diff --git a/examples/game-of-life/build/optimized.wasm b/examples/game-of-life/build/optimized.wasm index e96a54fc..12f1a666 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 a195eef3..1e9714ea 100644 --- a/examples/game-of-life/build/optimized.wat +++ b/examples/game-of-life/build/optimized.wat @@ -11,10 +11,10 @@ (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 "init" (func $assembly/index/init)) (export "step" (func $assembly/index/step)) (export "fill" (func $assembly/index/fill)) - (export "memory" (memory $0)) (func $assembly/index/init (; 1 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) ;;@ assembly/index.ts:29:2 diff --git a/examples/game-of-life/build/untouched.wat b/examples/game-of-life/build/untouched.wat index 8ca9bf04..436ae074 100644 --- a/examples/game-of-life/build/untouched.wat +++ b/examples/game-of-life/build/untouched.wat @@ -12,10 +12,10 @@ (global $assembly/index/h (mut i32) (i32.const 0)) (global $assembly/index/s (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 8)) + (export "memory" (memory $0)) (export "init" (func $assembly/index/init)) (export "step" (func $assembly/index/step)) (export "fill" (func $assembly/index/fill)) - (export "memory" (memory $0)) (func $assembly/index/init (; 1 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) diff --git a/examples/i64-polyfill/build/optimized.wat b/examples/i64-polyfill/build/optimized.wat index 8f74a27b..f69f9ce1 100644 --- a/examples/i64-polyfill/build/optimized.wat +++ b/examples/i64-polyfill/build/optimized.wat @@ -5,6 +5,7 @@ (global $assembly/i64/lo (mut i32) (i32.const 0)) (global $assembly/i64/hi (mut i32) (i32.const 0)) (memory $0 0) + (export "memory" (memory $0)) (export "getLo" (func $assembly/i64/getLo)) (export "getHi" (func $assembly/i64/getHi)) (export "clz" (func $assembly/i64/clz)) @@ -36,7 +37,6 @@ (export "gt_u" (func $assembly/i64/gt_u)) (export "ge_s" (func $assembly/i64/ge_s)) (export "ge_u" (func $assembly/i64/ge_u)) - (export "memory" (memory $0)) (func $assembly/i64/getLo (; 0 ;) (type $i) (result i32) ;;@ assembly/i64.ts:4:9 (get_global $assembly/i64/lo) diff --git a/examples/i64-polyfill/build/untouched.wat b/examples/i64-polyfill/build/untouched.wat index cab16526..5e81d0df 100644 --- a/examples/i64-polyfill/build/untouched.wat +++ b/examples/i64-polyfill/build/untouched.wat @@ -8,6 +8,7 @@ (global $Infinity f64 (f64.const inf)) (global $HEAP_BASE i32 (i32.const 8)) (memory $0 0) + (export "memory" (memory $0)) (export "getLo" (func $assembly/i64/getLo)) (export "getHi" (func $assembly/i64/getHi)) (export "clz" (func $assembly/i64/clz)) @@ -39,7 +40,6 @@ (export "gt_u" (func $assembly/i64/gt_u)) (export "ge_s" (func $assembly/i64/ge_s)) (export "ge_u" (func $assembly/i64/ge_u)) - (export "memory" (memory $0)) (func $assembly/i64/getLo (; 0 ;) (type $i) (result i32) ;;@ assembly/i64.ts:4:9 (get_global $assembly/i64/lo) diff --git a/examples/mandelbrot/build/optimized.wasm b/examples/mandelbrot/build/optimized.wasm index d460e0da..85b29a7e 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 b4fd7732..9039e811 100644 --- a/examples/mandelbrot/build/optimized.wat +++ b/examples/mandelbrot/build/optimized.wat @@ -5,8 +5,8 @@ (import "JSMath" "log" (func $~lib/math/JSMath.log (param f64) (result f64))) (import "JSMath" "LN2" (global $~lib/math/JSMath.LN2 f64)) (import "env" "memory" (memory $0 0)) - (export "computeLine" (func $assembly/index/computeLine)) (export "memory" (memory $0)) + (export "computeLine" (func $assembly/index/computeLine)) (func $assembly/index/computeLine (; 2 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 f64) (local $5 f64) diff --git a/examples/mandelbrot/build/untouched.wat b/examples/mandelbrot/build/untouched.wat index f5143619..e1ee20e4 100644 --- a/examples/mandelbrot/build/untouched.wat +++ b/examples/mandelbrot/build/untouched.wat @@ -9,18 +9,18 @@ (import "env" "memory" (memory $0 0)) (global $assembly/index/NUM_COLORS i32 (i32.const 2048)) (global $HEAP_BASE i32 (i32.const 8)) - (export "computeLine" (func $assembly/index/computeLine)) (export "memory" (memory $0)) - (func $isFinite (; 2 ;) (type $Fi) (param $0 f64) (result i32) - ;;@ ~lib/builtins.ts:26:26 + (export "computeLine" (func $assembly/index/computeLine)) + (func $~lib/builtins/isFinite (; 2 ;) (type $Fi) (param $0 f64) (result i32) + ;;@ ~lib/builtins.ts:16:70 (f64.eq - ;;@ ~lib/builtins.ts:26:9 + ;;@ ~lib/builtins.ts:16:53 (f64.sub (get_local $0) - ;;@ ~lib/builtins.ts:26:17 + ;;@ ~lib/builtins.ts:16:61 (get_local $0) ) - ;;@ ~lib/builtins.ts:26:26 + ;;@ ~lib/builtins.ts:16:70 (f64.const 0) ) ) @@ -375,7 +375,7 @@ (set_local $17 ;;@ assembly/index.ts:37:15 (if (result i32) - (call $isFinite + (call $~lib/builtins/isFinite ;;@ assembly/index.ts:37:24 (get_local $15) ) @@ -386,7 +386,7 @@ (f64.convert_s/i32 (i32.sub ;;@ assembly/index.ts:38:15 - (i32.const 2048) + (get_global $assembly/index/NUM_COLORS) ;;@ assembly/index.ts:38:28 (i32.const 1) ) @@ -421,7 +421,7 @@ ) ;;@ assembly/index.ts:39:8 (i32.sub - (i32.const 2048) + (get_global $assembly/index/NUM_COLORS) ;;@ assembly/index.ts:39:21 (i32.const 1) ) diff --git a/examples/n-body/build/index.asm.js b/examples/n-body/build/index.asm.js index 9f467fe1..3797ab4d 100644 --- a/examples/n-body/build/index.asm.js +++ b/examples/n-body/build/index.asm.js @@ -24,7 +24,6 @@ function asmFunc(global, env, buffer) { var $lib_allocator_arena_startOffset = 0; var $lib_allocator_arena_offset = 0; var assembly_index_system = 0; - var HEAP_BASE = 40; var i64toi32_i32$HIGH_BITS = 0; function $lib_allocator_arena___memory_allocate($0) { $0 = $0 | 0; @@ -81,7 +80,7 @@ function asmFunc(global, env, buffer) { return $0 | 0; } - function $lib_memory_memory_fill($0, $1, $2) { + function $lib_memory_memset($0, $1, $2) { $0 = $0 | 0; $1 = $1 | 0; $2 = $2 | 0; @@ -272,7 +271,7 @@ function asmFunc(global, env, buffer) { wasm2asm_i32$0 = $0; wasm2asm_i32$1 = $1; HEAP32[(wasm2asm_i32$0 + 4 | 0) >> 2] = wasm2asm_i32$1; - $lib_memory_memory_fill($3 + 8 | 0 | 0, 0 | 0, $2 | 0); + $lib_memory_memset($3 + 8 | 0 | 0, 0 | 0, $2 | 0); return $0 | 0; } @@ -492,7 +491,7 @@ function asmFunc(global, env, buffer) { } function start() { - $lib_allocator_arena_startOffset = (HEAP_BASE + 7 | 0) & 4294967288 | 0; + $lib_allocator_arena_startOffset = 40; $lib_allocator_arena_offset = $lib_allocator_arena_startOffset; } @@ -522,10 +521,6 @@ function asmFunc(global, env, buffer) { } return { - init: assembly_index_init, - getBody: assembly_index_getBody, - step: assembly_index_step, - bench: assembly_index_bench, memory: Object.create(Object.prototype, { grow: { value: __wasm_grow_memory @@ -536,6 +531,10 @@ function asmFunc(global, env, buffer) { } } - }) + }), + init: assembly_index_init, + getBody: assembly_index_getBody, + step: assembly_index_step, + bench: assembly_index_bench }; } diff --git a/examples/n-body/build/optimized.wasm b/examples/n-body/build/optimized.wasm index 380b0089..f7104678 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 24fbd49b..40bcbe76 100644 --- a/examples/n-body/build/optimized.wat +++ b/examples/n-body/build/optimized.wat @@ -13,14 +13,13 @@ (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)) - (global $HEAP_BASE i32 (i32.const 40)) (memory $0 1) (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (export "memory" (memory $0)) (export "init" (func $assembly/index/init)) (export "getBody" (func $assembly/index/getBody)) (export "step" (func $assembly/index/step)) (export "bench" (func $assembly/index/bench)) - (export "memory" (memory $0)) (start $start) (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) @@ -150,7 +149,7 @@ ) (get_local $0) ) - (func $~lib/memory/memory.fill (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) (if @@ -549,7 +548,7 @@ (get_local $0) (get_local $1) ) - (call $~lib/memory/memory.fill + (call $~lib/memory/memset (i32.add (get_local $3) (i32.const 8) @@ -1403,13 +1402,7 @@ ) (func $start (; 12 ;) (type $v) (set_global $~lib/allocator/arena/startOffset - (i32.and - (i32.add - (get_global $HEAP_BASE) - (i32.const 7) - ) - (i32.const -8) - ) + (i32.const 40) ) (set_global $~lib/allocator/arena/offset (get_global $~lib/allocator/arena/startOffset) diff --git a/examples/n-body/build/untouched.wat b/examples/n-body/build/untouched.wat index c01093ce..d5b7ee53 100644 --- a/examples/n-body/build/untouched.wat +++ b/examples/n-body/build/untouched.wat @@ -18,6 +18,7 @@ (global $~lib/internal/allocator/MAX_SIZE_32 i32 (i32.const 1073741824)) (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)) @@ -27,24 +28,13 @@ (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") + (export "memory" (memory $0)) (export "init" (func $assembly/index/init)) (export "getBody" (func $assembly/index/getBody)) (export "step" (func $assembly/index/step)) (export "bench" (func $assembly/index/bench)) - (export "memory" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 1 ;) (type $i) (result i32) - ;;@ ~lib/memory.ts:4:25 - (current_memory) - ) - (func $~lib/memory/memory.grow (; 2 ;) (type $ii) (param $0 i32) (result i32) - ;;@ ~lib/memory.ts:8:30 - (grow_memory - ;;@ ~lib/memory.ts:8:25 - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -63,7 +53,7 @@ (i32.gt_u (get_local $0) ;;@ ~lib/allocator/arena.ts:18:15 - (i32.const 1073741824) + (get_global $~lib/internal/allocator/MAX_SIZE_32) ) ;;@ ~lib/allocator/arena.ts:18:28 (unreachable) @@ -85,12 +75,12 @@ (get_local $0) ) ;;@ ~lib/allocator/arena.ts:20:31 - (i32.const 7) + (get_global $~lib/internal/allocator/AL_MASK) ) ;;@ ~lib/allocator/arena.ts:20:42 (i32.xor ;;@ ~lib/allocator/arena.ts:20:43 - (i32.const 7) + (get_global $~lib/internal/allocator/AL_MASK) (i32.const -1) ) ) @@ -98,7 +88,7 @@ ;;@ ~lib/allocator/arena.ts:21:4 (set_local $3 ;;@ ~lib/allocator/arena.ts:21:29 - (call $~lib/memory/memory.size) + (current_memory) ) ;;@ ~lib/allocator/arena.ts:22:4 (if @@ -164,7 +154,7 @@ ;;@ ~lib/allocator/arena.ts:25:10 (i32.lt_s ;;@ ~lib/allocator/arena.ts:25:17 - (call $~lib/memory/memory.grow + (grow_memory ;;@ ~lib/allocator/arena.ts:25:22 (get_local $5) ) @@ -176,7 +166,7 @@ ;;@ ~lib/allocator/arena.ts:26:12 (i32.lt_s ;;@ ~lib/allocator/arena.ts:26:19 - (call $~lib/memory/memory.grow + (grow_memory ;;@ ~lib/allocator/arena.ts:26:24 (get_local $4) ) @@ -203,17 +193,17 @@ ;;@ ~lib/allocator/arena.ts:34:9 (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) - ;;@ ~lib/memory.ts:144:4 + (func $~lib/memory/memory.allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) + ;;@ ~lib/memory.ts:37:4 (return - ;;@ ~lib/memory.ts:144:45 + ;;@ ~lib/memory.ts:37:45 (call $~lib/allocator/arena/__memory_allocate - ;;@ ~lib/memory.ts:144:63 + ;;@ ~lib/memory.ts:37:63 (get_local $0) ) ) ) - (func $assembly/index/Body#constructor (; 5 ;) (type $iFFFFFFFi) (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 (; 3 ;) (type $iFFFFFFFi) (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 $8 i32) (tee_local $0 (if (result i32) @@ -260,7 +250,7 @@ ) ) ) - (func $assembly/index/Sun (; 6 ;) (type $i) (result i32) + (func $assembly/index/Sun (; 4 ;) (type $i) (result i32) ;;@ assembly/index.ts:34:2 (call $assembly/index/Body#constructor (i32.const 0) @@ -277,10 +267,10 @@ ;;@ assembly/index.ts:33:29 (f64.const 0) ;;@ assembly/index.ts:33:34 - (f64.const 39.47841760435743) + (get_global $assembly/index/SOLAR_MASS) ) ) - (func $assembly/index/Jupiter (; 7 ;) (type $i) (result i32) + (func $assembly/index/Jupiter (; 5 ;) (type $i) (result i32) ;;@ assembly/index.ts:46:2 (call $assembly/index/Body#constructor (i32.const 0) @@ -294,29 +284,29 @@ (f64.mul (f64.const 0.001660076642744037) ;;@ assembly/index.ts:42:30 - (f64.const 365.24) + (get_global $assembly/index/DAYS_PER_YEAR) ) ;;@ assembly/index.ts:43:4 (f64.mul (f64.const 0.007699011184197404) ;;@ assembly/index.ts:43:30 - (f64.const 365.24) + (get_global $assembly/index/DAYS_PER_YEAR) ) ;;@ assembly/index.ts:44:4 (f64.mul (f64.const -6.90460016972063e-05) ;;@ assembly/index.ts:44:31 - (f64.const 365.24) + (get_global $assembly/index/DAYS_PER_YEAR) ) ;;@ assembly/index.ts:45:4 (f64.mul (f64.const 9.547919384243266e-04) ;;@ assembly/index.ts:45:30 - (f64.const 39.47841760435743) + (get_global $assembly/index/SOLAR_MASS) ) ) ) - (func $assembly/index/Saturn (; 8 ;) (type $i) (result i32) + (func $assembly/index/Saturn (; 6 ;) (type $i) (result i32) ;;@ assembly/index.ts:58:2 (call $assembly/index/Body#constructor (i32.const 0) @@ -330,29 +320,29 @@ (f64.mul (f64.const -0.002767425107268624) ;;@ assembly/index.ts:54:31 - (f64.const 365.24) + (get_global $assembly/index/DAYS_PER_YEAR) ) ;;@ assembly/index.ts:55:4 (f64.mul (f64.const 0.004998528012349172) ;;@ assembly/index.ts:55:30 - (f64.const 365.24) + (get_global $assembly/index/DAYS_PER_YEAR) ) ;;@ assembly/index.ts:56:4 (f64.mul (f64.const 2.3041729757376393e-05) ;;@ assembly/index.ts:56:30 - (f64.const 365.24) + (get_global $assembly/index/DAYS_PER_YEAR) ) ;;@ assembly/index.ts:57:4 (f64.mul (f64.const 2.858859806661308e-04) ;;@ assembly/index.ts:57:30 - (f64.const 39.47841760435743) + (get_global $assembly/index/SOLAR_MASS) ) ) ) - (func $assembly/index/Uranus (; 9 ;) (type $i) (result i32) + (func $assembly/index/Uranus (; 7 ;) (type $i) (result i32) ;;@ assembly/index.ts:70:2 (call $assembly/index/Body#constructor (i32.const 0) @@ -366,29 +356,29 @@ (f64.mul (f64.const 0.002964601375647616) ;;@ assembly/index.ts:66:30 - (f64.const 365.24) + (get_global $assembly/index/DAYS_PER_YEAR) ) ;;@ assembly/index.ts:67:4 (f64.mul (f64.const 2.3784717395948095e-03) ;;@ assembly/index.ts:67:30 - (f64.const 365.24) + (get_global $assembly/index/DAYS_PER_YEAR) ) ;;@ assembly/index.ts:68:4 (f64.mul (f64.const -2.9658956854023756e-05) ;;@ assembly/index.ts:68:31 - (f64.const 365.24) + (get_global $assembly/index/DAYS_PER_YEAR) ) ;;@ assembly/index.ts:69:4 (f64.mul (f64.const 4.366244043351563e-05) ;;@ assembly/index.ts:69:30 - (f64.const 39.47841760435743) + (get_global $assembly/index/SOLAR_MASS) ) ) ) - (func $assembly/index/Neptune (; 10 ;) (type $i) (result i32) + (func $assembly/index/Neptune (; 8 ;) (type $i) (result i32) ;;@ assembly/index.ts:82:2 (call $assembly/index/Body#constructor (i32.const 0) @@ -402,29 +392,29 @@ (f64.mul (f64.const 2.6806777249038932e-03) ;;@ assembly/index.ts:78:30 - (f64.const 365.24) + (get_global $assembly/index/DAYS_PER_YEAR) ) ;;@ assembly/index.ts:79:4 (f64.mul (f64.const 0.001628241700382423) ;;@ assembly/index.ts:79:30 - (f64.const 365.24) + (get_global $assembly/index/DAYS_PER_YEAR) ) ;;@ assembly/index.ts:80:4 (f64.mul (f64.const -9.515922545197159e-05) ;;@ assembly/index.ts:80:31 - (f64.const 365.24) + (get_global $assembly/index/DAYS_PER_YEAR) ) ;;@ assembly/index.ts:81:4 (f64.mul (f64.const 5.1513890204661145e-05) ;;@ assembly/index.ts:81:30 - (f64.const 39.47841760435743) + (get_global $assembly/index/SOLAR_MASS) ) ) ) - (func $~lib/internal/arraybuffer/computeSize (; 11 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/computeSize (; 9 ;) (type $ii) (param $0 i32) (result i32) ;;@ ~lib/internal/arraybuffer.ts:17:77 (i32.shl ;;@ ~lib/internal/arraybuffer.ts:17:9 @@ -440,7 +430,7 @@ (i32.add (get_local $0) ;;@ ~lib/internal/arraybuffer.ts:17:61 - (i32.const 8) + (get_global $~lib/internal/arraybuffer/HEADER_SIZE) ) ;;@ ~lib/internal/arraybuffer.ts:17:75 (i32.const 1) @@ -449,7 +439,7 @@ ) ) ) - (func $~lib/internal/arraybuffer/allocUnsafe (; 12 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocUnsafe (; 10 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) ;;@ ~lib/internal/arraybuffer.ts:22:2 (if @@ -458,7 +448,7 @@ (i32.le_u (get_local $0) ;;@ ~lib/internal/arraybuffer.ts:22:28 - (i32.const 1073741816) + (get_global $~lib/internal/arraybuffer/MAX_BLENGTH) ) ) (block @@ -492,519 +482,519 @@ ;;@ ~lib/internal/arraybuffer.ts:25:39 (get_local $1) ) - (func $~lib/memory/memory.fill (; 13 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 11 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) - ;;@ ~lib/memory.ts:17:4 + ;;@ ~lib/memory.ts:244:2 (if - ;;@ ~lib/memory.ts:17:8 + ;;@ ~lib/memory.ts:244:6 (i32.eqz - ;;@ ~lib/memory.ts:17:9 + ;;@ ~lib/memory.ts:244:7 (get_local $2) ) - ;;@ ~lib/memory.ts:17:12 + ;;@ ~lib/memory.ts:244:10 (return) ) - ;;@ ~lib/memory.ts:18:4 + ;;@ ~lib/memory.ts:245:2 (i32.store8 - ;;@ ~lib/memory.ts:18:14 + ;;@ ~lib/memory.ts:245:12 (get_local $0) - ;;@ ~lib/memory.ts:18:20 + ;;@ ~lib/memory.ts:245:18 (get_local $1) ) - ;;@ ~lib/memory.ts:19:4 + ;;@ ~lib/memory.ts:246:2 (i32.store8 - ;;@ ~lib/memory.ts:19:14 + ;;@ ~lib/memory.ts:246:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:19:21 + ;;@ ~lib/memory.ts:246:19 (get_local $2) ) - ;;@ ~lib/memory.ts:19:25 + ;;@ ~lib/memory.ts:246:23 (i32.const 1) ) - ;;@ ~lib/memory.ts:19:28 + ;;@ ~lib/memory.ts:246:26 (get_local $1) ) - ;;@ ~lib/memory.ts:20:4 + ;;@ ~lib/memory.ts:247:2 (if - ;;@ ~lib/memory.ts:20:8 + ;;@ ~lib/memory.ts:247:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:20:13 + ;;@ ~lib/memory.ts:247:11 (i32.const 2) ) - ;;@ ~lib/memory.ts:20:16 + ;;@ ~lib/memory.ts:247:14 (return) ) - ;;@ ~lib/memory.ts:22:4 + ;;@ ~lib/memory.ts:249:2 (i32.store8 - ;;@ ~lib/memory.ts:22:14 + ;;@ ~lib/memory.ts:249:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:22:21 + ;;@ ~lib/memory.ts:249:19 (i32.const 1) ) - ;;@ ~lib/memory.ts:22:24 + ;;@ ~lib/memory.ts:249:22 (get_local $1) ) - ;;@ ~lib/memory.ts:23:4 + ;;@ ~lib/memory.ts:250:2 (i32.store8 - ;;@ ~lib/memory.ts:23:14 + ;;@ ~lib/memory.ts:250:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:23:21 + ;;@ ~lib/memory.ts:250:19 (i32.const 2) ) - ;;@ ~lib/memory.ts:23:24 + ;;@ ~lib/memory.ts:250:22 (get_local $1) ) - ;;@ ~lib/memory.ts:24:4 + ;;@ ~lib/memory.ts:251:2 (i32.store8 - ;;@ ~lib/memory.ts:24:14 + ;;@ ~lib/memory.ts:251:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:24:21 + ;;@ ~lib/memory.ts:251:19 (get_local $2) ) - ;;@ ~lib/memory.ts:24:25 + ;;@ ~lib/memory.ts:251:23 (i32.const 2) ) - ;;@ ~lib/memory.ts:24:28 + ;;@ ~lib/memory.ts:251:26 (get_local $1) ) - ;;@ ~lib/memory.ts:25:4 + ;;@ ~lib/memory.ts:252:2 (i32.store8 - ;;@ ~lib/memory.ts:25:14 + ;;@ ~lib/memory.ts:252:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:25:21 + ;;@ ~lib/memory.ts:252:19 (get_local $2) ) - ;;@ ~lib/memory.ts:25:25 + ;;@ ~lib/memory.ts:252:23 (i32.const 3) ) - ;;@ ~lib/memory.ts:25:28 + ;;@ ~lib/memory.ts:252:26 (get_local $1) ) - ;;@ ~lib/memory.ts:26:4 + ;;@ ~lib/memory.ts:253:2 (if - ;;@ ~lib/memory.ts:26:8 + ;;@ ~lib/memory.ts:253:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:26:13 + ;;@ ~lib/memory.ts:253:11 (i32.const 6) ) - ;;@ ~lib/memory.ts:26:16 + ;;@ ~lib/memory.ts:253:14 (return) ) - ;;@ ~lib/memory.ts:27:4 + ;;@ ~lib/memory.ts:254:2 (i32.store8 - ;;@ ~lib/memory.ts:27:14 + ;;@ ~lib/memory.ts:254:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:27:21 + ;;@ ~lib/memory.ts:254:19 (i32.const 3) ) - ;;@ ~lib/memory.ts:27:24 + ;;@ ~lib/memory.ts:254:22 (get_local $1) ) - ;;@ ~lib/memory.ts:28:4 + ;;@ ~lib/memory.ts:255:2 (i32.store8 - ;;@ ~lib/memory.ts:28:14 + ;;@ ~lib/memory.ts:255:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:28:21 + ;;@ ~lib/memory.ts:255:19 (get_local $2) ) - ;;@ ~lib/memory.ts:28:25 + ;;@ ~lib/memory.ts:255:23 (i32.const 4) ) - ;;@ ~lib/memory.ts:28:28 + ;;@ ~lib/memory.ts:255:26 (get_local $1) ) - ;;@ ~lib/memory.ts:29:4 + ;;@ ~lib/memory.ts:256:2 (if - ;;@ ~lib/memory.ts:29:8 + ;;@ ~lib/memory.ts:256:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:29:13 + ;;@ ~lib/memory.ts:256:11 (i32.const 8) ) - ;;@ ~lib/memory.ts:29:16 + ;;@ ~lib/memory.ts:256:14 (return) ) - ;;@ ~lib/memory.ts:32:4 + ;;@ ~lib/memory.ts:259:2 (set_local $3 - ;;@ ~lib/memory.ts:32:19 + ;;@ ~lib/memory.ts:259:17 (i32.and (i32.sub (i32.const 0) - ;;@ ~lib/memory.ts:32:20 + ;;@ ~lib/memory.ts:259:18 (get_local $0) ) - ;;@ ~lib/memory.ts:32:27 + ;;@ ~lib/memory.ts:259:25 (i32.const 3) ) ) - ;;@ ~lib/memory.ts:33:4 + ;;@ ~lib/memory.ts:260:2 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:33:12 + ;;@ ~lib/memory.ts:260:10 (get_local $3) ) ) - ;;@ ~lib/memory.ts:34:4 + ;;@ ~lib/memory.ts:261:2 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:34:9 + ;;@ ~lib/memory.ts:261:7 (get_local $3) ) ) - ;;@ ~lib/memory.ts:35:4 + ;;@ ~lib/memory.ts:262:2 (set_local $2 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:35:9 + ;;@ ~lib/memory.ts:262:7 (i32.const -4) ) ) - ;;@ ~lib/memory.ts:37:4 + ;;@ ~lib/memory.ts:264:2 (set_local $4 - ;;@ ~lib/memory.ts:37:19 + ;;@ ~lib/memory.ts:264:17 (i32.mul (i32.div_u (i32.const -1) - ;;@ ~lib/memory.ts:37:29 + ;;@ ~lib/memory.ts:264:27 (i32.const 255) ) (i32.and - ;;@ ~lib/memory.ts:37:35 + ;;@ ~lib/memory.ts:264:33 (get_local $1) (i32.const 255) ) ) ) - ;;@ ~lib/memory.ts:40:4 + ;;@ ~lib/memory.ts:267:2 (i32.store - ;;@ ~lib/memory.ts:40:15 + ;;@ ~lib/memory.ts:267:13 (get_local $0) - ;;@ ~lib/memory.ts:40:21 + ;;@ ~lib/memory.ts:267:19 (get_local $4) ) - ;;@ ~lib/memory.ts:41:4 + ;;@ ~lib/memory.ts:268:2 (i32.store - ;;@ ~lib/memory.ts:41:15 + ;;@ ~lib/memory.ts:268:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:41:22 + ;;@ ~lib/memory.ts:268:20 (get_local $2) ) - ;;@ ~lib/memory.ts:41:26 + ;;@ ~lib/memory.ts:268:24 (i32.const 4) ) - ;;@ ~lib/memory.ts:41:29 + ;;@ ~lib/memory.ts:268:27 (get_local $4) ) - ;;@ ~lib/memory.ts:42:4 + ;;@ ~lib/memory.ts:269:2 (if - ;;@ ~lib/memory.ts:42:8 + ;;@ ~lib/memory.ts:269:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:42:13 + ;;@ ~lib/memory.ts:269:11 (i32.const 8) ) - ;;@ ~lib/memory.ts:42:16 + ;;@ ~lib/memory.ts:269:14 (return) ) - ;;@ ~lib/memory.ts:43:4 + ;;@ ~lib/memory.ts:270:2 (i32.store - ;;@ ~lib/memory.ts:43:15 + ;;@ ~lib/memory.ts:270:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:43:22 + ;;@ ~lib/memory.ts:270:20 (i32.const 4) ) - ;;@ ~lib/memory.ts:43:25 + ;;@ ~lib/memory.ts:270:23 (get_local $4) ) - ;;@ ~lib/memory.ts:44:4 + ;;@ ~lib/memory.ts:271:2 (i32.store - ;;@ ~lib/memory.ts:44:15 + ;;@ ~lib/memory.ts:271:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:44:22 + ;;@ ~lib/memory.ts:271:20 (i32.const 8) ) - ;;@ ~lib/memory.ts:44:25 + ;;@ ~lib/memory.ts:271:23 (get_local $4) ) - ;;@ ~lib/memory.ts:45:4 + ;;@ ~lib/memory.ts:272:2 (i32.store - ;;@ ~lib/memory.ts:45:15 + ;;@ ~lib/memory.ts:272:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:45:22 + ;;@ ~lib/memory.ts:272:20 (get_local $2) ) - ;;@ ~lib/memory.ts:45:26 + ;;@ ~lib/memory.ts:272:24 (i32.const 12) ) - ;;@ ~lib/memory.ts:45:30 + ;;@ ~lib/memory.ts:272:28 (get_local $4) ) - ;;@ ~lib/memory.ts:46:4 + ;;@ ~lib/memory.ts:273:2 (i32.store - ;;@ ~lib/memory.ts:46:15 + ;;@ ~lib/memory.ts:273:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:46:22 + ;;@ ~lib/memory.ts:273:20 (get_local $2) ) - ;;@ ~lib/memory.ts:46:26 + ;;@ ~lib/memory.ts:273:24 (i32.const 8) ) - ;;@ ~lib/memory.ts:46:29 + ;;@ ~lib/memory.ts:273:27 (get_local $4) ) - ;;@ ~lib/memory.ts:47:4 + ;;@ ~lib/memory.ts:274:2 (if - ;;@ ~lib/memory.ts:47:8 + ;;@ ~lib/memory.ts:274:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:47:13 + ;;@ ~lib/memory.ts:274:11 (i32.const 24) ) - ;;@ ~lib/memory.ts:47:17 + ;;@ ~lib/memory.ts:274:15 (return) ) - ;;@ ~lib/memory.ts:48:4 + ;;@ ~lib/memory.ts:275:2 (i32.store - ;;@ ~lib/memory.ts:48:15 + ;;@ ~lib/memory.ts:275:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:48:22 + ;;@ ~lib/memory.ts:275:20 (i32.const 12) ) - ;;@ ~lib/memory.ts:48:26 + ;;@ ~lib/memory.ts:275:24 (get_local $4) ) - ;;@ ~lib/memory.ts:49:4 + ;;@ ~lib/memory.ts:276:2 (i32.store - ;;@ ~lib/memory.ts:49:15 + ;;@ ~lib/memory.ts:276:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:49:22 + ;;@ ~lib/memory.ts:276:20 (i32.const 16) ) - ;;@ ~lib/memory.ts:49:26 + ;;@ ~lib/memory.ts:276:24 (get_local $4) ) - ;;@ ~lib/memory.ts:50:4 + ;;@ ~lib/memory.ts:277:2 (i32.store - ;;@ ~lib/memory.ts:50:15 + ;;@ ~lib/memory.ts:277:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:50:22 + ;;@ ~lib/memory.ts:277:20 (i32.const 20) ) - ;;@ ~lib/memory.ts:50:26 + ;;@ ~lib/memory.ts:277:24 (get_local $4) ) - ;;@ ~lib/memory.ts:51:4 + ;;@ ~lib/memory.ts:278:2 (i32.store - ;;@ ~lib/memory.ts:51:15 + ;;@ ~lib/memory.ts:278:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:51:22 + ;;@ ~lib/memory.ts:278:20 (i32.const 24) ) - ;;@ ~lib/memory.ts:51:26 + ;;@ ~lib/memory.ts:278:24 (get_local $4) ) - ;;@ ~lib/memory.ts:52:4 + ;;@ ~lib/memory.ts:279:2 (i32.store - ;;@ ~lib/memory.ts:52:15 + ;;@ ~lib/memory.ts:279:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:52:22 + ;;@ ~lib/memory.ts:279:20 (get_local $2) ) - ;;@ ~lib/memory.ts:52:26 + ;;@ ~lib/memory.ts:279:24 (i32.const 28) ) - ;;@ ~lib/memory.ts:52:30 + ;;@ ~lib/memory.ts:279:28 (get_local $4) ) - ;;@ ~lib/memory.ts:53:4 + ;;@ ~lib/memory.ts:280:2 (i32.store - ;;@ ~lib/memory.ts:53:15 + ;;@ ~lib/memory.ts:280:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:53:22 + ;;@ ~lib/memory.ts:280:20 (get_local $2) ) - ;;@ ~lib/memory.ts:53:26 + ;;@ ~lib/memory.ts:280:24 (i32.const 24) ) - ;;@ ~lib/memory.ts:53:30 + ;;@ ~lib/memory.ts:280:28 (get_local $4) ) - ;;@ ~lib/memory.ts:54:4 + ;;@ ~lib/memory.ts:281:2 (i32.store - ;;@ ~lib/memory.ts:54:15 + ;;@ ~lib/memory.ts:281:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:54:22 + ;;@ ~lib/memory.ts:281:20 (get_local $2) ) - ;;@ ~lib/memory.ts:54:26 + ;;@ ~lib/memory.ts:281:24 (i32.const 20) ) - ;;@ ~lib/memory.ts:54:30 + ;;@ ~lib/memory.ts:281:28 (get_local $4) ) - ;;@ ~lib/memory.ts:55:4 + ;;@ ~lib/memory.ts:282:2 (i32.store - ;;@ ~lib/memory.ts:55:15 + ;;@ ~lib/memory.ts:282:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:55:22 + ;;@ ~lib/memory.ts:282:20 (get_local $2) ) - ;;@ ~lib/memory.ts:55:26 + ;;@ ~lib/memory.ts:282:24 (i32.const 16) ) - ;;@ ~lib/memory.ts:55:30 + ;;@ ~lib/memory.ts:282:28 (get_local $4) ) - ;;@ ~lib/memory.ts:58:4 + ;;@ ~lib/memory.ts:285:2 (set_local $3 - ;;@ ~lib/memory.ts:58:8 + ;;@ ~lib/memory.ts:285:6 (i32.add (i32.const 24) - ;;@ ~lib/memory.ts:58:13 + ;;@ ~lib/memory.ts:285:11 (i32.and - ;;@ ~lib/memory.ts:58:14 + ;;@ ~lib/memory.ts:285:12 (get_local $0) - ;;@ ~lib/memory.ts:58:21 + ;;@ ~lib/memory.ts:285:19 (i32.const 4) ) ) ) - ;;@ ~lib/memory.ts:59:4 + ;;@ ~lib/memory.ts:286:2 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:59:12 + ;;@ ~lib/memory.ts:286:10 (get_local $3) ) ) - ;;@ ~lib/memory.ts:60:4 + ;;@ ~lib/memory.ts:287:2 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:60:9 + ;;@ ~lib/memory.ts:287:7 (get_local $3) ) ) - ;;@ ~lib/memory.ts:63:4 + ;;@ ~lib/memory.ts:290:2 (set_local $5 - ;;@ ~lib/memory.ts:63:19 + ;;@ ~lib/memory.ts:290:17 (i64.or (i64.extend_u/i32 (get_local $4) ) - ;;@ ~lib/memory.ts:63:30 + ;;@ ~lib/memory.ts:290:28 (i64.shl - ;;@ ~lib/memory.ts:63:31 + ;;@ ~lib/memory.ts:290:29 (i64.extend_u/i32 (get_local $4) ) - ;;@ ~lib/memory.ts:63:43 + ;;@ ~lib/memory.ts:290:41 (i64.const 32) ) ) ) - ;;@ ~lib/memory.ts:64:4 + ;;@ ~lib/memory.ts:291:2 (block $break|0 (loop $continue|0 (if - ;;@ ~lib/memory.ts:64:11 + ;;@ ~lib/memory.ts:291:9 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:64:16 + ;;@ ~lib/memory.ts:291:14 (i32.const 32) ) (block (block - ;;@ ~lib/memory.ts:65:6 + ;;@ ~lib/memory.ts:292:4 (i64.store - ;;@ ~lib/memory.ts:65:17 + ;;@ ~lib/memory.ts:292:15 (get_local $0) - ;;@ ~lib/memory.ts:65:23 + ;;@ ~lib/memory.ts:292:21 (get_local $5) ) - ;;@ ~lib/memory.ts:66:6 + ;;@ ~lib/memory.ts:293:4 (i64.store - ;;@ ~lib/memory.ts:66:17 + ;;@ ~lib/memory.ts:293:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:66:24 + ;;@ ~lib/memory.ts:293:22 (i32.const 8) ) - ;;@ ~lib/memory.ts:66:27 + ;;@ ~lib/memory.ts:293:25 (get_local $5) ) - ;;@ ~lib/memory.ts:67:6 + ;;@ ~lib/memory.ts:294:4 (i64.store - ;;@ ~lib/memory.ts:67:17 + ;;@ ~lib/memory.ts:294:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:67:24 + ;;@ ~lib/memory.ts:294:22 (i32.const 16) ) - ;;@ ~lib/memory.ts:67:28 + ;;@ ~lib/memory.ts:294:26 (get_local $5) ) - ;;@ ~lib/memory.ts:68:6 + ;;@ ~lib/memory.ts:295:4 (i64.store - ;;@ ~lib/memory.ts:68:17 + ;;@ ~lib/memory.ts:295:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:68:24 + ;;@ ~lib/memory.ts:295:22 (i32.const 24) ) - ;;@ ~lib/memory.ts:68:28 + ;;@ ~lib/memory.ts:295:26 (get_local $5) ) - ;;@ ~lib/memory.ts:69:6 + ;;@ ~lib/memory.ts:296:4 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:69:11 + ;;@ ~lib/memory.ts:296:9 (i32.const 32) ) ) - ;;@ ~lib/memory.ts:70:6 + ;;@ ~lib/memory.ts:297:4 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:70:14 + ;;@ ~lib/memory.ts:297:12 (i32.const 32) ) ) @@ -1015,7 +1005,18 @@ ) ) ) - (func $~lib/array/Array#constructor (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/memory/memory.fill (; 12 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + ;;@ ~lib/memory.ts:11:4 + (call $~lib/memory/memset + ;;@ ~lib/memory.ts:11:11 + (get_local $0) + ;;@ ~lib/memory.ts:11:17 + (get_local $1) + ;;@ ~lib/memory.ts:11:20 + (get_local $2) + ) + ) + (func $~lib/array/Array#constructor (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1096,7 +1097,7 @@ (i32.add (get_local $3) ;;@ ~lib/array.ts:29:34 - (i32.const 8) + (get_global $~lib/internal/arraybuffer/HEADER_SIZE) ) ;;@ ~lib/array.ts:30:6 (i32.const 0) @@ -1105,7 +1106,7 @@ ) (get_local $0) ) - (func $~lib/array/Array#__unchecked_set (; 15 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 14 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) ;;@ ~lib/array.ts:96:4 (block $~lib/internal/arraybuffer/storeUnsafe|inlined.0 @@ -1133,14 +1134,14 @@ ) ) ) - (func $~lib/array/Array#get:length (; 16 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 15 ;) (type $ii) (param $0 i32) (result i32) ;;@ ~lib/array.ts:36:16 (i32.load offset=4 ;;@ ~lib/array.ts:36:11 (get_local $0) ) ) - (func $~lib/array/Array#__unchecked_get (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) ;;@ ~lib/array.ts:77:46 (block $~lib/internal/arraybuffer/loadUnsafe|inlined.0 (result i32) @@ -1166,7 +1167,7 @@ ) ) ) - (func $~lib/array/Array#__get (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) ;;@ ~lib/array.ts:69:4 (set_local $2 @@ -1211,7 +1212,7 @@ (unreachable) ) ) - (func $assembly/index/Body#offsetMomentum (; 19 ;) (type $iFFFi) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (func $assembly/index/Body#offsetMomentum (; 18 ;) (type $iFFFi) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) ;;@ assembly/index.ts:24:4 (f64.store offset=24 (get_local $0) @@ -1222,7 +1223,7 @@ (get_local $1) ) ;;@ assembly/index.ts:24:20 - (f64.const 39.47841760435743) + (get_global $assembly/index/SOLAR_MASS) ) ) ;;@ assembly/index.ts:25:4 @@ -1235,7 +1236,7 @@ (get_local $2) ) ;;@ assembly/index.ts:25:20 - (f64.const 39.47841760435743) + (get_global $assembly/index/SOLAR_MASS) ) ) ;;@ assembly/index.ts:26:4 @@ -1248,13 +1249,13 @@ (get_local $3) ) ;;@ assembly/index.ts:26:20 - (f64.const 39.47841760435743) + (get_global $assembly/index/SOLAR_MASS) ) ) ;;@ assembly/index.ts:27:11 (get_local $0) ) - (func $assembly/index/NBodySystem#constructor (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $assembly/index/NBodySystem#constructor (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 f64) (local $3 f64) (local $4 f64) @@ -1412,7 +1413,7 @@ ) ) ) - (func $assembly/index/init (; 21 ;) (type $v) + (func $assembly/index/init (; 20 ;) (type $v) (local $0 i32) ;;@ assembly/index.ts:191:2 (set_global $assembly/index/system @@ -1462,7 +1463,7 @@ ) ) ) - (func $assembly/index/getBody (; 22 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/index/getBody (; 21 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) ;;@ assembly/index.ts:201:2 (set_local $1 @@ -1492,7 +1493,7 @@ (i32.const 0) ) ) - (func $assembly/index/NBodySystem#advance (; 23 ;) (type $iFv) (param $0 i32) (param $1 f64) + (func $assembly/index/NBodySystem#advance (; 22 ;) (type $iFv) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1913,7 +1914,7 @@ ) ) ) - (func $assembly/index/NBodySystem#energy (; 24 ;) (type $iF) (param $0 i32) (result f64) + (func $assembly/index/NBodySystem#energy (; 23 ;) (type $iF) (param $0 i32) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -2214,7 +2215,7 @@ ;;@ assembly/index.ts:184:11 (get_local $1) ) - (func $assembly/index/step (; 25 ;) (type $F) (result f64) + (func $assembly/index/step (; 24 ;) (type $F) (result f64) ;;@ assembly/index.ts:206:9 (call $assembly/index/NBodySystem#advance ;;@ assembly/index.ts:206:2 @@ -2228,7 +2229,7 @@ (get_global $assembly/index/system) ) ) - (func $assembly/index/bench (; 26 ;) (type $iv) (param $0 i32) + (func $assembly/index/bench (; 25 ;) (type $iv) (param $0 i32) (local $1 i32) ;;@ assembly/index.ts:211:2 (block $break|0 @@ -2266,7 +2267,7 @@ ) ) ) - (func $start (; 27 ;) (type $v) + (func $start (; 26 ;) (type $v) (set_global $~lib/allocator/arena/startOffset ;;@ ~lib/allocator/arena.ts:12:25 (i32.and @@ -2274,12 +2275,12 @@ ;;@ ~lib/allocator/arena.ts:12:26 (get_global $HEAP_BASE) ;;@ ~lib/allocator/arena.ts:12:38 - (i32.const 7) + (get_global $~lib/internal/allocator/AL_MASK) ) ;;@ ~lib/allocator/arena.ts:12:49 (i32.xor ;;@ ~lib/allocator/arena.ts:12:50 - (i32.const 7) + (get_global $~lib/internal/allocator/AL_MASK) (i32.const -1) ) ) diff --git a/examples/pson/build/optimized.wat b/examples/pson/build/optimized.wat index eb045a4a..7f3aa416 100644 --- a/examples/pson/build/optimized.wat +++ b/examples/pson/build/optimized.wat @@ -22,6 +22,7 @@ (import "pson" "onBinary" (func $assembly/pson/onBinary (param i32 i32))) (global $assembly/pson/offset (mut i32) (i32.const 0)) (memory $0 0) + (export "memory" (memory $0)) (export "onNull" (func $assembly/pson/onNull)) (export "onTrue" (func $assembly/pson/onTrue)) (export "onFalse" (func $assembly/pson/onFalse)) @@ -37,7 +38,6 @@ (export "onString" (func $assembly/pson/onString)) (export "onBinary" (func $assembly/pson/onBinary)) (export "decode" (func $assembly/pson/decode)) - (export "memory" (memory $0)) (func $assembly/pson/readVarint32 (; 14 ;) (type $i) (result i32) (local $0 i32) (local $1 i32) @@ -190,54 +190,59 @@ (block $case3|0 (block $case2|0 (block $case1|0 - (block $case0|0 - (block $tablify|0 + (if + ;;@ assembly/pson.ts:46:28 + (block (result i32) (set_global $assembly/pson/offset (i32.add (tee_local $1 - ;;@ assembly/pson.ts:46:28 (get_global $assembly/pson/offset) ) (i32.const 1) ) ) - (br_table $case0|0 $case1|0 $case2|0 $case3|0 $case4|0 $case5|0 $case6|0 $case7|0 $case8|0 $case9|0 $case10|0 $case11|0 $case12|0 $tablify|0 - (i32.sub - (tee_local $1 - ;;@ assembly/pson.ts:46:2 - (tee_local $0 - ;;@ assembly/pson.ts:46:19 - (i32.load8_u - (get_local $1) - ) + (i32.ne + (tee_local $1 + ;;@ assembly/pson.ts:46:2 + (tee_local $0 + ;;@ assembly/pson.ts:46:19 + (i32.load8_u + (get_local $1) ) ) - (i32.const 240) ) + (i32.const 240) ) ) - (br_if $case14|0 - (i32.or + (block + (block $tablify|0 + (br_table $case1|0 $case2|0 $case3|0 $case4|0 $case5|0 $case6|0 $case7|0 $case8|0 $case9|0 $case10|0 $case11|0 $case12|0 $tablify|0 + (i32.sub + (get_local $1) + (i32.const 241) + ) + ) + ) + (br_if $case14|0 + (i32.or + (i32.eq + (get_local $1) + (i32.const 253) + ) + (i32.eq + (get_local $1) + (i32.const 254) + ) + ) + ) + (br_if $case15|0 (i32.eq (get_local $1) - ;;@ assembly/pson.ts:112:9 - (i32.const 253) - ) - (i32.eq - (get_local $1) - ;;@ assembly/pson.ts:113:9 - (i32.const 254) + (i32.const 255) ) ) + (br $case16|0) ) - (br_if $case15|0 - (i32.eq - (get_local $1) - ;;@ assembly/pson.ts:118:9 - (i32.const 255) - ) - ) - (br $case16|0) ) ;;@ assembly/pson.ts:51:6 (call $assembly/pson/onNull) @@ -500,7 +505,6 @@ ;;@ assembly/pson.ts:125:10 (i32.gt_u (get_local $0) - ;;@ assembly/pson.ts:125:18 (i32.const 239) ) ;;@ assembly/pson.ts:125:34 diff --git a/examples/pson/build/untouched.wat b/examples/pson/build/untouched.wat index 2d357852..4cbfd94c 100644 --- a/examples/pson/build/untouched.wat +++ b/examples/pson/build/untouched.wat @@ -41,6 +41,7 @@ (global $assembly/pson/Token.BINARY i32 (i32.const 255)) (global $HEAP_BASE i32 (i32.const 8)) (memory $0 0) + (export "memory" (memory $0)) (export "onNull" (func $assembly/pson/onNull)) (export "onTrue" (func $assembly/pson/onTrue)) (export "onFalse" (func $assembly/pson/onFalse)) @@ -56,7 +57,6 @@ (export "onString" (func $assembly/pson/onString)) (export "onBinary" (func $assembly/pson/onBinary)) (export "decode" (func $assembly/pson/decode)) - (export "memory" (memory $0)) (func $assembly/pson/readVarint32 (; 14 ;) (type $i) (result i32) (local $0 i32) (local $1 i32) @@ -283,112 +283,112 @@ (i32.eq (get_local $0) ;;@ assembly/pson.ts:50:9 - (i32.const 240) + (get_global $assembly/pson/Token.NULL) ) ) (br_if $case1|0 (i32.eq (get_local $0) ;;@ assembly/pson.ts:54:9 - (i32.const 241) + (get_global $assembly/pson/Token.TRUE) ) ) (br_if $case2|0 (i32.eq (get_local $0) ;;@ assembly/pson.ts:58:9 - (i32.const 242) + (get_global $assembly/pson/Token.FALSE) ) ) (br_if $case3|0 (i32.eq (get_local $0) ;;@ assembly/pson.ts:62:9 - (i32.const 243) + (get_global $assembly/pson/Token.EOBJECT) ) ) (br_if $case4|0 (i32.eq (get_local $0) ;;@ assembly/pson.ts:66:9 - (i32.const 244) + (get_global $assembly/pson/Token.EARRAY) ) ) (br_if $case5|0 (i32.eq (get_local $0) ;;@ assembly/pson.ts:70:9 - (i32.const 245) + (get_global $assembly/pson/Token.ESTRING) ) ) (br_if $case6|0 (i32.eq (get_local $0) ;;@ assembly/pson.ts:74:9 - (i32.const 246) + (get_global $assembly/pson/Token.OBJECT) ) ) (br_if $case7|0 (i32.eq (get_local $0) ;;@ assembly/pson.ts:82:9 - (i32.const 247) + (get_global $assembly/pson/Token.ARRAY) ) ) (br_if $case8|0 (i32.eq (get_local $0) ;;@ assembly/pson.ts:87:9 - (i32.const 248) + (get_global $assembly/pson/Token.INTEGER) ) ) (br_if $case9|0 (i32.eq (get_local $0) ;;@ assembly/pson.ts:91:9 - (i32.const 249) + (get_global $assembly/pson/Token.LONG) ) ) (br_if $case10|0 (i32.eq (get_local $0) ;;@ assembly/pson.ts:96:9 - (i32.const 250) + (get_global $assembly/pson/Token.FLOAT) ) ) (br_if $case11|0 (i32.eq (get_local $0) ;;@ assembly/pson.ts:101:9 - (i32.const 251) + (get_global $assembly/pson/Token.DOUBLE) ) ) (br_if $case12|0 (i32.eq (get_local $0) ;;@ assembly/pson.ts:106:9 - (i32.const 252) + (get_global $assembly/pson/Token.STRING) ) ) (br_if $case13|0 (i32.eq (get_local $0) ;;@ assembly/pson.ts:112:9 - (i32.const 253) + (get_global $assembly/pson/Token.STRING_ADD) ) ) (br_if $case14|0 (i32.eq (get_local $0) ;;@ assembly/pson.ts:113:9 - (i32.const 254) + (get_global $assembly/pson/Token.STRING_GET) ) ) (br_if $case15|0 (i32.eq (get_local $0) ;;@ assembly/pson.ts:118:9 - (i32.const 255) + (get_global $assembly/pson/Token.BINARY) ) ) (br $case16|0) @@ -716,7 +716,7 @@ (i32.gt_u (get_local $1) ;;@ assembly/pson.ts:125:18 - (i32.const 239) + (get_global $assembly/pson/Token.MAX) ) ;;@ assembly/pson.ts:125:34 (unreachable) diff --git a/src/ast.ts b/src/ast.ts index 53bc8f85..ed3d07cf 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -1122,7 +1122,8 @@ export enum DecoratorKind { UNMANAGED, SEALED, INLINE, - EXTERNAL + EXTERNAL, + BUILTIN } /** Returns the kind of the specified decorator. Defaults to {@link DecoratorKind.CUSTOM}. */ @@ -1132,6 +1133,10 @@ export function decoratorNameToKind(name: Expression): DecoratorKind { let nameStr = (name).text; assert(nameStr.length); switch (nameStr.charCodeAt(0)) { + case CharCode.b: { + if (nameStr == "builtin") return DecoratorKind.BUILTIN; + break; + } case CharCode.e: { if (nameStr == "external") return DecoratorKind.EXTERNAL; break; diff --git a/src/builtins.ts b/src/builtins.ts index 38ef7b44..a22db6fa 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -1871,7 +1871,7 @@ export function compileCall( // host operations - case "__memory_size": { // __memory_size() -> i32 + case "memory.size": { // memory.size() -> i32 compiler.currentType = Type.i32; if (operands.length != 0) { compiler.error( @@ -1887,7 +1887,7 @@ export function compileCall( } return module.createHost(HostOp.CurrentMemory); } - case "__memory_grow": { // __memory_grow(pages: i32) -> i32 + case "memory.grow": { // memory.grow(pages: i32) -> i32 compiler.currentType = Type.i32; if (operands.length != 1) { compiler.error( @@ -1907,7 +1907,7 @@ export function compileCall( return module.createHost(HostOp.GrowMemory, null, [ arg0 ]); } // see: https://github.com/WebAssembly/bulk-memory-operations - case "__memory_copy": { // __memory_copy(dest: usize, src: usize: n: usize) -> void + case "memory.copy": { // memory.copy(dest: usize, src: usize: n: usize) -> void if (typeArguments) { compiler.error( DiagnosticCode.Type_0_is_not_generic, @@ -1944,7 +1944,7 @@ export function compileCall( throw new Error("not implemented"); // return module.createHost(HostOp.MoveMemory, null, [ arg0, arg1, arg2 ]); } - case "__memory_fill": { // __memory_fill(dest: usize, value: u8, n: usize) -> void + case "memory.fill": { // memory.fill(dest: usize, value: u8, n: usize) -> void if (typeArguments) { compiler.error( DiagnosticCode.Type_0_is_not_generic, @@ -2629,7 +2629,7 @@ export function compileCall( // gc - case "__gc_iterate_roots": { + case "gc.iterateRoots": { // TOOD: make it so that this can only be called from a library file? if (typeArguments) { compiler.error( diff --git a/src/common.ts b/src/common.ts index 783cdbb8..638e3cba 100644 --- a/src/common.ts +++ b/src/common.ts @@ -58,24 +58,22 @@ export enum CommonFlags { // Compilation states - /** Is a builtin. */ - BUILTIN = 1 << 21, /** Is compiled. */ - COMPILED = 1 << 22, + COMPILED = 1 << 21, /** Has a constant value and is therefore inlined. */ - INLINED = 1 << 23, + INLINED = 1 << 22, /** Is scoped. */ - SCOPED = 1 << 24, + SCOPED = 1 << 23, /** Is a trampoline. */ - TRAMPOLINE = 1 << 25, + TRAMPOLINE = 1 << 24, /** Is a virtual method. */ - VIRTUAL = 1 << 26, + VIRTUAL = 1 << 25, /** Is the main function. */ - MAIN = 1 << 27, + MAIN = 1 << 26, // Other - QUOTED = 1 << 28 + QUOTED = 1 << 27 } /** Path delimiter inserted between file system levels. */ diff --git a/src/compiler.ts b/src/compiler.ts index 52748a37..ff5c4193 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -727,7 +727,7 @@ export class Compiler extends DiagnosticEmitter { } // ambient builtins like 'HEAP_BASE' need to be resolved but are added explicitly - if (global.is(CommonFlags.AMBIENT | CommonFlags.BUILTIN)) return true; + if (global.is(CommonFlags.AMBIENT) && global.hasDecorator(DecoratorFlags.BUILTIN)) return true; var nativeType = global.type.toNativeType(); var isDeclaredConstant = global.is(CommonFlags.CONST) || global.is(CommonFlags.STATIC | CommonFlags.READONLY); @@ -1007,7 +1007,7 @@ export class Compiler extends DiagnosticEmitter { /** Compiles a readily resolved function instance. */ compileFunction(instance: Function): bool { if (instance.is(CommonFlags.COMPILED)) return true; - assert(!instance.is(CommonFlags.AMBIENT | CommonFlags.BUILTIN)); + assert(!(instance.is(CommonFlags.AMBIENT) && instance.hasDecorator(DecoratorFlags.BUILTIN))); instance.set(CommonFlags.COMPILED); // check that modifiers are matching @@ -1229,6 +1229,7 @@ export class Compiler extends DiagnosticEmitter { noTreeShaking || (element).is(CommonFlags.EXPORT) ) && !(element).is(CommonFlags.GENERIC) ) { + if (element.hasDecorator(DecoratorFlags.BUILTIN)) break; this.compileFunctionUsingTypeArguments( element, [], @@ -2342,7 +2343,8 @@ export class Compiler extends DiagnosticEmitter { : this.module.createI64(0); } case TypeKind.F64: { - if (!(element.is(CommonFlags.BUILTIN) && contextualType == Type.f32)) { + // monkey-patch for converting built-in floats to f32 implicitly + if (!(element.hasDecorator(DecoratorFlags.BUILTIN) && contextualType == Type.f32)) { return this.module.createF64((element).constantFloatValue); } // otherwise fall-through: basically precomputes f32.demote/f64 of NaN / Infinity @@ -4967,7 +4969,7 @@ export class Compiler extends DiagnosticEmitter { let typeArguments = expression.typeArguments; // builtins handle present respectively omitted type arguments on their own - if (prototype.is(CommonFlags.AMBIENT | CommonFlags.BUILTIN)) { + if (prototype.hasDecorator(DecoratorFlags.BUILTIN)) { return this.compileCallExpressionBuiltin(prototype, expression, contextualType); } diff --git a/src/parser.ts b/src/parser.ts index 2da1bf21..45ef2215 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -86,8 +86,6 @@ import { nodeIsGenericCallable } from "./ast"; -const builtinsFile = LIBRARY_PREFIX + "builtins.ts"; - /** Parser interface. */ export class Parser extends DiagnosticEmitter { @@ -135,11 +133,6 @@ export class Parser extends DiagnosticEmitter { var program = this.program; program.sources.push(source); - // mark the special builtins library file - if (source.normalizedPath == builtinsFile) { - source.set(CommonFlags.BUILTIN); - } - // tokenize and parse var tn = new Tokenizer(source, program.diagnostics); tn.onComment = this.onComment; @@ -176,9 +169,6 @@ export class Parser extends DiagnosticEmitter { decorators.push(decorator); } - // mark builtins - flags |= (tn.source.flags & CommonFlags.BUILTIN); - // check modifiers var exportStart: i32 = 0; var exportEnd: i32 = 0; diff --git a/src/program.ts b/src/program.ts index 249a0d92..11c76101 100644 --- a/src/program.ts +++ b/src/program.ts @@ -708,7 +708,16 @@ export class Program extends DiagnosticEmitter { let kind = decoratorNameToKind(decorator.name); let flag = decoratorKindToFlag(kind); if (flag) { - if (!(acceptedFlags & flag)) { + if (flag == DecoratorFlags.BUILTIN) { + if (decorator.range.source.isLibrary) { + presentFlags |= flag; + } else { + this.error( + DiagnosticCode.Decorator_0_is_not_valid_here, + decorator.range, decorator.name.range.toString() + ); + } + } else if (!(acceptedFlags & flag)) { this.error( DiagnosticCode.Decorator_0_is_not_valid_here, decorator.range, decorator.name.range.toString() @@ -732,13 +741,9 @@ export class Program extends DiagnosticEmitter { declaration: DeclarationStatement ): void { var parentNode = declaration.parent; - // alias the element globally if it is ... + // alias globally if explicitly annotated @global or exported from a top-level library file if ( - // explicitly annotated with @global - or - (element.hasDecorator(DecoratorFlags.GLOBAL)) || - // part of the special builtins library file - or - - (declaration.range.source.is(CommonFlags.BUILTIN)) || - // exported from a top-level library file ( declaration.range.source.isLibrary && element.is(CommonFlags.EXPORT) && @@ -758,10 +763,12 @@ export class Program extends DiagnosticEmitter { ); } else { this.elementsLookup.set(globalName, element); - // builtins can use the global name directly instead of being just an alias - if (element.is(CommonFlags.BUILTIN)) element.internalName = globalName; } } + // builtins use the global name directly + if (element.hasDecorator(DecoratorFlags.BUILTIN)) { + element.internalName = declaration.programLevelInternalName; + } } /** Initializes a class declaration. */ @@ -2040,7 +2047,9 @@ export enum DecoratorFlags { /** Is always inlined. */ INLINE = 1 << 6, /** Is using a different external name. */ - EXTERNAL = 1 << 7 + EXTERNAL = 1 << 7, + /** Is a builtin. */ + BUILTIN = 1 << 8 } export function decoratorKindToFlag(kind: DecoratorKind): DecoratorFlags { @@ -2054,6 +2063,7 @@ export function decoratorKindToFlag(kind: DecoratorKind): DecoratorFlags { case DecoratorKind.SEALED: return DecoratorFlags.SEALED; case DecoratorKind.INLINE: return DecoratorFlags.INLINE; case DecoratorKind.EXTERNAL: return DecoratorFlags.EXTERNAL; + case DecoratorKind.BUILTIN: return DecoratorFlags.BUILTIN; default: return DecoratorFlags.NONE; } } @@ -2375,7 +2385,7 @@ export class Function extends Element { this.flags = prototype.flags; this.decoratorFlags = prototype.decoratorFlags; this.contextualTypeArguments = contextualTypeArguments; - if (!(prototype.is(CommonFlags.AMBIENT | CommonFlags.BUILTIN) || prototype.is(CommonFlags.DECLARE))) { + if (!(prototype.is(CommonFlags.AMBIENT))) { let localIndex = 0; if (parent && parent.kind == ElementKind.CLASS) { assert(this.is(CommonFlags.INSTANCE)); diff --git a/std/assembly/builtins.ts b/std/assembly/builtins.ts index dc5815cd..0ccb28c8 100644 --- a/std/assembly/builtins.ts +++ b/std/assembly/builtins.ts @@ -1,101 +1,103 @@ -@inline export const NaN: f64 = 0 / 0; -@inline export const Infinity: f64 = 1 / 0; -export declare const HEAP_BASE: usize; +/* tslint:disable */ -export declare function isInteger(value?: T): bool; -export declare function isFloat(value?: T): bool; -export declare function isSigned(value?: T): bool; -export declare function isReference(value?: T): bool; -export declare function isString(value?: T): bool; -export declare function isArray(value?: T): bool; -export declare function isDefined(expression: void): bool; -export declare function isConstant(expression: void): bool; +@builtin @inline export const NaN: f64 = 0 / 0; +@builtin @inline export const Infinity: f64 = 1 / 0; +@builtin export declare const HEAP_BASE: usize; + +@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 isDefined(expression: void): bool; +@builtin export declare function isConstant(expression: void): bool; export function isNaN(value: T): bool { return value != value; } export function isFinite(value: T): bool { return value - value == 0; } -export declare function clz(value: T): T; -export declare function ctz(value: T): T; -export declare function popcnt(value: T): T; -export declare function rotl(value: T, shift: T): T; -export declare function rotr(value: T, shift: T): T; -export declare function abs(value: T): T; -export declare function max(left: T, right: T): T; -export declare function min(left: T, right: T): T; -export declare function ceil(value: T): T; -export declare function floor(value: T): T; -export declare function copysign(left: T, right: T): T; -export declare function nearest(value: T): T; -export declare function reinterpret(value: void): T; -export declare function sqrt(value: T): T; -export declare function trunc(value: T): T; -export declare function load(offset: usize, constantOffset?: usize): T; -export declare function store(offset: usize, value: void, constantOffset?: usize): void; -export declare function sizeof(): usize; // | u32 / u64 -export declare function alignof(): usize; // | u32 / u64 -export declare function offsetof(fieldName?: string): usize; // | u32 / u64 -export declare function select(ifTrue: T, ifFalse: T, condition: bool): T; -export declare function unreachable(): void; -export declare function changetype(value: void): T; -export declare function assert(isTrueish: T, message?: string): T; -export declare function unchecked(expr: T): T; -export declare function call_indirect(target: void, ...args: void[]): T; +@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, constantOffset?: usize): T; +@builtin export declare function store(offset: usize, value: void, constantOffset?: 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; -export declare function i8(value: void): i8; +@builtin export declare function i8(value: void): i8; export namespace i8 { export const MIN_VALUE: i8 = -128; export const MAX_VALUE: i8 = 127; } -export declare function i16(value: void): i16; +@builtin export declare function i16(value: void): i16; export namespace i16 { export const MIN_VALUE: i16 = -32768; export const MAX_VALUE: i16 = 32767; } -export declare function i32(value: void): i32; +@builtin export declare function i32(value: void): i32; export namespace i32 { export const MIN_VALUE: i32 = -2147483648; export const MAX_VALUE: i32 = 2147483647; - export declare function clz(value: i32): i32; - export declare function ctz(value: i32): i32; - export declare function popcnt(value: i32): i32; - export declare function rotl(value: i32, shift: i32): i32; - export declare function rotr(value: i32, shift: i32): i32; - export declare function reinterpret_f32(value: f32): i32; - export declare function load8_s(offset: usize, constantOffset?: usize): i32; - export declare function load8_u(offset: usize, constantOffset?: usize): i32; - export declare function load16_s(offset: usize, constantOffset?: usize): i32; - export declare function load16_u(offset: usize, constantOffset?: usize): i32; - export declare function load(offset: usize, constantOffset?: usize): i32; - export declare function store8(offset: usize, value: i32, constantOffset?: usize): void; - export declare function store16(offset: usize, value: i32, constantOffset?: usize): void; - export declare function store(offset: usize, value: i32, constantOffset?: usize): void; + @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, constantOffset?: usize): i32; + @builtin export declare function load8_u(offset: usize, constantOffset?: usize): i32; + @builtin export declare function load16_s(offset: usize, constantOffset?: usize): i32; + @builtin export declare function load16_u(offset: usize, constantOffset?: usize): i32; + @builtin export declare function load(offset: usize, constantOffset?: usize): i32; + @builtin export declare function store8(offset: usize, value: i32, constantOffset?: usize): void; + @builtin export declare function store16(offset: usize, value: i32, constantOffset?: usize): void; + @builtin export declare function store(offset: usize, value: i32, constantOffset?: usize): void; } -export declare function i64(value: void): i64; +@builtin export declare function i64(value: void): i64; export namespace i64 { export const MIN_VALUE: i64 = -9223372036854775808; export const MAX_VALUE: i64 = 9223372036854775807; - export declare function clz(value: i64): i64; - export declare function ctz(value: i64): i64; - export declare function load8_s(offset: usize, constantOffset?: usize): i64; - export declare function load8_u(offset: usize, constantOffset?: usize): u64; - export declare function load16_s(offset: usize, constantOffset?: usize): i64; - export declare function load16_u(offset: usize, constantOffset?: usize): u64; - export declare function load32_s(offset: usize, constantOffset?: usize): i64; - export declare function load32_u(offset: usize, constantOffset?: usize): u64; - export declare function load(offset: usize, constantOffset?: usize): i64; - export declare function popcnt(value: i64): i64; - export declare function rotl(value: i64, shift: i64): i64; - export declare function rotr(value: i64, shift: i64): i64; - export declare function reinterpret_f64(value: f64): i64; - export declare function store8(offset: usize, value: i64, constantOffset?: usize): void; - export declare function store16(offset: usize, value: i64, constantOffset?: usize): void; - export declare function store32(offset: usize, value: i64, constantOffset?: usize): void; - export declare function store(offset: usize, value: i64, constantOffset?: usize): void; + @builtin export declare function clz(value: i64): i64; + @builtin export declare function ctz(value: i64): i64; + @builtin export declare function load8_s(offset: usize, constantOffset?: usize): i64; + @builtin export declare function load8_u(offset: usize, constantOffset?: usize): u64; + @builtin export declare function load16_s(offset: usize, constantOffset?: usize): i64; + @builtin export declare function load16_u(offset: usize, constantOffset?: usize): u64; + @builtin export declare function load32_s(offset: usize, constantOffset?: usize): i64; + @builtin export declare function load32_u(offset: usize, constantOffset?: usize): u64; + @builtin export declare function load(offset: usize, constantOffset?: 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, constantOffset?: usize): void; + @builtin export declare function store16(offset: usize, value: i64, constantOffset?: usize): void; + @builtin export declare function store32(offset: usize, value: i64, constantOffset?: usize): void; + @builtin export declare function store(offset: usize, value: i64, constantOffset?: usize): void; } -export declare function isize(value: void): isize; +@builtin export declare function isize(value: void): isize; export namespace isize { export const MIN_VALUE: isize = sizeof() == sizeof() ? -2147483648 @@ -105,31 +107,31 @@ export namespace isize { : 9223372036854775807; } -export declare function u8(value: void): u8; +@builtin export declare function u8(value: void): u8; export namespace u8 { export const MIN_VALUE: u8 = 0; export const MAX_VALUE: u8 = 255; } -export declare function u16(value: void): u16; +@builtin export declare function u16(value: void): u16; export namespace u16 { export const MIN_VALUE: u16 = 0; export const MAX_VALUE: u16 = 65535; } -export declare function u32(value: void): u32; +@builtin export declare function u32(value: void): u32; export namespace u32 { export const MIN_VALUE: u32 = 0; export const MAX_VALUE: u32 = 4294967295; } -export declare function u64(value: void): u64; +@builtin export declare function u64(value: void): u64; export namespace u64 { export const MIN_VALUE: u64 = 0; export const MAX_VALUE: u64 = 18446744073709551615; } -export declare function usize(value: void): usize; +@builtin export declare function usize(value: void): usize; export namespace usize { export const MIN_VALUE: usize = 0; export const MAX_VALUE: usize = sizeof() == sizeof() @@ -137,13 +139,13 @@ export namespace usize { : 18446744073709551615; } -export declare function bool(value: void): bool; +@builtin export declare function bool(value: void): bool; export namespace bool { export const MIN_VALUE: bool = false; export const MAX_VALUE: bool = true; } -export declare function f32(value: void): f32; +@builtin export declare function f32(value: void): f32; export namespace f32 { export const MIN_VALUE = reinterpret(0xFF7FFFFF); // -0x1.fffffep+127f export const MAX_VALUE = reinterpret(0x7F7FFFFF); // 0x1.fffffep+127f @@ -151,21 +153,21 @@ export namespace f32 { export const MIN_SAFE_INTEGER: f32 = -16777215; export const MAX_SAFE_INTEGER: f32 = 16777215; export const EPSILON = reinterpret(0x34000000); // 0x1p-23f - export declare function abs(value: f32): f32; - export declare function ceil(value: f32): f32; - export declare function copysign(x: f32, y: f32): f32; - export declare function floor(value: f32): f32; - export declare function load(offset: usize, constantOffset?: usize): f32; - export declare function max(left: f32, right: f32): f32; - export declare function min(left: f32, right: f32): f32; - export declare function nearest(value: f32): f32; - export declare function reinterpret_i32(value: i32): f32; - export declare function sqrt(value: f32): f32; - export declare function store(offset: usize, value: f32, constantOffset?: usize): void; - export declare function trunc(value: f32): f32; + @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, constantOffset?: 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, constantOffset?: usize): void; + @builtin export declare function trunc(value: f32): f32; } -export declare function f64(value: void): f64; +@builtin export declare function f64(value: void): f64; export namespace f64 { export const MIN_VALUE = reinterpret(0xFFEFFFFFFFFFFFFF); // -0x1.fffffffffffffp+1023 export const MAX_VALUE = reinterpret(0x7FEFFFFFFFFFFFFF); // 0x1.fffffffffffffp+1023 @@ -173,29 +175,24 @@ export namespace f64 { export const MIN_SAFE_INTEGER: f64 = -9007199254740991; export const MAX_SAFE_INTEGER: f64 = 9007199254740991; export const EPSILON = reinterpret(0x3CB0000000000000); // 0x1p-52 - export declare function abs(value: f64): f64; - export declare function ceil(value: f64): f64; - export declare function copysign(x: f64, y: f64): f64; - export declare function floor(value: f64): f64; - export declare function load(offset: usize, constantOffset?: usize): f64; - export declare function max(left: f64, right: f64): f64; - export declare function min(left: f64, right: f64): f64; - export declare function nearest(value: f64): f64; - export declare function reinterpret_i64(value: i64): f64; - export declare function sqrt(value: f64): f64; - export declare function store(offset: usize, value: f64, constantOffset?: usize): void; - export declare function trunc(value: f64): f64; + @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, constantOffset?: 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, constantOffset?: usize): void; + @builtin export declare function trunc(value: f64): f64; } -export declare function start(): void; +@builtin export declare function start(): void; -export declare function ERROR(message?: void): void; -export declare function WARNING(message?: void): void; -export declare function INFO(message?: void): void; +@builtin export declare function ERROR(message?: void): void; +@builtin export declare function WARNING(message?: void): void; +@builtin export declare function INFO(message?: void): void; -export declare function __memory_size(): i32; -export declare function __memory_grow(pages: i32): i32; -// export declare function __memory_copy(dest: usize, src: usize: n: usize): void; -// export declare function __memory_fill(dest: usize, value: u32, n: usize): void; - -export declare function __gc_iterate_roots(fn: (ref: usize) => void): void; +@builtin export declare function __gc_iterate_roots(fn: (ref: usize) => void): void; diff --git a/std/assembly/gc.ts b/std/assembly/gc.ts new file mode 100644 index 00000000..c5bd545b --- /dev/null +++ b/std/assembly/gc.ts @@ -0,0 +1,3 @@ +export namespace gc { + @builtin export declare function iterateRoots(fn: (ref: usize) => void): void; +} diff --git a/std/assembly/memory.ts b/std/assembly/memory.ts index f05705b2..f38ef3c8 100644 --- a/std/assembly/memory.ts +++ b/std/assembly/memory.ts @@ -1,12 +1,10 @@ export namespace memory { - export function size(): i32 { - return __memory_size(); // tslint:disable-line - } + @builtin + export declare function size(): i32; - export function grow(pages: i32): i32 { - return __memory_grow(pages); // tslint:disable-line - } + @builtin + export declare function grow(pages: i32): i32; export function fill(dest: usize, c: u8, n: usize): void { // see: musl/src/string/memset if (isDefined(__memory_fill)) { __memory_fill(dest, c, n); return; } // tslint:disable-line diff --git a/tests/allocators/arena/optimized.wat b/tests/allocators/arena/optimized.wat index 5c47d70a..5230aa59 100644 --- a/tests/allocators/arena/optimized.wat +++ b/tests/allocators/arena/optimized.wat @@ -1,208 +1,193 @@ (module - (type $i (func (result i32))) - (type $ii (func (param i32) (result i32))) (type $iiiv (func (param i32 i32 i32))) (type $iiii (func (param i32 i32 i32) (result i32))) + (type $ii (func (param i32) (result i32))) (type $iv (func (param i32))) (type $v (func)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $HEAP_BASE i32 (i32.const 8)) (memory $0 0) - (export "memory.size" (func $~lib/memory/memory.size)) - (export "memory.grow" (func $~lib/memory/memory.grow)) + (export "memory" (memory $0)) (export "memory.fill" (func $~lib/memory/memory.fill)) (export "memory.copy" (func $~lib/memory/memory.copy)) (export "memory.compare" (func $~lib/memory/memory.compare)) (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" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 0 ;) (type $i) (result i32) - ;;@ ~lib/memory.ts:4:25 - (current_memory) - ) - (func $~lib/memory/memory.grow (; 1 ;) (type $ii) (param $0 i32) (result i32) - ;;@ ~lib/memory.ts:8:30 - (grow_memory - ;;@ ~lib/memory.ts:8:25 - (get_local $0) - ) - ) - (func $~lib/memory/memory.fill (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 0 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i64) (local $4 i32) - ;;@ ~lib/memory.ts:17:4 + ;;@ ~lib/memory.ts:244:2 (if - ;;@ ~lib/memory.ts:17:8 + ;;@ ~lib/memory.ts:244:6 (i32.eqz - ;;@ ~lib/memory.ts:17:9 + ;;@ ~lib/memory.ts:244:7 (get_local $2) ) - ;;@ ~lib/memory.ts:17:12 + ;;@ ~lib/memory.ts:244:10 (return) ) - ;;@ ~lib/memory.ts:18:4 + ;;@ ~lib/memory.ts:245:2 (i32.store8 - ;;@ ~lib/memory.ts:18:14 + ;;@ ~lib/memory.ts:245:12 (get_local $0) - ;;@ ~lib/memory.ts:18:20 + ;;@ ~lib/memory.ts:245:18 (get_local $1) ) - ;;@ ~lib/memory.ts:19:4 + ;;@ ~lib/memory.ts:246:2 (i32.store8 - ;;@ ~lib/memory.ts:19:14 + ;;@ ~lib/memory.ts:246:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:19:21 + ;;@ ~lib/memory.ts:246:19 (get_local $2) ) - ;;@ ~lib/memory.ts:19:25 + ;;@ ~lib/memory.ts:246:23 (i32.const 1) ) - ;;@ ~lib/memory.ts:19:28 + ;;@ ~lib/memory.ts:246:26 (get_local $1) ) - ;;@ ~lib/memory.ts:20:4 + ;;@ ~lib/memory.ts:247:2 (if - ;;@ ~lib/memory.ts:20:8 + ;;@ ~lib/memory.ts:247:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:20:13 + ;;@ ~lib/memory.ts:247:11 (i32.const 2) ) - ;;@ ~lib/memory.ts:20:16 + ;;@ ~lib/memory.ts:247:14 (return) ) - ;;@ ~lib/memory.ts:22:4 + ;;@ ~lib/memory.ts:249:2 (i32.store8 - ;;@ ~lib/memory.ts:22:14 + ;;@ ~lib/memory.ts:249:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:22:21 + ;;@ ~lib/memory.ts:249:19 (i32.const 1) ) - ;;@ ~lib/memory.ts:22:24 + ;;@ ~lib/memory.ts:249:22 (get_local $1) ) - ;;@ ~lib/memory.ts:23:4 + ;;@ ~lib/memory.ts:250:2 (i32.store8 - ;;@ ~lib/memory.ts:23:14 + ;;@ ~lib/memory.ts:250:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:23:21 + ;;@ ~lib/memory.ts:250:19 (i32.const 2) ) - ;;@ ~lib/memory.ts:23:24 + ;;@ ~lib/memory.ts:250:22 (get_local $1) ) - ;;@ ~lib/memory.ts:24:4 + ;;@ ~lib/memory.ts:251:2 (i32.store8 - ;;@ ~lib/memory.ts:24:14 + ;;@ ~lib/memory.ts:251:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:24:21 + ;;@ ~lib/memory.ts:251:19 (get_local $2) ) - ;;@ ~lib/memory.ts:24:25 + ;;@ ~lib/memory.ts:251:23 (i32.const 2) ) - ;;@ ~lib/memory.ts:24:28 + ;;@ ~lib/memory.ts:251:26 (get_local $1) ) - ;;@ ~lib/memory.ts:25:4 + ;;@ ~lib/memory.ts:252:2 (i32.store8 - ;;@ ~lib/memory.ts:25:14 + ;;@ ~lib/memory.ts:252:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:25:21 + ;;@ ~lib/memory.ts:252:19 (get_local $2) ) - ;;@ ~lib/memory.ts:25:25 + ;;@ ~lib/memory.ts:252:23 (i32.const 3) ) - ;;@ ~lib/memory.ts:25:28 + ;;@ ~lib/memory.ts:252:26 (get_local $1) ) - ;;@ ~lib/memory.ts:26:4 + ;;@ ~lib/memory.ts:253:2 (if - ;;@ ~lib/memory.ts:26:8 + ;;@ ~lib/memory.ts:253:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:26:13 + ;;@ ~lib/memory.ts:253:11 (i32.const 6) ) - ;;@ ~lib/memory.ts:26:16 + ;;@ ~lib/memory.ts:253:14 (return) ) - ;;@ ~lib/memory.ts:27:4 + ;;@ ~lib/memory.ts:254:2 (i32.store8 - ;;@ ~lib/memory.ts:27:14 + ;;@ ~lib/memory.ts:254:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:27:21 + ;;@ ~lib/memory.ts:254:19 (i32.const 3) ) - ;;@ ~lib/memory.ts:27:24 + ;;@ ~lib/memory.ts:254:22 (get_local $1) ) - ;;@ ~lib/memory.ts:28:4 + ;;@ ~lib/memory.ts:255:2 (i32.store8 - ;;@ ~lib/memory.ts:28:14 + ;;@ ~lib/memory.ts:255:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:28:21 + ;;@ ~lib/memory.ts:255:19 (get_local $2) ) - ;;@ ~lib/memory.ts:28:25 + ;;@ ~lib/memory.ts:255:23 (i32.const 4) ) - ;;@ ~lib/memory.ts:28:28 + ;;@ ~lib/memory.ts:255:26 (get_local $1) ) - ;;@ ~lib/memory.ts:29:4 + ;;@ ~lib/memory.ts:256:2 (if - ;;@ ~lib/memory.ts:29:8 + ;;@ ~lib/memory.ts:256:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:29:13 + ;;@ ~lib/memory.ts:256:11 (i32.const 8) ) - ;;@ ~lib/memory.ts:29:16 + ;;@ ~lib/memory.ts:256:14 (return) ) - ;;@ ~lib/memory.ts:40:4 + ;;@ ~lib/memory.ts:267:2 (i32.store - ;;@ ~lib/memory.ts:33:4 + ;;@ ~lib/memory.ts:260:2 (tee_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:32:4 + ;;@ ~lib/memory.ts:259:2 (tee_local $4 - ;;@ ~lib/memory.ts:32:19 + ;;@ ~lib/memory.ts:259:17 (i32.and (i32.sub (i32.const 0) - ;;@ ~lib/memory.ts:32:20 + ;;@ ~lib/memory.ts:259:18 (get_local $0) ) - ;;@ ~lib/memory.ts:32:27 + ;;@ ~lib/memory.ts:259:25 (i32.const 3) ) ) ) ) - ;;@ ~lib/memory.ts:37:4 + ;;@ ~lib/memory.ts:264:2 (tee_local $1 - ;;@ ~lib/memory.ts:37:19 + ;;@ ~lib/memory.ts:264:17 (i32.mul (i32.and - ;;@ ~lib/memory.ts:37:35 + ;;@ ~lib/memory.ts:264:33 (get_local $1) (i32.const 255) ) @@ -210,319 +195,319 @@ ) ) ) - ;;@ ~lib/memory.ts:41:4 + ;;@ ~lib/memory.ts:268:2 (i32.store - ;;@ ~lib/memory.ts:41:15 + ;;@ ~lib/memory.ts:268:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:35:4 + ;;@ ~lib/memory.ts:262:2 (tee_local $2 (i32.and (i32.sub - ;;@ ~lib/memory.ts:34:4 + ;;@ ~lib/memory.ts:261:2 (get_local $2) - ;;@ ~lib/memory.ts:34:9 + ;;@ ~lib/memory.ts:261:7 (get_local $4) ) - ;;@ ~lib/memory.ts:35:9 + ;;@ ~lib/memory.ts:262:7 (i32.const -4) ) ) ) - ;;@ ~lib/memory.ts:41:26 + ;;@ ~lib/memory.ts:268:24 (i32.const 4) ) - ;;@ ~lib/memory.ts:41:29 + ;;@ ~lib/memory.ts:268:27 (get_local $1) ) - ;;@ ~lib/memory.ts:42:4 + ;;@ ~lib/memory.ts:269:2 (if - ;;@ ~lib/memory.ts:42:8 + ;;@ ~lib/memory.ts:269:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:42:13 + ;;@ ~lib/memory.ts:269:11 (i32.const 8) ) - ;;@ ~lib/memory.ts:42:16 + ;;@ ~lib/memory.ts:269:14 (return) ) - ;;@ ~lib/memory.ts:43:4 + ;;@ ~lib/memory.ts:270:2 (i32.store - ;;@ ~lib/memory.ts:43:15 + ;;@ ~lib/memory.ts:270:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:43:22 + ;;@ ~lib/memory.ts:270:20 (i32.const 4) ) - ;;@ ~lib/memory.ts:43:25 + ;;@ ~lib/memory.ts:270:23 (get_local $1) ) - ;;@ ~lib/memory.ts:44:4 + ;;@ ~lib/memory.ts:271:2 (i32.store - ;;@ ~lib/memory.ts:44:15 + ;;@ ~lib/memory.ts:271:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:44:22 + ;;@ ~lib/memory.ts:271:20 (i32.const 8) ) - ;;@ ~lib/memory.ts:44:25 + ;;@ ~lib/memory.ts:271:23 (get_local $1) ) - ;;@ ~lib/memory.ts:45:4 + ;;@ ~lib/memory.ts:272:2 (i32.store - ;;@ ~lib/memory.ts:45:15 + ;;@ ~lib/memory.ts:272:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:45:22 + ;;@ ~lib/memory.ts:272:20 (get_local $2) ) - ;;@ ~lib/memory.ts:45:26 + ;;@ ~lib/memory.ts:272:24 (i32.const 12) ) - ;;@ ~lib/memory.ts:45:30 + ;;@ ~lib/memory.ts:272:28 (get_local $1) ) - ;;@ ~lib/memory.ts:46:4 + ;;@ ~lib/memory.ts:273:2 (i32.store - ;;@ ~lib/memory.ts:46:15 + ;;@ ~lib/memory.ts:273:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:46:22 + ;;@ ~lib/memory.ts:273:20 (get_local $2) ) - ;;@ ~lib/memory.ts:46:26 + ;;@ ~lib/memory.ts:273:24 (i32.const 8) ) - ;;@ ~lib/memory.ts:46:29 + ;;@ ~lib/memory.ts:273:27 (get_local $1) ) - ;;@ ~lib/memory.ts:47:4 + ;;@ ~lib/memory.ts:274:2 (if - ;;@ ~lib/memory.ts:47:8 + ;;@ ~lib/memory.ts:274:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:47:13 + ;;@ ~lib/memory.ts:274:11 (i32.const 24) ) - ;;@ ~lib/memory.ts:47:17 + ;;@ ~lib/memory.ts:274:15 (return) ) - ;;@ ~lib/memory.ts:48:4 + ;;@ ~lib/memory.ts:275:2 (i32.store - ;;@ ~lib/memory.ts:48:15 + ;;@ ~lib/memory.ts:275:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:48:22 + ;;@ ~lib/memory.ts:275:20 (i32.const 12) ) - ;;@ ~lib/memory.ts:48:26 + ;;@ ~lib/memory.ts:275:24 (get_local $1) ) - ;;@ ~lib/memory.ts:49:4 + ;;@ ~lib/memory.ts:276:2 (i32.store - ;;@ ~lib/memory.ts:49:15 + ;;@ ~lib/memory.ts:276:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:49:22 + ;;@ ~lib/memory.ts:276:20 (i32.const 16) ) - ;;@ ~lib/memory.ts:49:26 + ;;@ ~lib/memory.ts:276:24 (get_local $1) ) - ;;@ ~lib/memory.ts:50:4 + ;;@ ~lib/memory.ts:277:2 (i32.store - ;;@ ~lib/memory.ts:50:15 + ;;@ ~lib/memory.ts:277:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:50:22 + ;;@ ~lib/memory.ts:277:20 (i32.const 20) ) - ;;@ ~lib/memory.ts:50:26 + ;;@ ~lib/memory.ts:277:24 (get_local $1) ) - ;;@ ~lib/memory.ts:51:4 + ;;@ ~lib/memory.ts:278:2 (i32.store - ;;@ ~lib/memory.ts:51:15 + ;;@ ~lib/memory.ts:278:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:51:22 + ;;@ ~lib/memory.ts:278:20 (i32.const 24) ) - ;;@ ~lib/memory.ts:51:26 + ;;@ ~lib/memory.ts:278:24 (get_local $1) ) - ;;@ ~lib/memory.ts:52:4 + ;;@ ~lib/memory.ts:279:2 (i32.store - ;;@ ~lib/memory.ts:52:15 + ;;@ ~lib/memory.ts:279:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:52:22 + ;;@ ~lib/memory.ts:279:20 (get_local $2) ) - ;;@ ~lib/memory.ts:52:26 + ;;@ ~lib/memory.ts:279:24 (i32.const 28) ) - ;;@ ~lib/memory.ts:52:30 + ;;@ ~lib/memory.ts:279:28 (get_local $1) ) - ;;@ ~lib/memory.ts:53:4 + ;;@ ~lib/memory.ts:280:2 (i32.store - ;;@ ~lib/memory.ts:53:15 + ;;@ ~lib/memory.ts:280:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:53:22 + ;;@ ~lib/memory.ts:280:20 (get_local $2) ) - ;;@ ~lib/memory.ts:53:26 + ;;@ ~lib/memory.ts:280:24 (i32.const 24) ) - ;;@ ~lib/memory.ts:53:30 + ;;@ ~lib/memory.ts:280:28 (get_local $1) ) - ;;@ ~lib/memory.ts:54:4 + ;;@ ~lib/memory.ts:281:2 (i32.store - ;;@ ~lib/memory.ts:54:15 + ;;@ ~lib/memory.ts:281:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:54:22 + ;;@ ~lib/memory.ts:281:20 (get_local $2) ) - ;;@ ~lib/memory.ts:54:26 + ;;@ ~lib/memory.ts:281:24 (i32.const 20) ) - ;;@ ~lib/memory.ts:54:30 + ;;@ ~lib/memory.ts:281:28 (get_local $1) ) - ;;@ ~lib/memory.ts:55:4 + ;;@ ~lib/memory.ts:282:2 (i32.store - ;;@ ~lib/memory.ts:55:15 + ;;@ ~lib/memory.ts:282:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:55:22 + ;;@ ~lib/memory.ts:282:20 (get_local $2) ) - ;;@ ~lib/memory.ts:55:26 + ;;@ ~lib/memory.ts:282:24 (i32.const 16) ) - ;;@ ~lib/memory.ts:55:30 + ;;@ ~lib/memory.ts:282:28 (get_local $1) ) - ;;@ ~lib/memory.ts:59:4 + ;;@ ~lib/memory.ts:286:2 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:58:4 + ;;@ ~lib/memory.ts:285:2 (tee_local $4 - ;;@ ~lib/memory.ts:58:8 + ;;@ ~lib/memory.ts:285:6 (i32.add - ;;@ ~lib/memory.ts:58:13 + ;;@ ~lib/memory.ts:285:11 (i32.and - ;;@ ~lib/memory.ts:58:14 + ;;@ ~lib/memory.ts:285:12 (get_local $0) - ;;@ ~lib/memory.ts:58:21 + ;;@ ~lib/memory.ts:285:19 (i32.const 4) ) - ;;@ ~lib/memory.ts:58:8 + ;;@ ~lib/memory.ts:285:6 (i32.const 24) ) ) ) ) - ;;@ ~lib/memory.ts:60:4 + ;;@ ~lib/memory.ts:287:2 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:60:9 + ;;@ ~lib/memory.ts:287:7 (get_local $4) ) ) - ;;@ ~lib/memory.ts:63:4 + ;;@ ~lib/memory.ts:290:2 (set_local $3 - ;;@ ~lib/memory.ts:63:19 + ;;@ ~lib/memory.ts:290:17 (i64.or (i64.extend_u/i32 (get_local $1) ) - ;;@ ~lib/memory.ts:63:30 + ;;@ ~lib/memory.ts:290:28 (i64.shl - ;;@ ~lib/memory.ts:63:31 + ;;@ ~lib/memory.ts:290:29 (i64.extend_u/i32 (get_local $1) ) - ;;@ ~lib/memory.ts:63:43 + ;;@ ~lib/memory.ts:290:41 (i64.const 32) ) ) ) (loop $continue|0 (if - ;;@ ~lib/memory.ts:64:11 + ;;@ ~lib/memory.ts:291:9 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:64:16 + ;;@ ~lib/memory.ts:291:14 (i32.const 32) ) (block - ;;@ ~lib/memory.ts:65:6 + ;;@ ~lib/memory.ts:292:4 (i64.store - ;;@ ~lib/memory.ts:65:17 + ;;@ ~lib/memory.ts:292:15 (get_local $0) - ;;@ ~lib/memory.ts:65:23 + ;;@ ~lib/memory.ts:292:21 (get_local $3) ) - ;;@ ~lib/memory.ts:66:6 + ;;@ ~lib/memory.ts:293:4 (i64.store - ;;@ ~lib/memory.ts:66:17 + ;;@ ~lib/memory.ts:293:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:66:24 + ;;@ ~lib/memory.ts:293:22 (i32.const 8) ) - ;;@ ~lib/memory.ts:66:27 + ;;@ ~lib/memory.ts:293:25 (get_local $3) ) - ;;@ ~lib/memory.ts:67:6 + ;;@ ~lib/memory.ts:294:4 (i64.store - ;;@ ~lib/memory.ts:67:17 + ;;@ ~lib/memory.ts:294:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:67:24 + ;;@ ~lib/memory.ts:294:22 (i32.const 16) ) - ;;@ ~lib/memory.ts:67:28 + ;;@ ~lib/memory.ts:294:26 (get_local $3) ) - ;;@ ~lib/memory.ts:68:6 + ;;@ ~lib/memory.ts:295:4 (i64.store - ;;@ ~lib/memory.ts:68:17 + ;;@ ~lib/memory.ts:295:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:68:24 + ;;@ ~lib/memory.ts:295:22 (i32.const 24) ) - ;;@ ~lib/memory.ts:68:28 + ;;@ ~lib/memory.ts:295:26 (get_local $3) ) - ;;@ ~lib/memory.ts:69:6 + ;;@ ~lib/memory.ts:296:4 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:69:11 + ;;@ ~lib/memory.ts:296:9 (i32.const 32) ) ) - ;;@ ~lib/memory.ts:70:6 + ;;@ ~lib/memory.ts:297:4 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:70:14 + ;;@ ~lib/memory.ts:297:12 (i32.const 32) ) ) @@ -531,37 +516,48 @@ ) ) ) - (func $~lib/memory/memcpy (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 1 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + ;;@ ~lib/memory.ts:11:4 + (call $~lib/memory/memset + ;;@ ~lib/memory.ts:11:11 + (get_local $0) + ;;@ ~lib/memory.ts:11:17 + (get_local $1) + ;;@ ~lib/memory.ts:11:20 + (get_local $2) + ) + ) + (func $~lib/memory/memcpy (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (loop $continue|0 (if (select - ;;@ ~lib/memory.ts:164:14 + ;;@ ~lib/memory.ts:59:14 (i32.and - ;;@ ~lib/memory.ts:164:15 + ;;@ ~lib/memory.ts:59:15 (get_local $1) - ;;@ ~lib/memory.ts:164:21 + ;;@ ~lib/memory.ts:59:21 (i32.const 3) ) (get_local $2) - ;;@ ~lib/memory.ts:164:9 + ;;@ ~lib/memory.ts:59:9 (get_local $2) ) (block (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:165:14 + ;;@ ~lib/memory.ts:60:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:165:4 + ;;@ ~lib/memory.ts:60:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:165:31 + ;;@ ~lib/memory.ts:60:31 (block (result i32) (set_local $1 (i32.add @@ -571,13 +567,13 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:165:22 + ;;@ ~lib/memory.ts:60:22 (i32.load8_u (get_local $3) ) ) ) - ;;@ ~lib/memory.ts:166:4 + ;;@ ~lib/memory.ts:61:4 (set_local $2 (i32.sub (get_local $2) @@ -588,113 +584,113 @@ ) ) ) - ;;@ ~lib/memory.ts:170:2 + ;;@ ~lib/memory.ts:65:2 (if (i32.eqz - ;;@ ~lib/memory.ts:170:6 + ;;@ ~lib/memory.ts:65:6 (i32.and - ;;@ ~lib/memory.ts:170:7 + ;;@ ~lib/memory.ts:65:7 (get_local $0) - ;;@ ~lib/memory.ts:170:14 + ;;@ ~lib/memory.ts:65:14 (i32.const 3) ) ) - ;;@ ~lib/memory.ts:170:23 + ;;@ ~lib/memory.ts:65:23 (block (loop $continue|1 (if - ;;@ ~lib/memory.ts:171:11 + ;;@ ~lib/memory.ts:66:11 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:171:16 + ;;@ ~lib/memory.ts:66:16 (i32.const 16) ) (block - ;;@ ~lib/memory.ts:172:6 + ;;@ ~lib/memory.ts:67:6 (i32.store - ;;@ ~lib/memory.ts:172:17 + ;;@ ~lib/memory.ts:67:17 (get_local $0) - ;;@ ~lib/memory.ts:172:28 + ;;@ ~lib/memory.ts:67:28 (i32.load - ;;@ ~lib/memory.ts:172:38 + ;;@ ~lib/memory.ts:67:38 (get_local $1) ) ) - ;;@ ~lib/memory.ts:173:6 + ;;@ ~lib/memory.ts:68:6 (i32.store - ;;@ ~lib/memory.ts:173:17 + ;;@ ~lib/memory.ts:68:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:173:25 + ;;@ ~lib/memory.ts:68:25 (i32.const 4) ) - ;;@ ~lib/memory.ts:173:28 + ;;@ ~lib/memory.ts:68:28 (i32.load - ;;@ ~lib/memory.ts:173:38 + ;;@ ~lib/memory.ts:68:38 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:173:45 + ;;@ ~lib/memory.ts:68:45 (i32.const 4) ) ) ) - ;;@ ~lib/memory.ts:174:6 + ;;@ ~lib/memory.ts:69:6 (i32.store - ;;@ ~lib/memory.ts:174:17 + ;;@ ~lib/memory.ts:69:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:174:25 + ;;@ ~lib/memory.ts:69:25 (i32.const 8) ) - ;;@ ~lib/memory.ts:174:28 + ;;@ ~lib/memory.ts:69:28 (i32.load - ;;@ ~lib/memory.ts:174:38 + ;;@ ~lib/memory.ts:69:38 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:174:45 + ;;@ ~lib/memory.ts:69:45 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:175:6 + ;;@ ~lib/memory.ts:70:6 (i32.store - ;;@ ~lib/memory.ts:175:17 + ;;@ ~lib/memory.ts:70:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:175:24 + ;;@ ~lib/memory.ts:70:24 (i32.const 12) ) - ;;@ ~lib/memory.ts:175:28 + ;;@ ~lib/memory.ts:70:28 (i32.load - ;;@ ~lib/memory.ts:175:38 + ;;@ ~lib/memory.ts:70:38 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:175:44 + ;;@ ~lib/memory.ts:70:44 (i32.const 12) ) ) ) - ;;@ ~lib/memory.ts:176:6 + ;;@ ~lib/memory.ts:71:6 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:176:13 + ;;@ ~lib/memory.ts:71:13 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:176:17 + ;;@ ~lib/memory.ts:71:17 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:176:25 + ;;@ ~lib/memory.ts:71:25 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:176:29 + ;;@ ~lib/memory.ts:71:29 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:176:34 + ;;@ ~lib/memory.ts:71:34 (i32.const 16) ) ) @@ -702,160 +698,160 @@ ) ) ) - ;;@ ~lib/memory.ts:178:4 + ;;@ ~lib/memory.ts:73:4 (if - ;;@ ~lib/memory.ts:178:8 + ;;@ ~lib/memory.ts:73:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:178:12 + ;;@ ~lib/memory.ts:73:12 (i32.const 8) ) - ;;@ ~lib/memory.ts:178:15 + ;;@ ~lib/memory.ts:73:15 (block - ;;@ ~lib/memory.ts:179:6 + ;;@ ~lib/memory.ts:74:6 (i32.store - ;;@ ~lib/memory.ts:179:17 + ;;@ ~lib/memory.ts:74:17 (get_local $0) - ;;@ ~lib/memory.ts:179:27 + ;;@ ~lib/memory.ts:74:27 (i32.load - ;;@ ~lib/memory.ts:179:37 + ;;@ ~lib/memory.ts:74:37 (get_local $1) ) ) - ;;@ ~lib/memory.ts:180:6 + ;;@ ~lib/memory.ts:75:6 (i32.store - ;;@ ~lib/memory.ts:180:17 + ;;@ ~lib/memory.ts:75:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:180:24 + ;;@ ~lib/memory.ts:75:24 (i32.const 4) ) - ;;@ ~lib/memory.ts:180:27 + ;;@ ~lib/memory.ts:75:27 (i32.load - ;;@ ~lib/memory.ts:180:37 + ;;@ ~lib/memory.ts:75:37 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:180:43 + ;;@ ~lib/memory.ts:75:43 (i32.const 4) ) ) ) - ;;@ ~lib/memory.ts:181:6 + ;;@ ~lib/memory.ts:76:6 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:181:14 + ;;@ ~lib/memory.ts:76:14 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:181:17 + ;;@ ~lib/memory.ts:76:17 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:181:24 + ;;@ ~lib/memory.ts:76:24 (i32.const 8) ) ) ) ) - ;;@ ~lib/memory.ts:183:4 + ;;@ ~lib/memory.ts:78:4 (if - ;;@ ~lib/memory.ts:183:8 + ;;@ ~lib/memory.ts:78:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:183:12 + ;;@ ~lib/memory.ts:78:12 (i32.const 4) ) - ;;@ ~lib/memory.ts:183:15 + ;;@ ~lib/memory.ts:78:15 (block - ;;@ ~lib/memory.ts:184:6 + ;;@ ~lib/memory.ts:79:6 (i32.store - ;;@ ~lib/memory.ts:184:17 + ;;@ ~lib/memory.ts:79:17 (get_local $0) - ;;@ ~lib/memory.ts:184:23 + ;;@ ~lib/memory.ts:79:23 (i32.load - ;;@ ~lib/memory.ts:184:33 + ;;@ ~lib/memory.ts:79:33 (get_local $1) ) ) - ;;@ ~lib/memory.ts:185:6 + ;;@ ~lib/memory.ts:80:6 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:185:14 + ;;@ ~lib/memory.ts:80:14 (i32.const 4) ) ) - ;;@ ~lib/memory.ts:185:17 + ;;@ ~lib/memory.ts:80:17 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:185:24 + ;;@ ~lib/memory.ts:80:24 (i32.const 4) ) ) ) ) - ;;@ ~lib/memory.ts:187:4 + ;;@ ~lib/memory.ts:82:4 (if - ;;@ ~lib/memory.ts:187:8 + ;;@ ~lib/memory.ts:82:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:187:12 + ;;@ ~lib/memory.ts:82:12 (i32.const 2) ) - ;;@ ~lib/memory.ts:187:15 + ;;@ ~lib/memory.ts:82:15 (block - ;;@ ~lib/memory.ts:188:6 + ;;@ ~lib/memory.ts:83:6 (i32.store16 - ;;@ ~lib/memory.ts:188:17 + ;;@ ~lib/memory.ts:83:17 (get_local $0) - ;;@ ~lib/memory.ts:188:23 + ;;@ ~lib/memory.ts:83:23 (i32.load16_u - ;;@ ~lib/memory.ts:188:33 + ;;@ ~lib/memory.ts:83:33 (get_local $1) ) ) - ;;@ ~lib/memory.ts:189:6 + ;;@ ~lib/memory.ts:84:6 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:189:14 + ;;@ ~lib/memory.ts:84:14 (i32.const 2) ) ) - ;;@ ~lib/memory.ts:189:17 + ;;@ ~lib/memory.ts:84:17 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:189:24 + ;;@ ~lib/memory.ts:84:24 (i32.const 2) ) ) ) ) - ;;@ ~lib/memory.ts:191:4 + ;;@ ~lib/memory.ts:86:4 (if - ;;@ ~lib/memory.ts:191:8 + ;;@ ~lib/memory.ts:86:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:191:12 + ;;@ ~lib/memory.ts:86:12 (i32.const 1) ) - ;;@ ~lib/memory.ts:192:16 + ;;@ ~lib/memory.ts:87:16 (block (set_local $3 (get_local $0) ) - ;;@ ~lib/memory.ts:191:15 + ;;@ ~lib/memory.ts:86:15 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:192:33 + ;;@ ~lib/memory.ts:87:33 (block (result i32) (set_local $3 (get_local $1) ) - ;;@ ~lib/memory.ts:192:24 + ;;@ ~lib/memory.ts:87:24 (i32.load8_u (get_local $3) ) @@ -863,19 +859,19 @@ ) ) ) - ;;@ ~lib/memory.ts:194:4 + ;;@ ~lib/memory.ts:89:4 (return) ) ) - ;;@ ~lib/memory.ts:199:2 + ;;@ ~lib/memory.ts:94:2 (if - ;;@ ~lib/memory.ts:199:6 + ;;@ ~lib/memory.ts:94:6 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:199:11 + ;;@ ~lib/memory.ts:94:11 (i32.const 32) ) - ;;@ ~lib/memory.ts:199:15 + ;;@ ~lib/memory.ts:94:15 (block $break|2 (block $case2|2 (block $case1|2 @@ -883,10 +879,10 @@ (block $tablify|0 (br_table $case0|2 $case1|2 $case2|2 $tablify|0 (i32.sub - ;;@ ~lib/memory.ts:200:12 + ;;@ ~lib/memory.ts:95:12 (i32.and (get_local $0) - ;;@ ~lib/memory.ts:200:19 + ;;@ ~lib/memory.ts:95:19 (i32.const 3) ) (i32.const 1) @@ -895,27 +891,27 @@ ) (br $break|2) ) - ;;@ ~lib/memory.ts:203:8 + ;;@ ~lib/memory.ts:98:8 (set_local $4 - ;;@ ~lib/memory.ts:203:12 + ;;@ ~lib/memory.ts:98:12 (i32.load - ;;@ ~lib/memory.ts:203:22 + ;;@ ~lib/memory.ts:98:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:204:18 + ;;@ ~lib/memory.ts:99:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:204:8 + ;;@ ~lib/memory.ts:99:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:204:35 + ;;@ ~lib/memory.ts:99:35 (block (result i32) (set_local $1 (i32.add @@ -925,7 +921,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:204:26 + ;;@ ~lib/memory.ts:99:26 (i32.load8_u (get_local $3) ) @@ -934,16 +930,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:205:18 + ;;@ ~lib/memory.ts:100:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:205:8 + ;;@ ~lib/memory.ts:100:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:205:35 + ;;@ ~lib/memory.ts:100:35 (block (result i32) (set_local $1 (i32.add @@ -953,7 +949,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:205:26 + ;;@ ~lib/memory.ts:100:26 (i32.load8_u (get_local $3) ) @@ -962,16 +958,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:206:18 + ;;@ ~lib/memory.ts:101:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:206:8 + ;;@ ~lib/memory.ts:101:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:206:35 + ;;@ ~lib/memory.ts:101:35 (block (result i32) (set_local $1 (i32.add @@ -981,182 +977,182 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:206:26 + ;;@ ~lib/memory.ts:101:26 (i32.load8_u (get_local $3) ) ) ) - ;;@ ~lib/memory.ts:207:8 + ;;@ ~lib/memory.ts:102:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:207:13 + ;;@ ~lib/memory.ts:102:13 (i32.const 3) ) ) (loop $continue|3 (if - ;;@ ~lib/memory.ts:208:15 + ;;@ ~lib/memory.ts:103:15 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:208:20 + ;;@ ~lib/memory.ts:103:20 (i32.const 17) ) (block - ;;@ ~lib/memory.ts:210:10 + ;;@ ~lib/memory.ts:105:10 (i32.store - ;;@ ~lib/memory.ts:210:21 + ;;@ ~lib/memory.ts:105:21 (get_local $0) - ;;@ ~lib/memory.ts:210:27 + ;;@ ~lib/memory.ts:105:27 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:210:32 + ;;@ ~lib/memory.ts:105:32 (i32.const 24) ) - ;;@ ~lib/memory.ts:210:37 + ;;@ ~lib/memory.ts:105:37 (i32.shl - ;;@ ~lib/memory.ts:209:10 + ;;@ ~lib/memory.ts:104:10 (tee_local $3 - ;;@ ~lib/memory.ts:209:14 + ;;@ ~lib/memory.ts:104:14 (i32.load - ;;@ ~lib/memory.ts:209:24 + ;;@ ~lib/memory.ts:104:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:209:30 + ;;@ ~lib/memory.ts:104:30 (i32.const 1) ) ) ) - ;;@ ~lib/memory.ts:210:42 + ;;@ ~lib/memory.ts:105:42 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:212:10 + ;;@ ~lib/memory.ts:107:10 (i32.store - ;;@ ~lib/memory.ts:212:21 + ;;@ ~lib/memory.ts:107:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:212:28 + ;;@ ~lib/memory.ts:107:28 (i32.const 4) ) - ;;@ ~lib/memory.ts:212:31 + ;;@ ~lib/memory.ts:107:31 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:212:36 + ;;@ ~lib/memory.ts:107:36 (i32.const 24) ) - ;;@ ~lib/memory.ts:212:41 + ;;@ ~lib/memory.ts:107:41 (i32.shl - ;;@ ~lib/memory.ts:211:10 + ;;@ ~lib/memory.ts:106:10 (tee_local $4 - ;;@ ~lib/memory.ts:211:14 + ;;@ ~lib/memory.ts:106:14 (i32.load - ;;@ ~lib/memory.ts:211:24 + ;;@ ~lib/memory.ts:106:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:211:30 + ;;@ ~lib/memory.ts:106:30 (i32.const 5) ) ) ) - ;;@ ~lib/memory.ts:212:46 + ;;@ ~lib/memory.ts:107:46 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:214:10 + ;;@ ~lib/memory.ts:109:10 (i32.store - ;;@ ~lib/memory.ts:214:21 + ;;@ ~lib/memory.ts:109:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:214:28 + ;;@ ~lib/memory.ts:109:28 (i32.const 8) ) - ;;@ ~lib/memory.ts:214:31 + ;;@ ~lib/memory.ts:109:31 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:214:36 + ;;@ ~lib/memory.ts:109:36 (i32.const 24) ) - ;;@ ~lib/memory.ts:214:41 + ;;@ ~lib/memory.ts:109:41 (i32.shl - ;;@ ~lib/memory.ts:213:10 + ;;@ ~lib/memory.ts:108:10 (tee_local $3 - ;;@ ~lib/memory.ts:213:14 + ;;@ ~lib/memory.ts:108:14 (i32.load - ;;@ ~lib/memory.ts:213:24 + ;;@ ~lib/memory.ts:108:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:213:30 + ;;@ ~lib/memory.ts:108:30 (i32.const 9) ) ) ) - ;;@ ~lib/memory.ts:214:46 + ;;@ ~lib/memory.ts:109:46 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:216:10 + ;;@ ~lib/memory.ts:111:10 (i32.store - ;;@ ~lib/memory.ts:216:21 + ;;@ ~lib/memory.ts:111:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:216:28 + ;;@ ~lib/memory.ts:111:28 (i32.const 12) ) - ;;@ ~lib/memory.ts:216:32 + ;;@ ~lib/memory.ts:111:32 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:216:37 + ;;@ ~lib/memory.ts:111:37 (i32.const 24) ) - ;;@ ~lib/memory.ts:216:42 + ;;@ ~lib/memory.ts:111:42 (i32.shl - ;;@ ~lib/memory.ts:215:10 + ;;@ ~lib/memory.ts:110:10 (tee_local $4 - ;;@ ~lib/memory.ts:215:14 + ;;@ ~lib/memory.ts:110:14 (i32.load - ;;@ ~lib/memory.ts:215:24 + ;;@ ~lib/memory.ts:110:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:215:30 + ;;@ ~lib/memory.ts:110:30 (i32.const 13) ) ) ) - ;;@ ~lib/memory.ts:216:47 + ;;@ ~lib/memory.ts:111:47 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:217:10 + ;;@ ~lib/memory.ts:112:10 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:217:17 + ;;@ ~lib/memory.ts:112:17 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:217:21 + ;;@ ~lib/memory.ts:112:21 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:217:29 + ;;@ ~lib/memory.ts:112:29 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:217:33 + ;;@ ~lib/memory.ts:112:33 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:217:38 + ;;@ ~lib/memory.ts:112:38 (i32.const 16) ) ) @@ -1164,30 +1160,30 @@ ) ) ) - ;;@ ~lib/memory.ts:219:8 + ;;@ ~lib/memory.ts:114:8 (br $break|2) ) - ;;@ ~lib/memory.ts:222:8 + ;;@ ~lib/memory.ts:117:8 (set_local $4 - ;;@ ~lib/memory.ts:222:12 + ;;@ ~lib/memory.ts:117:12 (i32.load - ;;@ ~lib/memory.ts:222:22 + ;;@ ~lib/memory.ts:117:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:223:18 + ;;@ ~lib/memory.ts:118:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:223:8 + ;;@ ~lib/memory.ts:118:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:223:35 + ;;@ ~lib/memory.ts:118:35 (block (result i32) (set_local $1 (i32.add @@ -1197,7 +1193,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:223:26 + ;;@ ~lib/memory.ts:118:26 (i32.load8_u (get_local $3) ) @@ -1206,16 +1202,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:224:18 + ;;@ ~lib/memory.ts:119:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:224:8 + ;;@ ~lib/memory.ts:119:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:224:35 + ;;@ ~lib/memory.ts:119:35 (block (result i32) (set_local $1 (i32.add @@ -1225,182 +1221,182 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:224:26 + ;;@ ~lib/memory.ts:119:26 (i32.load8_u (get_local $3) ) ) ) - ;;@ ~lib/memory.ts:225:8 + ;;@ ~lib/memory.ts:120:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:225:13 + ;;@ ~lib/memory.ts:120:13 (i32.const 2) ) ) (loop $continue|4 (if - ;;@ ~lib/memory.ts:226:15 + ;;@ ~lib/memory.ts:121:15 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:226:20 + ;;@ ~lib/memory.ts:121:20 (i32.const 18) ) (block - ;;@ ~lib/memory.ts:228:10 + ;;@ ~lib/memory.ts:123:10 (i32.store - ;;@ ~lib/memory.ts:228:21 + ;;@ ~lib/memory.ts:123:21 (get_local $0) - ;;@ ~lib/memory.ts:228:27 + ;;@ ~lib/memory.ts:123:27 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:228:32 + ;;@ ~lib/memory.ts:123:32 (i32.const 16) ) - ;;@ ~lib/memory.ts:228:37 + ;;@ ~lib/memory.ts:123:37 (i32.shl - ;;@ ~lib/memory.ts:227:10 + ;;@ ~lib/memory.ts:122:10 (tee_local $3 - ;;@ ~lib/memory.ts:227:14 + ;;@ ~lib/memory.ts:122:14 (i32.load - ;;@ ~lib/memory.ts:227:24 + ;;@ ~lib/memory.ts:122:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:227:30 + ;;@ ~lib/memory.ts:122:30 (i32.const 2) ) ) ) - ;;@ ~lib/memory.ts:228:42 + ;;@ ~lib/memory.ts:123:42 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:230:10 + ;;@ ~lib/memory.ts:125:10 (i32.store - ;;@ ~lib/memory.ts:230:21 + ;;@ ~lib/memory.ts:125:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:230:28 + ;;@ ~lib/memory.ts:125:28 (i32.const 4) ) - ;;@ ~lib/memory.ts:230:31 + ;;@ ~lib/memory.ts:125:31 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:230:36 + ;;@ ~lib/memory.ts:125:36 (i32.const 16) ) - ;;@ ~lib/memory.ts:230:41 + ;;@ ~lib/memory.ts:125:41 (i32.shl - ;;@ ~lib/memory.ts:229:10 + ;;@ ~lib/memory.ts:124:10 (tee_local $4 - ;;@ ~lib/memory.ts:229:14 + ;;@ ~lib/memory.ts:124:14 (i32.load - ;;@ ~lib/memory.ts:229:24 + ;;@ ~lib/memory.ts:124:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:229:30 + ;;@ ~lib/memory.ts:124:30 (i32.const 6) ) ) ) - ;;@ ~lib/memory.ts:230:46 + ;;@ ~lib/memory.ts:125:46 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:232:10 + ;;@ ~lib/memory.ts:127:10 (i32.store - ;;@ ~lib/memory.ts:232:21 + ;;@ ~lib/memory.ts:127:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:232:28 + ;;@ ~lib/memory.ts:127:28 (i32.const 8) ) - ;;@ ~lib/memory.ts:232:31 + ;;@ ~lib/memory.ts:127:31 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:232:36 + ;;@ ~lib/memory.ts:127:36 (i32.const 16) ) - ;;@ ~lib/memory.ts:232:41 + ;;@ ~lib/memory.ts:127:41 (i32.shl - ;;@ ~lib/memory.ts:231:10 + ;;@ ~lib/memory.ts:126:10 (tee_local $3 - ;;@ ~lib/memory.ts:231:14 + ;;@ ~lib/memory.ts:126:14 (i32.load - ;;@ ~lib/memory.ts:231:24 + ;;@ ~lib/memory.ts:126:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:231:30 + ;;@ ~lib/memory.ts:126:30 (i32.const 10) ) ) ) - ;;@ ~lib/memory.ts:232:46 + ;;@ ~lib/memory.ts:127:46 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:234:10 + ;;@ ~lib/memory.ts:129:10 (i32.store - ;;@ ~lib/memory.ts:234:21 + ;;@ ~lib/memory.ts:129:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:234:28 + ;;@ ~lib/memory.ts:129:28 (i32.const 12) ) - ;;@ ~lib/memory.ts:234:32 + ;;@ ~lib/memory.ts:129:32 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:234:37 + ;;@ ~lib/memory.ts:129:37 (i32.const 16) ) - ;;@ ~lib/memory.ts:234:42 + ;;@ ~lib/memory.ts:129:42 (i32.shl - ;;@ ~lib/memory.ts:233:10 + ;;@ ~lib/memory.ts:128:10 (tee_local $4 - ;;@ ~lib/memory.ts:233:14 + ;;@ ~lib/memory.ts:128:14 (i32.load - ;;@ ~lib/memory.ts:233:24 + ;;@ ~lib/memory.ts:128:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:233:30 + ;;@ ~lib/memory.ts:128:30 (i32.const 14) ) ) ) - ;;@ ~lib/memory.ts:234:47 + ;;@ ~lib/memory.ts:129:47 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:235:10 + ;;@ ~lib/memory.ts:130:10 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:235:17 + ;;@ ~lib/memory.ts:130:17 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:235:21 + ;;@ ~lib/memory.ts:130:21 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:235:29 + ;;@ ~lib/memory.ts:130:29 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:235:33 + ;;@ ~lib/memory.ts:130:33 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:235:38 + ;;@ ~lib/memory.ts:130:38 (i32.const 16) ) ) @@ -1408,30 +1404,30 @@ ) ) ) - ;;@ ~lib/memory.ts:237:8 + ;;@ ~lib/memory.ts:132:8 (br $break|2) ) - ;;@ ~lib/memory.ts:240:8 + ;;@ ~lib/memory.ts:135:8 (set_local $4 - ;;@ ~lib/memory.ts:240:12 + ;;@ ~lib/memory.ts:135:12 (i32.load - ;;@ ~lib/memory.ts:240:22 + ;;@ ~lib/memory.ts:135:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:241:18 + ;;@ ~lib/memory.ts:136:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:241:8 + ;;@ ~lib/memory.ts:136:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:241:35 + ;;@ ~lib/memory.ts:136:35 (block (result i32) (set_local $1 (i32.add @@ -1441,182 +1437,182 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:241:26 + ;;@ ~lib/memory.ts:136:26 (i32.load8_u (get_local $3) ) ) ) - ;;@ ~lib/memory.ts:242:8 + ;;@ ~lib/memory.ts:137:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:242:13 + ;;@ ~lib/memory.ts:137:13 (i32.const 1) ) ) (loop $continue|5 (if - ;;@ ~lib/memory.ts:243:15 + ;;@ ~lib/memory.ts:138:15 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:243:20 + ;;@ ~lib/memory.ts:138:20 (i32.const 19) ) (block - ;;@ ~lib/memory.ts:245:10 + ;;@ ~lib/memory.ts:140:10 (i32.store - ;;@ ~lib/memory.ts:245:21 + ;;@ ~lib/memory.ts:140:21 (get_local $0) - ;;@ ~lib/memory.ts:245:27 + ;;@ ~lib/memory.ts:140:27 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:245:32 + ;;@ ~lib/memory.ts:140:32 (i32.const 8) ) - ;;@ ~lib/memory.ts:245:36 + ;;@ ~lib/memory.ts:140:36 (i32.shl - ;;@ ~lib/memory.ts:244:10 + ;;@ ~lib/memory.ts:139:10 (tee_local $3 - ;;@ ~lib/memory.ts:244:14 + ;;@ ~lib/memory.ts:139:14 (i32.load - ;;@ ~lib/memory.ts:244:24 + ;;@ ~lib/memory.ts:139:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:244:30 + ;;@ ~lib/memory.ts:139:30 (i32.const 3) ) ) ) - ;;@ ~lib/memory.ts:245:41 + ;;@ ~lib/memory.ts:140:41 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:247:10 + ;;@ ~lib/memory.ts:142:10 (i32.store - ;;@ ~lib/memory.ts:247:21 + ;;@ ~lib/memory.ts:142:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:247:28 + ;;@ ~lib/memory.ts:142:28 (i32.const 4) ) - ;;@ ~lib/memory.ts:247:31 + ;;@ ~lib/memory.ts:142:31 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:247:36 + ;;@ ~lib/memory.ts:142:36 (i32.const 8) ) - ;;@ ~lib/memory.ts:247:40 + ;;@ ~lib/memory.ts:142:40 (i32.shl - ;;@ ~lib/memory.ts:246:10 + ;;@ ~lib/memory.ts:141:10 (tee_local $4 - ;;@ ~lib/memory.ts:246:14 + ;;@ ~lib/memory.ts:141:14 (i32.load - ;;@ ~lib/memory.ts:246:24 + ;;@ ~lib/memory.ts:141:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:246:30 + ;;@ ~lib/memory.ts:141:30 (i32.const 7) ) ) ) - ;;@ ~lib/memory.ts:247:45 + ;;@ ~lib/memory.ts:142:45 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:249:10 + ;;@ ~lib/memory.ts:144:10 (i32.store - ;;@ ~lib/memory.ts:249:21 + ;;@ ~lib/memory.ts:144:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:249:28 + ;;@ ~lib/memory.ts:144:28 (i32.const 8) ) - ;;@ ~lib/memory.ts:249:31 + ;;@ ~lib/memory.ts:144:31 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:249:36 + ;;@ ~lib/memory.ts:144:36 (i32.const 8) ) - ;;@ ~lib/memory.ts:249:40 + ;;@ ~lib/memory.ts:144:40 (i32.shl - ;;@ ~lib/memory.ts:248:10 + ;;@ ~lib/memory.ts:143:10 (tee_local $3 - ;;@ ~lib/memory.ts:248:14 + ;;@ ~lib/memory.ts:143:14 (i32.load - ;;@ ~lib/memory.ts:248:24 + ;;@ ~lib/memory.ts:143:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:248:30 + ;;@ ~lib/memory.ts:143:30 (i32.const 11) ) ) ) - ;;@ ~lib/memory.ts:249:45 + ;;@ ~lib/memory.ts:144:45 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:251:10 + ;;@ ~lib/memory.ts:146:10 (i32.store - ;;@ ~lib/memory.ts:251:21 + ;;@ ~lib/memory.ts:146:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:251:28 + ;;@ ~lib/memory.ts:146:28 (i32.const 12) ) - ;;@ ~lib/memory.ts:251:32 + ;;@ ~lib/memory.ts:146:32 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:251:37 + ;;@ ~lib/memory.ts:146:37 (i32.const 8) ) - ;;@ ~lib/memory.ts:251:41 + ;;@ ~lib/memory.ts:146:41 (i32.shl - ;;@ ~lib/memory.ts:250:10 + ;;@ ~lib/memory.ts:145:10 (tee_local $4 - ;;@ ~lib/memory.ts:250:14 + ;;@ ~lib/memory.ts:145:14 (i32.load - ;;@ ~lib/memory.ts:250:24 + ;;@ ~lib/memory.ts:145:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:250:30 + ;;@ ~lib/memory.ts:145:30 (i32.const 15) ) ) ) - ;;@ ~lib/memory.ts:251:46 + ;;@ ~lib/memory.ts:146:46 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:252:10 + ;;@ ~lib/memory.ts:147:10 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:252:17 + ;;@ ~lib/memory.ts:147:17 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:252:21 + ;;@ ~lib/memory.ts:147:21 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:252:29 + ;;@ ~lib/memory.ts:147:29 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:252:33 + ;;@ ~lib/memory.ts:147:33 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:252:38 + ;;@ ~lib/memory.ts:147:38 (i32.const 16) ) ) @@ -1626,29 +1622,29 @@ ) ) ) - ;;@ ~lib/memory.ts:260:2 + ;;@ ~lib/memory.ts:155:2 (if - ;;@ ~lib/memory.ts:260:6 + ;;@ ~lib/memory.ts:155:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:260:10 + ;;@ ~lib/memory.ts:155:10 (i32.const 16) ) - ;;@ ~lib/memory.ts:260:14 + ;;@ ~lib/memory.ts:155:14 (block (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:261:14 + ;;@ ~lib/memory.ts:156:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:261:4 + ;;@ ~lib/memory.ts:156:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:261:31 + ;;@ ~lib/memory.ts:156:31 (block (result i32) (set_local $1 (i32.add @@ -1658,7 +1654,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:261:22 + ;;@ ~lib/memory.ts:156:22 (i32.load8_u (get_local $3) ) @@ -1667,16 +1663,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:262:14 + ;;@ ~lib/memory.ts:157:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:262:4 + ;;@ ~lib/memory.ts:157:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:262:31 + ;;@ ~lib/memory.ts:157:31 (block (result i32) (set_local $1 (i32.add @@ -1686,7 +1682,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:262:22 + ;;@ ~lib/memory.ts:157:22 (i32.load8_u (get_local $3) ) @@ -1695,16 +1691,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:263:14 + ;;@ ~lib/memory.ts:158:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:263:4 + ;;@ ~lib/memory.ts:158:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:263:31 + ;;@ ~lib/memory.ts:158:31 (block (result i32) (set_local $1 (i32.add @@ -1714,7 +1710,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:263:22 + ;;@ ~lib/memory.ts:158:22 (i32.load8_u (get_local $3) ) @@ -1723,16 +1719,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:264:14 + ;;@ ~lib/memory.ts:159:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:264:4 + ;;@ ~lib/memory.ts:159:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:264:31 + ;;@ ~lib/memory.ts:159:31 (block (result i32) (set_local $1 (i32.add @@ -1742,7 +1738,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:264:22 + ;;@ ~lib/memory.ts:159:22 (i32.load8_u (get_local $3) ) @@ -1751,16 +1747,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:265:14 + ;;@ ~lib/memory.ts:160:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:265:4 + ;;@ ~lib/memory.ts:160:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:265:31 + ;;@ ~lib/memory.ts:160:31 (block (result i32) (set_local $1 (i32.add @@ -1770,7 +1766,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:265:22 + ;;@ ~lib/memory.ts:160:22 (i32.load8_u (get_local $3) ) @@ -1779,16 +1775,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:266:14 + ;;@ ~lib/memory.ts:161:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:266:4 + ;;@ ~lib/memory.ts:161:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:266:31 + ;;@ ~lib/memory.ts:161:31 (block (result i32) (set_local $1 (i32.add @@ -1798,7 +1794,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:266:22 + ;;@ ~lib/memory.ts:161:22 (i32.load8_u (get_local $3) ) @@ -1807,16 +1803,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:267:14 + ;;@ ~lib/memory.ts:162:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:267:4 + ;;@ ~lib/memory.ts:162:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:267:31 + ;;@ ~lib/memory.ts:162:31 (block (result i32) (set_local $1 (i32.add @@ -1826,7 +1822,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:267:22 + ;;@ ~lib/memory.ts:162:22 (i32.load8_u (get_local $3) ) @@ -1835,16 +1831,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:268:14 + ;;@ ~lib/memory.ts:163:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:268:4 + ;;@ ~lib/memory.ts:163:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:268:31 + ;;@ ~lib/memory.ts:163:31 (block (result i32) (set_local $1 (i32.add @@ -1854,7 +1850,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:268:22 + ;;@ ~lib/memory.ts:163:22 (i32.load8_u (get_local $3) ) @@ -1863,16 +1859,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:269:14 + ;;@ ~lib/memory.ts:164:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:269:4 + ;;@ ~lib/memory.ts:164:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:269:31 + ;;@ ~lib/memory.ts:164:31 (block (result i32) (set_local $1 (i32.add @@ -1882,7 +1878,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:269:22 + ;;@ ~lib/memory.ts:164:22 (i32.load8_u (get_local $3) ) @@ -1891,16 +1887,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:270:14 + ;;@ ~lib/memory.ts:165:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:270:4 + ;;@ ~lib/memory.ts:165:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:270:31 + ;;@ ~lib/memory.ts:165:31 (block (result i32) (set_local $1 (i32.add @@ -1910,7 +1906,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:270:22 + ;;@ ~lib/memory.ts:165:22 (i32.load8_u (get_local $3) ) @@ -1919,16 +1915,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:271:14 + ;;@ ~lib/memory.ts:166:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:271:4 + ;;@ ~lib/memory.ts:166:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:271:31 + ;;@ ~lib/memory.ts:166:31 (block (result i32) (set_local $1 (i32.add @@ -1938,7 +1934,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:271:22 + ;;@ ~lib/memory.ts:166:22 (i32.load8_u (get_local $3) ) @@ -1947,16 +1943,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:272:14 + ;;@ ~lib/memory.ts:167:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:272:4 + ;;@ ~lib/memory.ts:167:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:272:31 + ;;@ ~lib/memory.ts:167:31 (block (result i32) (set_local $1 (i32.add @@ -1966,7 +1962,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:272:22 + ;;@ ~lib/memory.ts:167:22 (i32.load8_u (get_local $3) ) @@ -1975,16 +1971,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:273:14 + ;;@ ~lib/memory.ts:168:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:273:4 + ;;@ ~lib/memory.ts:168:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:273:31 + ;;@ ~lib/memory.ts:168:31 (block (result i32) (set_local $1 (i32.add @@ -1994,7 +1990,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:273:22 + ;;@ ~lib/memory.ts:168:22 (i32.load8_u (get_local $3) ) @@ -2003,16 +1999,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:274:14 + ;;@ ~lib/memory.ts:169:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:274:4 + ;;@ ~lib/memory.ts:169:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:274:31 + ;;@ ~lib/memory.ts:169:31 (block (result i32) (set_local $1 (i32.add @@ -2022,7 +2018,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:274:22 + ;;@ ~lib/memory.ts:169:22 (i32.load8_u (get_local $3) ) @@ -2031,16 +2027,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:275:14 + ;;@ ~lib/memory.ts:170:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:275:4 + ;;@ ~lib/memory.ts:170:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:275:31 + ;;@ ~lib/memory.ts:170:31 (block (result i32) (set_local $1 (i32.add @@ -2050,7 +2046,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:275:22 + ;;@ ~lib/memory.ts:170:22 (i32.load8_u (get_local $3) ) @@ -2059,16 +2055,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:276:14 + ;;@ ~lib/memory.ts:171:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:276:4 + ;;@ ~lib/memory.ts:171:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:276:31 + ;;@ ~lib/memory.ts:171:31 (block (result i32) (set_local $1 (i32.add @@ -2078,7 +2074,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:276:22 + ;;@ ~lib/memory.ts:171:22 (i32.load8_u (get_local $3) ) @@ -2086,29 +2082,29 @@ ) ) ) - ;;@ ~lib/memory.ts:278:2 + ;;@ ~lib/memory.ts:173:2 (if - ;;@ ~lib/memory.ts:278:6 + ;;@ ~lib/memory.ts:173:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:278:10 + ;;@ ~lib/memory.ts:173:10 (i32.const 8) ) - ;;@ ~lib/memory.ts:278:13 + ;;@ ~lib/memory.ts:173:13 (block (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:279:14 + ;;@ ~lib/memory.ts:174:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:279:4 + ;;@ ~lib/memory.ts:174:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:279:31 + ;;@ ~lib/memory.ts:174:31 (block (result i32) (set_local $1 (i32.add @@ -2118,7 +2114,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:279:22 + ;;@ ~lib/memory.ts:174:22 (i32.load8_u (get_local $3) ) @@ -2127,16 +2123,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:280:14 + ;;@ ~lib/memory.ts:175:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:280:4 + ;;@ ~lib/memory.ts:175:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:280:31 + ;;@ ~lib/memory.ts:175:31 (block (result i32) (set_local $1 (i32.add @@ -2146,7 +2142,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:280:22 + ;;@ ~lib/memory.ts:175:22 (i32.load8_u (get_local $3) ) @@ -2155,16 +2151,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:281:14 + ;;@ ~lib/memory.ts:176:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:281:4 + ;;@ ~lib/memory.ts:176:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:281:31 + ;;@ ~lib/memory.ts:176:31 (block (result i32) (set_local $1 (i32.add @@ -2174,7 +2170,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:281:22 + ;;@ ~lib/memory.ts:176:22 (i32.load8_u (get_local $3) ) @@ -2183,16 +2179,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:282:14 + ;;@ ~lib/memory.ts:177:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:282:4 + ;;@ ~lib/memory.ts:177:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:282:31 + ;;@ ~lib/memory.ts:177:31 (block (result i32) (set_local $1 (i32.add @@ -2202,7 +2198,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:282:22 + ;;@ ~lib/memory.ts:177:22 (i32.load8_u (get_local $3) ) @@ -2211,16 +2207,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:283:14 + ;;@ ~lib/memory.ts:178:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:283:4 + ;;@ ~lib/memory.ts:178:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:283:31 + ;;@ ~lib/memory.ts:178:31 (block (result i32) (set_local $1 (i32.add @@ -2230,7 +2226,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:283:22 + ;;@ ~lib/memory.ts:178:22 (i32.load8_u (get_local $3) ) @@ -2239,16 +2235,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:284:14 + ;;@ ~lib/memory.ts:179:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:284:4 + ;;@ ~lib/memory.ts:179:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:284:31 + ;;@ ~lib/memory.ts:179:31 (block (result i32) (set_local $1 (i32.add @@ -2258,7 +2254,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:284:22 + ;;@ ~lib/memory.ts:179:22 (i32.load8_u (get_local $3) ) @@ -2267,16 +2263,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:285:14 + ;;@ ~lib/memory.ts:180:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:285:4 + ;;@ ~lib/memory.ts:180:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:285:31 + ;;@ ~lib/memory.ts:180:31 (block (result i32) (set_local $1 (i32.add @@ -2286,7 +2282,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:285:22 + ;;@ ~lib/memory.ts:180:22 (i32.load8_u (get_local $3) ) @@ -2295,16 +2291,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:286:14 + ;;@ ~lib/memory.ts:181:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:286:4 + ;;@ ~lib/memory.ts:181:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:286:31 + ;;@ ~lib/memory.ts:181:31 (block (result i32) (set_local $1 (i32.add @@ -2314,7 +2310,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:286:22 + ;;@ ~lib/memory.ts:181:22 (i32.load8_u (get_local $3) ) @@ -2322,29 +2318,29 @@ ) ) ) - ;;@ ~lib/memory.ts:288:2 + ;;@ ~lib/memory.ts:183:2 (if - ;;@ ~lib/memory.ts:288:6 + ;;@ ~lib/memory.ts:183:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:288:10 + ;;@ ~lib/memory.ts:183:10 (i32.const 4) ) - ;;@ ~lib/memory.ts:288:13 + ;;@ ~lib/memory.ts:183:13 (block (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:289:14 + ;;@ ~lib/memory.ts:184:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:289:4 + ;;@ ~lib/memory.ts:184:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:289:31 + ;;@ ~lib/memory.ts:184:31 (block (result i32) (set_local $1 (i32.add @@ -2354,7 +2350,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:289:22 + ;;@ ~lib/memory.ts:184:22 (i32.load8_u (get_local $3) ) @@ -2363,16 +2359,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:290:14 + ;;@ ~lib/memory.ts:185:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:290:4 + ;;@ ~lib/memory.ts:185:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:290:31 + ;;@ ~lib/memory.ts:185:31 (block (result i32) (set_local $1 (i32.add @@ -2382,7 +2378,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:290:22 + ;;@ ~lib/memory.ts:185:22 (i32.load8_u (get_local $3) ) @@ -2391,16 +2387,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:291:14 + ;;@ ~lib/memory.ts:186:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:291:4 + ;;@ ~lib/memory.ts:186:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:291:31 + ;;@ ~lib/memory.ts:186:31 (block (result i32) (set_local $1 (i32.add @@ -2410,7 +2406,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:291:22 + ;;@ ~lib/memory.ts:186:22 (i32.load8_u (get_local $3) ) @@ -2419,16 +2415,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:292:14 + ;;@ ~lib/memory.ts:187:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:292:4 + ;;@ ~lib/memory.ts:187:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:292:31 + ;;@ ~lib/memory.ts:187:31 (block (result i32) (set_local $1 (i32.add @@ -2438,7 +2434,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:292:22 + ;;@ ~lib/memory.ts:187:22 (i32.load8_u (get_local $3) ) @@ -2446,29 +2442,29 @@ ) ) ) - ;;@ ~lib/memory.ts:294:2 + ;;@ ~lib/memory.ts:189:2 (if - ;;@ ~lib/memory.ts:294:6 + ;;@ ~lib/memory.ts:189:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:294:10 + ;;@ ~lib/memory.ts:189:10 (i32.const 2) ) - ;;@ ~lib/memory.ts:294:13 + ;;@ ~lib/memory.ts:189:13 (block (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:295:14 + ;;@ ~lib/memory.ts:190:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:295:4 + ;;@ ~lib/memory.ts:190:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:295:31 + ;;@ ~lib/memory.ts:190:31 (block (result i32) (set_local $1 (i32.add @@ -2478,7 +2474,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:295:22 + ;;@ ~lib/memory.ts:190:22 (i32.load8_u (get_local $3) ) @@ -2487,16 +2483,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:296:14 + ;;@ ~lib/memory.ts:191:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:296:4 + ;;@ ~lib/memory.ts:191:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:296:31 + ;;@ ~lib/memory.ts:191:31 (block (result i32) (set_local $1 (i32.add @@ -2506,7 +2502,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:296:22 + ;;@ ~lib/memory.ts:191:22 (i32.load8_u (get_local $3) ) @@ -2514,28 +2510,28 @@ ) ) ) - ;;@ ~lib/memory.ts:298:2 + ;;@ ~lib/memory.ts:193:2 (if - ;;@ ~lib/memory.ts:298:6 + ;;@ ~lib/memory.ts:193:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:298:10 + ;;@ ~lib/memory.ts:193:10 (i32.const 1) ) - ;;@ ~lib/memory.ts:299:14 + ;;@ ~lib/memory.ts:194:14 (block (set_local $3 (get_local $0) ) - ;;@ ~lib/memory.ts:298:13 + ;;@ ~lib/memory.ts:193:13 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:299:31 + ;;@ ~lib/memory.ts:194:31 (block (result i32) (set_local $3 (get_local $1) ) - ;;@ ~lib/memory.ts:299:22 + ;;@ ~lib/memory.ts:194:22 (i32.load8_u (get_local $3) ) @@ -2544,114 +2540,114 @@ ) ) ) - (func $~lib/memory/memory.copy (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memmove (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - ;;@ ~lib/memory.ts:79:4 + ;;@ ~lib/memory.ts:200:2 (if - ;;@ ~lib/memory.ts:79:8 + ;;@ ~lib/memory.ts:200:6 (i32.eq (get_local $0) - ;;@ ~lib/memory.ts:79:16 + ;;@ ~lib/memory.ts:200:14 (get_local $1) ) - ;;@ ~lib/memory.ts:79:21 + ;;@ ~lib/memory.ts:200:19 (return) ) - ;;@ ~lib/memory.ts:80:4 + ;;@ ~lib/memory.ts:201:2 (if - ;;@ ~lib/memory.ts:80:8 + ;;@ ~lib/memory.ts:201:6 (if (result i32) (tee_local $3 (i32.le_u (i32.add (get_local $1) - ;;@ ~lib/memory.ts:80:14 + ;;@ ~lib/memory.ts:201:12 (get_local $2) ) - ;;@ ~lib/memory.ts:80:19 + ;;@ ~lib/memory.ts:201:17 (get_local $0) ) ) (get_local $3) - ;;@ ~lib/memory.ts:80:27 + ;;@ ~lib/memory.ts:201:25 (i32.le_u (i32.add (get_local $0) - ;;@ ~lib/memory.ts:80:34 + ;;@ ~lib/memory.ts:201:32 (get_local $2) ) - ;;@ ~lib/memory.ts:80:39 + ;;@ ~lib/memory.ts:201:37 (get_local $1) ) ) - ;;@ ~lib/memory.ts:80:44 + ;;@ ~lib/memory.ts:201:42 (block - ;;@ ~lib/memory.ts:81:6 + ;;@ ~lib/memory.ts:202:4 (call $~lib/memory/memcpy - ;;@ ~lib/memory.ts:81:13 + ;;@ ~lib/memory.ts:202:11 (get_local $0) - ;;@ ~lib/memory.ts:81:19 + ;;@ ~lib/memory.ts:202:17 (get_local $1) - ;;@ ~lib/memory.ts:81:24 + ;;@ ~lib/memory.ts:202:22 (get_local $2) ) - ;;@ ~lib/memory.ts:82:6 + ;;@ ~lib/memory.ts:203:4 (return) ) ) - ;;@ ~lib/memory.ts:84:4 + ;;@ ~lib/memory.ts:205:2 (if - ;;@ ~lib/memory.ts:84:8 + ;;@ ~lib/memory.ts:205:6 (i32.lt_u (get_local $0) - ;;@ ~lib/memory.ts:84:15 + ;;@ ~lib/memory.ts:205:13 (get_local $1) ) - ;;@ ~lib/memory.ts:84:20 + ;;@ ~lib/memory.ts:205:18 (block - ;;@ ~lib/memory.ts:85:6 + ;;@ ~lib/memory.ts:206:4 (if - ;;@ ~lib/memory.ts:85:10 + ;;@ ~lib/memory.ts:206:8 (i32.eq (i32.and - ;;@ ~lib/memory.ts:85:11 + ;;@ ~lib/memory.ts:206:9 (get_local $1) - ;;@ ~lib/memory.ts:85:17 + ;;@ ~lib/memory.ts:206:15 (i32.const 7) ) - ;;@ ~lib/memory.ts:85:23 + ;;@ ~lib/memory.ts:206:21 (i32.and - ;;@ ~lib/memory.ts:85:24 + ;;@ ~lib/memory.ts:206:22 (get_local $0) - ;;@ ~lib/memory.ts:85:31 + ;;@ ~lib/memory.ts:206:29 (i32.const 7) ) ) - ;;@ ~lib/memory.ts:85:35 + ;;@ ~lib/memory.ts:206:33 (block (loop $continue|0 (if - ;;@ ~lib/memory.ts:86:15 + ;;@ ~lib/memory.ts:207:13 (i32.and (get_local $0) - ;;@ ~lib/memory.ts:86:22 + ;;@ ~lib/memory.ts:207:20 (i32.const 7) ) (block - ;;@ ~lib/memory.ts:87:10 + ;;@ ~lib/memory.ts:208:8 (if - ;;@ ~lib/memory.ts:87:14 + ;;@ ~lib/memory.ts:208:12 (i32.eqz - ;;@ ~lib/memory.ts:87:15 + ;;@ ~lib/memory.ts:208:13 (get_local $2) ) - ;;@ ~lib/memory.ts:87:18 + ;;@ ~lib/memory.ts:208:16 (return) ) - ;;@ ~lib/memory.ts:88:10 + ;;@ ~lib/memory.ts:209:8 (set_local $2 (i32.sub - ;;@ ~lib/memory.ts:88:12 + ;;@ ~lib/memory.ts:209:10 (get_local $2) (i32.const 1) ) @@ -2659,16 +2655,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:89:20 + ;;@ ~lib/memory.ts:210:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:89:10 + ;;@ ~lib/memory.ts:210:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:89:37 + ;;@ ~lib/memory.ts:210:35 (block (result i32) (set_local $1 (i32.add @@ -2678,7 +2674,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:89:28 + ;;@ ~lib/memory.ts:210:26 (i32.load8_u (get_local $3) ) @@ -2690,44 +2686,44 @@ ) (loop $continue|1 (if - ;;@ ~lib/memory.ts:91:15 + ;;@ ~lib/memory.ts:212:13 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:91:20 + ;;@ ~lib/memory.ts:212:18 (i32.const 8) ) (block - ;;@ ~lib/memory.ts:92:10 + ;;@ ~lib/memory.ts:213:8 (i64.store - ;;@ ~lib/memory.ts:92:21 + ;;@ ~lib/memory.ts:213:19 (get_local $0) - ;;@ ~lib/memory.ts:92:27 + ;;@ ~lib/memory.ts:213:25 (i64.load - ;;@ ~lib/memory.ts:92:37 + ;;@ ~lib/memory.ts:213:35 (get_local $1) ) ) - ;;@ ~lib/memory.ts:93:10 + ;;@ ~lib/memory.ts:214:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:93:18 + ;;@ ~lib/memory.ts:214:16 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:94:10 + ;;@ ~lib/memory.ts:215:8 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:94:18 + ;;@ ~lib/memory.ts:215:16 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:95:10 + ;;@ ~lib/memory.ts:216:8 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:95:18 + ;;@ ~lib/memory.ts:216:16 (i32.const 8) ) ) @@ -2739,22 +2735,22 @@ ) (loop $continue|2 (if - ;;@ ~lib/memory.ts:98:13 + ;;@ ~lib/memory.ts:219:11 (get_local $2) (block (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:99:18 + ;;@ ~lib/memory.ts:220:16 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:99:8 + ;;@ ~lib/memory.ts:220:6 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:99:35 + ;;@ ~lib/memory.ts:220:33 (block (result i32) (set_local $1 (i32.add @@ -2764,16 +2760,16 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:99:26 + ;;@ ~lib/memory.ts:220:24 (i32.load8_u (get_local $3) ) ) ) - ;;@ ~lib/memory.ts:100:8 + ;;@ ~lib/memory.ts:221:6 (set_local $2 (i32.sub - ;;@ ~lib/memory.ts:100:10 + ;;@ ~lib/memory.ts:221:8 (get_local $2) (i32.const 1) ) @@ -2783,72 +2779,72 @@ ) ) ) - ;;@ ~lib/memory.ts:102:11 + ;;@ ~lib/memory.ts:223:9 (block - ;;@ ~lib/memory.ts:103:6 + ;;@ ~lib/memory.ts:224:4 (if - ;;@ ~lib/memory.ts:103:10 + ;;@ ~lib/memory.ts:224:8 (i32.eq (i32.and - ;;@ ~lib/memory.ts:103:11 + ;;@ ~lib/memory.ts:224:9 (get_local $1) - ;;@ ~lib/memory.ts:103:17 + ;;@ ~lib/memory.ts:224:15 (i32.const 7) ) - ;;@ ~lib/memory.ts:103:23 + ;;@ ~lib/memory.ts:224:21 (i32.and - ;;@ ~lib/memory.ts:103:24 + ;;@ ~lib/memory.ts:224:22 (get_local $0) - ;;@ ~lib/memory.ts:103:31 + ;;@ ~lib/memory.ts:224:29 (i32.const 7) ) ) - ;;@ ~lib/memory.ts:103:35 + ;;@ ~lib/memory.ts:224:33 (block (loop $continue|3 (if - ;;@ ~lib/memory.ts:104:15 + ;;@ ~lib/memory.ts:225:13 (i32.and (i32.add - ;;@ ~lib/memory.ts:104:16 + ;;@ ~lib/memory.ts:225:14 (get_local $0) - ;;@ ~lib/memory.ts:104:23 + ;;@ ~lib/memory.ts:225:21 (get_local $2) ) - ;;@ ~lib/memory.ts:104:28 + ;;@ ~lib/memory.ts:225:26 (i32.const 7) ) (block - ;;@ ~lib/memory.ts:105:10 + ;;@ ~lib/memory.ts:226:8 (if - ;;@ ~lib/memory.ts:105:14 + ;;@ ~lib/memory.ts:226:12 (i32.eqz - ;;@ ~lib/memory.ts:105:15 + ;;@ ~lib/memory.ts:226:13 (get_local $2) ) - ;;@ ~lib/memory.ts:105:18 + ;;@ ~lib/memory.ts:226:16 (return) ) - ;;@ ~lib/memory.ts:106:10 + ;;@ ~lib/memory.ts:227:8 (i32.store8 - ;;@ ~lib/memory.ts:106:20 + ;;@ ~lib/memory.ts:227:18 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:106:27 + ;;@ ~lib/memory.ts:227:25 (tee_local $2 (i32.sub - ;;@ ~lib/memory.ts:106:29 + ;;@ ~lib/memory.ts:227:27 (get_local $2) (i32.const 1) ) ) ) - ;;@ ~lib/memory.ts:106:32 + ;;@ ~lib/memory.ts:227:30 (i32.load8_u - ;;@ ~lib/memory.ts:106:41 + ;;@ ~lib/memory.ts:227:39 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:106:47 + ;;@ ~lib/memory.ts:227:45 (get_local $2) ) ) @@ -2859,33 +2855,33 @@ ) (loop $continue|4 (if - ;;@ ~lib/memory.ts:108:15 + ;;@ ~lib/memory.ts:229:13 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:108:20 + ;;@ ~lib/memory.ts:229:18 (i32.const 8) ) (block - ;;@ ~lib/memory.ts:110:10 + ;;@ ~lib/memory.ts:231:8 (i64.store - ;;@ ~lib/memory.ts:110:21 + ;;@ ~lib/memory.ts:231:19 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:109:10 + ;;@ ~lib/memory.ts:230:8 (tee_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:109:15 + ;;@ ~lib/memory.ts:230:13 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:110:31 + ;;@ ~lib/memory.ts:231:29 (i64.load - ;;@ ~lib/memory.ts:110:41 + ;;@ ~lib/memory.ts:231:39 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:110:47 + ;;@ ~lib/memory.ts:231:45 (get_local $2) ) ) @@ -2898,29 +2894,29 @@ ) (loop $continue|5 (if - ;;@ ~lib/memory.ts:113:13 + ;;@ ~lib/memory.ts:234:11 (get_local $2) (block - ;;@ ~lib/memory.ts:113:16 + ;;@ ~lib/memory.ts:234:14 (i32.store8 - ;;@ ~lib/memory.ts:114:18 + ;;@ ~lib/memory.ts:235:16 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:114:25 + ;;@ ~lib/memory.ts:235:23 (tee_local $2 (i32.sub - ;;@ ~lib/memory.ts:114:27 + ;;@ ~lib/memory.ts:235:25 (get_local $2) (i32.const 1) ) ) ) - ;;@ ~lib/memory.ts:114:30 + ;;@ ~lib/memory.ts:235:28 (i32.load8_u - ;;@ ~lib/memory.ts:114:39 + ;;@ ~lib/memory.ts:235:37 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:114:45 + ;;@ ~lib/memory.ts:235:43 (get_local $2) ) ) @@ -2932,62 +2928,73 @@ ) ) ) - (func $~lib/memory/memory.compare (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.copy (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + ;;@ ~lib/memory.ts:16:4 + (call $~lib/memory/memmove + ;;@ ~lib/memory.ts:16:12 + (get_local $0) + ;;@ ~lib/memory.ts:16:18 + (get_local $1) + ;;@ ~lib/memory.ts:16:23 + (get_local $2) + ) + ) + (func $~lib/memory/memcmp (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - ;;@ ~lib/memory.ts:122:4 + ;;@ ~lib/memory.ts:302:2 (if - ;;@ ~lib/memory.ts:122:8 + ;;@ ~lib/memory.ts:302:6 (i32.eq (get_local $0) - ;;@ ~lib/memory.ts:122:14 + ;;@ ~lib/memory.ts:302:12 (get_local $1) ) - ;;@ ~lib/memory.ts:122:25 + ;;@ ~lib/memory.ts:302:23 (return (i32.const 0) ) ) (loop $continue|0 (if - ;;@ ~lib/memory.ts:123:11 + ;;@ ~lib/memory.ts:303:9 (if (result i32) (tee_local $3 (i32.ne (get_local $2) - ;;@ ~lib/memory.ts:123:16 + ;;@ ~lib/memory.ts:303:14 (i32.const 0) ) ) - ;;@ ~lib/memory.ts:123:21 + ;;@ ~lib/memory.ts:303:19 (i32.eq (i32.load8_u - ;;@ ~lib/memory.ts:123:30 + ;;@ ~lib/memory.ts:303:28 (get_local $0) ) - ;;@ ~lib/memory.ts:123:37 + ;;@ ~lib/memory.ts:303:35 (i32.load8_u - ;;@ ~lib/memory.ts:123:46 + ;;@ ~lib/memory.ts:303:44 (get_local $1) ) ) (get_local $3) ) (block - ;;@ ~lib/memory.ts:124:6 + ;;@ ~lib/memory.ts:304:4 (set_local $2 (i32.sub (get_local $2) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:124:11 + ;;@ ~lib/memory.ts:304:9 (set_local $0 (i32.add (get_local $0) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:124:17 + ;;@ ~lib/memory.ts:304:15 (set_local $1 (i32.add (get_local $1) @@ -2998,27 +3005,38 @@ ) ) ) - ;;@ ~lib/memory.ts:126:55 + ;;@ ~lib/memory.ts:306:53 (if (result i32) - ;;@ ~lib/memory.ts:126:11 + ;;@ ~lib/memory.ts:306:9 (get_local $2) - ;;@ ~lib/memory.ts:126:15 + ;;@ ~lib/memory.ts:306:13 (i32.sub (i32.load8_u - ;;@ ~lib/memory.ts:126:29 + ;;@ ~lib/memory.ts:306:27 (get_local $0) ) - ;;@ ~lib/memory.ts:126:35 + ;;@ ~lib/memory.ts:306:33 (i32.load8_u - ;;@ ~lib/memory.ts:126:49 + ;;@ ~lib/memory.ts:306:47 (get_local $1) ) ) - ;;@ ~lib/memory.ts:126:55 + ;;@ ~lib/memory.ts:306:53 (i32.const 0) ) ) - (func $~lib/allocator/arena/__memory_allocate (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.compare (; 6 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + ;;@ ~lib/memory.ts:21:27 + (call $~lib/memory/memcmp + ;;@ ~lib/memory.ts:21:18 + (get_local $0) + ;;@ ~lib/memory.ts:21:22 + (get_local $1) + ;;@ ~lib/memory.ts:21:26 + (get_local $2) + ) + ) + (func $~lib/allocator/arena/__memory_allocate (; 7 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3034,7 +3052,6 @@ ;;@ ~lib/allocator/arena.ts:18:8 (i32.gt_u (get_local $0) - ;;@ ~lib/allocator/arena.ts:18:15 (i32.const 1073741824) ) ;;@ ~lib/allocator/arena.ts:18:28 @@ -3059,7 +3076,6 @@ ;;@ ~lib/allocator/arena.ts:20:24 (get_local $0) ) - ;;@ ~lib/allocator/arena.ts:20:31 (i32.const 7) ) (i32.const -8) @@ -3069,6 +3085,7 @@ (i32.shl ;;@ ~lib/allocator/arena.ts:21:4 (tee_local $2 + ;;@ ~lib/allocator/arena.ts:21:29 (current_memory) ) ;;@ ~lib/allocator/arena.ts:22:39 @@ -3079,6 +3096,7 @@ (if ;;@ ~lib/allocator/arena.ts:25:10 (i32.lt_s + ;;@ ~lib/allocator/arena.ts:25:17 (grow_memory ;;@ ~lib/allocator/arena.ts:24:24 (select @@ -3121,6 +3139,7 @@ (if ;;@ ~lib/allocator/arena.ts:26:12 (i32.lt_s + ;;@ ~lib/allocator/arena.ts:26:19 (grow_memory ;;@ ~lib/allocator/arena.ts:26:24 (get_local $3) @@ -3147,33 +3166,24 @@ ;;@ ~lib/allocator/arena.ts:34:9 (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 7 ;) (type $ii) (param $0 i32) (result i32) - ;;@ ~lib/memory.ts:142:45 + (func $~lib/memory/memory.allocate (; 8 ;) (type $ii) (param $0 i32) (result i32) + ;;@ ~lib/memory.ts:37:45 (call $~lib/allocator/arena/__memory_allocate - ;;@ ~lib/memory.ts:142:63 + ;;@ ~lib/memory.ts:37:63 (get_local $0) ) ) - (func $~lib/memory/memory.free (; 8 ;) (type $iv) (param $0 i32) + (func $~lib/memory/memory.free (; 9 ;) (type $iv) (param $0 i32) (nop) ) - (func $~lib/memory/memory.reset (; 9 ;) (type $v) + (func $~lib/memory/memory.reset (; 10 ;) (type $v) (set_global $~lib/allocator/arena/offset (get_global $~lib/allocator/arena/startOffset) ) ) - (func $start (; 10 ;) (type $v) + (func $start (; 11 ;) (type $v) (set_global $~lib/allocator/arena/startOffset - ;;@ ~lib/allocator/arena.ts:12:25 - (i32.and - (i32.add - ;;@ ~lib/allocator/arena.ts:12:26 - (get_global $HEAP_BASE) - ;;@ ~lib/allocator/arena.ts:12:38 - (i32.const 7) - ) - (i32.const -8) - ) + (i32.const 8) ) (set_global $~lib/allocator/arena/offset ;;@ ~lib/allocator/arena.ts:13:20 diff --git a/tests/allocators/arena/untouched.wat b/tests/allocators/arena/untouched.wat index 543ab5ec..7f58e174 100644 --- a/tests/allocators/arena/untouched.wat +++ b/tests/allocators/arena/untouched.wat @@ -1,8 +1,7 @@ (module - (type $i (func (result i32))) - (type $ii (func (param i32) (result i32))) (type $iiiv (func (param i32 i32 i32))) (type $iiii (func (param i32 i32 i32) (result i32))) + (type $ii (func (param i32) (result i32))) (type $iv (func (param i32))) (type $v (func)) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) @@ -13,540 +12,527 @@ (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 8)) (memory $0 0) - (export "memory.size" (func $~lib/memory/memory.size)) - (export "memory.grow" (func $~lib/memory/memory.grow)) + (export "memory" (memory $0)) (export "memory.fill" (func $~lib/memory/memory.fill)) (export "memory.copy" (func $~lib/memory/memory.copy)) (export "memory.compare" (func $~lib/memory/memory.compare)) (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" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 0 ;) (type $i) (result i32) - ;;@ ~lib/memory.ts:4:25 - (current_memory) - ) - (func $~lib/memory/memory.grow (; 1 ;) (type $ii) (param $0 i32) (result i32) - ;;@ ~lib/memory.ts:8:30 - (grow_memory - ;;@ ~lib/memory.ts:8:25 - (get_local $0) - ) - ) - (func $~lib/memory/memory.fill (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 0 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) - ;;@ ~lib/memory.ts:17:4 + ;;@ ~lib/memory.ts:244:2 (if - ;;@ ~lib/memory.ts:17:8 + ;;@ ~lib/memory.ts:244:6 (i32.eqz - ;;@ ~lib/memory.ts:17:9 + ;;@ ~lib/memory.ts:244:7 (get_local $2) ) - ;;@ ~lib/memory.ts:17:12 + ;;@ ~lib/memory.ts:244:10 (return) ) - ;;@ ~lib/memory.ts:18:4 + ;;@ ~lib/memory.ts:245:2 (i32.store8 - ;;@ ~lib/memory.ts:18:14 + ;;@ ~lib/memory.ts:245:12 (get_local $0) - ;;@ ~lib/memory.ts:18:20 + ;;@ ~lib/memory.ts:245:18 (get_local $1) ) - ;;@ ~lib/memory.ts:19:4 + ;;@ ~lib/memory.ts:246:2 (i32.store8 - ;;@ ~lib/memory.ts:19:14 + ;;@ ~lib/memory.ts:246:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:19:21 + ;;@ ~lib/memory.ts:246:19 (get_local $2) ) - ;;@ ~lib/memory.ts:19:25 + ;;@ ~lib/memory.ts:246:23 (i32.const 1) ) - ;;@ ~lib/memory.ts:19:28 + ;;@ ~lib/memory.ts:246:26 (get_local $1) ) - ;;@ ~lib/memory.ts:20:4 + ;;@ ~lib/memory.ts:247:2 (if - ;;@ ~lib/memory.ts:20:8 + ;;@ ~lib/memory.ts:247:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:20:13 + ;;@ ~lib/memory.ts:247:11 (i32.const 2) ) - ;;@ ~lib/memory.ts:20:16 + ;;@ ~lib/memory.ts:247:14 (return) ) - ;;@ ~lib/memory.ts:22:4 + ;;@ ~lib/memory.ts:249:2 (i32.store8 - ;;@ ~lib/memory.ts:22:14 + ;;@ ~lib/memory.ts:249:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:22:21 + ;;@ ~lib/memory.ts:249:19 (i32.const 1) ) - ;;@ ~lib/memory.ts:22:24 + ;;@ ~lib/memory.ts:249:22 (get_local $1) ) - ;;@ ~lib/memory.ts:23:4 + ;;@ ~lib/memory.ts:250:2 (i32.store8 - ;;@ ~lib/memory.ts:23:14 + ;;@ ~lib/memory.ts:250:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:23:21 + ;;@ ~lib/memory.ts:250:19 (i32.const 2) ) - ;;@ ~lib/memory.ts:23:24 + ;;@ ~lib/memory.ts:250:22 (get_local $1) ) - ;;@ ~lib/memory.ts:24:4 + ;;@ ~lib/memory.ts:251:2 (i32.store8 - ;;@ ~lib/memory.ts:24:14 + ;;@ ~lib/memory.ts:251:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:24:21 + ;;@ ~lib/memory.ts:251:19 (get_local $2) ) - ;;@ ~lib/memory.ts:24:25 + ;;@ ~lib/memory.ts:251:23 (i32.const 2) ) - ;;@ ~lib/memory.ts:24:28 + ;;@ ~lib/memory.ts:251:26 (get_local $1) ) - ;;@ ~lib/memory.ts:25:4 + ;;@ ~lib/memory.ts:252:2 (i32.store8 - ;;@ ~lib/memory.ts:25:14 + ;;@ ~lib/memory.ts:252:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:25:21 + ;;@ ~lib/memory.ts:252:19 (get_local $2) ) - ;;@ ~lib/memory.ts:25:25 + ;;@ ~lib/memory.ts:252:23 (i32.const 3) ) - ;;@ ~lib/memory.ts:25:28 + ;;@ ~lib/memory.ts:252:26 (get_local $1) ) - ;;@ ~lib/memory.ts:26:4 + ;;@ ~lib/memory.ts:253:2 (if - ;;@ ~lib/memory.ts:26:8 + ;;@ ~lib/memory.ts:253:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:26:13 + ;;@ ~lib/memory.ts:253:11 (i32.const 6) ) - ;;@ ~lib/memory.ts:26:16 + ;;@ ~lib/memory.ts:253:14 (return) ) - ;;@ ~lib/memory.ts:27:4 + ;;@ ~lib/memory.ts:254:2 (i32.store8 - ;;@ ~lib/memory.ts:27:14 + ;;@ ~lib/memory.ts:254:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:27:21 + ;;@ ~lib/memory.ts:254:19 (i32.const 3) ) - ;;@ ~lib/memory.ts:27:24 + ;;@ ~lib/memory.ts:254:22 (get_local $1) ) - ;;@ ~lib/memory.ts:28:4 + ;;@ ~lib/memory.ts:255:2 (i32.store8 - ;;@ ~lib/memory.ts:28:14 + ;;@ ~lib/memory.ts:255:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:28:21 + ;;@ ~lib/memory.ts:255:19 (get_local $2) ) - ;;@ ~lib/memory.ts:28:25 + ;;@ ~lib/memory.ts:255:23 (i32.const 4) ) - ;;@ ~lib/memory.ts:28:28 + ;;@ ~lib/memory.ts:255:26 (get_local $1) ) - ;;@ ~lib/memory.ts:29:4 + ;;@ ~lib/memory.ts:256:2 (if - ;;@ ~lib/memory.ts:29:8 + ;;@ ~lib/memory.ts:256:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:29:13 + ;;@ ~lib/memory.ts:256:11 (i32.const 8) ) - ;;@ ~lib/memory.ts:29:16 + ;;@ ~lib/memory.ts:256:14 (return) ) - ;;@ ~lib/memory.ts:32:4 + ;;@ ~lib/memory.ts:259:2 (set_local $3 - ;;@ ~lib/memory.ts:32:19 + ;;@ ~lib/memory.ts:259:17 (i32.and (i32.sub (i32.const 0) - ;;@ ~lib/memory.ts:32:20 + ;;@ ~lib/memory.ts:259:18 (get_local $0) ) - ;;@ ~lib/memory.ts:32:27 + ;;@ ~lib/memory.ts:259:25 (i32.const 3) ) ) - ;;@ ~lib/memory.ts:33:4 + ;;@ ~lib/memory.ts:260:2 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:33:12 + ;;@ ~lib/memory.ts:260:10 (get_local $3) ) ) - ;;@ ~lib/memory.ts:34:4 + ;;@ ~lib/memory.ts:261:2 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:34:9 + ;;@ ~lib/memory.ts:261:7 (get_local $3) ) ) - ;;@ ~lib/memory.ts:35:4 + ;;@ ~lib/memory.ts:262:2 (set_local $2 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:35:9 + ;;@ ~lib/memory.ts:262:7 (i32.const -4) ) ) - ;;@ ~lib/memory.ts:37:4 + ;;@ ~lib/memory.ts:264:2 (set_local $4 - ;;@ ~lib/memory.ts:37:19 + ;;@ ~lib/memory.ts:264:17 (i32.mul (i32.div_u (i32.const -1) - ;;@ ~lib/memory.ts:37:29 + ;;@ ~lib/memory.ts:264:27 (i32.const 255) ) (i32.and - ;;@ ~lib/memory.ts:37:35 + ;;@ ~lib/memory.ts:264:33 (get_local $1) (i32.const 255) ) ) ) - ;;@ ~lib/memory.ts:40:4 + ;;@ ~lib/memory.ts:267:2 (i32.store - ;;@ ~lib/memory.ts:40:15 + ;;@ ~lib/memory.ts:267:13 (get_local $0) - ;;@ ~lib/memory.ts:40:21 + ;;@ ~lib/memory.ts:267:19 (get_local $4) ) - ;;@ ~lib/memory.ts:41:4 + ;;@ ~lib/memory.ts:268:2 (i32.store - ;;@ ~lib/memory.ts:41:15 + ;;@ ~lib/memory.ts:268:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:41:22 + ;;@ ~lib/memory.ts:268:20 (get_local $2) ) - ;;@ ~lib/memory.ts:41:26 + ;;@ ~lib/memory.ts:268:24 (i32.const 4) ) - ;;@ ~lib/memory.ts:41:29 + ;;@ ~lib/memory.ts:268:27 (get_local $4) ) - ;;@ ~lib/memory.ts:42:4 + ;;@ ~lib/memory.ts:269:2 (if - ;;@ ~lib/memory.ts:42:8 + ;;@ ~lib/memory.ts:269:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:42:13 + ;;@ ~lib/memory.ts:269:11 (i32.const 8) ) - ;;@ ~lib/memory.ts:42:16 + ;;@ ~lib/memory.ts:269:14 (return) ) - ;;@ ~lib/memory.ts:43:4 + ;;@ ~lib/memory.ts:270:2 (i32.store - ;;@ ~lib/memory.ts:43:15 + ;;@ ~lib/memory.ts:270:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:43:22 + ;;@ ~lib/memory.ts:270:20 (i32.const 4) ) - ;;@ ~lib/memory.ts:43:25 + ;;@ ~lib/memory.ts:270:23 (get_local $4) ) - ;;@ ~lib/memory.ts:44:4 + ;;@ ~lib/memory.ts:271:2 (i32.store - ;;@ ~lib/memory.ts:44:15 + ;;@ ~lib/memory.ts:271:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:44:22 + ;;@ ~lib/memory.ts:271:20 (i32.const 8) ) - ;;@ ~lib/memory.ts:44:25 + ;;@ ~lib/memory.ts:271:23 (get_local $4) ) - ;;@ ~lib/memory.ts:45:4 + ;;@ ~lib/memory.ts:272:2 (i32.store - ;;@ ~lib/memory.ts:45:15 + ;;@ ~lib/memory.ts:272:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:45:22 + ;;@ ~lib/memory.ts:272:20 (get_local $2) ) - ;;@ ~lib/memory.ts:45:26 + ;;@ ~lib/memory.ts:272:24 (i32.const 12) ) - ;;@ ~lib/memory.ts:45:30 + ;;@ ~lib/memory.ts:272:28 (get_local $4) ) - ;;@ ~lib/memory.ts:46:4 + ;;@ ~lib/memory.ts:273:2 (i32.store - ;;@ ~lib/memory.ts:46:15 + ;;@ ~lib/memory.ts:273:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:46:22 + ;;@ ~lib/memory.ts:273:20 (get_local $2) ) - ;;@ ~lib/memory.ts:46:26 + ;;@ ~lib/memory.ts:273:24 (i32.const 8) ) - ;;@ ~lib/memory.ts:46:29 + ;;@ ~lib/memory.ts:273:27 (get_local $4) ) - ;;@ ~lib/memory.ts:47:4 + ;;@ ~lib/memory.ts:274:2 (if - ;;@ ~lib/memory.ts:47:8 + ;;@ ~lib/memory.ts:274:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:47:13 + ;;@ ~lib/memory.ts:274:11 (i32.const 24) ) - ;;@ ~lib/memory.ts:47:17 + ;;@ ~lib/memory.ts:274:15 (return) ) - ;;@ ~lib/memory.ts:48:4 + ;;@ ~lib/memory.ts:275:2 (i32.store - ;;@ ~lib/memory.ts:48:15 + ;;@ ~lib/memory.ts:275:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:48:22 + ;;@ ~lib/memory.ts:275:20 (i32.const 12) ) - ;;@ ~lib/memory.ts:48:26 + ;;@ ~lib/memory.ts:275:24 (get_local $4) ) - ;;@ ~lib/memory.ts:49:4 + ;;@ ~lib/memory.ts:276:2 (i32.store - ;;@ ~lib/memory.ts:49:15 + ;;@ ~lib/memory.ts:276:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:49:22 + ;;@ ~lib/memory.ts:276:20 (i32.const 16) ) - ;;@ ~lib/memory.ts:49:26 + ;;@ ~lib/memory.ts:276:24 (get_local $4) ) - ;;@ ~lib/memory.ts:50:4 + ;;@ ~lib/memory.ts:277:2 (i32.store - ;;@ ~lib/memory.ts:50:15 + ;;@ ~lib/memory.ts:277:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:50:22 + ;;@ ~lib/memory.ts:277:20 (i32.const 20) ) - ;;@ ~lib/memory.ts:50:26 + ;;@ ~lib/memory.ts:277:24 (get_local $4) ) - ;;@ ~lib/memory.ts:51:4 + ;;@ ~lib/memory.ts:278:2 (i32.store - ;;@ ~lib/memory.ts:51:15 + ;;@ ~lib/memory.ts:278:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:51:22 + ;;@ ~lib/memory.ts:278:20 (i32.const 24) ) - ;;@ ~lib/memory.ts:51:26 + ;;@ ~lib/memory.ts:278:24 (get_local $4) ) - ;;@ ~lib/memory.ts:52:4 + ;;@ ~lib/memory.ts:279:2 (i32.store - ;;@ ~lib/memory.ts:52:15 + ;;@ ~lib/memory.ts:279:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:52:22 + ;;@ ~lib/memory.ts:279:20 (get_local $2) ) - ;;@ ~lib/memory.ts:52:26 + ;;@ ~lib/memory.ts:279:24 (i32.const 28) ) - ;;@ ~lib/memory.ts:52:30 + ;;@ ~lib/memory.ts:279:28 (get_local $4) ) - ;;@ ~lib/memory.ts:53:4 + ;;@ ~lib/memory.ts:280:2 (i32.store - ;;@ ~lib/memory.ts:53:15 + ;;@ ~lib/memory.ts:280:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:53:22 + ;;@ ~lib/memory.ts:280:20 (get_local $2) ) - ;;@ ~lib/memory.ts:53:26 + ;;@ ~lib/memory.ts:280:24 (i32.const 24) ) - ;;@ ~lib/memory.ts:53:30 + ;;@ ~lib/memory.ts:280:28 (get_local $4) ) - ;;@ ~lib/memory.ts:54:4 + ;;@ ~lib/memory.ts:281:2 (i32.store - ;;@ ~lib/memory.ts:54:15 + ;;@ ~lib/memory.ts:281:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:54:22 + ;;@ ~lib/memory.ts:281:20 (get_local $2) ) - ;;@ ~lib/memory.ts:54:26 + ;;@ ~lib/memory.ts:281:24 (i32.const 20) ) - ;;@ ~lib/memory.ts:54:30 + ;;@ ~lib/memory.ts:281:28 (get_local $4) ) - ;;@ ~lib/memory.ts:55:4 + ;;@ ~lib/memory.ts:282:2 (i32.store - ;;@ ~lib/memory.ts:55:15 + ;;@ ~lib/memory.ts:282:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:55:22 + ;;@ ~lib/memory.ts:282:20 (get_local $2) ) - ;;@ ~lib/memory.ts:55:26 + ;;@ ~lib/memory.ts:282:24 (i32.const 16) ) - ;;@ ~lib/memory.ts:55:30 + ;;@ ~lib/memory.ts:282:28 (get_local $4) ) - ;;@ ~lib/memory.ts:58:4 + ;;@ ~lib/memory.ts:285:2 (set_local $3 - ;;@ ~lib/memory.ts:58:8 + ;;@ ~lib/memory.ts:285:6 (i32.add (i32.const 24) - ;;@ ~lib/memory.ts:58:13 + ;;@ ~lib/memory.ts:285:11 (i32.and - ;;@ ~lib/memory.ts:58:14 + ;;@ ~lib/memory.ts:285:12 (get_local $0) - ;;@ ~lib/memory.ts:58:21 + ;;@ ~lib/memory.ts:285:19 (i32.const 4) ) ) ) - ;;@ ~lib/memory.ts:59:4 + ;;@ ~lib/memory.ts:286:2 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:59:12 + ;;@ ~lib/memory.ts:286:10 (get_local $3) ) ) - ;;@ ~lib/memory.ts:60:4 + ;;@ ~lib/memory.ts:287:2 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:60:9 + ;;@ ~lib/memory.ts:287:7 (get_local $3) ) ) - ;;@ ~lib/memory.ts:63:4 + ;;@ ~lib/memory.ts:290:2 (set_local $5 - ;;@ ~lib/memory.ts:63:19 + ;;@ ~lib/memory.ts:290:17 (i64.or (i64.extend_u/i32 (get_local $4) ) - ;;@ ~lib/memory.ts:63:30 + ;;@ ~lib/memory.ts:290:28 (i64.shl - ;;@ ~lib/memory.ts:63:31 + ;;@ ~lib/memory.ts:290:29 (i64.extend_u/i32 (get_local $4) ) - ;;@ ~lib/memory.ts:63:43 + ;;@ ~lib/memory.ts:290:41 (i64.const 32) ) ) ) - ;;@ ~lib/memory.ts:64:4 + ;;@ ~lib/memory.ts:291:2 (block $break|0 (loop $continue|0 (if - ;;@ ~lib/memory.ts:64:11 + ;;@ ~lib/memory.ts:291:9 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:64:16 + ;;@ ~lib/memory.ts:291:14 (i32.const 32) ) (block (block - ;;@ ~lib/memory.ts:65:6 + ;;@ ~lib/memory.ts:292:4 (i64.store - ;;@ ~lib/memory.ts:65:17 + ;;@ ~lib/memory.ts:292:15 (get_local $0) - ;;@ ~lib/memory.ts:65:23 + ;;@ ~lib/memory.ts:292:21 (get_local $5) ) - ;;@ ~lib/memory.ts:66:6 + ;;@ ~lib/memory.ts:293:4 (i64.store - ;;@ ~lib/memory.ts:66:17 + ;;@ ~lib/memory.ts:293:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:66:24 + ;;@ ~lib/memory.ts:293:22 (i32.const 8) ) - ;;@ ~lib/memory.ts:66:27 + ;;@ ~lib/memory.ts:293:25 (get_local $5) ) - ;;@ ~lib/memory.ts:67:6 + ;;@ ~lib/memory.ts:294:4 (i64.store - ;;@ ~lib/memory.ts:67:17 + ;;@ ~lib/memory.ts:294:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:67:24 + ;;@ ~lib/memory.ts:294:22 (i32.const 16) ) - ;;@ ~lib/memory.ts:67:28 + ;;@ ~lib/memory.ts:294:26 (get_local $5) ) - ;;@ ~lib/memory.ts:68:6 + ;;@ ~lib/memory.ts:295:4 (i64.store - ;;@ ~lib/memory.ts:68:17 + ;;@ ~lib/memory.ts:295:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:68:24 + ;;@ ~lib/memory.ts:295:22 (i32.const 24) ) - ;;@ ~lib/memory.ts:68:28 + ;;@ ~lib/memory.ts:295:26 (get_local $5) ) - ;;@ ~lib/memory.ts:69:6 + ;;@ ~lib/memory.ts:296:4 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:69:11 + ;;@ ~lib/memory.ts:296:9 (i32.const 32) ) ) - ;;@ ~lib/memory.ts:70:6 + ;;@ ~lib/memory.ts:297:4 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:70:14 + ;;@ ~lib/memory.ts:297:12 (i32.const 32) ) ) @@ -557,31 +543,42 @@ ) ) ) - (func $~lib/memory/memcpy (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 1 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + ;;@ ~lib/memory.ts:11:4 + (call $~lib/memory/memset + ;;@ ~lib/memory.ts:11:11 + (get_local $0) + ;;@ ~lib/memory.ts:11:17 + (get_local $1) + ;;@ ~lib/memory.ts:11:20 + (get_local $2) + ) + ) + (func $~lib/memory/memcpy (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - ;;@ ~lib/memory.ts:164:2 + ;;@ ~lib/memory.ts:59:2 (block $break|0 (loop $continue|0 (if - ;;@ ~lib/memory.ts:164:9 + ;;@ ~lib/memory.ts:59:9 (if (result i32) (get_local $2) - ;;@ ~lib/memory.ts:164:14 + ;;@ ~lib/memory.ts:59:14 (i32.and - ;;@ ~lib/memory.ts:164:15 + ;;@ ~lib/memory.ts:59:15 (get_local $1) - ;;@ ~lib/memory.ts:164:21 + ;;@ ~lib/memory.ts:59:21 (i32.const 3) ) (get_local $2) ) (block (block - ;;@ ~lib/memory.ts:165:4 + ;;@ ~lib/memory.ts:60:4 (i32.store8 - ;;@ ~lib/memory.ts:165:14 + ;;@ ~lib/memory.ts:60:14 (block (result i32) (set_local $5 (get_local $0) @@ -594,9 +591,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:165:22 + ;;@ ~lib/memory.ts:60:22 (i32.load8_u - ;;@ ~lib/memory.ts:165:31 + ;;@ ~lib/memory.ts:60:31 (block (result i32) (set_local $5 (get_local $1) @@ -611,7 +608,7 @@ ) ) ) - ;;@ ~lib/memory.ts:166:4 + ;;@ ~lib/memory.ts:61:4 (set_local $2 (i32.sub (get_local $2) @@ -624,117 +621,117 @@ ) ) ) - ;;@ ~lib/memory.ts:170:2 + ;;@ ~lib/memory.ts:65:2 (if - ;;@ ~lib/memory.ts:170:6 + ;;@ ~lib/memory.ts:65:6 (i32.eq (i32.and - ;;@ ~lib/memory.ts:170:7 + ;;@ ~lib/memory.ts:65:7 (get_local $0) - ;;@ ~lib/memory.ts:170:14 + ;;@ ~lib/memory.ts:65:14 (i32.const 3) ) - ;;@ ~lib/memory.ts:170:20 + ;;@ ~lib/memory.ts:65:20 (i32.const 0) ) - ;;@ ~lib/memory.ts:170:23 + ;;@ ~lib/memory.ts:65:23 (block (block $break|1 (loop $continue|1 (if - ;;@ ~lib/memory.ts:171:11 + ;;@ ~lib/memory.ts:66:11 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:171:16 + ;;@ ~lib/memory.ts:66:16 (i32.const 16) ) (block (block - ;;@ ~lib/memory.ts:172:6 + ;;@ ~lib/memory.ts:67:6 (i32.store - ;;@ ~lib/memory.ts:172:17 + ;;@ ~lib/memory.ts:67:17 (get_local $0) - ;;@ ~lib/memory.ts:172:28 + ;;@ ~lib/memory.ts:67:28 (i32.load - ;;@ ~lib/memory.ts:172:38 + ;;@ ~lib/memory.ts:67:38 (get_local $1) ) ) - ;;@ ~lib/memory.ts:173:6 + ;;@ ~lib/memory.ts:68:6 (i32.store - ;;@ ~lib/memory.ts:173:17 + ;;@ ~lib/memory.ts:68:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:173:25 + ;;@ ~lib/memory.ts:68:25 (i32.const 4) ) - ;;@ ~lib/memory.ts:173:28 + ;;@ ~lib/memory.ts:68:28 (i32.load - ;;@ ~lib/memory.ts:173:38 + ;;@ ~lib/memory.ts:68:38 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:173:45 + ;;@ ~lib/memory.ts:68:45 (i32.const 4) ) ) ) - ;;@ ~lib/memory.ts:174:6 + ;;@ ~lib/memory.ts:69:6 (i32.store - ;;@ ~lib/memory.ts:174:17 + ;;@ ~lib/memory.ts:69:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:174:25 + ;;@ ~lib/memory.ts:69:25 (i32.const 8) ) - ;;@ ~lib/memory.ts:174:28 + ;;@ ~lib/memory.ts:69:28 (i32.load - ;;@ ~lib/memory.ts:174:38 + ;;@ ~lib/memory.ts:69:38 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:174:45 + ;;@ ~lib/memory.ts:69:45 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:175:6 + ;;@ ~lib/memory.ts:70:6 (i32.store - ;;@ ~lib/memory.ts:175:17 + ;;@ ~lib/memory.ts:70:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:175:24 + ;;@ ~lib/memory.ts:70:24 (i32.const 12) ) - ;;@ ~lib/memory.ts:175:28 + ;;@ ~lib/memory.ts:70:28 (i32.load - ;;@ ~lib/memory.ts:175:38 + ;;@ ~lib/memory.ts:70:38 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:175:44 + ;;@ ~lib/memory.ts:70:44 (i32.const 12) ) ) ) - ;;@ ~lib/memory.ts:176:6 + ;;@ ~lib/memory.ts:71:6 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:176:13 + ;;@ ~lib/memory.ts:71:13 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:176:17 + ;;@ ~lib/memory.ts:71:17 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:176:25 + ;;@ ~lib/memory.ts:71:25 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:176:29 + ;;@ ~lib/memory.ts:71:29 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:176:34 + ;;@ ~lib/memory.ts:71:34 (i32.const 16) ) ) @@ -744,149 +741,149 @@ ) ) ) - ;;@ ~lib/memory.ts:178:4 + ;;@ ~lib/memory.ts:73:4 (if - ;;@ ~lib/memory.ts:178:8 + ;;@ ~lib/memory.ts:73:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:178:12 + ;;@ ~lib/memory.ts:73:12 (i32.const 8) ) - ;;@ ~lib/memory.ts:178:15 + ;;@ ~lib/memory.ts:73:15 (block - ;;@ ~lib/memory.ts:179:6 + ;;@ ~lib/memory.ts:74:6 (i32.store - ;;@ ~lib/memory.ts:179:17 + ;;@ ~lib/memory.ts:74:17 (get_local $0) - ;;@ ~lib/memory.ts:179:27 + ;;@ ~lib/memory.ts:74:27 (i32.load - ;;@ ~lib/memory.ts:179:37 + ;;@ ~lib/memory.ts:74:37 (get_local $1) ) ) - ;;@ ~lib/memory.ts:180:6 + ;;@ ~lib/memory.ts:75:6 (i32.store - ;;@ ~lib/memory.ts:180:17 + ;;@ ~lib/memory.ts:75:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:180:24 + ;;@ ~lib/memory.ts:75:24 (i32.const 4) ) - ;;@ ~lib/memory.ts:180:27 + ;;@ ~lib/memory.ts:75:27 (i32.load - ;;@ ~lib/memory.ts:180:37 + ;;@ ~lib/memory.ts:75:37 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:180:43 + ;;@ ~lib/memory.ts:75:43 (i32.const 4) ) ) ) - ;;@ ~lib/memory.ts:181:6 + ;;@ ~lib/memory.ts:76:6 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:181:14 + ;;@ ~lib/memory.ts:76:14 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:181:17 + ;;@ ~lib/memory.ts:76:17 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:181:24 + ;;@ ~lib/memory.ts:76:24 (i32.const 8) ) ) ) ) - ;;@ ~lib/memory.ts:183:4 + ;;@ ~lib/memory.ts:78:4 (if - ;;@ ~lib/memory.ts:183:8 + ;;@ ~lib/memory.ts:78:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:183:12 + ;;@ ~lib/memory.ts:78:12 (i32.const 4) ) - ;;@ ~lib/memory.ts:183:15 + ;;@ ~lib/memory.ts:78:15 (block - ;;@ ~lib/memory.ts:184:6 + ;;@ ~lib/memory.ts:79:6 (i32.store - ;;@ ~lib/memory.ts:184:17 + ;;@ ~lib/memory.ts:79:17 (get_local $0) - ;;@ ~lib/memory.ts:184:23 + ;;@ ~lib/memory.ts:79:23 (i32.load - ;;@ ~lib/memory.ts:184:33 + ;;@ ~lib/memory.ts:79:33 (get_local $1) ) ) - ;;@ ~lib/memory.ts:185:6 + ;;@ ~lib/memory.ts:80:6 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:185:14 + ;;@ ~lib/memory.ts:80:14 (i32.const 4) ) ) - ;;@ ~lib/memory.ts:185:17 + ;;@ ~lib/memory.ts:80:17 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:185:24 + ;;@ ~lib/memory.ts:80:24 (i32.const 4) ) ) ) ) - ;;@ ~lib/memory.ts:187:4 + ;;@ ~lib/memory.ts:82:4 (if - ;;@ ~lib/memory.ts:187:8 + ;;@ ~lib/memory.ts:82:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:187:12 + ;;@ ~lib/memory.ts:82:12 (i32.const 2) ) - ;;@ ~lib/memory.ts:187:15 + ;;@ ~lib/memory.ts:82:15 (block - ;;@ ~lib/memory.ts:188:6 + ;;@ ~lib/memory.ts:83:6 (i32.store16 - ;;@ ~lib/memory.ts:188:17 + ;;@ ~lib/memory.ts:83:17 (get_local $0) - ;;@ ~lib/memory.ts:188:23 + ;;@ ~lib/memory.ts:83:23 (i32.load16_u - ;;@ ~lib/memory.ts:188:33 + ;;@ ~lib/memory.ts:83:33 (get_local $1) ) ) - ;;@ ~lib/memory.ts:189:6 + ;;@ ~lib/memory.ts:84:6 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:189:14 + ;;@ ~lib/memory.ts:84:14 (i32.const 2) ) ) - ;;@ ~lib/memory.ts:189:17 + ;;@ ~lib/memory.ts:84:17 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:189:24 + ;;@ ~lib/memory.ts:84:24 (i32.const 2) ) ) ) ) - ;;@ ~lib/memory.ts:191:4 + ;;@ ~lib/memory.ts:86:4 (if - ;;@ ~lib/memory.ts:191:8 + ;;@ ~lib/memory.ts:86:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:191:12 + ;;@ ~lib/memory.ts:86:12 (i32.const 1) ) - ;;@ ~lib/memory.ts:191:15 + ;;@ ~lib/memory.ts:86:15 (i32.store8 - ;;@ ~lib/memory.ts:192:16 + ;;@ ~lib/memory.ts:87:16 (block (result i32) (set_local $5 (get_local $0) @@ -899,9 +896,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:192:24 + ;;@ ~lib/memory.ts:87:24 (i32.load8_u - ;;@ ~lib/memory.ts:192:33 + ;;@ ~lib/memory.ts:87:33 (block (result i32) (set_local $5 (get_local $1) @@ -917,67 +914,67 @@ ) ) ) - ;;@ ~lib/memory.ts:194:4 + ;;@ ~lib/memory.ts:89:4 (return) ) ) - ;;@ ~lib/memory.ts:199:2 + ;;@ ~lib/memory.ts:94:2 (if - ;;@ ~lib/memory.ts:199:6 + ;;@ ~lib/memory.ts:94:6 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:199:11 + ;;@ ~lib/memory.ts:94:11 (i32.const 32) ) - ;;@ ~lib/memory.ts:199:15 + ;;@ ~lib/memory.ts:94:15 (block $break|2 (block $case2|2 (block $case1|2 (block $case0|2 (set_local $5 - ;;@ ~lib/memory.ts:200:12 + ;;@ ~lib/memory.ts:95:12 (i32.and (get_local $0) - ;;@ ~lib/memory.ts:200:19 + ;;@ ~lib/memory.ts:95:19 (i32.const 3) ) ) (br_if $case0|2 (i32.eq (get_local $5) - ;;@ ~lib/memory.ts:202:11 + ;;@ ~lib/memory.ts:97:11 (i32.const 1) ) ) (br_if $case1|2 (i32.eq (get_local $5) - ;;@ ~lib/memory.ts:221:11 + ;;@ ~lib/memory.ts:116:11 (i32.const 2) ) ) (br_if $case2|2 (i32.eq (get_local $5) - ;;@ ~lib/memory.ts:239:11 + ;;@ ~lib/memory.ts:134:11 (i32.const 3) ) ) (br $break|2) ) - ;;@ ~lib/memory.ts:202:14 + ;;@ ~lib/memory.ts:97:14 (block - ;;@ ~lib/memory.ts:203:8 + ;;@ ~lib/memory.ts:98:8 (set_local $3 - ;;@ ~lib/memory.ts:203:12 + ;;@ ~lib/memory.ts:98:12 (i32.load - ;;@ ~lib/memory.ts:203:22 + ;;@ ~lib/memory.ts:98:22 (get_local $1) ) ) - ;;@ ~lib/memory.ts:204:8 + ;;@ ~lib/memory.ts:99:8 (i32.store8 - ;;@ ~lib/memory.ts:204:18 + ;;@ ~lib/memory.ts:99:18 (block (result i32) (set_local $5 (get_local $0) @@ -990,9 +987,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:204:26 + ;;@ ~lib/memory.ts:99:26 (i32.load8_u - ;;@ ~lib/memory.ts:204:35 + ;;@ ~lib/memory.ts:99:35 (block (result i32) (set_local $5 (get_local $1) @@ -1007,9 +1004,9 @@ ) ) ) - ;;@ ~lib/memory.ts:205:8 + ;;@ ~lib/memory.ts:100:8 (i32.store8 - ;;@ ~lib/memory.ts:205:18 + ;;@ ~lib/memory.ts:100:18 (block (result i32) (set_local $5 (get_local $0) @@ -1022,9 +1019,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:205:26 + ;;@ ~lib/memory.ts:100:26 (i32.load8_u - ;;@ ~lib/memory.ts:205:35 + ;;@ ~lib/memory.ts:100:35 (block (result i32) (set_local $5 (get_local $1) @@ -1039,9 +1036,9 @@ ) ) ) - ;;@ ~lib/memory.ts:206:8 + ;;@ ~lib/memory.ts:101:8 (i32.store8 - ;;@ ~lib/memory.ts:206:18 + ;;@ ~lib/memory.ts:101:18 (block (result i32) (set_local $5 (get_local $0) @@ -1054,9 +1051,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:206:26 + ;;@ ~lib/memory.ts:101:26 (i32.load8_u - ;;@ ~lib/memory.ts:206:35 + ;;@ ~lib/memory.ts:101:35 (block (result i32) (set_local $5 (get_local $1) @@ -1071,183 +1068,183 @@ ) ) ) - ;;@ ~lib/memory.ts:207:8 + ;;@ ~lib/memory.ts:102:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:207:13 + ;;@ ~lib/memory.ts:102:13 (i32.const 3) ) ) - ;;@ ~lib/memory.ts:208:8 + ;;@ ~lib/memory.ts:103:8 (block $break|3 (loop $continue|3 (if - ;;@ ~lib/memory.ts:208:15 + ;;@ ~lib/memory.ts:103:15 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:208:20 + ;;@ ~lib/memory.ts:103:20 (i32.const 17) ) (block (block - ;;@ ~lib/memory.ts:209:10 + ;;@ ~lib/memory.ts:104:10 (set_local $4 - ;;@ ~lib/memory.ts:209:14 + ;;@ ~lib/memory.ts:104:14 (i32.load - ;;@ ~lib/memory.ts:209:24 + ;;@ ~lib/memory.ts:104:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:209:30 + ;;@ ~lib/memory.ts:104:30 (i32.const 1) ) ) ) - ;;@ ~lib/memory.ts:210:10 + ;;@ ~lib/memory.ts:105:10 (i32.store - ;;@ ~lib/memory.ts:210:21 + ;;@ ~lib/memory.ts:105:21 (get_local $0) - ;;@ ~lib/memory.ts:210:27 + ;;@ ~lib/memory.ts:105:27 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:210:32 + ;;@ ~lib/memory.ts:105:32 (i32.const 24) ) - ;;@ ~lib/memory.ts:210:37 + ;;@ ~lib/memory.ts:105:37 (i32.shl (get_local $4) - ;;@ ~lib/memory.ts:210:42 + ;;@ ~lib/memory.ts:105:42 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:211:10 + ;;@ ~lib/memory.ts:106:10 (set_local $3 - ;;@ ~lib/memory.ts:211:14 + ;;@ ~lib/memory.ts:106:14 (i32.load - ;;@ ~lib/memory.ts:211:24 + ;;@ ~lib/memory.ts:106:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:211:30 + ;;@ ~lib/memory.ts:106:30 (i32.const 5) ) ) ) - ;;@ ~lib/memory.ts:212:10 + ;;@ ~lib/memory.ts:107:10 (i32.store - ;;@ ~lib/memory.ts:212:21 + ;;@ ~lib/memory.ts:107:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:212:28 + ;;@ ~lib/memory.ts:107:28 (i32.const 4) ) - ;;@ ~lib/memory.ts:212:31 + ;;@ ~lib/memory.ts:107:31 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:212:36 + ;;@ ~lib/memory.ts:107:36 (i32.const 24) ) - ;;@ ~lib/memory.ts:212:41 + ;;@ ~lib/memory.ts:107:41 (i32.shl (get_local $3) - ;;@ ~lib/memory.ts:212:46 + ;;@ ~lib/memory.ts:107:46 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:213:10 + ;;@ ~lib/memory.ts:108:10 (set_local $4 - ;;@ ~lib/memory.ts:213:14 + ;;@ ~lib/memory.ts:108:14 (i32.load - ;;@ ~lib/memory.ts:213:24 + ;;@ ~lib/memory.ts:108:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:213:30 + ;;@ ~lib/memory.ts:108:30 (i32.const 9) ) ) ) - ;;@ ~lib/memory.ts:214:10 + ;;@ ~lib/memory.ts:109:10 (i32.store - ;;@ ~lib/memory.ts:214:21 + ;;@ ~lib/memory.ts:109:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:214:28 + ;;@ ~lib/memory.ts:109:28 (i32.const 8) ) - ;;@ ~lib/memory.ts:214:31 + ;;@ ~lib/memory.ts:109:31 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:214:36 + ;;@ ~lib/memory.ts:109:36 (i32.const 24) ) - ;;@ ~lib/memory.ts:214:41 + ;;@ ~lib/memory.ts:109:41 (i32.shl (get_local $4) - ;;@ ~lib/memory.ts:214:46 + ;;@ ~lib/memory.ts:109:46 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:215:10 + ;;@ ~lib/memory.ts:110:10 (set_local $3 - ;;@ ~lib/memory.ts:215:14 + ;;@ ~lib/memory.ts:110:14 (i32.load - ;;@ ~lib/memory.ts:215:24 + ;;@ ~lib/memory.ts:110:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:215:30 + ;;@ ~lib/memory.ts:110:30 (i32.const 13) ) ) ) - ;;@ ~lib/memory.ts:216:10 + ;;@ ~lib/memory.ts:111:10 (i32.store - ;;@ ~lib/memory.ts:216:21 + ;;@ ~lib/memory.ts:111:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:216:28 + ;;@ ~lib/memory.ts:111:28 (i32.const 12) ) - ;;@ ~lib/memory.ts:216:32 + ;;@ ~lib/memory.ts:111:32 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:216:37 + ;;@ ~lib/memory.ts:111:37 (i32.const 24) ) - ;;@ ~lib/memory.ts:216:42 + ;;@ ~lib/memory.ts:111:42 (i32.shl (get_local $3) - ;;@ ~lib/memory.ts:216:47 + ;;@ ~lib/memory.ts:111:47 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:217:10 + ;;@ ~lib/memory.ts:112:10 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:217:17 + ;;@ ~lib/memory.ts:112:17 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:217:21 + ;;@ ~lib/memory.ts:112:21 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:217:29 + ;;@ ~lib/memory.ts:112:29 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:217:33 + ;;@ ~lib/memory.ts:112:33 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:217:38 + ;;@ ~lib/memory.ts:112:38 (i32.const 16) ) ) @@ -1257,23 +1254,23 @@ ) ) ) - ;;@ ~lib/memory.ts:219:8 + ;;@ ~lib/memory.ts:114:8 (br $break|2) ) ) - ;;@ ~lib/memory.ts:221:14 + ;;@ ~lib/memory.ts:116:14 (block - ;;@ ~lib/memory.ts:222:8 + ;;@ ~lib/memory.ts:117:8 (set_local $3 - ;;@ ~lib/memory.ts:222:12 + ;;@ ~lib/memory.ts:117:12 (i32.load - ;;@ ~lib/memory.ts:222:22 + ;;@ ~lib/memory.ts:117:22 (get_local $1) ) ) - ;;@ ~lib/memory.ts:223:8 + ;;@ ~lib/memory.ts:118:8 (i32.store8 - ;;@ ~lib/memory.ts:223:18 + ;;@ ~lib/memory.ts:118:18 (block (result i32) (set_local $5 (get_local $0) @@ -1286,9 +1283,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:223:26 + ;;@ ~lib/memory.ts:118:26 (i32.load8_u - ;;@ ~lib/memory.ts:223:35 + ;;@ ~lib/memory.ts:118:35 (block (result i32) (set_local $5 (get_local $1) @@ -1303,9 +1300,9 @@ ) ) ) - ;;@ ~lib/memory.ts:224:8 + ;;@ ~lib/memory.ts:119:8 (i32.store8 - ;;@ ~lib/memory.ts:224:18 + ;;@ ~lib/memory.ts:119:18 (block (result i32) (set_local $5 (get_local $0) @@ -1318,9 +1315,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:224:26 + ;;@ ~lib/memory.ts:119:26 (i32.load8_u - ;;@ ~lib/memory.ts:224:35 + ;;@ ~lib/memory.ts:119:35 (block (result i32) (set_local $5 (get_local $1) @@ -1335,183 +1332,183 @@ ) ) ) - ;;@ ~lib/memory.ts:225:8 + ;;@ ~lib/memory.ts:120:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:225:13 + ;;@ ~lib/memory.ts:120:13 (i32.const 2) ) ) - ;;@ ~lib/memory.ts:226:8 + ;;@ ~lib/memory.ts:121:8 (block $break|4 (loop $continue|4 (if - ;;@ ~lib/memory.ts:226:15 + ;;@ ~lib/memory.ts:121:15 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:226:20 + ;;@ ~lib/memory.ts:121:20 (i32.const 18) ) (block (block - ;;@ ~lib/memory.ts:227:10 + ;;@ ~lib/memory.ts:122:10 (set_local $4 - ;;@ ~lib/memory.ts:227:14 + ;;@ ~lib/memory.ts:122:14 (i32.load - ;;@ ~lib/memory.ts:227:24 + ;;@ ~lib/memory.ts:122:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:227:30 + ;;@ ~lib/memory.ts:122:30 (i32.const 2) ) ) ) - ;;@ ~lib/memory.ts:228:10 + ;;@ ~lib/memory.ts:123:10 (i32.store - ;;@ ~lib/memory.ts:228:21 + ;;@ ~lib/memory.ts:123:21 (get_local $0) - ;;@ ~lib/memory.ts:228:27 + ;;@ ~lib/memory.ts:123:27 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:228:32 + ;;@ ~lib/memory.ts:123:32 (i32.const 16) ) - ;;@ ~lib/memory.ts:228:37 + ;;@ ~lib/memory.ts:123:37 (i32.shl (get_local $4) - ;;@ ~lib/memory.ts:228:42 + ;;@ ~lib/memory.ts:123:42 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:229:10 + ;;@ ~lib/memory.ts:124:10 (set_local $3 - ;;@ ~lib/memory.ts:229:14 + ;;@ ~lib/memory.ts:124:14 (i32.load - ;;@ ~lib/memory.ts:229:24 + ;;@ ~lib/memory.ts:124:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:229:30 + ;;@ ~lib/memory.ts:124:30 (i32.const 6) ) ) ) - ;;@ ~lib/memory.ts:230:10 + ;;@ ~lib/memory.ts:125:10 (i32.store - ;;@ ~lib/memory.ts:230:21 + ;;@ ~lib/memory.ts:125:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:230:28 + ;;@ ~lib/memory.ts:125:28 (i32.const 4) ) - ;;@ ~lib/memory.ts:230:31 + ;;@ ~lib/memory.ts:125:31 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:230:36 + ;;@ ~lib/memory.ts:125:36 (i32.const 16) ) - ;;@ ~lib/memory.ts:230:41 + ;;@ ~lib/memory.ts:125:41 (i32.shl (get_local $3) - ;;@ ~lib/memory.ts:230:46 + ;;@ ~lib/memory.ts:125:46 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:231:10 + ;;@ ~lib/memory.ts:126:10 (set_local $4 - ;;@ ~lib/memory.ts:231:14 + ;;@ ~lib/memory.ts:126:14 (i32.load - ;;@ ~lib/memory.ts:231:24 + ;;@ ~lib/memory.ts:126:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:231:30 + ;;@ ~lib/memory.ts:126:30 (i32.const 10) ) ) ) - ;;@ ~lib/memory.ts:232:10 + ;;@ ~lib/memory.ts:127:10 (i32.store - ;;@ ~lib/memory.ts:232:21 + ;;@ ~lib/memory.ts:127:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:232:28 + ;;@ ~lib/memory.ts:127:28 (i32.const 8) ) - ;;@ ~lib/memory.ts:232:31 + ;;@ ~lib/memory.ts:127:31 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:232:36 + ;;@ ~lib/memory.ts:127:36 (i32.const 16) ) - ;;@ ~lib/memory.ts:232:41 + ;;@ ~lib/memory.ts:127:41 (i32.shl (get_local $4) - ;;@ ~lib/memory.ts:232:46 + ;;@ ~lib/memory.ts:127:46 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:233:10 + ;;@ ~lib/memory.ts:128:10 (set_local $3 - ;;@ ~lib/memory.ts:233:14 + ;;@ ~lib/memory.ts:128:14 (i32.load - ;;@ ~lib/memory.ts:233:24 + ;;@ ~lib/memory.ts:128:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:233:30 + ;;@ ~lib/memory.ts:128:30 (i32.const 14) ) ) ) - ;;@ ~lib/memory.ts:234:10 + ;;@ ~lib/memory.ts:129:10 (i32.store - ;;@ ~lib/memory.ts:234:21 + ;;@ ~lib/memory.ts:129:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:234:28 + ;;@ ~lib/memory.ts:129:28 (i32.const 12) ) - ;;@ ~lib/memory.ts:234:32 + ;;@ ~lib/memory.ts:129:32 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:234:37 + ;;@ ~lib/memory.ts:129:37 (i32.const 16) ) - ;;@ ~lib/memory.ts:234:42 + ;;@ ~lib/memory.ts:129:42 (i32.shl (get_local $3) - ;;@ ~lib/memory.ts:234:47 + ;;@ ~lib/memory.ts:129:47 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:235:10 + ;;@ ~lib/memory.ts:130:10 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:235:17 + ;;@ ~lib/memory.ts:130:17 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:235:21 + ;;@ ~lib/memory.ts:130:21 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:235:29 + ;;@ ~lib/memory.ts:130:29 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:235:33 + ;;@ ~lib/memory.ts:130:33 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:235:38 + ;;@ ~lib/memory.ts:130:38 (i32.const 16) ) ) @@ -1521,23 +1518,23 @@ ) ) ) - ;;@ ~lib/memory.ts:237:8 + ;;@ ~lib/memory.ts:132:8 (br $break|2) ) ) - ;;@ ~lib/memory.ts:239:14 + ;;@ ~lib/memory.ts:134:14 (block - ;;@ ~lib/memory.ts:240:8 + ;;@ ~lib/memory.ts:135:8 (set_local $3 - ;;@ ~lib/memory.ts:240:12 + ;;@ ~lib/memory.ts:135:12 (i32.load - ;;@ ~lib/memory.ts:240:22 + ;;@ ~lib/memory.ts:135:22 (get_local $1) ) ) - ;;@ ~lib/memory.ts:241:8 + ;;@ ~lib/memory.ts:136:8 (i32.store8 - ;;@ ~lib/memory.ts:241:18 + ;;@ ~lib/memory.ts:136:18 (block (result i32) (set_local $5 (get_local $0) @@ -1550,9 +1547,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:241:26 + ;;@ ~lib/memory.ts:136:26 (i32.load8_u - ;;@ ~lib/memory.ts:241:35 + ;;@ ~lib/memory.ts:136:35 (block (result i32) (set_local $5 (get_local $1) @@ -1567,183 +1564,183 @@ ) ) ) - ;;@ ~lib/memory.ts:242:8 + ;;@ ~lib/memory.ts:137:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:242:13 + ;;@ ~lib/memory.ts:137:13 (i32.const 1) ) ) - ;;@ ~lib/memory.ts:243:8 + ;;@ ~lib/memory.ts:138:8 (block $break|5 (loop $continue|5 (if - ;;@ ~lib/memory.ts:243:15 + ;;@ ~lib/memory.ts:138:15 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:243:20 + ;;@ ~lib/memory.ts:138:20 (i32.const 19) ) (block (block - ;;@ ~lib/memory.ts:244:10 + ;;@ ~lib/memory.ts:139:10 (set_local $4 - ;;@ ~lib/memory.ts:244:14 + ;;@ ~lib/memory.ts:139:14 (i32.load - ;;@ ~lib/memory.ts:244:24 + ;;@ ~lib/memory.ts:139:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:244:30 + ;;@ ~lib/memory.ts:139:30 (i32.const 3) ) ) ) - ;;@ ~lib/memory.ts:245:10 + ;;@ ~lib/memory.ts:140:10 (i32.store - ;;@ ~lib/memory.ts:245:21 + ;;@ ~lib/memory.ts:140:21 (get_local $0) - ;;@ ~lib/memory.ts:245:27 + ;;@ ~lib/memory.ts:140:27 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:245:32 + ;;@ ~lib/memory.ts:140:32 (i32.const 8) ) - ;;@ ~lib/memory.ts:245:36 + ;;@ ~lib/memory.ts:140:36 (i32.shl (get_local $4) - ;;@ ~lib/memory.ts:245:41 + ;;@ ~lib/memory.ts:140:41 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:246:10 + ;;@ ~lib/memory.ts:141:10 (set_local $3 - ;;@ ~lib/memory.ts:246:14 + ;;@ ~lib/memory.ts:141:14 (i32.load - ;;@ ~lib/memory.ts:246:24 + ;;@ ~lib/memory.ts:141:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:246:30 + ;;@ ~lib/memory.ts:141:30 (i32.const 7) ) ) ) - ;;@ ~lib/memory.ts:247:10 + ;;@ ~lib/memory.ts:142:10 (i32.store - ;;@ ~lib/memory.ts:247:21 + ;;@ ~lib/memory.ts:142:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:247:28 + ;;@ ~lib/memory.ts:142:28 (i32.const 4) ) - ;;@ ~lib/memory.ts:247:31 + ;;@ ~lib/memory.ts:142:31 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:247:36 + ;;@ ~lib/memory.ts:142:36 (i32.const 8) ) - ;;@ ~lib/memory.ts:247:40 + ;;@ ~lib/memory.ts:142:40 (i32.shl (get_local $3) - ;;@ ~lib/memory.ts:247:45 + ;;@ ~lib/memory.ts:142:45 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:248:10 + ;;@ ~lib/memory.ts:143:10 (set_local $4 - ;;@ ~lib/memory.ts:248:14 + ;;@ ~lib/memory.ts:143:14 (i32.load - ;;@ ~lib/memory.ts:248:24 + ;;@ ~lib/memory.ts:143:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:248:30 + ;;@ ~lib/memory.ts:143:30 (i32.const 11) ) ) ) - ;;@ ~lib/memory.ts:249:10 + ;;@ ~lib/memory.ts:144:10 (i32.store - ;;@ ~lib/memory.ts:249:21 + ;;@ ~lib/memory.ts:144:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:249:28 + ;;@ ~lib/memory.ts:144:28 (i32.const 8) ) - ;;@ ~lib/memory.ts:249:31 + ;;@ ~lib/memory.ts:144:31 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:249:36 + ;;@ ~lib/memory.ts:144:36 (i32.const 8) ) - ;;@ ~lib/memory.ts:249:40 + ;;@ ~lib/memory.ts:144:40 (i32.shl (get_local $4) - ;;@ ~lib/memory.ts:249:45 + ;;@ ~lib/memory.ts:144:45 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:250:10 + ;;@ ~lib/memory.ts:145:10 (set_local $3 - ;;@ ~lib/memory.ts:250:14 + ;;@ ~lib/memory.ts:145:14 (i32.load - ;;@ ~lib/memory.ts:250:24 + ;;@ ~lib/memory.ts:145:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:250:30 + ;;@ ~lib/memory.ts:145:30 (i32.const 15) ) ) ) - ;;@ ~lib/memory.ts:251:10 + ;;@ ~lib/memory.ts:146:10 (i32.store - ;;@ ~lib/memory.ts:251:21 + ;;@ ~lib/memory.ts:146:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:251:28 + ;;@ ~lib/memory.ts:146:28 (i32.const 12) ) - ;;@ ~lib/memory.ts:251:32 + ;;@ ~lib/memory.ts:146:32 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:251:37 + ;;@ ~lib/memory.ts:146:37 (i32.const 8) ) - ;;@ ~lib/memory.ts:251:41 + ;;@ ~lib/memory.ts:146:41 (i32.shl (get_local $3) - ;;@ ~lib/memory.ts:251:46 + ;;@ ~lib/memory.ts:146:46 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:252:10 + ;;@ ~lib/memory.ts:147:10 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:252:17 + ;;@ ~lib/memory.ts:147:17 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:252:21 + ;;@ ~lib/memory.ts:147:21 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:252:29 + ;;@ ~lib/memory.ts:147:29 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:252:33 + ;;@ ~lib/memory.ts:147:33 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:252:38 + ;;@ ~lib/memory.ts:147:38 (i32.const 16) ) ) @@ -1753,24 +1750,24 @@ ) ) ) - ;;@ ~lib/memory.ts:254:8 + ;;@ ~lib/memory.ts:149:8 (br $break|2) ) ) ) - ;;@ ~lib/memory.ts:260:2 + ;;@ ~lib/memory.ts:155:2 (if - ;;@ ~lib/memory.ts:260:6 + ;;@ ~lib/memory.ts:155:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:260:10 + ;;@ ~lib/memory.ts:155:10 (i32.const 16) ) - ;;@ ~lib/memory.ts:260:14 + ;;@ ~lib/memory.ts:155:14 (block - ;;@ ~lib/memory.ts:261:4 + ;;@ ~lib/memory.ts:156:4 (i32.store8 - ;;@ ~lib/memory.ts:261:14 + ;;@ ~lib/memory.ts:156:14 (block (result i32) (set_local $5 (get_local $0) @@ -1783,9 +1780,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:261:22 + ;;@ ~lib/memory.ts:156:22 (i32.load8_u - ;;@ ~lib/memory.ts:261:31 + ;;@ ~lib/memory.ts:156:31 (block (result i32) (set_local $5 (get_local $1) @@ -1800,9 +1797,9 @@ ) ) ) - ;;@ ~lib/memory.ts:262:4 + ;;@ ~lib/memory.ts:157:4 (i32.store8 - ;;@ ~lib/memory.ts:262:14 + ;;@ ~lib/memory.ts:157:14 (block (result i32) (set_local $5 (get_local $0) @@ -1815,9 +1812,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:262:22 + ;;@ ~lib/memory.ts:157:22 (i32.load8_u - ;;@ ~lib/memory.ts:262:31 + ;;@ ~lib/memory.ts:157:31 (block (result i32) (set_local $5 (get_local $1) @@ -1832,9 +1829,9 @@ ) ) ) - ;;@ ~lib/memory.ts:263:4 + ;;@ ~lib/memory.ts:158:4 (i32.store8 - ;;@ ~lib/memory.ts:263:14 + ;;@ ~lib/memory.ts:158:14 (block (result i32) (set_local $5 (get_local $0) @@ -1847,9 +1844,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:263:22 + ;;@ ~lib/memory.ts:158:22 (i32.load8_u - ;;@ ~lib/memory.ts:263:31 + ;;@ ~lib/memory.ts:158:31 (block (result i32) (set_local $5 (get_local $1) @@ -1864,9 +1861,9 @@ ) ) ) - ;;@ ~lib/memory.ts:264:4 + ;;@ ~lib/memory.ts:159:4 (i32.store8 - ;;@ ~lib/memory.ts:264:14 + ;;@ ~lib/memory.ts:159:14 (block (result i32) (set_local $5 (get_local $0) @@ -1879,9 +1876,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:264:22 + ;;@ ~lib/memory.ts:159:22 (i32.load8_u - ;;@ ~lib/memory.ts:264:31 + ;;@ ~lib/memory.ts:159:31 (block (result i32) (set_local $5 (get_local $1) @@ -1896,9 +1893,9 @@ ) ) ) - ;;@ ~lib/memory.ts:265:4 + ;;@ ~lib/memory.ts:160:4 (i32.store8 - ;;@ ~lib/memory.ts:265:14 + ;;@ ~lib/memory.ts:160:14 (block (result i32) (set_local $5 (get_local $0) @@ -1911,9 +1908,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:265:22 + ;;@ ~lib/memory.ts:160:22 (i32.load8_u - ;;@ ~lib/memory.ts:265:31 + ;;@ ~lib/memory.ts:160:31 (block (result i32) (set_local $5 (get_local $1) @@ -1928,9 +1925,9 @@ ) ) ) - ;;@ ~lib/memory.ts:266:4 + ;;@ ~lib/memory.ts:161:4 (i32.store8 - ;;@ ~lib/memory.ts:266:14 + ;;@ ~lib/memory.ts:161:14 (block (result i32) (set_local $5 (get_local $0) @@ -1943,9 +1940,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:266:22 + ;;@ ~lib/memory.ts:161:22 (i32.load8_u - ;;@ ~lib/memory.ts:266:31 + ;;@ ~lib/memory.ts:161:31 (block (result i32) (set_local $5 (get_local $1) @@ -1960,9 +1957,9 @@ ) ) ) - ;;@ ~lib/memory.ts:267:4 + ;;@ ~lib/memory.ts:162:4 (i32.store8 - ;;@ ~lib/memory.ts:267:14 + ;;@ ~lib/memory.ts:162:14 (block (result i32) (set_local $5 (get_local $0) @@ -1975,9 +1972,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:267:22 + ;;@ ~lib/memory.ts:162:22 (i32.load8_u - ;;@ ~lib/memory.ts:267:31 + ;;@ ~lib/memory.ts:162:31 (block (result i32) (set_local $5 (get_local $1) @@ -1992,9 +1989,9 @@ ) ) ) - ;;@ ~lib/memory.ts:268:4 + ;;@ ~lib/memory.ts:163:4 (i32.store8 - ;;@ ~lib/memory.ts:268:14 + ;;@ ~lib/memory.ts:163:14 (block (result i32) (set_local $5 (get_local $0) @@ -2007,9 +2004,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:268:22 + ;;@ ~lib/memory.ts:163:22 (i32.load8_u - ;;@ ~lib/memory.ts:268:31 + ;;@ ~lib/memory.ts:163:31 (block (result i32) (set_local $5 (get_local $1) @@ -2024,9 +2021,9 @@ ) ) ) - ;;@ ~lib/memory.ts:269:4 + ;;@ ~lib/memory.ts:164:4 (i32.store8 - ;;@ ~lib/memory.ts:269:14 + ;;@ ~lib/memory.ts:164:14 (block (result i32) (set_local $5 (get_local $0) @@ -2039,9 +2036,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:269:22 + ;;@ ~lib/memory.ts:164:22 (i32.load8_u - ;;@ ~lib/memory.ts:269:31 + ;;@ ~lib/memory.ts:164:31 (block (result i32) (set_local $5 (get_local $1) @@ -2056,9 +2053,9 @@ ) ) ) - ;;@ ~lib/memory.ts:270:4 + ;;@ ~lib/memory.ts:165:4 (i32.store8 - ;;@ ~lib/memory.ts:270:14 + ;;@ ~lib/memory.ts:165:14 (block (result i32) (set_local $5 (get_local $0) @@ -2071,9 +2068,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:270:22 + ;;@ ~lib/memory.ts:165:22 (i32.load8_u - ;;@ ~lib/memory.ts:270:31 + ;;@ ~lib/memory.ts:165:31 (block (result i32) (set_local $5 (get_local $1) @@ -2088,9 +2085,9 @@ ) ) ) - ;;@ ~lib/memory.ts:271:4 + ;;@ ~lib/memory.ts:166:4 (i32.store8 - ;;@ ~lib/memory.ts:271:14 + ;;@ ~lib/memory.ts:166:14 (block (result i32) (set_local $5 (get_local $0) @@ -2103,9 +2100,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:271:22 + ;;@ ~lib/memory.ts:166:22 (i32.load8_u - ;;@ ~lib/memory.ts:271:31 + ;;@ ~lib/memory.ts:166:31 (block (result i32) (set_local $5 (get_local $1) @@ -2120,9 +2117,9 @@ ) ) ) - ;;@ ~lib/memory.ts:272:4 + ;;@ ~lib/memory.ts:167:4 (i32.store8 - ;;@ ~lib/memory.ts:272:14 + ;;@ ~lib/memory.ts:167:14 (block (result i32) (set_local $5 (get_local $0) @@ -2135,9 +2132,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:272:22 + ;;@ ~lib/memory.ts:167:22 (i32.load8_u - ;;@ ~lib/memory.ts:272:31 + ;;@ ~lib/memory.ts:167:31 (block (result i32) (set_local $5 (get_local $1) @@ -2152,9 +2149,9 @@ ) ) ) - ;;@ ~lib/memory.ts:273:4 + ;;@ ~lib/memory.ts:168:4 (i32.store8 - ;;@ ~lib/memory.ts:273:14 + ;;@ ~lib/memory.ts:168:14 (block (result i32) (set_local $5 (get_local $0) @@ -2167,9 +2164,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:273:22 + ;;@ ~lib/memory.ts:168:22 (i32.load8_u - ;;@ ~lib/memory.ts:273:31 + ;;@ ~lib/memory.ts:168:31 (block (result i32) (set_local $5 (get_local $1) @@ -2184,9 +2181,9 @@ ) ) ) - ;;@ ~lib/memory.ts:274:4 + ;;@ ~lib/memory.ts:169:4 (i32.store8 - ;;@ ~lib/memory.ts:274:14 + ;;@ ~lib/memory.ts:169:14 (block (result i32) (set_local $5 (get_local $0) @@ -2199,9 +2196,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:274:22 + ;;@ ~lib/memory.ts:169:22 (i32.load8_u - ;;@ ~lib/memory.ts:274:31 + ;;@ ~lib/memory.ts:169:31 (block (result i32) (set_local $5 (get_local $1) @@ -2216,9 +2213,9 @@ ) ) ) - ;;@ ~lib/memory.ts:275:4 + ;;@ ~lib/memory.ts:170:4 (i32.store8 - ;;@ ~lib/memory.ts:275:14 + ;;@ ~lib/memory.ts:170:14 (block (result i32) (set_local $5 (get_local $0) @@ -2231,9 +2228,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:275:22 + ;;@ ~lib/memory.ts:170:22 (i32.load8_u - ;;@ ~lib/memory.ts:275:31 + ;;@ ~lib/memory.ts:170:31 (block (result i32) (set_local $5 (get_local $1) @@ -2248,9 +2245,9 @@ ) ) ) - ;;@ ~lib/memory.ts:276:4 + ;;@ ~lib/memory.ts:171:4 (i32.store8 - ;;@ ~lib/memory.ts:276:14 + ;;@ ~lib/memory.ts:171:14 (block (result i32) (set_local $5 (get_local $0) @@ -2263,9 +2260,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:276:22 + ;;@ ~lib/memory.ts:171:22 (i32.load8_u - ;;@ ~lib/memory.ts:276:31 + ;;@ ~lib/memory.ts:171:31 (block (result i32) (set_local $5 (get_local $1) @@ -2282,19 +2279,19 @@ ) ) ) - ;;@ ~lib/memory.ts:278:2 + ;;@ ~lib/memory.ts:173:2 (if - ;;@ ~lib/memory.ts:278:6 + ;;@ ~lib/memory.ts:173:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:278:10 + ;;@ ~lib/memory.ts:173:10 (i32.const 8) ) - ;;@ ~lib/memory.ts:278:13 + ;;@ ~lib/memory.ts:173:13 (block - ;;@ ~lib/memory.ts:279:4 + ;;@ ~lib/memory.ts:174:4 (i32.store8 - ;;@ ~lib/memory.ts:279:14 + ;;@ ~lib/memory.ts:174:14 (block (result i32) (set_local $5 (get_local $0) @@ -2307,9 +2304,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:279:22 + ;;@ ~lib/memory.ts:174:22 (i32.load8_u - ;;@ ~lib/memory.ts:279:31 + ;;@ ~lib/memory.ts:174:31 (block (result i32) (set_local $5 (get_local $1) @@ -2324,9 +2321,9 @@ ) ) ) - ;;@ ~lib/memory.ts:280:4 + ;;@ ~lib/memory.ts:175:4 (i32.store8 - ;;@ ~lib/memory.ts:280:14 + ;;@ ~lib/memory.ts:175:14 (block (result i32) (set_local $5 (get_local $0) @@ -2339,9 +2336,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:280:22 + ;;@ ~lib/memory.ts:175:22 (i32.load8_u - ;;@ ~lib/memory.ts:280:31 + ;;@ ~lib/memory.ts:175:31 (block (result i32) (set_local $5 (get_local $1) @@ -2356,9 +2353,9 @@ ) ) ) - ;;@ ~lib/memory.ts:281:4 + ;;@ ~lib/memory.ts:176:4 (i32.store8 - ;;@ ~lib/memory.ts:281:14 + ;;@ ~lib/memory.ts:176:14 (block (result i32) (set_local $5 (get_local $0) @@ -2371,9 +2368,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:281:22 + ;;@ ~lib/memory.ts:176:22 (i32.load8_u - ;;@ ~lib/memory.ts:281:31 + ;;@ ~lib/memory.ts:176:31 (block (result i32) (set_local $5 (get_local $1) @@ -2388,9 +2385,9 @@ ) ) ) - ;;@ ~lib/memory.ts:282:4 + ;;@ ~lib/memory.ts:177:4 (i32.store8 - ;;@ ~lib/memory.ts:282:14 + ;;@ ~lib/memory.ts:177:14 (block (result i32) (set_local $5 (get_local $0) @@ -2403,9 +2400,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:282:22 + ;;@ ~lib/memory.ts:177:22 (i32.load8_u - ;;@ ~lib/memory.ts:282:31 + ;;@ ~lib/memory.ts:177:31 (block (result i32) (set_local $5 (get_local $1) @@ -2420,9 +2417,9 @@ ) ) ) - ;;@ ~lib/memory.ts:283:4 + ;;@ ~lib/memory.ts:178:4 (i32.store8 - ;;@ ~lib/memory.ts:283:14 + ;;@ ~lib/memory.ts:178:14 (block (result i32) (set_local $5 (get_local $0) @@ -2435,9 +2432,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:283:22 + ;;@ ~lib/memory.ts:178:22 (i32.load8_u - ;;@ ~lib/memory.ts:283:31 + ;;@ ~lib/memory.ts:178:31 (block (result i32) (set_local $5 (get_local $1) @@ -2452,9 +2449,9 @@ ) ) ) - ;;@ ~lib/memory.ts:284:4 + ;;@ ~lib/memory.ts:179:4 (i32.store8 - ;;@ ~lib/memory.ts:284:14 + ;;@ ~lib/memory.ts:179:14 (block (result i32) (set_local $5 (get_local $0) @@ -2467,9 +2464,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:284:22 + ;;@ ~lib/memory.ts:179:22 (i32.load8_u - ;;@ ~lib/memory.ts:284:31 + ;;@ ~lib/memory.ts:179:31 (block (result i32) (set_local $5 (get_local $1) @@ -2484,9 +2481,9 @@ ) ) ) - ;;@ ~lib/memory.ts:285:4 + ;;@ ~lib/memory.ts:180:4 (i32.store8 - ;;@ ~lib/memory.ts:285:14 + ;;@ ~lib/memory.ts:180:14 (block (result i32) (set_local $5 (get_local $0) @@ -2499,9 +2496,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:285:22 + ;;@ ~lib/memory.ts:180:22 (i32.load8_u - ;;@ ~lib/memory.ts:285:31 + ;;@ ~lib/memory.ts:180:31 (block (result i32) (set_local $5 (get_local $1) @@ -2516,9 +2513,9 @@ ) ) ) - ;;@ ~lib/memory.ts:286:4 + ;;@ ~lib/memory.ts:181:4 (i32.store8 - ;;@ ~lib/memory.ts:286:14 + ;;@ ~lib/memory.ts:181:14 (block (result i32) (set_local $5 (get_local $0) @@ -2531,9 +2528,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:286:22 + ;;@ ~lib/memory.ts:181:22 (i32.load8_u - ;;@ ~lib/memory.ts:286:31 + ;;@ ~lib/memory.ts:181:31 (block (result i32) (set_local $5 (get_local $1) @@ -2550,19 +2547,19 @@ ) ) ) - ;;@ ~lib/memory.ts:288:2 + ;;@ ~lib/memory.ts:183:2 (if - ;;@ ~lib/memory.ts:288:6 + ;;@ ~lib/memory.ts:183:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:288:10 + ;;@ ~lib/memory.ts:183:10 (i32.const 4) ) - ;;@ ~lib/memory.ts:288:13 + ;;@ ~lib/memory.ts:183:13 (block - ;;@ ~lib/memory.ts:289:4 + ;;@ ~lib/memory.ts:184:4 (i32.store8 - ;;@ ~lib/memory.ts:289:14 + ;;@ ~lib/memory.ts:184:14 (block (result i32) (set_local $5 (get_local $0) @@ -2575,9 +2572,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:289:22 + ;;@ ~lib/memory.ts:184:22 (i32.load8_u - ;;@ ~lib/memory.ts:289:31 + ;;@ ~lib/memory.ts:184:31 (block (result i32) (set_local $5 (get_local $1) @@ -2592,9 +2589,9 @@ ) ) ) - ;;@ ~lib/memory.ts:290:4 + ;;@ ~lib/memory.ts:185:4 (i32.store8 - ;;@ ~lib/memory.ts:290:14 + ;;@ ~lib/memory.ts:185:14 (block (result i32) (set_local $5 (get_local $0) @@ -2607,9 +2604,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:290:22 + ;;@ ~lib/memory.ts:185:22 (i32.load8_u - ;;@ ~lib/memory.ts:290:31 + ;;@ ~lib/memory.ts:185:31 (block (result i32) (set_local $5 (get_local $1) @@ -2624,9 +2621,9 @@ ) ) ) - ;;@ ~lib/memory.ts:291:4 + ;;@ ~lib/memory.ts:186:4 (i32.store8 - ;;@ ~lib/memory.ts:291:14 + ;;@ ~lib/memory.ts:186:14 (block (result i32) (set_local $5 (get_local $0) @@ -2639,9 +2636,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:291:22 + ;;@ ~lib/memory.ts:186:22 (i32.load8_u - ;;@ ~lib/memory.ts:291:31 + ;;@ ~lib/memory.ts:186:31 (block (result i32) (set_local $5 (get_local $1) @@ -2656,9 +2653,9 @@ ) ) ) - ;;@ ~lib/memory.ts:292:4 + ;;@ ~lib/memory.ts:187:4 (i32.store8 - ;;@ ~lib/memory.ts:292:14 + ;;@ ~lib/memory.ts:187:14 (block (result i32) (set_local $5 (get_local $0) @@ -2671,9 +2668,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:292:22 + ;;@ ~lib/memory.ts:187:22 (i32.load8_u - ;;@ ~lib/memory.ts:292:31 + ;;@ ~lib/memory.ts:187:31 (block (result i32) (set_local $5 (get_local $1) @@ -2690,19 +2687,19 @@ ) ) ) - ;;@ ~lib/memory.ts:294:2 + ;;@ ~lib/memory.ts:189:2 (if - ;;@ ~lib/memory.ts:294:6 + ;;@ ~lib/memory.ts:189:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:294:10 + ;;@ ~lib/memory.ts:189:10 (i32.const 2) ) - ;;@ ~lib/memory.ts:294:13 + ;;@ ~lib/memory.ts:189:13 (block - ;;@ ~lib/memory.ts:295:4 + ;;@ ~lib/memory.ts:190:4 (i32.store8 - ;;@ ~lib/memory.ts:295:14 + ;;@ ~lib/memory.ts:190:14 (block (result i32) (set_local $5 (get_local $0) @@ -2715,9 +2712,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:295:22 + ;;@ ~lib/memory.ts:190:22 (i32.load8_u - ;;@ ~lib/memory.ts:295:31 + ;;@ ~lib/memory.ts:190:31 (block (result i32) (set_local $5 (get_local $1) @@ -2732,9 +2729,9 @@ ) ) ) - ;;@ ~lib/memory.ts:296:4 + ;;@ ~lib/memory.ts:191:4 (i32.store8 - ;;@ ~lib/memory.ts:296:14 + ;;@ ~lib/memory.ts:191:14 (block (result i32) (set_local $5 (get_local $0) @@ -2747,9 +2744,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:296:22 + ;;@ ~lib/memory.ts:191:22 (i32.load8_u - ;;@ ~lib/memory.ts:296:31 + ;;@ ~lib/memory.ts:191:31 (block (result i32) (set_local $5 (get_local $1) @@ -2766,17 +2763,17 @@ ) ) ) - ;;@ ~lib/memory.ts:298:2 + ;;@ ~lib/memory.ts:193:2 (if - ;;@ ~lib/memory.ts:298:6 + ;;@ ~lib/memory.ts:193:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:298:10 + ;;@ ~lib/memory.ts:193:10 (i32.const 1) ) - ;;@ ~lib/memory.ts:298:13 + ;;@ ~lib/memory.ts:193:13 (i32.store8 - ;;@ ~lib/memory.ts:299:14 + ;;@ ~lib/memory.ts:194:14 (block (result i32) (set_local $5 (get_local $0) @@ -2789,9 +2786,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:299:22 + ;;@ ~lib/memory.ts:194:22 (i32.load8_u - ;;@ ~lib/memory.ts:299:31 + ;;@ ~lib/memory.ts:194:31 (block (result i32) (set_local $5 (get_local $1) @@ -2808,123 +2805,123 @@ ) ) ) - (func $~lib/memory/memory.copy (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memmove (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - ;;@ ~lib/memory.ts:79:4 + ;;@ ~lib/memory.ts:200:2 (if - ;;@ ~lib/memory.ts:79:8 + ;;@ ~lib/memory.ts:200:6 (i32.eq (get_local $0) - ;;@ ~lib/memory.ts:79:16 + ;;@ ~lib/memory.ts:200:14 (get_local $1) ) - ;;@ ~lib/memory.ts:79:21 + ;;@ ~lib/memory.ts:200:19 (return) ) - ;;@ ~lib/memory.ts:80:4 + ;;@ ~lib/memory.ts:201:2 (if - ;;@ ~lib/memory.ts:80:8 + ;;@ ~lib/memory.ts:201:6 (if (result i32) (tee_local $3 (i32.le_u (i32.add (get_local $1) - ;;@ ~lib/memory.ts:80:14 + ;;@ ~lib/memory.ts:201:12 (get_local $2) ) - ;;@ ~lib/memory.ts:80:19 + ;;@ ~lib/memory.ts:201:17 (get_local $0) ) ) (get_local $3) - ;;@ ~lib/memory.ts:80:27 + ;;@ ~lib/memory.ts:201:25 (i32.le_u (i32.add (get_local $0) - ;;@ ~lib/memory.ts:80:34 + ;;@ ~lib/memory.ts:201:32 (get_local $2) ) - ;;@ ~lib/memory.ts:80:39 + ;;@ ~lib/memory.ts:201:37 (get_local $1) ) ) - ;;@ ~lib/memory.ts:80:44 + ;;@ ~lib/memory.ts:201:42 (block - ;;@ ~lib/memory.ts:81:6 + ;;@ ~lib/memory.ts:202:4 (call $~lib/memory/memcpy - ;;@ ~lib/memory.ts:81:13 + ;;@ ~lib/memory.ts:202:11 (get_local $0) - ;;@ ~lib/memory.ts:81:19 + ;;@ ~lib/memory.ts:202:17 (get_local $1) - ;;@ ~lib/memory.ts:81:24 + ;;@ ~lib/memory.ts:202:22 (get_local $2) ) - ;;@ ~lib/memory.ts:82:6 + ;;@ ~lib/memory.ts:203:4 (return) ) ) - ;;@ ~lib/memory.ts:84:4 + ;;@ ~lib/memory.ts:205:2 (if - ;;@ ~lib/memory.ts:84:8 + ;;@ ~lib/memory.ts:205:6 (i32.lt_u (get_local $0) - ;;@ ~lib/memory.ts:84:15 + ;;@ ~lib/memory.ts:205:13 (get_local $1) ) - ;;@ ~lib/memory.ts:84:20 + ;;@ ~lib/memory.ts:205:18 (block - ;;@ ~lib/memory.ts:85:6 + ;;@ ~lib/memory.ts:206:4 (if - ;;@ ~lib/memory.ts:85:10 + ;;@ ~lib/memory.ts:206:8 (i32.eq (i32.and - ;;@ ~lib/memory.ts:85:11 + ;;@ ~lib/memory.ts:206:9 (get_local $1) - ;;@ ~lib/memory.ts:85:17 + ;;@ ~lib/memory.ts:206:15 (i32.const 7) ) - ;;@ ~lib/memory.ts:85:23 + ;;@ ~lib/memory.ts:206:21 (i32.and - ;;@ ~lib/memory.ts:85:24 + ;;@ ~lib/memory.ts:206:22 (get_local $0) - ;;@ ~lib/memory.ts:85:31 + ;;@ ~lib/memory.ts:206:29 (i32.const 7) ) ) - ;;@ ~lib/memory.ts:85:35 + ;;@ ~lib/memory.ts:206:33 (block (block $break|0 (loop $continue|0 (if - ;;@ ~lib/memory.ts:86:15 + ;;@ ~lib/memory.ts:207:13 (i32.and (get_local $0) - ;;@ ~lib/memory.ts:86:22 + ;;@ ~lib/memory.ts:207:20 (i32.const 7) ) (block (block - ;;@ ~lib/memory.ts:87:10 + ;;@ ~lib/memory.ts:208:8 (if - ;;@ ~lib/memory.ts:87:14 + ;;@ ~lib/memory.ts:208:12 (i32.eqz - ;;@ ~lib/memory.ts:87:15 + ;;@ ~lib/memory.ts:208:13 (get_local $2) ) - ;;@ ~lib/memory.ts:87:18 + ;;@ ~lib/memory.ts:208:16 (return) ) - ;;@ ~lib/memory.ts:88:10 + ;;@ ~lib/memory.ts:209:8 (set_local $2 (i32.sub - ;;@ ~lib/memory.ts:88:12 + ;;@ ~lib/memory.ts:209:10 (get_local $2) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:89:10 + ;;@ ~lib/memory.ts:210:8 (i32.store8 - ;;@ ~lib/memory.ts:89:20 + ;;@ ~lib/memory.ts:210:18 (block (result i32) (set_local $3 (get_local $0) @@ -2937,9 +2934,9 @@ ) (get_local $3) ) - ;;@ ~lib/memory.ts:89:28 + ;;@ ~lib/memory.ts:210:26 (i32.load8_u - ;;@ ~lib/memory.ts:89:37 + ;;@ ~lib/memory.ts:210:35 (block (result i32) (set_local $3 (get_local $1) @@ -2960,49 +2957,49 @@ ) ) ) - ;;@ ~lib/memory.ts:91:8 + ;;@ ~lib/memory.ts:212:6 (block $break|1 (loop $continue|1 (if - ;;@ ~lib/memory.ts:91:15 + ;;@ ~lib/memory.ts:212:13 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:91:20 + ;;@ ~lib/memory.ts:212:18 (i32.const 8) ) (block (block - ;;@ ~lib/memory.ts:92:10 + ;;@ ~lib/memory.ts:213:8 (i64.store - ;;@ ~lib/memory.ts:92:21 + ;;@ ~lib/memory.ts:213:19 (get_local $0) - ;;@ ~lib/memory.ts:92:27 + ;;@ ~lib/memory.ts:213:25 (i64.load - ;;@ ~lib/memory.ts:92:37 + ;;@ ~lib/memory.ts:213:35 (get_local $1) ) ) - ;;@ ~lib/memory.ts:93:10 + ;;@ ~lib/memory.ts:214:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:93:18 + ;;@ ~lib/memory.ts:214:16 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:94:10 + ;;@ ~lib/memory.ts:215:8 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:94:18 + ;;@ ~lib/memory.ts:215:16 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:95:10 + ;;@ ~lib/memory.ts:216:8 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:95:18 + ;;@ ~lib/memory.ts:216:16 (i32.const 8) ) ) @@ -3014,17 +3011,17 @@ ) ) ) - ;;@ ~lib/memory.ts:98:6 + ;;@ ~lib/memory.ts:219:4 (block $break|2 (loop $continue|2 (if - ;;@ ~lib/memory.ts:98:13 + ;;@ ~lib/memory.ts:219:11 (get_local $2) (block (block - ;;@ ~lib/memory.ts:99:8 + ;;@ ~lib/memory.ts:220:6 (i32.store8 - ;;@ ~lib/memory.ts:99:18 + ;;@ ~lib/memory.ts:220:16 (block (result i32) (set_local $3 (get_local $0) @@ -3037,9 +3034,9 @@ ) (get_local $3) ) - ;;@ ~lib/memory.ts:99:26 + ;;@ ~lib/memory.ts:220:24 (i32.load8_u - ;;@ ~lib/memory.ts:99:35 + ;;@ ~lib/memory.ts:220:33 (block (result i32) (set_local $3 (get_local $1) @@ -3054,10 +3051,10 @@ ) ) ) - ;;@ ~lib/memory.ts:100:8 + ;;@ ~lib/memory.ts:221:6 (set_local $2 (i32.sub - ;;@ ~lib/memory.ts:100:10 + ;;@ ~lib/memory.ts:221:8 (get_local $2) (i32.const 1) ) @@ -3069,74 +3066,74 @@ ) ) ) - ;;@ ~lib/memory.ts:102:11 + ;;@ ~lib/memory.ts:223:9 (block - ;;@ ~lib/memory.ts:103:6 + ;;@ ~lib/memory.ts:224:4 (if - ;;@ ~lib/memory.ts:103:10 + ;;@ ~lib/memory.ts:224:8 (i32.eq (i32.and - ;;@ ~lib/memory.ts:103:11 + ;;@ ~lib/memory.ts:224:9 (get_local $1) - ;;@ ~lib/memory.ts:103:17 + ;;@ ~lib/memory.ts:224:15 (i32.const 7) ) - ;;@ ~lib/memory.ts:103:23 + ;;@ ~lib/memory.ts:224:21 (i32.and - ;;@ ~lib/memory.ts:103:24 + ;;@ ~lib/memory.ts:224:22 (get_local $0) - ;;@ ~lib/memory.ts:103:31 + ;;@ ~lib/memory.ts:224:29 (i32.const 7) ) ) - ;;@ ~lib/memory.ts:103:35 + ;;@ ~lib/memory.ts:224:33 (block (block $break|3 (loop $continue|3 (if - ;;@ ~lib/memory.ts:104:15 + ;;@ ~lib/memory.ts:225:13 (i32.and (i32.add - ;;@ ~lib/memory.ts:104:16 + ;;@ ~lib/memory.ts:225:14 (get_local $0) - ;;@ ~lib/memory.ts:104:23 + ;;@ ~lib/memory.ts:225:21 (get_local $2) ) - ;;@ ~lib/memory.ts:104:28 + ;;@ ~lib/memory.ts:225:26 (i32.const 7) ) (block (block - ;;@ ~lib/memory.ts:105:10 + ;;@ ~lib/memory.ts:226:8 (if - ;;@ ~lib/memory.ts:105:14 + ;;@ ~lib/memory.ts:226:12 (i32.eqz - ;;@ ~lib/memory.ts:105:15 + ;;@ ~lib/memory.ts:226:13 (get_local $2) ) - ;;@ ~lib/memory.ts:105:18 + ;;@ ~lib/memory.ts:226:16 (return) ) - ;;@ ~lib/memory.ts:106:10 + ;;@ ~lib/memory.ts:227:8 (i32.store8 - ;;@ ~lib/memory.ts:106:20 + ;;@ ~lib/memory.ts:227:18 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:106:27 + ;;@ ~lib/memory.ts:227:25 (tee_local $2 (i32.sub - ;;@ ~lib/memory.ts:106:29 + ;;@ ~lib/memory.ts:227:27 (get_local $2) (i32.const 1) ) ) ) - ;;@ ~lib/memory.ts:106:32 + ;;@ ~lib/memory.ts:227:30 (i32.load8_u - ;;@ ~lib/memory.ts:106:41 + ;;@ ~lib/memory.ts:227:39 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:106:47 + ;;@ ~lib/memory.ts:227:45 (get_local $2) ) ) @@ -3147,40 +3144,40 @@ ) ) ) - ;;@ ~lib/memory.ts:108:8 + ;;@ ~lib/memory.ts:229:6 (block $break|4 (loop $continue|4 (if - ;;@ ~lib/memory.ts:108:15 + ;;@ ~lib/memory.ts:229:13 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:108:20 + ;;@ ~lib/memory.ts:229:18 (i32.const 8) ) (block (block - ;;@ ~lib/memory.ts:109:10 + ;;@ ~lib/memory.ts:230:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:109:15 + ;;@ ~lib/memory.ts:230:13 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:110:10 + ;;@ ~lib/memory.ts:231:8 (i64.store - ;;@ ~lib/memory.ts:110:21 + ;;@ ~lib/memory.ts:231:19 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:110:28 + ;;@ ~lib/memory.ts:231:26 (get_local $2) ) - ;;@ ~lib/memory.ts:110:31 + ;;@ ~lib/memory.ts:231:29 (i64.load - ;;@ ~lib/memory.ts:110:41 + ;;@ ~lib/memory.ts:231:39 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:110:47 + ;;@ ~lib/memory.ts:231:45 (get_local $2) ) ) @@ -3193,33 +3190,33 @@ ) ) ) - ;;@ ~lib/memory.ts:113:6 + ;;@ ~lib/memory.ts:234:4 (block $break|5 (loop $continue|5 (if - ;;@ ~lib/memory.ts:113:13 + ;;@ ~lib/memory.ts:234:11 (get_local $2) (block - ;;@ ~lib/memory.ts:113:16 + ;;@ ~lib/memory.ts:234:14 (i32.store8 - ;;@ ~lib/memory.ts:114:18 + ;;@ ~lib/memory.ts:235:16 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:114:25 + ;;@ ~lib/memory.ts:235:23 (tee_local $2 (i32.sub - ;;@ ~lib/memory.ts:114:27 + ;;@ ~lib/memory.ts:235:25 (get_local $2) (i32.const 1) ) ) ) - ;;@ ~lib/memory.ts:114:30 + ;;@ ~lib/memory.ts:235:28 (i32.load8_u - ;;@ ~lib/memory.ts:114:39 + ;;@ ~lib/memory.ts:235:37 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:114:45 + ;;@ ~lib/memory.ts:235:43 (get_local $2) ) ) @@ -3232,43 +3229,54 @@ ) ) ) - (func $~lib/memory/memory.compare (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.copy (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + ;;@ ~lib/memory.ts:16:4 + (call $~lib/memory/memmove + ;;@ ~lib/memory.ts:16:12 + (get_local $0) + ;;@ ~lib/memory.ts:16:18 + (get_local $1) + ;;@ ~lib/memory.ts:16:23 + (get_local $2) + ) + ) + (func $~lib/memory/memcmp (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - ;;@ ~lib/memory.ts:122:4 + ;;@ ~lib/memory.ts:302:2 (if - ;;@ ~lib/memory.ts:122:8 + ;;@ ~lib/memory.ts:302:6 (i32.eq (get_local $0) - ;;@ ~lib/memory.ts:122:14 + ;;@ ~lib/memory.ts:302:12 (get_local $1) ) - ;;@ ~lib/memory.ts:122:25 + ;;@ ~lib/memory.ts:302:23 (return (i32.const 0) ) ) - ;;@ ~lib/memory.ts:123:4 + ;;@ ~lib/memory.ts:303:2 (block $break|0 (loop $continue|0 (if - ;;@ ~lib/memory.ts:123:11 + ;;@ ~lib/memory.ts:303:9 (if (result i32) (tee_local $3 (i32.ne (get_local $2) - ;;@ ~lib/memory.ts:123:16 + ;;@ ~lib/memory.ts:303:14 (i32.const 0) ) ) - ;;@ ~lib/memory.ts:123:21 + ;;@ ~lib/memory.ts:303:19 (i32.eq (i32.load8_u - ;;@ ~lib/memory.ts:123:30 + ;;@ ~lib/memory.ts:303:28 (get_local $0) ) - ;;@ ~lib/memory.ts:123:37 + ;;@ ~lib/memory.ts:303:35 (i32.load8_u - ;;@ ~lib/memory.ts:123:46 + ;;@ ~lib/memory.ts:303:44 (get_local $1) ) ) @@ -3276,21 +3284,21 @@ ) (block (block - ;;@ ~lib/memory.ts:124:6 + ;;@ ~lib/memory.ts:304:4 (set_local $2 (i32.sub (get_local $2) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:124:11 + ;;@ ~lib/memory.ts:304:9 (set_local $0 (i32.add (get_local $0) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:124:17 + ;;@ ~lib/memory.ts:304:15 (set_local $1 (i32.add (get_local $1) @@ -3303,27 +3311,38 @@ ) ) ) - ;;@ ~lib/memory.ts:126:55 + ;;@ ~lib/memory.ts:306:53 (if (result i32) - ;;@ ~lib/memory.ts:126:11 + ;;@ ~lib/memory.ts:306:9 (get_local $2) - ;;@ ~lib/memory.ts:126:15 + ;;@ ~lib/memory.ts:306:13 (i32.sub (i32.load8_u - ;;@ ~lib/memory.ts:126:29 + ;;@ ~lib/memory.ts:306:27 (get_local $0) ) - ;;@ ~lib/memory.ts:126:35 + ;;@ ~lib/memory.ts:306:33 (i32.load8_u - ;;@ ~lib/memory.ts:126:49 + ;;@ ~lib/memory.ts:306:47 (get_local $1) ) ) - ;;@ ~lib/memory.ts:126:55 + ;;@ ~lib/memory.ts:306:53 (i32.const 0) ) ) - (func $~lib/allocator/arena/__memory_allocate (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.compare (; 6 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + ;;@ ~lib/memory.ts:21:27 + (call $~lib/memory/memcmp + ;;@ ~lib/memory.ts:21:18 + (get_local $0) + ;;@ ~lib/memory.ts:21:22 + (get_local $1) + ;;@ ~lib/memory.ts:21:26 + (get_local $2) + ) + ) + (func $~lib/allocator/arena/__memory_allocate (; 7 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3342,7 +3361,7 @@ (i32.gt_u (get_local $0) ;;@ ~lib/allocator/arena.ts:18:15 - (i32.const 1073741824) + (get_global $~lib/internal/allocator/MAX_SIZE_32) ) ;;@ ~lib/allocator/arena.ts:18:28 (unreachable) @@ -3364,12 +3383,12 @@ (get_local $0) ) ;;@ ~lib/allocator/arena.ts:20:31 - (i32.const 7) + (get_global $~lib/internal/allocator/AL_MASK) ) ;;@ ~lib/allocator/arena.ts:20:42 (i32.xor ;;@ ~lib/allocator/arena.ts:20:43 - (i32.const 7) + (get_global $~lib/internal/allocator/AL_MASK) (i32.const -1) ) ) @@ -3377,7 +3396,7 @@ ;;@ ~lib/allocator/arena.ts:21:4 (set_local $3 ;;@ ~lib/allocator/arena.ts:21:29 - (call $~lib/memory/memory.size) + (current_memory) ) ;;@ ~lib/allocator/arena.ts:22:4 (if @@ -3443,7 +3462,7 @@ ;;@ ~lib/allocator/arena.ts:25:10 (i32.lt_s ;;@ ~lib/allocator/arena.ts:25:17 - (call $~lib/memory/memory.grow + (grow_memory ;;@ ~lib/allocator/arena.ts:25:22 (get_local $5) ) @@ -3455,7 +3474,7 @@ ;;@ ~lib/allocator/arena.ts:26:12 (i32.lt_s ;;@ ~lib/allocator/arena.ts:26:19 - (call $~lib/memory/memory.grow + (grow_memory ;;@ ~lib/allocator/arena.ts:26:24 (get_local $4) ) @@ -3482,42 +3501,42 @@ ;;@ ~lib/allocator/arena.ts:34:9 (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 7 ;) (type $ii) (param $0 i32) (result i32) - ;;@ ~lib/memory.ts:142:4 + (func $~lib/memory/memory.allocate (; 8 ;) (type $ii) (param $0 i32) (result i32) + ;;@ ~lib/memory.ts:37:4 (return - ;;@ ~lib/memory.ts:142:45 + ;;@ ~lib/memory.ts:37:45 (call $~lib/allocator/arena/__memory_allocate - ;;@ ~lib/memory.ts:142:63 + ;;@ ~lib/memory.ts:37:63 (get_local $0) ) ) ) - (func $~lib/allocator/arena/__memory_free (; 8 ;) (type $iv) (param $0 i32) + (func $~lib/allocator/arena/__memory_free (; 9 ;) (type $iv) (param $0 i32) (nop) ) - (func $~lib/memory/memory.free (; 9 ;) (type $iv) (param $0 i32) - ;;@ ~lib/memory.ts:148:36 + (func $~lib/memory/memory.free (; 10 ;) (type $iv) (param $0 i32) + ;;@ ~lib/memory.ts:43:36 (call $~lib/allocator/arena/__memory_free - ;;@ ~lib/memory.ts:148:50 + ;;@ ~lib/memory.ts:43:50 (get_local $0) ) - ;;@ ~lib/memory.ts:148:56 + ;;@ ~lib/memory.ts:43:56 (return) ) - (func $~lib/allocator/arena/__memory_reset (; 10 ;) (type $v) + (func $~lib/allocator/arena/__memory_reset (; 11 ;) (type $v) ;;@ ~lib/allocator/arena.ts:44:2 (set_global $~lib/allocator/arena/offset ;;@ ~lib/allocator/arena.ts:44:11 (get_global $~lib/allocator/arena/startOffset) ) ) - (func $~lib/memory/memory.reset (; 11 ;) (type $v) - ;;@ ~lib/memory.ts:154:37 + (func $~lib/memory/memory.reset (; 12 ;) (type $v) + ;;@ ~lib/memory.ts:49:37 (call $~lib/allocator/arena/__memory_reset) - ;;@ ~lib/memory.ts:154:55 + ;;@ ~lib/memory.ts:49:55 (return) ) - (func $start (; 12 ;) (type $v) + (func $start (; 13 ;) (type $v) (set_global $~lib/allocator/arena/startOffset ;;@ ~lib/allocator/arena.ts:12:25 (i32.and @@ -3525,12 +3544,12 @@ ;;@ ~lib/allocator/arena.ts:12:26 (get_global $HEAP_BASE) ;;@ ~lib/allocator/arena.ts:12:38 - (i32.const 7) + (get_global $~lib/internal/allocator/AL_MASK) ) ;;@ ~lib/allocator/arena.ts:12:49 (i32.xor ;;@ ~lib/allocator/arena.ts:12:50 - (i32.const 7) + (get_global $~lib/internal/allocator/AL_MASK) (i32.const -1) ) ) diff --git a/tests/allocators/buddy/optimized.wat b/tests/allocators/buddy/optimized.wat index c604eee0..1256781b 100644 --- a/tests/allocators/buddy/optimized.wat +++ b/tests/allocators/buddy/optimized.wat @@ -1,8 +1,7 @@ (module - (type $i (func (result i32))) - (type $ii (func (param i32) (result i32))) (type $iiiv (func (param i32 i32 i32))) (type $iiii (func (param i32 i32 i32) (result i32))) + (type $ii (func (param i32) (result i32))) (type $iv (func (param i32))) (type $iiv (func (param i32 i32))) (type $iii (func (param i32 i32) (result i32))) @@ -14,202 +13,188 @@ (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 $HEAP_BASE i32 (i32.const 8)) (memory $0 0) - (export "memory.size" (func $~lib/memory/memory.size)) - (export "memory.grow" (func $~lib/memory/memory.grow)) + (export "memory" (memory $0)) (export "memory.fill" (func $~lib/memory/memory.fill)) (export "memory.copy" (func $~lib/memory/memory.copy)) (export "memory.compare" (func $~lib/memory/memory.compare)) (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" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 0 ;) (type $i) (result i32) - ;;@ ~lib/memory.ts:4:25 - (current_memory) - ) - (func $~lib/memory/memory.grow (; 1 ;) (type $ii) (param $0 i32) (result i32) - ;;@ ~lib/memory.ts:8:30 - (grow_memory - ;;@ ~lib/memory.ts:8:25 - (get_local $0) - ) - ) - (func $~lib/memory/memory.fill (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 0 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i64) (local $4 i32) - ;;@ ~lib/memory.ts:17:4 + ;;@ ~lib/memory.ts:244:2 (if - ;;@ ~lib/memory.ts:17:8 + ;;@ ~lib/memory.ts:244:6 (i32.eqz - ;;@ ~lib/memory.ts:17:9 + ;;@ ~lib/memory.ts:244:7 (get_local $2) ) - ;;@ ~lib/memory.ts:17:12 + ;;@ ~lib/memory.ts:244:10 (return) ) - ;;@ ~lib/memory.ts:18:4 + ;;@ ~lib/memory.ts:245:2 (i32.store8 - ;;@ ~lib/memory.ts:18:14 + ;;@ ~lib/memory.ts:245:12 (get_local $0) - ;;@ ~lib/memory.ts:18:20 + ;;@ ~lib/memory.ts:245:18 (get_local $1) ) - ;;@ ~lib/memory.ts:19:4 + ;;@ ~lib/memory.ts:246:2 (i32.store8 - ;;@ ~lib/memory.ts:19:14 + ;;@ ~lib/memory.ts:246:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:19:21 + ;;@ ~lib/memory.ts:246:19 (get_local $2) ) - ;;@ ~lib/memory.ts:19:25 + ;;@ ~lib/memory.ts:246:23 (i32.const 1) ) - ;;@ ~lib/memory.ts:19:28 + ;;@ ~lib/memory.ts:246:26 (get_local $1) ) - ;;@ ~lib/memory.ts:20:4 + ;;@ ~lib/memory.ts:247:2 (if - ;;@ ~lib/memory.ts:20:8 + ;;@ ~lib/memory.ts:247:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:20:13 + ;;@ ~lib/memory.ts:247:11 (i32.const 2) ) - ;;@ ~lib/memory.ts:20:16 + ;;@ ~lib/memory.ts:247:14 (return) ) - ;;@ ~lib/memory.ts:22:4 + ;;@ ~lib/memory.ts:249:2 (i32.store8 - ;;@ ~lib/memory.ts:22:14 + ;;@ ~lib/memory.ts:249:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:22:21 + ;;@ ~lib/memory.ts:249:19 (i32.const 1) ) - ;;@ ~lib/memory.ts:22:24 + ;;@ ~lib/memory.ts:249:22 (get_local $1) ) - ;;@ ~lib/memory.ts:23:4 + ;;@ ~lib/memory.ts:250:2 (i32.store8 - ;;@ ~lib/memory.ts:23:14 + ;;@ ~lib/memory.ts:250:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:23:21 + ;;@ ~lib/memory.ts:250:19 (i32.const 2) ) - ;;@ ~lib/memory.ts:23:24 + ;;@ ~lib/memory.ts:250:22 (get_local $1) ) - ;;@ ~lib/memory.ts:24:4 + ;;@ ~lib/memory.ts:251:2 (i32.store8 - ;;@ ~lib/memory.ts:24:14 + ;;@ ~lib/memory.ts:251:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:24:21 + ;;@ ~lib/memory.ts:251:19 (get_local $2) ) - ;;@ ~lib/memory.ts:24:25 + ;;@ ~lib/memory.ts:251:23 (i32.const 2) ) - ;;@ ~lib/memory.ts:24:28 + ;;@ ~lib/memory.ts:251:26 (get_local $1) ) - ;;@ ~lib/memory.ts:25:4 + ;;@ ~lib/memory.ts:252:2 (i32.store8 - ;;@ ~lib/memory.ts:25:14 + ;;@ ~lib/memory.ts:252:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:25:21 + ;;@ ~lib/memory.ts:252:19 (get_local $2) ) - ;;@ ~lib/memory.ts:25:25 + ;;@ ~lib/memory.ts:252:23 (i32.const 3) ) - ;;@ ~lib/memory.ts:25:28 + ;;@ ~lib/memory.ts:252:26 (get_local $1) ) - ;;@ ~lib/memory.ts:26:4 + ;;@ ~lib/memory.ts:253:2 (if - ;;@ ~lib/memory.ts:26:8 + ;;@ ~lib/memory.ts:253:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:26:13 + ;;@ ~lib/memory.ts:253:11 (i32.const 6) ) - ;;@ ~lib/memory.ts:26:16 + ;;@ ~lib/memory.ts:253:14 (return) ) - ;;@ ~lib/memory.ts:27:4 + ;;@ ~lib/memory.ts:254:2 (i32.store8 - ;;@ ~lib/memory.ts:27:14 + ;;@ ~lib/memory.ts:254:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:27:21 + ;;@ ~lib/memory.ts:254:19 (i32.const 3) ) - ;;@ ~lib/memory.ts:27:24 + ;;@ ~lib/memory.ts:254:22 (get_local $1) ) - ;;@ ~lib/memory.ts:28:4 + ;;@ ~lib/memory.ts:255:2 (i32.store8 - ;;@ ~lib/memory.ts:28:14 + ;;@ ~lib/memory.ts:255:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:28:21 + ;;@ ~lib/memory.ts:255:19 (get_local $2) ) - ;;@ ~lib/memory.ts:28:25 + ;;@ ~lib/memory.ts:255:23 (i32.const 4) ) - ;;@ ~lib/memory.ts:28:28 + ;;@ ~lib/memory.ts:255:26 (get_local $1) ) - ;;@ ~lib/memory.ts:29:4 + ;;@ ~lib/memory.ts:256:2 (if - ;;@ ~lib/memory.ts:29:8 + ;;@ ~lib/memory.ts:256:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:29:13 + ;;@ ~lib/memory.ts:256:11 (i32.const 8) ) - ;;@ ~lib/memory.ts:29:16 + ;;@ ~lib/memory.ts:256:14 (return) ) - ;;@ ~lib/memory.ts:40:4 + ;;@ ~lib/memory.ts:267:2 (i32.store - ;;@ ~lib/memory.ts:33:4 + ;;@ ~lib/memory.ts:260:2 (tee_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:32:4 + ;;@ ~lib/memory.ts:259:2 (tee_local $4 - ;;@ ~lib/memory.ts:32:19 + ;;@ ~lib/memory.ts:259:17 (i32.and (i32.sub (i32.const 0) - ;;@ ~lib/memory.ts:32:20 + ;;@ ~lib/memory.ts:259:18 (get_local $0) ) - ;;@ ~lib/memory.ts:32:27 + ;;@ ~lib/memory.ts:259:25 (i32.const 3) ) ) ) ) - ;;@ ~lib/memory.ts:37:4 + ;;@ ~lib/memory.ts:264:2 (tee_local $1 - ;;@ ~lib/memory.ts:37:19 + ;;@ ~lib/memory.ts:264:17 (i32.mul (i32.and - ;;@ ~lib/memory.ts:37:35 + ;;@ ~lib/memory.ts:264:33 (get_local $1) (i32.const 255) ) @@ -217,319 +202,319 @@ ) ) ) - ;;@ ~lib/memory.ts:41:4 + ;;@ ~lib/memory.ts:268:2 (i32.store - ;;@ ~lib/memory.ts:41:15 + ;;@ ~lib/memory.ts:268:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:35:4 + ;;@ ~lib/memory.ts:262:2 (tee_local $2 (i32.and (i32.sub - ;;@ ~lib/memory.ts:34:4 + ;;@ ~lib/memory.ts:261:2 (get_local $2) - ;;@ ~lib/memory.ts:34:9 + ;;@ ~lib/memory.ts:261:7 (get_local $4) ) - ;;@ ~lib/memory.ts:35:9 + ;;@ ~lib/memory.ts:262:7 (i32.const -4) ) ) ) - ;;@ ~lib/memory.ts:41:26 + ;;@ ~lib/memory.ts:268:24 (i32.const 4) ) - ;;@ ~lib/memory.ts:41:29 + ;;@ ~lib/memory.ts:268:27 (get_local $1) ) - ;;@ ~lib/memory.ts:42:4 + ;;@ ~lib/memory.ts:269:2 (if - ;;@ ~lib/memory.ts:42:8 + ;;@ ~lib/memory.ts:269:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:42:13 + ;;@ ~lib/memory.ts:269:11 (i32.const 8) ) - ;;@ ~lib/memory.ts:42:16 + ;;@ ~lib/memory.ts:269:14 (return) ) - ;;@ ~lib/memory.ts:43:4 + ;;@ ~lib/memory.ts:270:2 (i32.store - ;;@ ~lib/memory.ts:43:15 + ;;@ ~lib/memory.ts:270:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:43:22 + ;;@ ~lib/memory.ts:270:20 (i32.const 4) ) - ;;@ ~lib/memory.ts:43:25 + ;;@ ~lib/memory.ts:270:23 (get_local $1) ) - ;;@ ~lib/memory.ts:44:4 + ;;@ ~lib/memory.ts:271:2 (i32.store - ;;@ ~lib/memory.ts:44:15 + ;;@ ~lib/memory.ts:271:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:44:22 + ;;@ ~lib/memory.ts:271:20 (i32.const 8) ) - ;;@ ~lib/memory.ts:44:25 + ;;@ ~lib/memory.ts:271:23 (get_local $1) ) - ;;@ ~lib/memory.ts:45:4 + ;;@ ~lib/memory.ts:272:2 (i32.store - ;;@ ~lib/memory.ts:45:15 + ;;@ ~lib/memory.ts:272:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:45:22 + ;;@ ~lib/memory.ts:272:20 (get_local $2) ) - ;;@ ~lib/memory.ts:45:26 + ;;@ ~lib/memory.ts:272:24 (i32.const 12) ) - ;;@ ~lib/memory.ts:45:30 + ;;@ ~lib/memory.ts:272:28 (get_local $1) ) - ;;@ ~lib/memory.ts:46:4 + ;;@ ~lib/memory.ts:273:2 (i32.store - ;;@ ~lib/memory.ts:46:15 + ;;@ ~lib/memory.ts:273:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:46:22 + ;;@ ~lib/memory.ts:273:20 (get_local $2) ) - ;;@ ~lib/memory.ts:46:26 + ;;@ ~lib/memory.ts:273:24 (i32.const 8) ) - ;;@ ~lib/memory.ts:46:29 + ;;@ ~lib/memory.ts:273:27 (get_local $1) ) - ;;@ ~lib/memory.ts:47:4 + ;;@ ~lib/memory.ts:274:2 (if - ;;@ ~lib/memory.ts:47:8 + ;;@ ~lib/memory.ts:274:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:47:13 + ;;@ ~lib/memory.ts:274:11 (i32.const 24) ) - ;;@ ~lib/memory.ts:47:17 + ;;@ ~lib/memory.ts:274:15 (return) ) - ;;@ ~lib/memory.ts:48:4 + ;;@ ~lib/memory.ts:275:2 (i32.store - ;;@ ~lib/memory.ts:48:15 + ;;@ ~lib/memory.ts:275:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:48:22 + ;;@ ~lib/memory.ts:275:20 (i32.const 12) ) - ;;@ ~lib/memory.ts:48:26 + ;;@ ~lib/memory.ts:275:24 (get_local $1) ) - ;;@ ~lib/memory.ts:49:4 + ;;@ ~lib/memory.ts:276:2 (i32.store - ;;@ ~lib/memory.ts:49:15 + ;;@ ~lib/memory.ts:276:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:49:22 + ;;@ ~lib/memory.ts:276:20 (i32.const 16) ) - ;;@ ~lib/memory.ts:49:26 + ;;@ ~lib/memory.ts:276:24 (get_local $1) ) - ;;@ ~lib/memory.ts:50:4 + ;;@ ~lib/memory.ts:277:2 (i32.store - ;;@ ~lib/memory.ts:50:15 + ;;@ ~lib/memory.ts:277:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:50:22 + ;;@ ~lib/memory.ts:277:20 (i32.const 20) ) - ;;@ ~lib/memory.ts:50:26 + ;;@ ~lib/memory.ts:277:24 (get_local $1) ) - ;;@ ~lib/memory.ts:51:4 + ;;@ ~lib/memory.ts:278:2 (i32.store - ;;@ ~lib/memory.ts:51:15 + ;;@ ~lib/memory.ts:278:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:51:22 + ;;@ ~lib/memory.ts:278:20 (i32.const 24) ) - ;;@ ~lib/memory.ts:51:26 + ;;@ ~lib/memory.ts:278:24 (get_local $1) ) - ;;@ ~lib/memory.ts:52:4 + ;;@ ~lib/memory.ts:279:2 (i32.store - ;;@ ~lib/memory.ts:52:15 + ;;@ ~lib/memory.ts:279:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:52:22 + ;;@ ~lib/memory.ts:279:20 (get_local $2) ) - ;;@ ~lib/memory.ts:52:26 + ;;@ ~lib/memory.ts:279:24 (i32.const 28) ) - ;;@ ~lib/memory.ts:52:30 + ;;@ ~lib/memory.ts:279:28 (get_local $1) ) - ;;@ ~lib/memory.ts:53:4 + ;;@ ~lib/memory.ts:280:2 (i32.store - ;;@ ~lib/memory.ts:53:15 + ;;@ ~lib/memory.ts:280:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:53:22 + ;;@ ~lib/memory.ts:280:20 (get_local $2) ) - ;;@ ~lib/memory.ts:53:26 + ;;@ ~lib/memory.ts:280:24 (i32.const 24) ) - ;;@ ~lib/memory.ts:53:30 + ;;@ ~lib/memory.ts:280:28 (get_local $1) ) - ;;@ ~lib/memory.ts:54:4 + ;;@ ~lib/memory.ts:281:2 (i32.store - ;;@ ~lib/memory.ts:54:15 + ;;@ ~lib/memory.ts:281:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:54:22 + ;;@ ~lib/memory.ts:281:20 (get_local $2) ) - ;;@ ~lib/memory.ts:54:26 + ;;@ ~lib/memory.ts:281:24 (i32.const 20) ) - ;;@ ~lib/memory.ts:54:30 + ;;@ ~lib/memory.ts:281:28 (get_local $1) ) - ;;@ ~lib/memory.ts:55:4 + ;;@ ~lib/memory.ts:282:2 (i32.store - ;;@ ~lib/memory.ts:55:15 + ;;@ ~lib/memory.ts:282:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:55:22 + ;;@ ~lib/memory.ts:282:20 (get_local $2) ) - ;;@ ~lib/memory.ts:55:26 + ;;@ ~lib/memory.ts:282:24 (i32.const 16) ) - ;;@ ~lib/memory.ts:55:30 + ;;@ ~lib/memory.ts:282:28 (get_local $1) ) - ;;@ ~lib/memory.ts:59:4 + ;;@ ~lib/memory.ts:286:2 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:58:4 + ;;@ ~lib/memory.ts:285:2 (tee_local $4 - ;;@ ~lib/memory.ts:58:8 + ;;@ ~lib/memory.ts:285:6 (i32.add - ;;@ ~lib/memory.ts:58:13 + ;;@ ~lib/memory.ts:285:11 (i32.and - ;;@ ~lib/memory.ts:58:14 + ;;@ ~lib/memory.ts:285:12 (get_local $0) - ;;@ ~lib/memory.ts:58:21 + ;;@ ~lib/memory.ts:285:19 (i32.const 4) ) - ;;@ ~lib/memory.ts:58:8 + ;;@ ~lib/memory.ts:285:6 (i32.const 24) ) ) ) ) - ;;@ ~lib/memory.ts:60:4 + ;;@ ~lib/memory.ts:287:2 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:60:9 + ;;@ ~lib/memory.ts:287:7 (get_local $4) ) ) - ;;@ ~lib/memory.ts:63:4 + ;;@ ~lib/memory.ts:290:2 (set_local $3 - ;;@ ~lib/memory.ts:63:19 + ;;@ ~lib/memory.ts:290:17 (i64.or (i64.extend_u/i32 (get_local $1) ) - ;;@ ~lib/memory.ts:63:30 + ;;@ ~lib/memory.ts:290:28 (i64.shl - ;;@ ~lib/memory.ts:63:31 + ;;@ ~lib/memory.ts:290:29 (i64.extend_u/i32 (get_local $1) ) - ;;@ ~lib/memory.ts:63:43 + ;;@ ~lib/memory.ts:290:41 (i64.const 32) ) ) ) (loop $continue|0 (if - ;;@ ~lib/memory.ts:64:11 + ;;@ ~lib/memory.ts:291:9 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:64:16 + ;;@ ~lib/memory.ts:291:14 (i32.const 32) ) (block - ;;@ ~lib/memory.ts:65:6 + ;;@ ~lib/memory.ts:292:4 (i64.store - ;;@ ~lib/memory.ts:65:17 + ;;@ ~lib/memory.ts:292:15 (get_local $0) - ;;@ ~lib/memory.ts:65:23 + ;;@ ~lib/memory.ts:292:21 (get_local $3) ) - ;;@ ~lib/memory.ts:66:6 + ;;@ ~lib/memory.ts:293:4 (i64.store - ;;@ ~lib/memory.ts:66:17 + ;;@ ~lib/memory.ts:293:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:66:24 + ;;@ ~lib/memory.ts:293:22 (i32.const 8) ) - ;;@ ~lib/memory.ts:66:27 + ;;@ ~lib/memory.ts:293:25 (get_local $3) ) - ;;@ ~lib/memory.ts:67:6 + ;;@ ~lib/memory.ts:294:4 (i64.store - ;;@ ~lib/memory.ts:67:17 + ;;@ ~lib/memory.ts:294:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:67:24 + ;;@ ~lib/memory.ts:294:22 (i32.const 16) ) - ;;@ ~lib/memory.ts:67:28 + ;;@ ~lib/memory.ts:294:26 (get_local $3) ) - ;;@ ~lib/memory.ts:68:6 + ;;@ ~lib/memory.ts:295:4 (i64.store - ;;@ ~lib/memory.ts:68:17 + ;;@ ~lib/memory.ts:295:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:68:24 + ;;@ ~lib/memory.ts:295:22 (i32.const 24) ) - ;;@ ~lib/memory.ts:68:28 + ;;@ ~lib/memory.ts:295:26 (get_local $3) ) - ;;@ ~lib/memory.ts:69:6 + ;;@ ~lib/memory.ts:296:4 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:69:11 + ;;@ ~lib/memory.ts:296:9 (i32.const 32) ) ) - ;;@ ~lib/memory.ts:70:6 + ;;@ ~lib/memory.ts:297:4 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:70:14 + ;;@ ~lib/memory.ts:297:12 (i32.const 32) ) ) @@ -538,37 +523,48 @@ ) ) ) - (func $~lib/memory/memcpy (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 1 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + ;;@ ~lib/memory.ts:11:4 + (call $~lib/memory/memset + ;;@ ~lib/memory.ts:11:11 + (get_local $0) + ;;@ ~lib/memory.ts:11:17 + (get_local $1) + ;;@ ~lib/memory.ts:11:20 + (get_local $2) + ) + ) + (func $~lib/memory/memcpy (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (loop $continue|0 (if (select - ;;@ ~lib/memory.ts:164:14 + ;;@ ~lib/memory.ts:59:14 (i32.and - ;;@ ~lib/memory.ts:164:15 + ;;@ ~lib/memory.ts:59:15 (get_local $1) - ;;@ ~lib/memory.ts:164:21 + ;;@ ~lib/memory.ts:59:21 (i32.const 3) ) (get_local $2) - ;;@ ~lib/memory.ts:164:9 + ;;@ ~lib/memory.ts:59:9 (get_local $2) ) (block (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:165:14 + ;;@ ~lib/memory.ts:60:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:165:4 + ;;@ ~lib/memory.ts:60:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:165:31 + ;;@ ~lib/memory.ts:60:31 (block (result i32) (set_local $1 (i32.add @@ -578,13 +574,13 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:165:22 + ;;@ ~lib/memory.ts:60:22 (i32.load8_u (get_local $3) ) ) ) - ;;@ ~lib/memory.ts:166:4 + ;;@ ~lib/memory.ts:61:4 (set_local $2 (i32.sub (get_local $2) @@ -595,113 +591,113 @@ ) ) ) - ;;@ ~lib/memory.ts:170:2 + ;;@ ~lib/memory.ts:65:2 (if (i32.eqz - ;;@ ~lib/memory.ts:170:6 + ;;@ ~lib/memory.ts:65:6 (i32.and - ;;@ ~lib/memory.ts:170:7 + ;;@ ~lib/memory.ts:65:7 (get_local $0) - ;;@ ~lib/memory.ts:170:14 + ;;@ ~lib/memory.ts:65:14 (i32.const 3) ) ) - ;;@ ~lib/memory.ts:170:23 + ;;@ ~lib/memory.ts:65:23 (block (loop $continue|1 (if - ;;@ ~lib/memory.ts:171:11 + ;;@ ~lib/memory.ts:66:11 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:171:16 + ;;@ ~lib/memory.ts:66:16 (i32.const 16) ) (block - ;;@ ~lib/memory.ts:172:6 + ;;@ ~lib/memory.ts:67:6 (i32.store - ;;@ ~lib/memory.ts:172:17 + ;;@ ~lib/memory.ts:67:17 (get_local $0) - ;;@ ~lib/memory.ts:172:28 + ;;@ ~lib/memory.ts:67:28 (i32.load - ;;@ ~lib/memory.ts:172:38 + ;;@ ~lib/memory.ts:67:38 (get_local $1) ) ) - ;;@ ~lib/memory.ts:173:6 + ;;@ ~lib/memory.ts:68:6 (i32.store - ;;@ ~lib/memory.ts:173:17 + ;;@ ~lib/memory.ts:68:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:173:25 + ;;@ ~lib/memory.ts:68:25 (i32.const 4) ) - ;;@ ~lib/memory.ts:173:28 + ;;@ ~lib/memory.ts:68:28 (i32.load - ;;@ ~lib/memory.ts:173:38 + ;;@ ~lib/memory.ts:68:38 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:173:45 + ;;@ ~lib/memory.ts:68:45 (i32.const 4) ) ) ) - ;;@ ~lib/memory.ts:174:6 + ;;@ ~lib/memory.ts:69:6 (i32.store - ;;@ ~lib/memory.ts:174:17 + ;;@ ~lib/memory.ts:69:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:174:25 + ;;@ ~lib/memory.ts:69:25 (i32.const 8) ) - ;;@ ~lib/memory.ts:174:28 + ;;@ ~lib/memory.ts:69:28 (i32.load - ;;@ ~lib/memory.ts:174:38 + ;;@ ~lib/memory.ts:69:38 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:174:45 + ;;@ ~lib/memory.ts:69:45 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:175:6 + ;;@ ~lib/memory.ts:70:6 (i32.store - ;;@ ~lib/memory.ts:175:17 + ;;@ ~lib/memory.ts:70:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:175:24 + ;;@ ~lib/memory.ts:70:24 (i32.const 12) ) - ;;@ ~lib/memory.ts:175:28 + ;;@ ~lib/memory.ts:70:28 (i32.load - ;;@ ~lib/memory.ts:175:38 + ;;@ ~lib/memory.ts:70:38 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:175:44 + ;;@ ~lib/memory.ts:70:44 (i32.const 12) ) ) ) - ;;@ ~lib/memory.ts:176:6 + ;;@ ~lib/memory.ts:71:6 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:176:13 + ;;@ ~lib/memory.ts:71:13 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:176:17 + ;;@ ~lib/memory.ts:71:17 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:176:25 + ;;@ ~lib/memory.ts:71:25 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:176:29 + ;;@ ~lib/memory.ts:71:29 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:176:34 + ;;@ ~lib/memory.ts:71:34 (i32.const 16) ) ) @@ -709,160 +705,160 @@ ) ) ) - ;;@ ~lib/memory.ts:178:4 + ;;@ ~lib/memory.ts:73:4 (if - ;;@ ~lib/memory.ts:178:8 + ;;@ ~lib/memory.ts:73:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:178:12 + ;;@ ~lib/memory.ts:73:12 (i32.const 8) ) - ;;@ ~lib/memory.ts:178:15 + ;;@ ~lib/memory.ts:73:15 (block - ;;@ ~lib/memory.ts:179:6 + ;;@ ~lib/memory.ts:74:6 (i32.store - ;;@ ~lib/memory.ts:179:17 + ;;@ ~lib/memory.ts:74:17 (get_local $0) - ;;@ ~lib/memory.ts:179:27 + ;;@ ~lib/memory.ts:74:27 (i32.load - ;;@ ~lib/memory.ts:179:37 + ;;@ ~lib/memory.ts:74:37 (get_local $1) ) ) - ;;@ ~lib/memory.ts:180:6 + ;;@ ~lib/memory.ts:75:6 (i32.store - ;;@ ~lib/memory.ts:180:17 + ;;@ ~lib/memory.ts:75:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:180:24 + ;;@ ~lib/memory.ts:75:24 (i32.const 4) ) - ;;@ ~lib/memory.ts:180:27 + ;;@ ~lib/memory.ts:75:27 (i32.load - ;;@ ~lib/memory.ts:180:37 + ;;@ ~lib/memory.ts:75:37 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:180:43 + ;;@ ~lib/memory.ts:75:43 (i32.const 4) ) ) ) - ;;@ ~lib/memory.ts:181:6 + ;;@ ~lib/memory.ts:76:6 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:181:14 + ;;@ ~lib/memory.ts:76:14 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:181:17 + ;;@ ~lib/memory.ts:76:17 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:181:24 + ;;@ ~lib/memory.ts:76:24 (i32.const 8) ) ) ) ) - ;;@ ~lib/memory.ts:183:4 + ;;@ ~lib/memory.ts:78:4 (if - ;;@ ~lib/memory.ts:183:8 + ;;@ ~lib/memory.ts:78:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:183:12 + ;;@ ~lib/memory.ts:78:12 (i32.const 4) ) - ;;@ ~lib/memory.ts:183:15 + ;;@ ~lib/memory.ts:78:15 (block - ;;@ ~lib/memory.ts:184:6 + ;;@ ~lib/memory.ts:79:6 (i32.store - ;;@ ~lib/memory.ts:184:17 + ;;@ ~lib/memory.ts:79:17 (get_local $0) - ;;@ ~lib/memory.ts:184:23 + ;;@ ~lib/memory.ts:79:23 (i32.load - ;;@ ~lib/memory.ts:184:33 + ;;@ ~lib/memory.ts:79:33 (get_local $1) ) ) - ;;@ ~lib/memory.ts:185:6 + ;;@ ~lib/memory.ts:80:6 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:185:14 + ;;@ ~lib/memory.ts:80:14 (i32.const 4) ) ) - ;;@ ~lib/memory.ts:185:17 + ;;@ ~lib/memory.ts:80:17 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:185:24 + ;;@ ~lib/memory.ts:80:24 (i32.const 4) ) ) ) ) - ;;@ ~lib/memory.ts:187:4 + ;;@ ~lib/memory.ts:82:4 (if - ;;@ ~lib/memory.ts:187:8 + ;;@ ~lib/memory.ts:82:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:187:12 + ;;@ ~lib/memory.ts:82:12 (i32.const 2) ) - ;;@ ~lib/memory.ts:187:15 + ;;@ ~lib/memory.ts:82:15 (block - ;;@ ~lib/memory.ts:188:6 + ;;@ ~lib/memory.ts:83:6 (i32.store16 - ;;@ ~lib/memory.ts:188:17 + ;;@ ~lib/memory.ts:83:17 (get_local $0) - ;;@ ~lib/memory.ts:188:23 + ;;@ ~lib/memory.ts:83:23 (i32.load16_u - ;;@ ~lib/memory.ts:188:33 + ;;@ ~lib/memory.ts:83:33 (get_local $1) ) ) - ;;@ ~lib/memory.ts:189:6 + ;;@ ~lib/memory.ts:84:6 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:189:14 + ;;@ ~lib/memory.ts:84:14 (i32.const 2) ) ) - ;;@ ~lib/memory.ts:189:17 + ;;@ ~lib/memory.ts:84:17 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:189:24 + ;;@ ~lib/memory.ts:84:24 (i32.const 2) ) ) ) ) - ;;@ ~lib/memory.ts:191:4 + ;;@ ~lib/memory.ts:86:4 (if - ;;@ ~lib/memory.ts:191:8 + ;;@ ~lib/memory.ts:86:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:191:12 + ;;@ ~lib/memory.ts:86:12 (i32.const 1) ) - ;;@ ~lib/memory.ts:192:16 + ;;@ ~lib/memory.ts:87:16 (block (set_local $3 (get_local $0) ) - ;;@ ~lib/memory.ts:191:15 + ;;@ ~lib/memory.ts:86:15 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:192:33 + ;;@ ~lib/memory.ts:87:33 (block (result i32) (set_local $3 (get_local $1) ) - ;;@ ~lib/memory.ts:192:24 + ;;@ ~lib/memory.ts:87:24 (i32.load8_u (get_local $3) ) @@ -870,19 +866,19 @@ ) ) ) - ;;@ ~lib/memory.ts:194:4 + ;;@ ~lib/memory.ts:89:4 (return) ) ) - ;;@ ~lib/memory.ts:199:2 + ;;@ ~lib/memory.ts:94:2 (if - ;;@ ~lib/memory.ts:199:6 + ;;@ ~lib/memory.ts:94:6 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:199:11 + ;;@ ~lib/memory.ts:94:11 (i32.const 32) ) - ;;@ ~lib/memory.ts:199:15 + ;;@ ~lib/memory.ts:94:15 (block $break|2 (block $case2|2 (block $case1|2 @@ -890,10 +886,10 @@ (block $tablify|0 (br_table $case0|2 $case1|2 $case2|2 $tablify|0 (i32.sub - ;;@ ~lib/memory.ts:200:12 + ;;@ ~lib/memory.ts:95:12 (i32.and (get_local $0) - ;;@ ~lib/memory.ts:200:19 + ;;@ ~lib/memory.ts:95:19 (i32.const 3) ) (i32.const 1) @@ -902,27 +898,27 @@ ) (br $break|2) ) - ;;@ ~lib/memory.ts:203:8 + ;;@ ~lib/memory.ts:98:8 (set_local $4 - ;;@ ~lib/memory.ts:203:12 + ;;@ ~lib/memory.ts:98:12 (i32.load - ;;@ ~lib/memory.ts:203:22 + ;;@ ~lib/memory.ts:98:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:204:18 + ;;@ ~lib/memory.ts:99:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:204:8 + ;;@ ~lib/memory.ts:99:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:204:35 + ;;@ ~lib/memory.ts:99:35 (block (result i32) (set_local $1 (i32.add @@ -932,7 +928,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:204:26 + ;;@ ~lib/memory.ts:99:26 (i32.load8_u (get_local $3) ) @@ -941,16 +937,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:205:18 + ;;@ ~lib/memory.ts:100:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:205:8 + ;;@ ~lib/memory.ts:100:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:205:35 + ;;@ ~lib/memory.ts:100:35 (block (result i32) (set_local $1 (i32.add @@ -960,7 +956,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:205:26 + ;;@ ~lib/memory.ts:100:26 (i32.load8_u (get_local $3) ) @@ -969,16 +965,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:206:18 + ;;@ ~lib/memory.ts:101:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:206:8 + ;;@ ~lib/memory.ts:101:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:206:35 + ;;@ ~lib/memory.ts:101:35 (block (result i32) (set_local $1 (i32.add @@ -988,182 +984,182 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:206:26 + ;;@ ~lib/memory.ts:101:26 (i32.load8_u (get_local $3) ) ) ) - ;;@ ~lib/memory.ts:207:8 + ;;@ ~lib/memory.ts:102:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:207:13 + ;;@ ~lib/memory.ts:102:13 (i32.const 3) ) ) (loop $continue|3 (if - ;;@ ~lib/memory.ts:208:15 + ;;@ ~lib/memory.ts:103:15 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:208:20 + ;;@ ~lib/memory.ts:103:20 (i32.const 17) ) (block - ;;@ ~lib/memory.ts:210:10 + ;;@ ~lib/memory.ts:105:10 (i32.store - ;;@ ~lib/memory.ts:210:21 + ;;@ ~lib/memory.ts:105:21 (get_local $0) - ;;@ ~lib/memory.ts:210:27 + ;;@ ~lib/memory.ts:105:27 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:210:32 + ;;@ ~lib/memory.ts:105:32 (i32.const 24) ) - ;;@ ~lib/memory.ts:210:37 + ;;@ ~lib/memory.ts:105:37 (i32.shl - ;;@ ~lib/memory.ts:209:10 + ;;@ ~lib/memory.ts:104:10 (tee_local $3 - ;;@ ~lib/memory.ts:209:14 + ;;@ ~lib/memory.ts:104:14 (i32.load - ;;@ ~lib/memory.ts:209:24 + ;;@ ~lib/memory.ts:104:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:209:30 + ;;@ ~lib/memory.ts:104:30 (i32.const 1) ) ) ) - ;;@ ~lib/memory.ts:210:42 + ;;@ ~lib/memory.ts:105:42 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:212:10 + ;;@ ~lib/memory.ts:107:10 (i32.store - ;;@ ~lib/memory.ts:212:21 + ;;@ ~lib/memory.ts:107:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:212:28 + ;;@ ~lib/memory.ts:107:28 (i32.const 4) ) - ;;@ ~lib/memory.ts:212:31 + ;;@ ~lib/memory.ts:107:31 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:212:36 + ;;@ ~lib/memory.ts:107:36 (i32.const 24) ) - ;;@ ~lib/memory.ts:212:41 + ;;@ ~lib/memory.ts:107:41 (i32.shl - ;;@ ~lib/memory.ts:211:10 + ;;@ ~lib/memory.ts:106:10 (tee_local $4 - ;;@ ~lib/memory.ts:211:14 + ;;@ ~lib/memory.ts:106:14 (i32.load - ;;@ ~lib/memory.ts:211:24 + ;;@ ~lib/memory.ts:106:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:211:30 + ;;@ ~lib/memory.ts:106:30 (i32.const 5) ) ) ) - ;;@ ~lib/memory.ts:212:46 + ;;@ ~lib/memory.ts:107:46 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:214:10 + ;;@ ~lib/memory.ts:109:10 (i32.store - ;;@ ~lib/memory.ts:214:21 + ;;@ ~lib/memory.ts:109:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:214:28 + ;;@ ~lib/memory.ts:109:28 (i32.const 8) ) - ;;@ ~lib/memory.ts:214:31 + ;;@ ~lib/memory.ts:109:31 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:214:36 + ;;@ ~lib/memory.ts:109:36 (i32.const 24) ) - ;;@ ~lib/memory.ts:214:41 + ;;@ ~lib/memory.ts:109:41 (i32.shl - ;;@ ~lib/memory.ts:213:10 + ;;@ ~lib/memory.ts:108:10 (tee_local $3 - ;;@ ~lib/memory.ts:213:14 + ;;@ ~lib/memory.ts:108:14 (i32.load - ;;@ ~lib/memory.ts:213:24 + ;;@ ~lib/memory.ts:108:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:213:30 + ;;@ ~lib/memory.ts:108:30 (i32.const 9) ) ) ) - ;;@ ~lib/memory.ts:214:46 + ;;@ ~lib/memory.ts:109:46 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:216:10 + ;;@ ~lib/memory.ts:111:10 (i32.store - ;;@ ~lib/memory.ts:216:21 + ;;@ ~lib/memory.ts:111:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:216:28 + ;;@ ~lib/memory.ts:111:28 (i32.const 12) ) - ;;@ ~lib/memory.ts:216:32 + ;;@ ~lib/memory.ts:111:32 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:216:37 + ;;@ ~lib/memory.ts:111:37 (i32.const 24) ) - ;;@ ~lib/memory.ts:216:42 + ;;@ ~lib/memory.ts:111:42 (i32.shl - ;;@ ~lib/memory.ts:215:10 + ;;@ ~lib/memory.ts:110:10 (tee_local $4 - ;;@ ~lib/memory.ts:215:14 + ;;@ ~lib/memory.ts:110:14 (i32.load - ;;@ ~lib/memory.ts:215:24 + ;;@ ~lib/memory.ts:110:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:215:30 + ;;@ ~lib/memory.ts:110:30 (i32.const 13) ) ) ) - ;;@ ~lib/memory.ts:216:47 + ;;@ ~lib/memory.ts:111:47 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:217:10 + ;;@ ~lib/memory.ts:112:10 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:217:17 + ;;@ ~lib/memory.ts:112:17 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:217:21 + ;;@ ~lib/memory.ts:112:21 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:217:29 + ;;@ ~lib/memory.ts:112:29 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:217:33 + ;;@ ~lib/memory.ts:112:33 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:217:38 + ;;@ ~lib/memory.ts:112:38 (i32.const 16) ) ) @@ -1171,30 +1167,30 @@ ) ) ) - ;;@ ~lib/memory.ts:219:8 + ;;@ ~lib/memory.ts:114:8 (br $break|2) ) - ;;@ ~lib/memory.ts:222:8 + ;;@ ~lib/memory.ts:117:8 (set_local $4 - ;;@ ~lib/memory.ts:222:12 + ;;@ ~lib/memory.ts:117:12 (i32.load - ;;@ ~lib/memory.ts:222:22 + ;;@ ~lib/memory.ts:117:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:223:18 + ;;@ ~lib/memory.ts:118:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:223:8 + ;;@ ~lib/memory.ts:118:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:223:35 + ;;@ ~lib/memory.ts:118:35 (block (result i32) (set_local $1 (i32.add @@ -1204,7 +1200,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:223:26 + ;;@ ~lib/memory.ts:118:26 (i32.load8_u (get_local $3) ) @@ -1213,16 +1209,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:224:18 + ;;@ ~lib/memory.ts:119:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:224:8 + ;;@ ~lib/memory.ts:119:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:224:35 + ;;@ ~lib/memory.ts:119:35 (block (result i32) (set_local $1 (i32.add @@ -1232,182 +1228,182 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:224:26 + ;;@ ~lib/memory.ts:119:26 (i32.load8_u (get_local $3) ) ) ) - ;;@ ~lib/memory.ts:225:8 + ;;@ ~lib/memory.ts:120:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:225:13 + ;;@ ~lib/memory.ts:120:13 (i32.const 2) ) ) (loop $continue|4 (if - ;;@ ~lib/memory.ts:226:15 + ;;@ ~lib/memory.ts:121:15 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:226:20 + ;;@ ~lib/memory.ts:121:20 (i32.const 18) ) (block - ;;@ ~lib/memory.ts:228:10 + ;;@ ~lib/memory.ts:123:10 (i32.store - ;;@ ~lib/memory.ts:228:21 + ;;@ ~lib/memory.ts:123:21 (get_local $0) - ;;@ ~lib/memory.ts:228:27 + ;;@ ~lib/memory.ts:123:27 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:228:32 + ;;@ ~lib/memory.ts:123:32 (i32.const 16) ) - ;;@ ~lib/memory.ts:228:37 + ;;@ ~lib/memory.ts:123:37 (i32.shl - ;;@ ~lib/memory.ts:227:10 + ;;@ ~lib/memory.ts:122:10 (tee_local $3 - ;;@ ~lib/memory.ts:227:14 + ;;@ ~lib/memory.ts:122:14 (i32.load - ;;@ ~lib/memory.ts:227:24 + ;;@ ~lib/memory.ts:122:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:227:30 + ;;@ ~lib/memory.ts:122:30 (i32.const 2) ) ) ) - ;;@ ~lib/memory.ts:228:42 + ;;@ ~lib/memory.ts:123:42 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:230:10 + ;;@ ~lib/memory.ts:125:10 (i32.store - ;;@ ~lib/memory.ts:230:21 + ;;@ ~lib/memory.ts:125:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:230:28 + ;;@ ~lib/memory.ts:125:28 (i32.const 4) ) - ;;@ ~lib/memory.ts:230:31 + ;;@ ~lib/memory.ts:125:31 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:230:36 + ;;@ ~lib/memory.ts:125:36 (i32.const 16) ) - ;;@ ~lib/memory.ts:230:41 + ;;@ ~lib/memory.ts:125:41 (i32.shl - ;;@ ~lib/memory.ts:229:10 + ;;@ ~lib/memory.ts:124:10 (tee_local $4 - ;;@ ~lib/memory.ts:229:14 + ;;@ ~lib/memory.ts:124:14 (i32.load - ;;@ ~lib/memory.ts:229:24 + ;;@ ~lib/memory.ts:124:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:229:30 + ;;@ ~lib/memory.ts:124:30 (i32.const 6) ) ) ) - ;;@ ~lib/memory.ts:230:46 + ;;@ ~lib/memory.ts:125:46 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:232:10 + ;;@ ~lib/memory.ts:127:10 (i32.store - ;;@ ~lib/memory.ts:232:21 + ;;@ ~lib/memory.ts:127:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:232:28 + ;;@ ~lib/memory.ts:127:28 (i32.const 8) ) - ;;@ ~lib/memory.ts:232:31 + ;;@ ~lib/memory.ts:127:31 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:232:36 + ;;@ ~lib/memory.ts:127:36 (i32.const 16) ) - ;;@ ~lib/memory.ts:232:41 + ;;@ ~lib/memory.ts:127:41 (i32.shl - ;;@ ~lib/memory.ts:231:10 + ;;@ ~lib/memory.ts:126:10 (tee_local $3 - ;;@ ~lib/memory.ts:231:14 + ;;@ ~lib/memory.ts:126:14 (i32.load - ;;@ ~lib/memory.ts:231:24 + ;;@ ~lib/memory.ts:126:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:231:30 + ;;@ ~lib/memory.ts:126:30 (i32.const 10) ) ) ) - ;;@ ~lib/memory.ts:232:46 + ;;@ ~lib/memory.ts:127:46 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:234:10 + ;;@ ~lib/memory.ts:129:10 (i32.store - ;;@ ~lib/memory.ts:234:21 + ;;@ ~lib/memory.ts:129:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:234:28 + ;;@ ~lib/memory.ts:129:28 (i32.const 12) ) - ;;@ ~lib/memory.ts:234:32 + ;;@ ~lib/memory.ts:129:32 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:234:37 + ;;@ ~lib/memory.ts:129:37 (i32.const 16) ) - ;;@ ~lib/memory.ts:234:42 + ;;@ ~lib/memory.ts:129:42 (i32.shl - ;;@ ~lib/memory.ts:233:10 + ;;@ ~lib/memory.ts:128:10 (tee_local $4 - ;;@ ~lib/memory.ts:233:14 + ;;@ ~lib/memory.ts:128:14 (i32.load - ;;@ ~lib/memory.ts:233:24 + ;;@ ~lib/memory.ts:128:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:233:30 + ;;@ ~lib/memory.ts:128:30 (i32.const 14) ) ) ) - ;;@ ~lib/memory.ts:234:47 + ;;@ ~lib/memory.ts:129:47 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:235:10 + ;;@ ~lib/memory.ts:130:10 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:235:17 + ;;@ ~lib/memory.ts:130:17 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:235:21 + ;;@ ~lib/memory.ts:130:21 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:235:29 + ;;@ ~lib/memory.ts:130:29 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:235:33 + ;;@ ~lib/memory.ts:130:33 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:235:38 + ;;@ ~lib/memory.ts:130:38 (i32.const 16) ) ) @@ -1415,30 +1411,30 @@ ) ) ) - ;;@ ~lib/memory.ts:237:8 + ;;@ ~lib/memory.ts:132:8 (br $break|2) ) - ;;@ ~lib/memory.ts:240:8 + ;;@ ~lib/memory.ts:135:8 (set_local $4 - ;;@ ~lib/memory.ts:240:12 + ;;@ ~lib/memory.ts:135:12 (i32.load - ;;@ ~lib/memory.ts:240:22 + ;;@ ~lib/memory.ts:135:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:241:18 + ;;@ ~lib/memory.ts:136:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:241:8 + ;;@ ~lib/memory.ts:136:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:241:35 + ;;@ ~lib/memory.ts:136:35 (block (result i32) (set_local $1 (i32.add @@ -1448,182 +1444,182 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:241:26 + ;;@ ~lib/memory.ts:136:26 (i32.load8_u (get_local $3) ) ) ) - ;;@ ~lib/memory.ts:242:8 + ;;@ ~lib/memory.ts:137:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:242:13 + ;;@ ~lib/memory.ts:137:13 (i32.const 1) ) ) (loop $continue|5 (if - ;;@ ~lib/memory.ts:243:15 + ;;@ ~lib/memory.ts:138:15 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:243:20 + ;;@ ~lib/memory.ts:138:20 (i32.const 19) ) (block - ;;@ ~lib/memory.ts:245:10 + ;;@ ~lib/memory.ts:140:10 (i32.store - ;;@ ~lib/memory.ts:245:21 + ;;@ ~lib/memory.ts:140:21 (get_local $0) - ;;@ ~lib/memory.ts:245:27 + ;;@ ~lib/memory.ts:140:27 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:245:32 + ;;@ ~lib/memory.ts:140:32 (i32.const 8) ) - ;;@ ~lib/memory.ts:245:36 + ;;@ ~lib/memory.ts:140:36 (i32.shl - ;;@ ~lib/memory.ts:244:10 + ;;@ ~lib/memory.ts:139:10 (tee_local $3 - ;;@ ~lib/memory.ts:244:14 + ;;@ ~lib/memory.ts:139:14 (i32.load - ;;@ ~lib/memory.ts:244:24 + ;;@ ~lib/memory.ts:139:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:244:30 + ;;@ ~lib/memory.ts:139:30 (i32.const 3) ) ) ) - ;;@ ~lib/memory.ts:245:41 + ;;@ ~lib/memory.ts:140:41 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:247:10 + ;;@ ~lib/memory.ts:142:10 (i32.store - ;;@ ~lib/memory.ts:247:21 + ;;@ ~lib/memory.ts:142:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:247:28 + ;;@ ~lib/memory.ts:142:28 (i32.const 4) ) - ;;@ ~lib/memory.ts:247:31 + ;;@ ~lib/memory.ts:142:31 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:247:36 + ;;@ ~lib/memory.ts:142:36 (i32.const 8) ) - ;;@ ~lib/memory.ts:247:40 + ;;@ ~lib/memory.ts:142:40 (i32.shl - ;;@ ~lib/memory.ts:246:10 + ;;@ ~lib/memory.ts:141:10 (tee_local $4 - ;;@ ~lib/memory.ts:246:14 + ;;@ ~lib/memory.ts:141:14 (i32.load - ;;@ ~lib/memory.ts:246:24 + ;;@ ~lib/memory.ts:141:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:246:30 + ;;@ ~lib/memory.ts:141:30 (i32.const 7) ) ) ) - ;;@ ~lib/memory.ts:247:45 + ;;@ ~lib/memory.ts:142:45 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:249:10 + ;;@ ~lib/memory.ts:144:10 (i32.store - ;;@ ~lib/memory.ts:249:21 + ;;@ ~lib/memory.ts:144:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:249:28 + ;;@ ~lib/memory.ts:144:28 (i32.const 8) ) - ;;@ ~lib/memory.ts:249:31 + ;;@ ~lib/memory.ts:144:31 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:249:36 + ;;@ ~lib/memory.ts:144:36 (i32.const 8) ) - ;;@ ~lib/memory.ts:249:40 + ;;@ ~lib/memory.ts:144:40 (i32.shl - ;;@ ~lib/memory.ts:248:10 + ;;@ ~lib/memory.ts:143:10 (tee_local $3 - ;;@ ~lib/memory.ts:248:14 + ;;@ ~lib/memory.ts:143:14 (i32.load - ;;@ ~lib/memory.ts:248:24 + ;;@ ~lib/memory.ts:143:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:248:30 + ;;@ ~lib/memory.ts:143:30 (i32.const 11) ) ) ) - ;;@ ~lib/memory.ts:249:45 + ;;@ ~lib/memory.ts:144:45 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:251:10 + ;;@ ~lib/memory.ts:146:10 (i32.store - ;;@ ~lib/memory.ts:251:21 + ;;@ ~lib/memory.ts:146:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:251:28 + ;;@ ~lib/memory.ts:146:28 (i32.const 12) ) - ;;@ ~lib/memory.ts:251:32 + ;;@ ~lib/memory.ts:146:32 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:251:37 + ;;@ ~lib/memory.ts:146:37 (i32.const 8) ) - ;;@ ~lib/memory.ts:251:41 + ;;@ ~lib/memory.ts:146:41 (i32.shl - ;;@ ~lib/memory.ts:250:10 + ;;@ ~lib/memory.ts:145:10 (tee_local $4 - ;;@ ~lib/memory.ts:250:14 + ;;@ ~lib/memory.ts:145:14 (i32.load - ;;@ ~lib/memory.ts:250:24 + ;;@ ~lib/memory.ts:145:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:250:30 + ;;@ ~lib/memory.ts:145:30 (i32.const 15) ) ) ) - ;;@ ~lib/memory.ts:251:46 + ;;@ ~lib/memory.ts:146:46 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:252:10 + ;;@ ~lib/memory.ts:147:10 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:252:17 + ;;@ ~lib/memory.ts:147:17 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:252:21 + ;;@ ~lib/memory.ts:147:21 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:252:29 + ;;@ ~lib/memory.ts:147:29 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:252:33 + ;;@ ~lib/memory.ts:147:33 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:252:38 + ;;@ ~lib/memory.ts:147:38 (i32.const 16) ) ) @@ -1633,29 +1629,29 @@ ) ) ) - ;;@ ~lib/memory.ts:260:2 + ;;@ ~lib/memory.ts:155:2 (if - ;;@ ~lib/memory.ts:260:6 + ;;@ ~lib/memory.ts:155:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:260:10 + ;;@ ~lib/memory.ts:155:10 (i32.const 16) ) - ;;@ ~lib/memory.ts:260:14 + ;;@ ~lib/memory.ts:155:14 (block (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:261:14 + ;;@ ~lib/memory.ts:156:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:261:4 + ;;@ ~lib/memory.ts:156:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:261:31 + ;;@ ~lib/memory.ts:156:31 (block (result i32) (set_local $1 (i32.add @@ -1665,7 +1661,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:261:22 + ;;@ ~lib/memory.ts:156:22 (i32.load8_u (get_local $3) ) @@ -1674,16 +1670,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:262:14 + ;;@ ~lib/memory.ts:157:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:262:4 + ;;@ ~lib/memory.ts:157:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:262:31 + ;;@ ~lib/memory.ts:157:31 (block (result i32) (set_local $1 (i32.add @@ -1693,7 +1689,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:262:22 + ;;@ ~lib/memory.ts:157:22 (i32.load8_u (get_local $3) ) @@ -1702,16 +1698,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:263:14 + ;;@ ~lib/memory.ts:158:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:263:4 + ;;@ ~lib/memory.ts:158:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:263:31 + ;;@ ~lib/memory.ts:158:31 (block (result i32) (set_local $1 (i32.add @@ -1721,7 +1717,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:263:22 + ;;@ ~lib/memory.ts:158:22 (i32.load8_u (get_local $3) ) @@ -1730,16 +1726,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:264:14 + ;;@ ~lib/memory.ts:159:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:264:4 + ;;@ ~lib/memory.ts:159:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:264:31 + ;;@ ~lib/memory.ts:159:31 (block (result i32) (set_local $1 (i32.add @@ -1749,7 +1745,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:264:22 + ;;@ ~lib/memory.ts:159:22 (i32.load8_u (get_local $3) ) @@ -1758,16 +1754,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:265:14 + ;;@ ~lib/memory.ts:160:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:265:4 + ;;@ ~lib/memory.ts:160:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:265:31 + ;;@ ~lib/memory.ts:160:31 (block (result i32) (set_local $1 (i32.add @@ -1777,7 +1773,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:265:22 + ;;@ ~lib/memory.ts:160:22 (i32.load8_u (get_local $3) ) @@ -1786,16 +1782,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:266:14 + ;;@ ~lib/memory.ts:161:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:266:4 + ;;@ ~lib/memory.ts:161:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:266:31 + ;;@ ~lib/memory.ts:161:31 (block (result i32) (set_local $1 (i32.add @@ -1805,7 +1801,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:266:22 + ;;@ ~lib/memory.ts:161:22 (i32.load8_u (get_local $3) ) @@ -1814,16 +1810,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:267:14 + ;;@ ~lib/memory.ts:162:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:267:4 + ;;@ ~lib/memory.ts:162:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:267:31 + ;;@ ~lib/memory.ts:162:31 (block (result i32) (set_local $1 (i32.add @@ -1833,7 +1829,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:267:22 + ;;@ ~lib/memory.ts:162:22 (i32.load8_u (get_local $3) ) @@ -1842,16 +1838,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:268:14 + ;;@ ~lib/memory.ts:163:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:268:4 + ;;@ ~lib/memory.ts:163:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:268:31 + ;;@ ~lib/memory.ts:163:31 (block (result i32) (set_local $1 (i32.add @@ -1861,7 +1857,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:268:22 + ;;@ ~lib/memory.ts:163:22 (i32.load8_u (get_local $3) ) @@ -1870,16 +1866,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:269:14 + ;;@ ~lib/memory.ts:164:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:269:4 + ;;@ ~lib/memory.ts:164:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:269:31 + ;;@ ~lib/memory.ts:164:31 (block (result i32) (set_local $1 (i32.add @@ -1889,7 +1885,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:269:22 + ;;@ ~lib/memory.ts:164:22 (i32.load8_u (get_local $3) ) @@ -1898,16 +1894,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:270:14 + ;;@ ~lib/memory.ts:165:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:270:4 + ;;@ ~lib/memory.ts:165:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:270:31 + ;;@ ~lib/memory.ts:165:31 (block (result i32) (set_local $1 (i32.add @@ -1917,7 +1913,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:270:22 + ;;@ ~lib/memory.ts:165:22 (i32.load8_u (get_local $3) ) @@ -1926,16 +1922,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:271:14 + ;;@ ~lib/memory.ts:166:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:271:4 + ;;@ ~lib/memory.ts:166:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:271:31 + ;;@ ~lib/memory.ts:166:31 (block (result i32) (set_local $1 (i32.add @@ -1945,7 +1941,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:271:22 + ;;@ ~lib/memory.ts:166:22 (i32.load8_u (get_local $3) ) @@ -1954,16 +1950,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:272:14 + ;;@ ~lib/memory.ts:167:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:272:4 + ;;@ ~lib/memory.ts:167:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:272:31 + ;;@ ~lib/memory.ts:167:31 (block (result i32) (set_local $1 (i32.add @@ -1973,7 +1969,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:272:22 + ;;@ ~lib/memory.ts:167:22 (i32.load8_u (get_local $3) ) @@ -1982,16 +1978,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:273:14 + ;;@ ~lib/memory.ts:168:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:273:4 + ;;@ ~lib/memory.ts:168:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:273:31 + ;;@ ~lib/memory.ts:168:31 (block (result i32) (set_local $1 (i32.add @@ -2001,7 +1997,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:273:22 + ;;@ ~lib/memory.ts:168:22 (i32.load8_u (get_local $3) ) @@ -2010,16 +2006,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:274:14 + ;;@ ~lib/memory.ts:169:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:274:4 + ;;@ ~lib/memory.ts:169:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:274:31 + ;;@ ~lib/memory.ts:169:31 (block (result i32) (set_local $1 (i32.add @@ -2029,7 +2025,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:274:22 + ;;@ ~lib/memory.ts:169:22 (i32.load8_u (get_local $3) ) @@ -2038,16 +2034,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:275:14 + ;;@ ~lib/memory.ts:170:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:275:4 + ;;@ ~lib/memory.ts:170:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:275:31 + ;;@ ~lib/memory.ts:170:31 (block (result i32) (set_local $1 (i32.add @@ -2057,7 +2053,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:275:22 + ;;@ ~lib/memory.ts:170:22 (i32.load8_u (get_local $3) ) @@ -2066,16 +2062,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:276:14 + ;;@ ~lib/memory.ts:171:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:276:4 + ;;@ ~lib/memory.ts:171:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:276:31 + ;;@ ~lib/memory.ts:171:31 (block (result i32) (set_local $1 (i32.add @@ -2085,7 +2081,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:276:22 + ;;@ ~lib/memory.ts:171:22 (i32.load8_u (get_local $3) ) @@ -2093,29 +2089,29 @@ ) ) ) - ;;@ ~lib/memory.ts:278:2 + ;;@ ~lib/memory.ts:173:2 (if - ;;@ ~lib/memory.ts:278:6 + ;;@ ~lib/memory.ts:173:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:278:10 + ;;@ ~lib/memory.ts:173:10 (i32.const 8) ) - ;;@ ~lib/memory.ts:278:13 + ;;@ ~lib/memory.ts:173:13 (block (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:279:14 + ;;@ ~lib/memory.ts:174:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:279:4 + ;;@ ~lib/memory.ts:174:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:279:31 + ;;@ ~lib/memory.ts:174:31 (block (result i32) (set_local $1 (i32.add @@ -2125,7 +2121,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:279:22 + ;;@ ~lib/memory.ts:174:22 (i32.load8_u (get_local $3) ) @@ -2134,16 +2130,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:280:14 + ;;@ ~lib/memory.ts:175:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:280:4 + ;;@ ~lib/memory.ts:175:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:280:31 + ;;@ ~lib/memory.ts:175:31 (block (result i32) (set_local $1 (i32.add @@ -2153,7 +2149,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:280:22 + ;;@ ~lib/memory.ts:175:22 (i32.load8_u (get_local $3) ) @@ -2162,16 +2158,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:281:14 + ;;@ ~lib/memory.ts:176:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:281:4 + ;;@ ~lib/memory.ts:176:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:281:31 + ;;@ ~lib/memory.ts:176:31 (block (result i32) (set_local $1 (i32.add @@ -2181,7 +2177,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:281:22 + ;;@ ~lib/memory.ts:176:22 (i32.load8_u (get_local $3) ) @@ -2190,16 +2186,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:282:14 + ;;@ ~lib/memory.ts:177:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:282:4 + ;;@ ~lib/memory.ts:177:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:282:31 + ;;@ ~lib/memory.ts:177:31 (block (result i32) (set_local $1 (i32.add @@ -2209,7 +2205,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:282:22 + ;;@ ~lib/memory.ts:177:22 (i32.load8_u (get_local $3) ) @@ -2218,16 +2214,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:283:14 + ;;@ ~lib/memory.ts:178:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:283:4 + ;;@ ~lib/memory.ts:178:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:283:31 + ;;@ ~lib/memory.ts:178:31 (block (result i32) (set_local $1 (i32.add @@ -2237,7 +2233,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:283:22 + ;;@ ~lib/memory.ts:178:22 (i32.load8_u (get_local $3) ) @@ -2246,16 +2242,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:284:14 + ;;@ ~lib/memory.ts:179:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:284:4 + ;;@ ~lib/memory.ts:179:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:284:31 + ;;@ ~lib/memory.ts:179:31 (block (result i32) (set_local $1 (i32.add @@ -2265,7 +2261,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:284:22 + ;;@ ~lib/memory.ts:179:22 (i32.load8_u (get_local $3) ) @@ -2274,16 +2270,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:285:14 + ;;@ ~lib/memory.ts:180:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:285:4 + ;;@ ~lib/memory.ts:180:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:285:31 + ;;@ ~lib/memory.ts:180:31 (block (result i32) (set_local $1 (i32.add @@ -2293,7 +2289,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:285:22 + ;;@ ~lib/memory.ts:180:22 (i32.load8_u (get_local $3) ) @@ -2302,16 +2298,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:286:14 + ;;@ ~lib/memory.ts:181:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:286:4 + ;;@ ~lib/memory.ts:181:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:286:31 + ;;@ ~lib/memory.ts:181:31 (block (result i32) (set_local $1 (i32.add @@ -2321,7 +2317,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:286:22 + ;;@ ~lib/memory.ts:181:22 (i32.load8_u (get_local $3) ) @@ -2329,29 +2325,29 @@ ) ) ) - ;;@ ~lib/memory.ts:288:2 + ;;@ ~lib/memory.ts:183:2 (if - ;;@ ~lib/memory.ts:288:6 + ;;@ ~lib/memory.ts:183:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:288:10 + ;;@ ~lib/memory.ts:183:10 (i32.const 4) ) - ;;@ ~lib/memory.ts:288:13 + ;;@ ~lib/memory.ts:183:13 (block (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:289:14 + ;;@ ~lib/memory.ts:184:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:289:4 + ;;@ ~lib/memory.ts:184:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:289:31 + ;;@ ~lib/memory.ts:184:31 (block (result i32) (set_local $1 (i32.add @@ -2361,7 +2357,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:289:22 + ;;@ ~lib/memory.ts:184:22 (i32.load8_u (get_local $3) ) @@ -2370,16 +2366,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:290:14 + ;;@ ~lib/memory.ts:185:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:290:4 + ;;@ ~lib/memory.ts:185:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:290:31 + ;;@ ~lib/memory.ts:185:31 (block (result i32) (set_local $1 (i32.add @@ -2389,7 +2385,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:290:22 + ;;@ ~lib/memory.ts:185:22 (i32.load8_u (get_local $3) ) @@ -2398,16 +2394,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:291:14 + ;;@ ~lib/memory.ts:186:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:291:4 + ;;@ ~lib/memory.ts:186:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:291:31 + ;;@ ~lib/memory.ts:186:31 (block (result i32) (set_local $1 (i32.add @@ -2417,7 +2413,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:291:22 + ;;@ ~lib/memory.ts:186:22 (i32.load8_u (get_local $3) ) @@ -2426,16 +2422,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:292:14 + ;;@ ~lib/memory.ts:187:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:292:4 + ;;@ ~lib/memory.ts:187:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:292:31 + ;;@ ~lib/memory.ts:187:31 (block (result i32) (set_local $1 (i32.add @@ -2445,7 +2441,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:292:22 + ;;@ ~lib/memory.ts:187:22 (i32.load8_u (get_local $3) ) @@ -2453,29 +2449,29 @@ ) ) ) - ;;@ ~lib/memory.ts:294:2 + ;;@ ~lib/memory.ts:189:2 (if - ;;@ ~lib/memory.ts:294:6 + ;;@ ~lib/memory.ts:189:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:294:10 + ;;@ ~lib/memory.ts:189:10 (i32.const 2) ) - ;;@ ~lib/memory.ts:294:13 + ;;@ ~lib/memory.ts:189:13 (block (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:295:14 + ;;@ ~lib/memory.ts:190:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:295:4 + ;;@ ~lib/memory.ts:190:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:295:31 + ;;@ ~lib/memory.ts:190:31 (block (result i32) (set_local $1 (i32.add @@ -2485,7 +2481,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:295:22 + ;;@ ~lib/memory.ts:190:22 (i32.load8_u (get_local $3) ) @@ -2494,16 +2490,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:296:14 + ;;@ ~lib/memory.ts:191:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:296:4 + ;;@ ~lib/memory.ts:191:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:296:31 + ;;@ ~lib/memory.ts:191:31 (block (result i32) (set_local $1 (i32.add @@ -2513,7 +2509,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:296:22 + ;;@ ~lib/memory.ts:191:22 (i32.load8_u (get_local $3) ) @@ -2521,28 +2517,28 @@ ) ) ) - ;;@ ~lib/memory.ts:298:2 + ;;@ ~lib/memory.ts:193:2 (if - ;;@ ~lib/memory.ts:298:6 + ;;@ ~lib/memory.ts:193:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:298:10 + ;;@ ~lib/memory.ts:193:10 (i32.const 1) ) - ;;@ ~lib/memory.ts:299:14 + ;;@ ~lib/memory.ts:194:14 (block (set_local $3 (get_local $0) ) - ;;@ ~lib/memory.ts:298:13 + ;;@ ~lib/memory.ts:193:13 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:299:31 + ;;@ ~lib/memory.ts:194:31 (block (result i32) (set_local $3 (get_local $1) ) - ;;@ ~lib/memory.ts:299:22 + ;;@ ~lib/memory.ts:194:22 (i32.load8_u (get_local $3) ) @@ -2551,114 +2547,114 @@ ) ) ) - (func $~lib/memory/memory.copy (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memmove (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - ;;@ ~lib/memory.ts:79:4 + ;;@ ~lib/memory.ts:200:2 (if - ;;@ ~lib/memory.ts:79:8 + ;;@ ~lib/memory.ts:200:6 (i32.eq (get_local $0) - ;;@ ~lib/memory.ts:79:16 + ;;@ ~lib/memory.ts:200:14 (get_local $1) ) - ;;@ ~lib/memory.ts:79:21 + ;;@ ~lib/memory.ts:200:19 (return) ) - ;;@ ~lib/memory.ts:80:4 + ;;@ ~lib/memory.ts:201:2 (if - ;;@ ~lib/memory.ts:80:8 + ;;@ ~lib/memory.ts:201:6 (if (result i32) (tee_local $3 (i32.le_u (i32.add (get_local $1) - ;;@ ~lib/memory.ts:80:14 + ;;@ ~lib/memory.ts:201:12 (get_local $2) ) - ;;@ ~lib/memory.ts:80:19 + ;;@ ~lib/memory.ts:201:17 (get_local $0) ) ) (get_local $3) - ;;@ ~lib/memory.ts:80:27 + ;;@ ~lib/memory.ts:201:25 (i32.le_u (i32.add (get_local $0) - ;;@ ~lib/memory.ts:80:34 + ;;@ ~lib/memory.ts:201:32 (get_local $2) ) - ;;@ ~lib/memory.ts:80:39 + ;;@ ~lib/memory.ts:201:37 (get_local $1) ) ) - ;;@ ~lib/memory.ts:80:44 + ;;@ ~lib/memory.ts:201:42 (block - ;;@ ~lib/memory.ts:81:6 + ;;@ ~lib/memory.ts:202:4 (call $~lib/memory/memcpy - ;;@ ~lib/memory.ts:81:13 + ;;@ ~lib/memory.ts:202:11 (get_local $0) - ;;@ ~lib/memory.ts:81:19 + ;;@ ~lib/memory.ts:202:17 (get_local $1) - ;;@ ~lib/memory.ts:81:24 + ;;@ ~lib/memory.ts:202:22 (get_local $2) ) - ;;@ ~lib/memory.ts:82:6 + ;;@ ~lib/memory.ts:203:4 (return) ) ) - ;;@ ~lib/memory.ts:84:4 + ;;@ ~lib/memory.ts:205:2 (if - ;;@ ~lib/memory.ts:84:8 + ;;@ ~lib/memory.ts:205:6 (i32.lt_u (get_local $0) - ;;@ ~lib/memory.ts:84:15 + ;;@ ~lib/memory.ts:205:13 (get_local $1) ) - ;;@ ~lib/memory.ts:84:20 + ;;@ ~lib/memory.ts:205:18 (block - ;;@ ~lib/memory.ts:85:6 + ;;@ ~lib/memory.ts:206:4 (if - ;;@ ~lib/memory.ts:85:10 + ;;@ ~lib/memory.ts:206:8 (i32.eq (i32.and - ;;@ ~lib/memory.ts:85:11 + ;;@ ~lib/memory.ts:206:9 (get_local $1) - ;;@ ~lib/memory.ts:85:17 + ;;@ ~lib/memory.ts:206:15 (i32.const 7) ) - ;;@ ~lib/memory.ts:85:23 + ;;@ ~lib/memory.ts:206:21 (i32.and - ;;@ ~lib/memory.ts:85:24 + ;;@ ~lib/memory.ts:206:22 (get_local $0) - ;;@ ~lib/memory.ts:85:31 + ;;@ ~lib/memory.ts:206:29 (i32.const 7) ) ) - ;;@ ~lib/memory.ts:85:35 + ;;@ ~lib/memory.ts:206:33 (block (loop $continue|0 (if - ;;@ ~lib/memory.ts:86:15 + ;;@ ~lib/memory.ts:207:13 (i32.and (get_local $0) - ;;@ ~lib/memory.ts:86:22 + ;;@ ~lib/memory.ts:207:20 (i32.const 7) ) (block - ;;@ ~lib/memory.ts:87:10 + ;;@ ~lib/memory.ts:208:8 (if - ;;@ ~lib/memory.ts:87:14 + ;;@ ~lib/memory.ts:208:12 (i32.eqz - ;;@ ~lib/memory.ts:87:15 + ;;@ ~lib/memory.ts:208:13 (get_local $2) ) - ;;@ ~lib/memory.ts:87:18 + ;;@ ~lib/memory.ts:208:16 (return) ) - ;;@ ~lib/memory.ts:88:10 + ;;@ ~lib/memory.ts:209:8 (set_local $2 (i32.sub - ;;@ ~lib/memory.ts:88:12 + ;;@ ~lib/memory.ts:209:10 (get_local $2) (i32.const 1) ) @@ -2666,16 +2662,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:89:20 + ;;@ ~lib/memory.ts:210:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:89:10 + ;;@ ~lib/memory.ts:210:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:89:37 + ;;@ ~lib/memory.ts:210:35 (block (result i32) (set_local $1 (i32.add @@ -2685,7 +2681,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:89:28 + ;;@ ~lib/memory.ts:210:26 (i32.load8_u (get_local $3) ) @@ -2697,44 +2693,44 @@ ) (loop $continue|1 (if - ;;@ ~lib/memory.ts:91:15 + ;;@ ~lib/memory.ts:212:13 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:91:20 + ;;@ ~lib/memory.ts:212:18 (i32.const 8) ) (block - ;;@ ~lib/memory.ts:92:10 + ;;@ ~lib/memory.ts:213:8 (i64.store - ;;@ ~lib/memory.ts:92:21 + ;;@ ~lib/memory.ts:213:19 (get_local $0) - ;;@ ~lib/memory.ts:92:27 + ;;@ ~lib/memory.ts:213:25 (i64.load - ;;@ ~lib/memory.ts:92:37 + ;;@ ~lib/memory.ts:213:35 (get_local $1) ) ) - ;;@ ~lib/memory.ts:93:10 + ;;@ ~lib/memory.ts:214:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:93:18 + ;;@ ~lib/memory.ts:214:16 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:94:10 + ;;@ ~lib/memory.ts:215:8 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:94:18 + ;;@ ~lib/memory.ts:215:16 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:95:10 + ;;@ ~lib/memory.ts:216:8 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:95:18 + ;;@ ~lib/memory.ts:216:16 (i32.const 8) ) ) @@ -2746,22 +2742,22 @@ ) (loop $continue|2 (if - ;;@ ~lib/memory.ts:98:13 + ;;@ ~lib/memory.ts:219:11 (get_local $2) (block (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:99:18 + ;;@ ~lib/memory.ts:220:16 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:99:8 + ;;@ ~lib/memory.ts:220:6 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:99:35 + ;;@ ~lib/memory.ts:220:33 (block (result i32) (set_local $1 (i32.add @@ -2771,16 +2767,16 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:99:26 + ;;@ ~lib/memory.ts:220:24 (i32.load8_u (get_local $3) ) ) ) - ;;@ ~lib/memory.ts:100:8 + ;;@ ~lib/memory.ts:221:6 (set_local $2 (i32.sub - ;;@ ~lib/memory.ts:100:10 + ;;@ ~lib/memory.ts:221:8 (get_local $2) (i32.const 1) ) @@ -2790,72 +2786,72 @@ ) ) ) - ;;@ ~lib/memory.ts:102:11 + ;;@ ~lib/memory.ts:223:9 (block - ;;@ ~lib/memory.ts:103:6 + ;;@ ~lib/memory.ts:224:4 (if - ;;@ ~lib/memory.ts:103:10 + ;;@ ~lib/memory.ts:224:8 (i32.eq (i32.and - ;;@ ~lib/memory.ts:103:11 + ;;@ ~lib/memory.ts:224:9 (get_local $1) - ;;@ ~lib/memory.ts:103:17 + ;;@ ~lib/memory.ts:224:15 (i32.const 7) ) - ;;@ ~lib/memory.ts:103:23 + ;;@ ~lib/memory.ts:224:21 (i32.and - ;;@ ~lib/memory.ts:103:24 + ;;@ ~lib/memory.ts:224:22 (get_local $0) - ;;@ ~lib/memory.ts:103:31 + ;;@ ~lib/memory.ts:224:29 (i32.const 7) ) ) - ;;@ ~lib/memory.ts:103:35 + ;;@ ~lib/memory.ts:224:33 (block (loop $continue|3 (if - ;;@ ~lib/memory.ts:104:15 + ;;@ ~lib/memory.ts:225:13 (i32.and (i32.add - ;;@ ~lib/memory.ts:104:16 + ;;@ ~lib/memory.ts:225:14 (get_local $0) - ;;@ ~lib/memory.ts:104:23 + ;;@ ~lib/memory.ts:225:21 (get_local $2) ) - ;;@ ~lib/memory.ts:104:28 + ;;@ ~lib/memory.ts:225:26 (i32.const 7) ) (block - ;;@ ~lib/memory.ts:105:10 + ;;@ ~lib/memory.ts:226:8 (if - ;;@ ~lib/memory.ts:105:14 + ;;@ ~lib/memory.ts:226:12 (i32.eqz - ;;@ ~lib/memory.ts:105:15 + ;;@ ~lib/memory.ts:226:13 (get_local $2) ) - ;;@ ~lib/memory.ts:105:18 + ;;@ ~lib/memory.ts:226:16 (return) ) - ;;@ ~lib/memory.ts:106:10 + ;;@ ~lib/memory.ts:227:8 (i32.store8 - ;;@ ~lib/memory.ts:106:20 + ;;@ ~lib/memory.ts:227:18 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:106:27 + ;;@ ~lib/memory.ts:227:25 (tee_local $2 (i32.sub - ;;@ ~lib/memory.ts:106:29 + ;;@ ~lib/memory.ts:227:27 (get_local $2) (i32.const 1) ) ) ) - ;;@ ~lib/memory.ts:106:32 + ;;@ ~lib/memory.ts:227:30 (i32.load8_u - ;;@ ~lib/memory.ts:106:41 + ;;@ ~lib/memory.ts:227:39 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:106:47 + ;;@ ~lib/memory.ts:227:45 (get_local $2) ) ) @@ -2866,33 +2862,33 @@ ) (loop $continue|4 (if - ;;@ ~lib/memory.ts:108:15 + ;;@ ~lib/memory.ts:229:13 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:108:20 + ;;@ ~lib/memory.ts:229:18 (i32.const 8) ) (block - ;;@ ~lib/memory.ts:110:10 + ;;@ ~lib/memory.ts:231:8 (i64.store - ;;@ ~lib/memory.ts:110:21 + ;;@ ~lib/memory.ts:231:19 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:109:10 + ;;@ ~lib/memory.ts:230:8 (tee_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:109:15 + ;;@ ~lib/memory.ts:230:13 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:110:31 + ;;@ ~lib/memory.ts:231:29 (i64.load - ;;@ ~lib/memory.ts:110:41 + ;;@ ~lib/memory.ts:231:39 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:110:47 + ;;@ ~lib/memory.ts:231:45 (get_local $2) ) ) @@ -2905,29 +2901,29 @@ ) (loop $continue|5 (if - ;;@ ~lib/memory.ts:113:13 + ;;@ ~lib/memory.ts:234:11 (get_local $2) (block - ;;@ ~lib/memory.ts:113:16 + ;;@ ~lib/memory.ts:234:14 (i32.store8 - ;;@ ~lib/memory.ts:114:18 + ;;@ ~lib/memory.ts:235:16 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:114:25 + ;;@ ~lib/memory.ts:235:23 (tee_local $2 (i32.sub - ;;@ ~lib/memory.ts:114:27 + ;;@ ~lib/memory.ts:235:25 (get_local $2) (i32.const 1) ) ) ) - ;;@ ~lib/memory.ts:114:30 + ;;@ ~lib/memory.ts:235:28 (i32.load8_u - ;;@ ~lib/memory.ts:114:39 + ;;@ ~lib/memory.ts:235:37 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:114:45 + ;;@ ~lib/memory.ts:235:43 (get_local $2) ) ) @@ -2939,62 +2935,73 @@ ) ) ) - (func $~lib/memory/memory.compare (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.copy (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + ;;@ ~lib/memory.ts:16:4 + (call $~lib/memory/memmove + ;;@ ~lib/memory.ts:16:12 + (get_local $0) + ;;@ ~lib/memory.ts:16:18 + (get_local $1) + ;;@ ~lib/memory.ts:16:23 + (get_local $2) + ) + ) + (func $~lib/memory/memcmp (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - ;;@ ~lib/memory.ts:122:4 + ;;@ ~lib/memory.ts:302:2 (if - ;;@ ~lib/memory.ts:122:8 + ;;@ ~lib/memory.ts:302:6 (i32.eq (get_local $0) - ;;@ ~lib/memory.ts:122:14 + ;;@ ~lib/memory.ts:302:12 (get_local $1) ) - ;;@ ~lib/memory.ts:122:25 + ;;@ ~lib/memory.ts:302:23 (return (i32.const 0) ) ) (loop $continue|0 (if - ;;@ ~lib/memory.ts:123:11 + ;;@ ~lib/memory.ts:303:9 (if (result i32) (tee_local $3 (i32.ne (get_local $2) - ;;@ ~lib/memory.ts:123:16 + ;;@ ~lib/memory.ts:303:14 (i32.const 0) ) ) - ;;@ ~lib/memory.ts:123:21 + ;;@ ~lib/memory.ts:303:19 (i32.eq (i32.load8_u - ;;@ ~lib/memory.ts:123:30 + ;;@ ~lib/memory.ts:303:28 (get_local $0) ) - ;;@ ~lib/memory.ts:123:37 + ;;@ ~lib/memory.ts:303:35 (i32.load8_u - ;;@ ~lib/memory.ts:123:46 + ;;@ ~lib/memory.ts:303:44 (get_local $1) ) ) (get_local $3) ) (block - ;;@ ~lib/memory.ts:124:6 + ;;@ ~lib/memory.ts:304:4 (set_local $2 (i32.sub (get_local $2) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:124:11 + ;;@ ~lib/memory.ts:304:9 (set_local $0 (i32.add (get_local $0) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:124:17 + ;;@ ~lib/memory.ts:304:15 (set_local $1 (i32.add (get_local $1) @@ -3005,27 +3012,38 @@ ) ) ) - ;;@ ~lib/memory.ts:126:55 + ;;@ ~lib/memory.ts:306:53 (if (result i32) - ;;@ ~lib/memory.ts:126:11 + ;;@ ~lib/memory.ts:306:9 (get_local $2) - ;;@ ~lib/memory.ts:126:15 + ;;@ ~lib/memory.ts:306:13 (i32.sub (i32.load8_u - ;;@ ~lib/memory.ts:126:29 + ;;@ ~lib/memory.ts:306:27 (get_local $0) ) - ;;@ ~lib/memory.ts:126:35 + ;;@ ~lib/memory.ts:306:33 (i32.load8_u - ;;@ ~lib/memory.ts:126:49 + ;;@ ~lib/memory.ts:306:47 (get_local $1) ) ) - ;;@ ~lib/memory.ts:126:55 + ;;@ ~lib/memory.ts:306:53 (i32.const 0) ) ) - (func $~lib/allocator/buddy/update_max_ptr (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.compare (; 6 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + ;;@ ~lib/memory.ts:21:27 + (call $~lib/memory/memcmp + ;;@ ~lib/memory.ts:21:18 + (get_local $0) + ;;@ ~lib/memory.ts:21:22 + (get_local $1) + ;;@ ~lib/memory.ts:21:26 + (get_local $2) + ) + ) + (func $~lib/allocator/buddy/update_max_ptr (; 7 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) ;;@ ~lib/allocator/buddy.ts:175:2 (if @@ -3041,6 +3059,7 @@ (if ;;@ ~lib/allocator/buddy.ts:182:8 (i32.lt_s + ;;@ ~lib/allocator/buddy.ts:182:15 (grow_memory ;;@ ~lib/allocator/buddy.ts:182:20 (i32.sub @@ -3063,6 +3082,7 @@ (i32.const 16) ) ) + ;;@ ~lib/allocator/buddy.ts:179:19 (current_memory) ) ) @@ -3089,7 +3109,7 @@ ;;@ ~lib/allocator/buddy.ts:188:9 (i32.const 1) ) - (func $~lib/allocator/buddy/buckets$get (; 7 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/buddy/buckets$get (; 8 ;) (type $ii) (param $0 i32) (result i32) ;;@ ~lib/allocator/buddy.ts:102:59 (i32.add ;;@ ~lib/allocator/buddy.ts:102:26 @@ -3097,12 +3117,11 @@ ;;@ ~lib/allocator/buddy.ts:102:42 (i32.shl (get_local $0) - ;;@ ~lib/allocator/buddy.ts:102:50 (i32.const 3) ) ) ) - (func $~lib/allocator/buddy/list_init (; 8 ;) (type $iv) (param $0 i32) + (func $~lib/allocator/buddy/list_init (; 9 ;) (type $iv) (param $0 i32) ;;@ ~lib/allocator/buddy.ts:197:2 (i32.store (get_local $0) @@ -3116,7 +3135,7 @@ (get_local $0) ) ) - (func $~lib/allocator/buddy/list_push (; 9 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/allocator/buddy/list_push (; 10 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) ;;@ ~lib/allocator/buddy.ts:207:2 (i32.store @@ -3148,17 +3167,15 @@ (get_local $1) ) ) - (func $~lib/allocator/buddy/bucket_for_request (; 10 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/buddy/bucket_for_request (; 11 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) ;;@ ~lib/allocator/buddy.ts:279:2 (set_local $1 - ;;@ ~lib/allocator/buddy.ts:279:15 (i32.const 26) ) ;;@ ~lib/allocator/buddy.ts:280:2 (set_local $2 - ;;@ ~lib/allocator/buddy.ts:280:13 (i32.const 16) ) (loop $continue|0 @@ -3192,7 +3209,7 @@ ;;@ ~lib/allocator/buddy.ts:287:9 (get_local $1) ) - (func $~lib/allocator/buddy/node_for_ptr (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/buddy/node_for_ptr (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) ;;@ ~lib/allocator/buddy.ts:252:75 (i32.sub ;;@ ~lib/allocator/buddy.ts:252:9 @@ -3207,7 +3224,6 @@ ) ;;@ ~lib/allocator/buddy.ts:252:30 (i32.sub - ;;@ ~lib/allocator/buddy.ts:252:31 (i32.const 30) ;;@ ~lib/allocator/buddy.ts:252:48 (get_local $1) @@ -3225,7 +3241,7 @@ (i32.const 1) ) ) - (func $~lib/allocator/buddy/node_is_split$get (; 12 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/buddy/node_is_split$get (; 13 ;) (type $ii) (param $0 i32) (result i32) ;;@ ~lib/allocator/buddy.ts:148:45 (i32.load8_u ;;@ ~lib/allocator/buddy.ts:148:18 @@ -3236,7 +3252,7 @@ ) ) ) - (func $~lib/allocator/buddy/parent_is_split (; 13 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/buddy/parent_is_split (; 14 ;) (type $ii) (param $0 i32) (result i32) ;;@ ~lib/allocator/buddy.ts:260:70 (i32.eq ;;@ ~lib/allocator/buddy.ts:260:9 @@ -3280,7 +3296,7 @@ (i32.const 1) ) ) - (func $~lib/allocator/buddy/list_remove (; 14 ;) (type $iv) (param $0 i32) + (func $~lib/allocator/buddy/list_remove (; 15 ;) (type $iv) (param $0 i32) (local $1 i32) ;;@ ~lib/allocator/buddy.ts:222:2 (i32.store offset=4 @@ -3306,7 +3322,7 @@ (get_local $1) ) ) - (func $~lib/allocator/buddy/ptr_for_node (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/buddy/ptr_for_node (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) ;;@ ~lib/allocator/buddy.ts:243:77 (i32.add ;;@ ~lib/allocator/buddy.ts:243:9 @@ -3331,7 +3347,6 @@ ) ;;@ ~lib/allocator/buddy.ts:243:52 (i32.sub - ;;@ ~lib/allocator/buddy.ts:243:53 (i32.const 30) ;;@ ~lib/allocator/buddy.ts:243:70 (get_local $1) @@ -3339,7 +3354,7 @@ ) ) ) - (func $~lib/allocator/buddy/flip_parent_is_split (; 16 ;) (type $iv) (param $0 i32) + (func $~lib/allocator/buddy/flip_parent_is_split (; 17 ;) (type $iv) (param $0 i32) (local $1 i32) (local $2 i32) (set_local $2 @@ -3395,7 +3410,7 @@ (get_local $0) ) ) - (func $~lib/allocator/buddy/lower_bucket_limit (; 17 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/buddy/lower_bucket_limit (; 18 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (loop $continue|0 @@ -3485,7 +3500,6 @@ (get_global $~lib/allocator/buddy/bucket_limit) ) ) - ;;@ ~lib/allocator/buddy.ts:322:38 (i32.const 8) ) ) @@ -3552,7 +3566,7 @@ ;;@ ~lib/allocator/buddy.ts:338:9 (i32.const 1) ) - (func $~lib/allocator/buddy/list_pop (; 18 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/buddy/list_pop (; 19 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) ;;@ ~lib/allocator/buddy.ts:231:2 (if @@ -3581,7 +3595,7 @@ ;;@ ~lib/allocator/buddy.ts:233:9 (get_local $1) ) - (func $~lib/allocator/buddy/__memory_allocate (; 19 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/buddy/__memory_allocate (; 20 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3591,7 +3605,6 @@ ;;@ ~lib/allocator/buddy.ts:350:6 (i32.gt_u (get_local $0) - ;;@ ~lib/allocator/buddy.ts:350:16 (i32.const 1073741816) ) ;;@ ~lib/allocator/buddy.ts:350:41 @@ -3629,7 +3642,6 @@ ) ;;@ ~lib/allocator/buddy.ts:361:4 (set_global $~lib/allocator/buddy/bucket_limit - ;;@ ~lib/allocator/buddy.ts:361:19 (i32.const 26) ) ;;@ ~lib/allocator/buddy.ts:362:4 @@ -3641,7 +3653,6 @@ ;;@ ~lib/allocator/buddy.ts:362:24 (i32.add (get_global $~lib/allocator/buddy/base_ptr) - ;;@ ~lib/allocator/buddy.ts:362:35 (i32.const 8) ) ) @@ -3656,7 +3667,6 @@ (call $~lib/allocator/buddy/list_init ;;@ ~lib/allocator/buddy.ts:365:14 (call $~lib/allocator/buddy/buckets$get - ;;@ ~lib/allocator/buddy.ts:365:26 (i32.const 26) ) ) @@ -3664,7 +3674,6 @@ (call $~lib/allocator/buddy/list_push ;;@ ~lib/allocator/buddy.ts:366:14 (call $~lib/allocator/buddy/buckets$get - ;;@ ~lib/allocator/buddy.ts:366:26 (i32.const 26) ) ;;@ ~lib/allocator/buddy.ts:366:45 @@ -3681,7 +3690,6 @@ ;;@ ~lib/allocator/buddy.ts:373:30 (i32.add (get_local $0) - ;;@ ~lib/allocator/buddy.ts:373:40 (i32.const 8) ) ) @@ -3801,7 +3809,6 @@ (i32.const 1) ;;@ ~lib/allocator/buddy.ts:425:16 (i32.sub - ;;@ ~lib/allocator/buddy.ts:425:17 (i32.const 30) ;;@ ~lib/allocator/buddy.ts:425:34 (get_local $1) @@ -3831,7 +3838,6 @@ ;;@ ~lib/allocator/buddy.ts:426:53 (i32.const 2) ) - ;;@ ~lib/allocator/buddy.ts:426:57 (i32.const 8) ) ;;@ ~lib/allocator/buddy.ts:426:69 @@ -3941,7 +3947,6 @@ ;;@ ~lib/allocator/buddy.ts:470:11 (i32.add (get_local $2) - ;;@ ~lib/allocator/buddy.ts:470:17 (i32.const 8) ) ) @@ -3951,14 +3956,14 @@ ;;@ ~lib/allocator/buddy.ts:473:9 (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 20 ;) (type $ii) (param $0 i32) (result i32) - ;;@ ~lib/memory.ts:142:45 + (func $~lib/memory/memory.allocate (; 21 ;) (type $ii) (param $0 i32) (result i32) + ;;@ ~lib/memory.ts:37:45 (call $~lib/allocator/buddy/__memory_allocate - ;;@ ~lib/memory.ts:142:63 + ;;@ ~lib/memory.ts:37:63 (get_local $0) ) ) - (func $~lib/allocator/buddy/__memory_free (; 21 ;) (type $iv) (param $0 i32) + (func $~lib/allocator/buddy/__memory_free (; 22 ;) (type $iv) (param $0 i32) (local $1 i32) (local $2 i32) ;;@ ~lib/allocator/buddy.ts:483:2 @@ -3983,12 +3988,10 @@ ;;@ ~lib/allocator/buddy.ts:492:8 (i32.sub (get_local $0) - ;;@ ~lib/allocator/buddy.ts:492:14 (i32.const 8) ) ) ) - ;;@ ~lib/allocator/buddy.ts:493:49 (i32.const 8) ) ) @@ -4100,20 +4103,19 @@ ) ) ) - (func $~lib/memory/memory.free (; 22 ;) (type $iv) (param $0 i32) - ;;@ ~lib/memory.ts:148:36 + (func $~lib/memory/memory.free (; 23 ;) (type $iv) (param $0 i32) + ;;@ ~lib/memory.ts:43:36 (call $~lib/allocator/buddy/__memory_free - ;;@ ~lib/memory.ts:148:50 + ;;@ ~lib/memory.ts:43:50 (get_local $0) ) ) - (func $~lib/memory/memory.reset (; 23 ;) (type $v) + (func $~lib/memory/memory.reset (; 24 ;) (type $v) (unreachable) ) - (func $start (; 24 ;) (type $v) + (func $start (; 25 ;) (type $v) (set_global $~lib/allocator/buddy/BUCKETS_START - ;;@ ~lib/allocator/buddy.ts:97:27 - (get_global $HEAP_BASE) + (i32.const 8) ) (set_global $~lib/allocator/buddy/BUCKETS_END ;;@ ~lib/allocator/buddy.ts:98:25 @@ -4130,7 +4132,6 @@ ;;@ ~lib/allocator/buddy.ts:144:31 (i32.add (get_global $~lib/allocator/buddy/NODE_IS_SPLIT_START) - ;;@ ~lib/allocator/buddy.ts:144:53 (i32.const 8388608) ) ) diff --git a/tests/allocators/buddy/untouched.wat b/tests/allocators/buddy/untouched.wat index 09ac75c5..3518776b 100644 --- a/tests/allocators/buddy/untouched.wat +++ b/tests/allocators/buddy/untouched.wat @@ -1,8 +1,7 @@ (module - (type $i (func (result i32))) - (type $ii (func (param i32) (result i32))) (type $iiiv (func (param i32 i32 i32))) (type $iiii (func (param i32 i32 i32) (result i32))) + (type $ii (func (param i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $iv (func (param i32))) (type $iiv (func (param i32 i32))) @@ -16,6 +15,7 @@ (global $~lib/allocator/buddy/MAX_ALLOC i32 (i32.const 1073741824)) (global $~lib/allocator/buddy/BUCKET_COUNT i32 (i32.const 27)) (global $~lib/allocator/buddy/BUCKETS_START (mut i32) (i32.const 0)) + (global $~lib/allocator/buddy/List.SIZE i32 (i32.const 8)) (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)) @@ -26,540 +26,527 @@ (global $HEAP_BASE i32 (i32.const 60)) (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") - (export "memory.size" (func $~lib/memory/memory.size)) - (export "memory.grow" (func $~lib/memory/memory.grow)) + (export "memory" (memory $0)) (export "memory.fill" (func $~lib/memory/memory.fill)) (export "memory.copy" (func $~lib/memory/memory.copy)) (export "memory.compare" (func $~lib/memory/memory.compare)) (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" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 1 ;) (type $i) (result i32) - ;;@ ~lib/memory.ts:4:25 - (current_memory) - ) - (func $~lib/memory/memory.grow (; 2 ;) (type $ii) (param $0 i32) (result i32) - ;;@ ~lib/memory.ts:8:30 - (grow_memory - ;;@ ~lib/memory.ts:8:25 - (get_local $0) - ) - ) - (func $~lib/memory/memory.fill (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 1 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) - ;;@ ~lib/memory.ts:17:4 + ;;@ ~lib/memory.ts:244:2 (if - ;;@ ~lib/memory.ts:17:8 + ;;@ ~lib/memory.ts:244:6 (i32.eqz - ;;@ ~lib/memory.ts:17:9 + ;;@ ~lib/memory.ts:244:7 (get_local $2) ) - ;;@ ~lib/memory.ts:17:12 + ;;@ ~lib/memory.ts:244:10 (return) ) - ;;@ ~lib/memory.ts:18:4 + ;;@ ~lib/memory.ts:245:2 (i32.store8 - ;;@ ~lib/memory.ts:18:14 + ;;@ ~lib/memory.ts:245:12 (get_local $0) - ;;@ ~lib/memory.ts:18:20 + ;;@ ~lib/memory.ts:245:18 (get_local $1) ) - ;;@ ~lib/memory.ts:19:4 + ;;@ ~lib/memory.ts:246:2 (i32.store8 - ;;@ ~lib/memory.ts:19:14 + ;;@ ~lib/memory.ts:246:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:19:21 + ;;@ ~lib/memory.ts:246:19 (get_local $2) ) - ;;@ ~lib/memory.ts:19:25 + ;;@ ~lib/memory.ts:246:23 (i32.const 1) ) - ;;@ ~lib/memory.ts:19:28 + ;;@ ~lib/memory.ts:246:26 (get_local $1) ) - ;;@ ~lib/memory.ts:20:4 + ;;@ ~lib/memory.ts:247:2 (if - ;;@ ~lib/memory.ts:20:8 + ;;@ ~lib/memory.ts:247:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:20:13 + ;;@ ~lib/memory.ts:247:11 (i32.const 2) ) - ;;@ ~lib/memory.ts:20:16 + ;;@ ~lib/memory.ts:247:14 (return) ) - ;;@ ~lib/memory.ts:22:4 + ;;@ ~lib/memory.ts:249:2 (i32.store8 - ;;@ ~lib/memory.ts:22:14 + ;;@ ~lib/memory.ts:249:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:22:21 + ;;@ ~lib/memory.ts:249:19 (i32.const 1) ) - ;;@ ~lib/memory.ts:22:24 + ;;@ ~lib/memory.ts:249:22 (get_local $1) ) - ;;@ ~lib/memory.ts:23:4 + ;;@ ~lib/memory.ts:250:2 (i32.store8 - ;;@ ~lib/memory.ts:23:14 + ;;@ ~lib/memory.ts:250:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:23:21 + ;;@ ~lib/memory.ts:250:19 (i32.const 2) ) - ;;@ ~lib/memory.ts:23:24 + ;;@ ~lib/memory.ts:250:22 (get_local $1) ) - ;;@ ~lib/memory.ts:24:4 + ;;@ ~lib/memory.ts:251:2 (i32.store8 - ;;@ ~lib/memory.ts:24:14 + ;;@ ~lib/memory.ts:251:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:24:21 + ;;@ ~lib/memory.ts:251:19 (get_local $2) ) - ;;@ ~lib/memory.ts:24:25 + ;;@ ~lib/memory.ts:251:23 (i32.const 2) ) - ;;@ ~lib/memory.ts:24:28 + ;;@ ~lib/memory.ts:251:26 (get_local $1) ) - ;;@ ~lib/memory.ts:25:4 + ;;@ ~lib/memory.ts:252:2 (i32.store8 - ;;@ ~lib/memory.ts:25:14 + ;;@ ~lib/memory.ts:252:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:25:21 + ;;@ ~lib/memory.ts:252:19 (get_local $2) ) - ;;@ ~lib/memory.ts:25:25 + ;;@ ~lib/memory.ts:252:23 (i32.const 3) ) - ;;@ ~lib/memory.ts:25:28 + ;;@ ~lib/memory.ts:252:26 (get_local $1) ) - ;;@ ~lib/memory.ts:26:4 + ;;@ ~lib/memory.ts:253:2 (if - ;;@ ~lib/memory.ts:26:8 + ;;@ ~lib/memory.ts:253:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:26:13 + ;;@ ~lib/memory.ts:253:11 (i32.const 6) ) - ;;@ ~lib/memory.ts:26:16 + ;;@ ~lib/memory.ts:253:14 (return) ) - ;;@ ~lib/memory.ts:27:4 + ;;@ ~lib/memory.ts:254:2 (i32.store8 - ;;@ ~lib/memory.ts:27:14 + ;;@ ~lib/memory.ts:254:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:27:21 + ;;@ ~lib/memory.ts:254:19 (i32.const 3) ) - ;;@ ~lib/memory.ts:27:24 + ;;@ ~lib/memory.ts:254:22 (get_local $1) ) - ;;@ ~lib/memory.ts:28:4 + ;;@ ~lib/memory.ts:255:2 (i32.store8 - ;;@ ~lib/memory.ts:28:14 + ;;@ ~lib/memory.ts:255:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:28:21 + ;;@ ~lib/memory.ts:255:19 (get_local $2) ) - ;;@ ~lib/memory.ts:28:25 + ;;@ ~lib/memory.ts:255:23 (i32.const 4) ) - ;;@ ~lib/memory.ts:28:28 + ;;@ ~lib/memory.ts:255:26 (get_local $1) ) - ;;@ ~lib/memory.ts:29:4 + ;;@ ~lib/memory.ts:256:2 (if - ;;@ ~lib/memory.ts:29:8 + ;;@ ~lib/memory.ts:256:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:29:13 + ;;@ ~lib/memory.ts:256:11 (i32.const 8) ) - ;;@ ~lib/memory.ts:29:16 + ;;@ ~lib/memory.ts:256:14 (return) ) - ;;@ ~lib/memory.ts:32:4 + ;;@ ~lib/memory.ts:259:2 (set_local $3 - ;;@ ~lib/memory.ts:32:19 + ;;@ ~lib/memory.ts:259:17 (i32.and (i32.sub (i32.const 0) - ;;@ ~lib/memory.ts:32:20 + ;;@ ~lib/memory.ts:259:18 (get_local $0) ) - ;;@ ~lib/memory.ts:32:27 + ;;@ ~lib/memory.ts:259:25 (i32.const 3) ) ) - ;;@ ~lib/memory.ts:33:4 + ;;@ ~lib/memory.ts:260:2 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:33:12 + ;;@ ~lib/memory.ts:260:10 (get_local $3) ) ) - ;;@ ~lib/memory.ts:34:4 + ;;@ ~lib/memory.ts:261:2 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:34:9 + ;;@ ~lib/memory.ts:261:7 (get_local $3) ) ) - ;;@ ~lib/memory.ts:35:4 + ;;@ ~lib/memory.ts:262:2 (set_local $2 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:35:9 + ;;@ ~lib/memory.ts:262:7 (i32.const -4) ) ) - ;;@ ~lib/memory.ts:37:4 + ;;@ ~lib/memory.ts:264:2 (set_local $4 - ;;@ ~lib/memory.ts:37:19 + ;;@ ~lib/memory.ts:264:17 (i32.mul (i32.div_u (i32.const -1) - ;;@ ~lib/memory.ts:37:29 + ;;@ ~lib/memory.ts:264:27 (i32.const 255) ) (i32.and - ;;@ ~lib/memory.ts:37:35 + ;;@ ~lib/memory.ts:264:33 (get_local $1) (i32.const 255) ) ) ) - ;;@ ~lib/memory.ts:40:4 + ;;@ ~lib/memory.ts:267:2 (i32.store - ;;@ ~lib/memory.ts:40:15 + ;;@ ~lib/memory.ts:267:13 (get_local $0) - ;;@ ~lib/memory.ts:40:21 + ;;@ ~lib/memory.ts:267:19 (get_local $4) ) - ;;@ ~lib/memory.ts:41:4 + ;;@ ~lib/memory.ts:268:2 (i32.store - ;;@ ~lib/memory.ts:41:15 + ;;@ ~lib/memory.ts:268:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:41:22 + ;;@ ~lib/memory.ts:268:20 (get_local $2) ) - ;;@ ~lib/memory.ts:41:26 + ;;@ ~lib/memory.ts:268:24 (i32.const 4) ) - ;;@ ~lib/memory.ts:41:29 + ;;@ ~lib/memory.ts:268:27 (get_local $4) ) - ;;@ ~lib/memory.ts:42:4 + ;;@ ~lib/memory.ts:269:2 (if - ;;@ ~lib/memory.ts:42:8 + ;;@ ~lib/memory.ts:269:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:42:13 + ;;@ ~lib/memory.ts:269:11 (i32.const 8) ) - ;;@ ~lib/memory.ts:42:16 + ;;@ ~lib/memory.ts:269:14 (return) ) - ;;@ ~lib/memory.ts:43:4 + ;;@ ~lib/memory.ts:270:2 (i32.store - ;;@ ~lib/memory.ts:43:15 + ;;@ ~lib/memory.ts:270:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:43:22 + ;;@ ~lib/memory.ts:270:20 (i32.const 4) ) - ;;@ ~lib/memory.ts:43:25 + ;;@ ~lib/memory.ts:270:23 (get_local $4) ) - ;;@ ~lib/memory.ts:44:4 + ;;@ ~lib/memory.ts:271:2 (i32.store - ;;@ ~lib/memory.ts:44:15 + ;;@ ~lib/memory.ts:271:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:44:22 + ;;@ ~lib/memory.ts:271:20 (i32.const 8) ) - ;;@ ~lib/memory.ts:44:25 + ;;@ ~lib/memory.ts:271:23 (get_local $4) ) - ;;@ ~lib/memory.ts:45:4 + ;;@ ~lib/memory.ts:272:2 (i32.store - ;;@ ~lib/memory.ts:45:15 + ;;@ ~lib/memory.ts:272:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:45:22 + ;;@ ~lib/memory.ts:272:20 (get_local $2) ) - ;;@ ~lib/memory.ts:45:26 + ;;@ ~lib/memory.ts:272:24 (i32.const 12) ) - ;;@ ~lib/memory.ts:45:30 + ;;@ ~lib/memory.ts:272:28 (get_local $4) ) - ;;@ ~lib/memory.ts:46:4 + ;;@ ~lib/memory.ts:273:2 (i32.store - ;;@ ~lib/memory.ts:46:15 + ;;@ ~lib/memory.ts:273:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:46:22 + ;;@ ~lib/memory.ts:273:20 (get_local $2) ) - ;;@ ~lib/memory.ts:46:26 + ;;@ ~lib/memory.ts:273:24 (i32.const 8) ) - ;;@ ~lib/memory.ts:46:29 + ;;@ ~lib/memory.ts:273:27 (get_local $4) ) - ;;@ ~lib/memory.ts:47:4 + ;;@ ~lib/memory.ts:274:2 (if - ;;@ ~lib/memory.ts:47:8 + ;;@ ~lib/memory.ts:274:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:47:13 + ;;@ ~lib/memory.ts:274:11 (i32.const 24) ) - ;;@ ~lib/memory.ts:47:17 + ;;@ ~lib/memory.ts:274:15 (return) ) - ;;@ ~lib/memory.ts:48:4 + ;;@ ~lib/memory.ts:275:2 (i32.store - ;;@ ~lib/memory.ts:48:15 + ;;@ ~lib/memory.ts:275:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:48:22 + ;;@ ~lib/memory.ts:275:20 (i32.const 12) ) - ;;@ ~lib/memory.ts:48:26 + ;;@ ~lib/memory.ts:275:24 (get_local $4) ) - ;;@ ~lib/memory.ts:49:4 + ;;@ ~lib/memory.ts:276:2 (i32.store - ;;@ ~lib/memory.ts:49:15 + ;;@ ~lib/memory.ts:276:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:49:22 + ;;@ ~lib/memory.ts:276:20 (i32.const 16) ) - ;;@ ~lib/memory.ts:49:26 + ;;@ ~lib/memory.ts:276:24 (get_local $4) ) - ;;@ ~lib/memory.ts:50:4 + ;;@ ~lib/memory.ts:277:2 (i32.store - ;;@ ~lib/memory.ts:50:15 + ;;@ ~lib/memory.ts:277:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:50:22 + ;;@ ~lib/memory.ts:277:20 (i32.const 20) ) - ;;@ ~lib/memory.ts:50:26 + ;;@ ~lib/memory.ts:277:24 (get_local $4) ) - ;;@ ~lib/memory.ts:51:4 + ;;@ ~lib/memory.ts:278:2 (i32.store - ;;@ ~lib/memory.ts:51:15 + ;;@ ~lib/memory.ts:278:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:51:22 + ;;@ ~lib/memory.ts:278:20 (i32.const 24) ) - ;;@ ~lib/memory.ts:51:26 + ;;@ ~lib/memory.ts:278:24 (get_local $4) ) - ;;@ ~lib/memory.ts:52:4 + ;;@ ~lib/memory.ts:279:2 (i32.store - ;;@ ~lib/memory.ts:52:15 + ;;@ ~lib/memory.ts:279:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:52:22 + ;;@ ~lib/memory.ts:279:20 (get_local $2) ) - ;;@ ~lib/memory.ts:52:26 + ;;@ ~lib/memory.ts:279:24 (i32.const 28) ) - ;;@ ~lib/memory.ts:52:30 + ;;@ ~lib/memory.ts:279:28 (get_local $4) ) - ;;@ ~lib/memory.ts:53:4 + ;;@ ~lib/memory.ts:280:2 (i32.store - ;;@ ~lib/memory.ts:53:15 + ;;@ ~lib/memory.ts:280:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:53:22 + ;;@ ~lib/memory.ts:280:20 (get_local $2) ) - ;;@ ~lib/memory.ts:53:26 + ;;@ ~lib/memory.ts:280:24 (i32.const 24) ) - ;;@ ~lib/memory.ts:53:30 + ;;@ ~lib/memory.ts:280:28 (get_local $4) ) - ;;@ ~lib/memory.ts:54:4 + ;;@ ~lib/memory.ts:281:2 (i32.store - ;;@ ~lib/memory.ts:54:15 + ;;@ ~lib/memory.ts:281:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:54:22 + ;;@ ~lib/memory.ts:281:20 (get_local $2) ) - ;;@ ~lib/memory.ts:54:26 + ;;@ ~lib/memory.ts:281:24 (i32.const 20) ) - ;;@ ~lib/memory.ts:54:30 + ;;@ ~lib/memory.ts:281:28 (get_local $4) ) - ;;@ ~lib/memory.ts:55:4 + ;;@ ~lib/memory.ts:282:2 (i32.store - ;;@ ~lib/memory.ts:55:15 + ;;@ ~lib/memory.ts:282:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:55:22 + ;;@ ~lib/memory.ts:282:20 (get_local $2) ) - ;;@ ~lib/memory.ts:55:26 + ;;@ ~lib/memory.ts:282:24 (i32.const 16) ) - ;;@ ~lib/memory.ts:55:30 + ;;@ ~lib/memory.ts:282:28 (get_local $4) ) - ;;@ ~lib/memory.ts:58:4 + ;;@ ~lib/memory.ts:285:2 (set_local $3 - ;;@ ~lib/memory.ts:58:8 + ;;@ ~lib/memory.ts:285:6 (i32.add (i32.const 24) - ;;@ ~lib/memory.ts:58:13 + ;;@ ~lib/memory.ts:285:11 (i32.and - ;;@ ~lib/memory.ts:58:14 + ;;@ ~lib/memory.ts:285:12 (get_local $0) - ;;@ ~lib/memory.ts:58:21 + ;;@ ~lib/memory.ts:285:19 (i32.const 4) ) ) ) - ;;@ ~lib/memory.ts:59:4 + ;;@ ~lib/memory.ts:286:2 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:59:12 + ;;@ ~lib/memory.ts:286:10 (get_local $3) ) ) - ;;@ ~lib/memory.ts:60:4 + ;;@ ~lib/memory.ts:287:2 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:60:9 + ;;@ ~lib/memory.ts:287:7 (get_local $3) ) ) - ;;@ ~lib/memory.ts:63:4 + ;;@ ~lib/memory.ts:290:2 (set_local $5 - ;;@ ~lib/memory.ts:63:19 + ;;@ ~lib/memory.ts:290:17 (i64.or (i64.extend_u/i32 (get_local $4) ) - ;;@ ~lib/memory.ts:63:30 + ;;@ ~lib/memory.ts:290:28 (i64.shl - ;;@ ~lib/memory.ts:63:31 + ;;@ ~lib/memory.ts:290:29 (i64.extend_u/i32 (get_local $4) ) - ;;@ ~lib/memory.ts:63:43 + ;;@ ~lib/memory.ts:290:41 (i64.const 32) ) ) ) - ;;@ ~lib/memory.ts:64:4 + ;;@ ~lib/memory.ts:291:2 (block $break|0 (loop $continue|0 (if - ;;@ ~lib/memory.ts:64:11 + ;;@ ~lib/memory.ts:291:9 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:64:16 + ;;@ ~lib/memory.ts:291:14 (i32.const 32) ) (block (block - ;;@ ~lib/memory.ts:65:6 + ;;@ ~lib/memory.ts:292:4 (i64.store - ;;@ ~lib/memory.ts:65:17 + ;;@ ~lib/memory.ts:292:15 (get_local $0) - ;;@ ~lib/memory.ts:65:23 + ;;@ ~lib/memory.ts:292:21 (get_local $5) ) - ;;@ ~lib/memory.ts:66:6 + ;;@ ~lib/memory.ts:293:4 (i64.store - ;;@ ~lib/memory.ts:66:17 + ;;@ ~lib/memory.ts:293:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:66:24 + ;;@ ~lib/memory.ts:293:22 (i32.const 8) ) - ;;@ ~lib/memory.ts:66:27 + ;;@ ~lib/memory.ts:293:25 (get_local $5) ) - ;;@ ~lib/memory.ts:67:6 + ;;@ ~lib/memory.ts:294:4 (i64.store - ;;@ ~lib/memory.ts:67:17 + ;;@ ~lib/memory.ts:294:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:67:24 + ;;@ ~lib/memory.ts:294:22 (i32.const 16) ) - ;;@ ~lib/memory.ts:67:28 + ;;@ ~lib/memory.ts:294:26 (get_local $5) ) - ;;@ ~lib/memory.ts:68:6 + ;;@ ~lib/memory.ts:295:4 (i64.store - ;;@ ~lib/memory.ts:68:17 + ;;@ ~lib/memory.ts:295:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:68:24 + ;;@ ~lib/memory.ts:295:22 (i32.const 24) ) - ;;@ ~lib/memory.ts:68:28 + ;;@ ~lib/memory.ts:295:26 (get_local $5) ) - ;;@ ~lib/memory.ts:69:6 + ;;@ ~lib/memory.ts:296:4 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:69:11 + ;;@ ~lib/memory.ts:296:9 (i32.const 32) ) ) - ;;@ ~lib/memory.ts:70:6 + ;;@ ~lib/memory.ts:297:4 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:70:14 + ;;@ ~lib/memory.ts:297:12 (i32.const 32) ) ) @@ -570,31 +557,42 @@ ) ) ) - (func $~lib/memory/memcpy (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + ;;@ ~lib/memory.ts:11:4 + (call $~lib/memory/memset + ;;@ ~lib/memory.ts:11:11 + (get_local $0) + ;;@ ~lib/memory.ts:11:17 + (get_local $1) + ;;@ ~lib/memory.ts:11:20 + (get_local $2) + ) + ) + (func $~lib/memory/memcpy (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - ;;@ ~lib/memory.ts:164:2 + ;;@ ~lib/memory.ts:59:2 (block $break|0 (loop $continue|0 (if - ;;@ ~lib/memory.ts:164:9 + ;;@ ~lib/memory.ts:59:9 (if (result i32) (get_local $2) - ;;@ ~lib/memory.ts:164:14 + ;;@ ~lib/memory.ts:59:14 (i32.and - ;;@ ~lib/memory.ts:164:15 + ;;@ ~lib/memory.ts:59:15 (get_local $1) - ;;@ ~lib/memory.ts:164:21 + ;;@ ~lib/memory.ts:59:21 (i32.const 3) ) (get_local $2) ) (block (block - ;;@ ~lib/memory.ts:165:4 + ;;@ ~lib/memory.ts:60:4 (i32.store8 - ;;@ ~lib/memory.ts:165:14 + ;;@ ~lib/memory.ts:60:14 (block (result i32) (set_local $5 (get_local $0) @@ -607,9 +605,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:165:22 + ;;@ ~lib/memory.ts:60:22 (i32.load8_u - ;;@ ~lib/memory.ts:165:31 + ;;@ ~lib/memory.ts:60:31 (block (result i32) (set_local $5 (get_local $1) @@ -624,7 +622,7 @@ ) ) ) - ;;@ ~lib/memory.ts:166:4 + ;;@ ~lib/memory.ts:61:4 (set_local $2 (i32.sub (get_local $2) @@ -637,117 +635,117 @@ ) ) ) - ;;@ ~lib/memory.ts:170:2 + ;;@ ~lib/memory.ts:65:2 (if - ;;@ ~lib/memory.ts:170:6 + ;;@ ~lib/memory.ts:65:6 (i32.eq (i32.and - ;;@ ~lib/memory.ts:170:7 + ;;@ ~lib/memory.ts:65:7 (get_local $0) - ;;@ ~lib/memory.ts:170:14 + ;;@ ~lib/memory.ts:65:14 (i32.const 3) ) - ;;@ ~lib/memory.ts:170:20 + ;;@ ~lib/memory.ts:65:20 (i32.const 0) ) - ;;@ ~lib/memory.ts:170:23 + ;;@ ~lib/memory.ts:65:23 (block (block $break|1 (loop $continue|1 (if - ;;@ ~lib/memory.ts:171:11 + ;;@ ~lib/memory.ts:66:11 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:171:16 + ;;@ ~lib/memory.ts:66:16 (i32.const 16) ) (block (block - ;;@ ~lib/memory.ts:172:6 + ;;@ ~lib/memory.ts:67:6 (i32.store - ;;@ ~lib/memory.ts:172:17 + ;;@ ~lib/memory.ts:67:17 (get_local $0) - ;;@ ~lib/memory.ts:172:28 + ;;@ ~lib/memory.ts:67:28 (i32.load - ;;@ ~lib/memory.ts:172:38 + ;;@ ~lib/memory.ts:67:38 (get_local $1) ) ) - ;;@ ~lib/memory.ts:173:6 + ;;@ ~lib/memory.ts:68:6 (i32.store - ;;@ ~lib/memory.ts:173:17 + ;;@ ~lib/memory.ts:68:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:173:25 + ;;@ ~lib/memory.ts:68:25 (i32.const 4) ) - ;;@ ~lib/memory.ts:173:28 + ;;@ ~lib/memory.ts:68:28 (i32.load - ;;@ ~lib/memory.ts:173:38 + ;;@ ~lib/memory.ts:68:38 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:173:45 + ;;@ ~lib/memory.ts:68:45 (i32.const 4) ) ) ) - ;;@ ~lib/memory.ts:174:6 + ;;@ ~lib/memory.ts:69:6 (i32.store - ;;@ ~lib/memory.ts:174:17 + ;;@ ~lib/memory.ts:69:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:174:25 + ;;@ ~lib/memory.ts:69:25 (i32.const 8) ) - ;;@ ~lib/memory.ts:174:28 + ;;@ ~lib/memory.ts:69:28 (i32.load - ;;@ ~lib/memory.ts:174:38 + ;;@ ~lib/memory.ts:69:38 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:174:45 + ;;@ ~lib/memory.ts:69:45 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:175:6 + ;;@ ~lib/memory.ts:70:6 (i32.store - ;;@ ~lib/memory.ts:175:17 + ;;@ ~lib/memory.ts:70:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:175:24 + ;;@ ~lib/memory.ts:70:24 (i32.const 12) ) - ;;@ ~lib/memory.ts:175:28 + ;;@ ~lib/memory.ts:70:28 (i32.load - ;;@ ~lib/memory.ts:175:38 + ;;@ ~lib/memory.ts:70:38 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:175:44 + ;;@ ~lib/memory.ts:70:44 (i32.const 12) ) ) ) - ;;@ ~lib/memory.ts:176:6 + ;;@ ~lib/memory.ts:71:6 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:176:13 + ;;@ ~lib/memory.ts:71:13 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:176:17 + ;;@ ~lib/memory.ts:71:17 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:176:25 + ;;@ ~lib/memory.ts:71:25 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:176:29 + ;;@ ~lib/memory.ts:71:29 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:176:34 + ;;@ ~lib/memory.ts:71:34 (i32.const 16) ) ) @@ -757,149 +755,149 @@ ) ) ) - ;;@ ~lib/memory.ts:178:4 + ;;@ ~lib/memory.ts:73:4 (if - ;;@ ~lib/memory.ts:178:8 + ;;@ ~lib/memory.ts:73:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:178:12 + ;;@ ~lib/memory.ts:73:12 (i32.const 8) ) - ;;@ ~lib/memory.ts:178:15 + ;;@ ~lib/memory.ts:73:15 (block - ;;@ ~lib/memory.ts:179:6 + ;;@ ~lib/memory.ts:74:6 (i32.store - ;;@ ~lib/memory.ts:179:17 + ;;@ ~lib/memory.ts:74:17 (get_local $0) - ;;@ ~lib/memory.ts:179:27 + ;;@ ~lib/memory.ts:74:27 (i32.load - ;;@ ~lib/memory.ts:179:37 + ;;@ ~lib/memory.ts:74:37 (get_local $1) ) ) - ;;@ ~lib/memory.ts:180:6 + ;;@ ~lib/memory.ts:75:6 (i32.store - ;;@ ~lib/memory.ts:180:17 + ;;@ ~lib/memory.ts:75:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:180:24 + ;;@ ~lib/memory.ts:75:24 (i32.const 4) ) - ;;@ ~lib/memory.ts:180:27 + ;;@ ~lib/memory.ts:75:27 (i32.load - ;;@ ~lib/memory.ts:180:37 + ;;@ ~lib/memory.ts:75:37 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:180:43 + ;;@ ~lib/memory.ts:75:43 (i32.const 4) ) ) ) - ;;@ ~lib/memory.ts:181:6 + ;;@ ~lib/memory.ts:76:6 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:181:14 + ;;@ ~lib/memory.ts:76:14 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:181:17 + ;;@ ~lib/memory.ts:76:17 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:181:24 + ;;@ ~lib/memory.ts:76:24 (i32.const 8) ) ) ) ) - ;;@ ~lib/memory.ts:183:4 + ;;@ ~lib/memory.ts:78:4 (if - ;;@ ~lib/memory.ts:183:8 + ;;@ ~lib/memory.ts:78:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:183:12 + ;;@ ~lib/memory.ts:78:12 (i32.const 4) ) - ;;@ ~lib/memory.ts:183:15 + ;;@ ~lib/memory.ts:78:15 (block - ;;@ ~lib/memory.ts:184:6 + ;;@ ~lib/memory.ts:79:6 (i32.store - ;;@ ~lib/memory.ts:184:17 + ;;@ ~lib/memory.ts:79:17 (get_local $0) - ;;@ ~lib/memory.ts:184:23 + ;;@ ~lib/memory.ts:79:23 (i32.load - ;;@ ~lib/memory.ts:184:33 + ;;@ ~lib/memory.ts:79:33 (get_local $1) ) ) - ;;@ ~lib/memory.ts:185:6 + ;;@ ~lib/memory.ts:80:6 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:185:14 + ;;@ ~lib/memory.ts:80:14 (i32.const 4) ) ) - ;;@ ~lib/memory.ts:185:17 + ;;@ ~lib/memory.ts:80:17 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:185:24 + ;;@ ~lib/memory.ts:80:24 (i32.const 4) ) ) ) ) - ;;@ ~lib/memory.ts:187:4 + ;;@ ~lib/memory.ts:82:4 (if - ;;@ ~lib/memory.ts:187:8 + ;;@ ~lib/memory.ts:82:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:187:12 + ;;@ ~lib/memory.ts:82:12 (i32.const 2) ) - ;;@ ~lib/memory.ts:187:15 + ;;@ ~lib/memory.ts:82:15 (block - ;;@ ~lib/memory.ts:188:6 + ;;@ ~lib/memory.ts:83:6 (i32.store16 - ;;@ ~lib/memory.ts:188:17 + ;;@ ~lib/memory.ts:83:17 (get_local $0) - ;;@ ~lib/memory.ts:188:23 + ;;@ ~lib/memory.ts:83:23 (i32.load16_u - ;;@ ~lib/memory.ts:188:33 + ;;@ ~lib/memory.ts:83:33 (get_local $1) ) ) - ;;@ ~lib/memory.ts:189:6 + ;;@ ~lib/memory.ts:84:6 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:189:14 + ;;@ ~lib/memory.ts:84:14 (i32.const 2) ) ) - ;;@ ~lib/memory.ts:189:17 + ;;@ ~lib/memory.ts:84:17 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:189:24 + ;;@ ~lib/memory.ts:84:24 (i32.const 2) ) ) ) ) - ;;@ ~lib/memory.ts:191:4 + ;;@ ~lib/memory.ts:86:4 (if - ;;@ ~lib/memory.ts:191:8 + ;;@ ~lib/memory.ts:86:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:191:12 + ;;@ ~lib/memory.ts:86:12 (i32.const 1) ) - ;;@ ~lib/memory.ts:191:15 + ;;@ ~lib/memory.ts:86:15 (i32.store8 - ;;@ ~lib/memory.ts:192:16 + ;;@ ~lib/memory.ts:87:16 (block (result i32) (set_local $5 (get_local $0) @@ -912,9 +910,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:192:24 + ;;@ ~lib/memory.ts:87:24 (i32.load8_u - ;;@ ~lib/memory.ts:192:33 + ;;@ ~lib/memory.ts:87:33 (block (result i32) (set_local $5 (get_local $1) @@ -930,67 +928,67 @@ ) ) ) - ;;@ ~lib/memory.ts:194:4 + ;;@ ~lib/memory.ts:89:4 (return) ) ) - ;;@ ~lib/memory.ts:199:2 + ;;@ ~lib/memory.ts:94:2 (if - ;;@ ~lib/memory.ts:199:6 + ;;@ ~lib/memory.ts:94:6 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:199:11 + ;;@ ~lib/memory.ts:94:11 (i32.const 32) ) - ;;@ ~lib/memory.ts:199:15 + ;;@ ~lib/memory.ts:94:15 (block $break|2 (block $case2|2 (block $case1|2 (block $case0|2 (set_local $5 - ;;@ ~lib/memory.ts:200:12 + ;;@ ~lib/memory.ts:95:12 (i32.and (get_local $0) - ;;@ ~lib/memory.ts:200:19 + ;;@ ~lib/memory.ts:95:19 (i32.const 3) ) ) (br_if $case0|2 (i32.eq (get_local $5) - ;;@ ~lib/memory.ts:202:11 + ;;@ ~lib/memory.ts:97:11 (i32.const 1) ) ) (br_if $case1|2 (i32.eq (get_local $5) - ;;@ ~lib/memory.ts:221:11 + ;;@ ~lib/memory.ts:116:11 (i32.const 2) ) ) (br_if $case2|2 (i32.eq (get_local $5) - ;;@ ~lib/memory.ts:239:11 + ;;@ ~lib/memory.ts:134:11 (i32.const 3) ) ) (br $break|2) ) - ;;@ ~lib/memory.ts:202:14 + ;;@ ~lib/memory.ts:97:14 (block - ;;@ ~lib/memory.ts:203:8 + ;;@ ~lib/memory.ts:98:8 (set_local $3 - ;;@ ~lib/memory.ts:203:12 + ;;@ ~lib/memory.ts:98:12 (i32.load - ;;@ ~lib/memory.ts:203:22 + ;;@ ~lib/memory.ts:98:22 (get_local $1) ) ) - ;;@ ~lib/memory.ts:204:8 + ;;@ ~lib/memory.ts:99:8 (i32.store8 - ;;@ ~lib/memory.ts:204:18 + ;;@ ~lib/memory.ts:99:18 (block (result i32) (set_local $5 (get_local $0) @@ -1003,9 +1001,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:204:26 + ;;@ ~lib/memory.ts:99:26 (i32.load8_u - ;;@ ~lib/memory.ts:204:35 + ;;@ ~lib/memory.ts:99:35 (block (result i32) (set_local $5 (get_local $1) @@ -1020,9 +1018,9 @@ ) ) ) - ;;@ ~lib/memory.ts:205:8 + ;;@ ~lib/memory.ts:100:8 (i32.store8 - ;;@ ~lib/memory.ts:205:18 + ;;@ ~lib/memory.ts:100:18 (block (result i32) (set_local $5 (get_local $0) @@ -1035,9 +1033,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:205:26 + ;;@ ~lib/memory.ts:100:26 (i32.load8_u - ;;@ ~lib/memory.ts:205:35 + ;;@ ~lib/memory.ts:100:35 (block (result i32) (set_local $5 (get_local $1) @@ -1052,9 +1050,9 @@ ) ) ) - ;;@ ~lib/memory.ts:206:8 + ;;@ ~lib/memory.ts:101:8 (i32.store8 - ;;@ ~lib/memory.ts:206:18 + ;;@ ~lib/memory.ts:101:18 (block (result i32) (set_local $5 (get_local $0) @@ -1067,9 +1065,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:206:26 + ;;@ ~lib/memory.ts:101:26 (i32.load8_u - ;;@ ~lib/memory.ts:206:35 + ;;@ ~lib/memory.ts:101:35 (block (result i32) (set_local $5 (get_local $1) @@ -1084,183 +1082,183 @@ ) ) ) - ;;@ ~lib/memory.ts:207:8 + ;;@ ~lib/memory.ts:102:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:207:13 + ;;@ ~lib/memory.ts:102:13 (i32.const 3) ) ) - ;;@ ~lib/memory.ts:208:8 + ;;@ ~lib/memory.ts:103:8 (block $break|3 (loop $continue|3 (if - ;;@ ~lib/memory.ts:208:15 + ;;@ ~lib/memory.ts:103:15 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:208:20 + ;;@ ~lib/memory.ts:103:20 (i32.const 17) ) (block (block - ;;@ ~lib/memory.ts:209:10 + ;;@ ~lib/memory.ts:104:10 (set_local $4 - ;;@ ~lib/memory.ts:209:14 + ;;@ ~lib/memory.ts:104:14 (i32.load - ;;@ ~lib/memory.ts:209:24 + ;;@ ~lib/memory.ts:104:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:209:30 + ;;@ ~lib/memory.ts:104:30 (i32.const 1) ) ) ) - ;;@ ~lib/memory.ts:210:10 + ;;@ ~lib/memory.ts:105:10 (i32.store - ;;@ ~lib/memory.ts:210:21 + ;;@ ~lib/memory.ts:105:21 (get_local $0) - ;;@ ~lib/memory.ts:210:27 + ;;@ ~lib/memory.ts:105:27 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:210:32 + ;;@ ~lib/memory.ts:105:32 (i32.const 24) ) - ;;@ ~lib/memory.ts:210:37 + ;;@ ~lib/memory.ts:105:37 (i32.shl (get_local $4) - ;;@ ~lib/memory.ts:210:42 + ;;@ ~lib/memory.ts:105:42 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:211:10 + ;;@ ~lib/memory.ts:106:10 (set_local $3 - ;;@ ~lib/memory.ts:211:14 + ;;@ ~lib/memory.ts:106:14 (i32.load - ;;@ ~lib/memory.ts:211:24 + ;;@ ~lib/memory.ts:106:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:211:30 + ;;@ ~lib/memory.ts:106:30 (i32.const 5) ) ) ) - ;;@ ~lib/memory.ts:212:10 + ;;@ ~lib/memory.ts:107:10 (i32.store - ;;@ ~lib/memory.ts:212:21 + ;;@ ~lib/memory.ts:107:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:212:28 + ;;@ ~lib/memory.ts:107:28 (i32.const 4) ) - ;;@ ~lib/memory.ts:212:31 + ;;@ ~lib/memory.ts:107:31 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:212:36 + ;;@ ~lib/memory.ts:107:36 (i32.const 24) ) - ;;@ ~lib/memory.ts:212:41 + ;;@ ~lib/memory.ts:107:41 (i32.shl (get_local $3) - ;;@ ~lib/memory.ts:212:46 + ;;@ ~lib/memory.ts:107:46 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:213:10 + ;;@ ~lib/memory.ts:108:10 (set_local $4 - ;;@ ~lib/memory.ts:213:14 + ;;@ ~lib/memory.ts:108:14 (i32.load - ;;@ ~lib/memory.ts:213:24 + ;;@ ~lib/memory.ts:108:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:213:30 + ;;@ ~lib/memory.ts:108:30 (i32.const 9) ) ) ) - ;;@ ~lib/memory.ts:214:10 + ;;@ ~lib/memory.ts:109:10 (i32.store - ;;@ ~lib/memory.ts:214:21 + ;;@ ~lib/memory.ts:109:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:214:28 + ;;@ ~lib/memory.ts:109:28 (i32.const 8) ) - ;;@ ~lib/memory.ts:214:31 + ;;@ ~lib/memory.ts:109:31 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:214:36 + ;;@ ~lib/memory.ts:109:36 (i32.const 24) ) - ;;@ ~lib/memory.ts:214:41 + ;;@ ~lib/memory.ts:109:41 (i32.shl (get_local $4) - ;;@ ~lib/memory.ts:214:46 + ;;@ ~lib/memory.ts:109:46 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:215:10 + ;;@ ~lib/memory.ts:110:10 (set_local $3 - ;;@ ~lib/memory.ts:215:14 + ;;@ ~lib/memory.ts:110:14 (i32.load - ;;@ ~lib/memory.ts:215:24 + ;;@ ~lib/memory.ts:110:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:215:30 + ;;@ ~lib/memory.ts:110:30 (i32.const 13) ) ) ) - ;;@ ~lib/memory.ts:216:10 + ;;@ ~lib/memory.ts:111:10 (i32.store - ;;@ ~lib/memory.ts:216:21 + ;;@ ~lib/memory.ts:111:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:216:28 + ;;@ ~lib/memory.ts:111:28 (i32.const 12) ) - ;;@ ~lib/memory.ts:216:32 + ;;@ ~lib/memory.ts:111:32 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:216:37 + ;;@ ~lib/memory.ts:111:37 (i32.const 24) ) - ;;@ ~lib/memory.ts:216:42 + ;;@ ~lib/memory.ts:111:42 (i32.shl (get_local $3) - ;;@ ~lib/memory.ts:216:47 + ;;@ ~lib/memory.ts:111:47 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:217:10 + ;;@ ~lib/memory.ts:112:10 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:217:17 + ;;@ ~lib/memory.ts:112:17 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:217:21 + ;;@ ~lib/memory.ts:112:21 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:217:29 + ;;@ ~lib/memory.ts:112:29 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:217:33 + ;;@ ~lib/memory.ts:112:33 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:217:38 + ;;@ ~lib/memory.ts:112:38 (i32.const 16) ) ) @@ -1270,23 +1268,23 @@ ) ) ) - ;;@ ~lib/memory.ts:219:8 + ;;@ ~lib/memory.ts:114:8 (br $break|2) ) ) - ;;@ ~lib/memory.ts:221:14 + ;;@ ~lib/memory.ts:116:14 (block - ;;@ ~lib/memory.ts:222:8 + ;;@ ~lib/memory.ts:117:8 (set_local $3 - ;;@ ~lib/memory.ts:222:12 + ;;@ ~lib/memory.ts:117:12 (i32.load - ;;@ ~lib/memory.ts:222:22 + ;;@ ~lib/memory.ts:117:22 (get_local $1) ) ) - ;;@ ~lib/memory.ts:223:8 + ;;@ ~lib/memory.ts:118:8 (i32.store8 - ;;@ ~lib/memory.ts:223:18 + ;;@ ~lib/memory.ts:118:18 (block (result i32) (set_local $5 (get_local $0) @@ -1299,9 +1297,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:223:26 + ;;@ ~lib/memory.ts:118:26 (i32.load8_u - ;;@ ~lib/memory.ts:223:35 + ;;@ ~lib/memory.ts:118:35 (block (result i32) (set_local $5 (get_local $1) @@ -1316,9 +1314,9 @@ ) ) ) - ;;@ ~lib/memory.ts:224:8 + ;;@ ~lib/memory.ts:119:8 (i32.store8 - ;;@ ~lib/memory.ts:224:18 + ;;@ ~lib/memory.ts:119:18 (block (result i32) (set_local $5 (get_local $0) @@ -1331,9 +1329,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:224:26 + ;;@ ~lib/memory.ts:119:26 (i32.load8_u - ;;@ ~lib/memory.ts:224:35 + ;;@ ~lib/memory.ts:119:35 (block (result i32) (set_local $5 (get_local $1) @@ -1348,183 +1346,183 @@ ) ) ) - ;;@ ~lib/memory.ts:225:8 + ;;@ ~lib/memory.ts:120:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:225:13 + ;;@ ~lib/memory.ts:120:13 (i32.const 2) ) ) - ;;@ ~lib/memory.ts:226:8 + ;;@ ~lib/memory.ts:121:8 (block $break|4 (loop $continue|4 (if - ;;@ ~lib/memory.ts:226:15 + ;;@ ~lib/memory.ts:121:15 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:226:20 + ;;@ ~lib/memory.ts:121:20 (i32.const 18) ) (block (block - ;;@ ~lib/memory.ts:227:10 + ;;@ ~lib/memory.ts:122:10 (set_local $4 - ;;@ ~lib/memory.ts:227:14 + ;;@ ~lib/memory.ts:122:14 (i32.load - ;;@ ~lib/memory.ts:227:24 + ;;@ ~lib/memory.ts:122:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:227:30 + ;;@ ~lib/memory.ts:122:30 (i32.const 2) ) ) ) - ;;@ ~lib/memory.ts:228:10 + ;;@ ~lib/memory.ts:123:10 (i32.store - ;;@ ~lib/memory.ts:228:21 + ;;@ ~lib/memory.ts:123:21 (get_local $0) - ;;@ ~lib/memory.ts:228:27 + ;;@ ~lib/memory.ts:123:27 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:228:32 + ;;@ ~lib/memory.ts:123:32 (i32.const 16) ) - ;;@ ~lib/memory.ts:228:37 + ;;@ ~lib/memory.ts:123:37 (i32.shl (get_local $4) - ;;@ ~lib/memory.ts:228:42 + ;;@ ~lib/memory.ts:123:42 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:229:10 + ;;@ ~lib/memory.ts:124:10 (set_local $3 - ;;@ ~lib/memory.ts:229:14 + ;;@ ~lib/memory.ts:124:14 (i32.load - ;;@ ~lib/memory.ts:229:24 + ;;@ ~lib/memory.ts:124:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:229:30 + ;;@ ~lib/memory.ts:124:30 (i32.const 6) ) ) ) - ;;@ ~lib/memory.ts:230:10 + ;;@ ~lib/memory.ts:125:10 (i32.store - ;;@ ~lib/memory.ts:230:21 + ;;@ ~lib/memory.ts:125:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:230:28 + ;;@ ~lib/memory.ts:125:28 (i32.const 4) ) - ;;@ ~lib/memory.ts:230:31 + ;;@ ~lib/memory.ts:125:31 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:230:36 + ;;@ ~lib/memory.ts:125:36 (i32.const 16) ) - ;;@ ~lib/memory.ts:230:41 + ;;@ ~lib/memory.ts:125:41 (i32.shl (get_local $3) - ;;@ ~lib/memory.ts:230:46 + ;;@ ~lib/memory.ts:125:46 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:231:10 + ;;@ ~lib/memory.ts:126:10 (set_local $4 - ;;@ ~lib/memory.ts:231:14 + ;;@ ~lib/memory.ts:126:14 (i32.load - ;;@ ~lib/memory.ts:231:24 + ;;@ ~lib/memory.ts:126:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:231:30 + ;;@ ~lib/memory.ts:126:30 (i32.const 10) ) ) ) - ;;@ ~lib/memory.ts:232:10 + ;;@ ~lib/memory.ts:127:10 (i32.store - ;;@ ~lib/memory.ts:232:21 + ;;@ ~lib/memory.ts:127:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:232:28 + ;;@ ~lib/memory.ts:127:28 (i32.const 8) ) - ;;@ ~lib/memory.ts:232:31 + ;;@ ~lib/memory.ts:127:31 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:232:36 + ;;@ ~lib/memory.ts:127:36 (i32.const 16) ) - ;;@ ~lib/memory.ts:232:41 + ;;@ ~lib/memory.ts:127:41 (i32.shl (get_local $4) - ;;@ ~lib/memory.ts:232:46 + ;;@ ~lib/memory.ts:127:46 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:233:10 + ;;@ ~lib/memory.ts:128:10 (set_local $3 - ;;@ ~lib/memory.ts:233:14 + ;;@ ~lib/memory.ts:128:14 (i32.load - ;;@ ~lib/memory.ts:233:24 + ;;@ ~lib/memory.ts:128:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:233:30 + ;;@ ~lib/memory.ts:128:30 (i32.const 14) ) ) ) - ;;@ ~lib/memory.ts:234:10 + ;;@ ~lib/memory.ts:129:10 (i32.store - ;;@ ~lib/memory.ts:234:21 + ;;@ ~lib/memory.ts:129:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:234:28 + ;;@ ~lib/memory.ts:129:28 (i32.const 12) ) - ;;@ ~lib/memory.ts:234:32 + ;;@ ~lib/memory.ts:129:32 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:234:37 + ;;@ ~lib/memory.ts:129:37 (i32.const 16) ) - ;;@ ~lib/memory.ts:234:42 + ;;@ ~lib/memory.ts:129:42 (i32.shl (get_local $3) - ;;@ ~lib/memory.ts:234:47 + ;;@ ~lib/memory.ts:129:47 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:235:10 + ;;@ ~lib/memory.ts:130:10 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:235:17 + ;;@ ~lib/memory.ts:130:17 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:235:21 + ;;@ ~lib/memory.ts:130:21 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:235:29 + ;;@ ~lib/memory.ts:130:29 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:235:33 + ;;@ ~lib/memory.ts:130:33 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:235:38 + ;;@ ~lib/memory.ts:130:38 (i32.const 16) ) ) @@ -1534,23 +1532,23 @@ ) ) ) - ;;@ ~lib/memory.ts:237:8 + ;;@ ~lib/memory.ts:132:8 (br $break|2) ) ) - ;;@ ~lib/memory.ts:239:14 + ;;@ ~lib/memory.ts:134:14 (block - ;;@ ~lib/memory.ts:240:8 + ;;@ ~lib/memory.ts:135:8 (set_local $3 - ;;@ ~lib/memory.ts:240:12 + ;;@ ~lib/memory.ts:135:12 (i32.load - ;;@ ~lib/memory.ts:240:22 + ;;@ ~lib/memory.ts:135:22 (get_local $1) ) ) - ;;@ ~lib/memory.ts:241:8 + ;;@ ~lib/memory.ts:136:8 (i32.store8 - ;;@ ~lib/memory.ts:241:18 + ;;@ ~lib/memory.ts:136:18 (block (result i32) (set_local $5 (get_local $0) @@ -1563,9 +1561,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:241:26 + ;;@ ~lib/memory.ts:136:26 (i32.load8_u - ;;@ ~lib/memory.ts:241:35 + ;;@ ~lib/memory.ts:136:35 (block (result i32) (set_local $5 (get_local $1) @@ -1580,183 +1578,183 @@ ) ) ) - ;;@ ~lib/memory.ts:242:8 + ;;@ ~lib/memory.ts:137:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:242:13 + ;;@ ~lib/memory.ts:137:13 (i32.const 1) ) ) - ;;@ ~lib/memory.ts:243:8 + ;;@ ~lib/memory.ts:138:8 (block $break|5 (loop $continue|5 (if - ;;@ ~lib/memory.ts:243:15 + ;;@ ~lib/memory.ts:138:15 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:243:20 + ;;@ ~lib/memory.ts:138:20 (i32.const 19) ) (block (block - ;;@ ~lib/memory.ts:244:10 + ;;@ ~lib/memory.ts:139:10 (set_local $4 - ;;@ ~lib/memory.ts:244:14 + ;;@ ~lib/memory.ts:139:14 (i32.load - ;;@ ~lib/memory.ts:244:24 + ;;@ ~lib/memory.ts:139:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:244:30 + ;;@ ~lib/memory.ts:139:30 (i32.const 3) ) ) ) - ;;@ ~lib/memory.ts:245:10 + ;;@ ~lib/memory.ts:140:10 (i32.store - ;;@ ~lib/memory.ts:245:21 + ;;@ ~lib/memory.ts:140:21 (get_local $0) - ;;@ ~lib/memory.ts:245:27 + ;;@ ~lib/memory.ts:140:27 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:245:32 + ;;@ ~lib/memory.ts:140:32 (i32.const 8) ) - ;;@ ~lib/memory.ts:245:36 + ;;@ ~lib/memory.ts:140:36 (i32.shl (get_local $4) - ;;@ ~lib/memory.ts:245:41 + ;;@ ~lib/memory.ts:140:41 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:246:10 + ;;@ ~lib/memory.ts:141:10 (set_local $3 - ;;@ ~lib/memory.ts:246:14 + ;;@ ~lib/memory.ts:141:14 (i32.load - ;;@ ~lib/memory.ts:246:24 + ;;@ ~lib/memory.ts:141:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:246:30 + ;;@ ~lib/memory.ts:141:30 (i32.const 7) ) ) ) - ;;@ ~lib/memory.ts:247:10 + ;;@ ~lib/memory.ts:142:10 (i32.store - ;;@ ~lib/memory.ts:247:21 + ;;@ ~lib/memory.ts:142:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:247:28 + ;;@ ~lib/memory.ts:142:28 (i32.const 4) ) - ;;@ ~lib/memory.ts:247:31 + ;;@ ~lib/memory.ts:142:31 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:247:36 + ;;@ ~lib/memory.ts:142:36 (i32.const 8) ) - ;;@ ~lib/memory.ts:247:40 + ;;@ ~lib/memory.ts:142:40 (i32.shl (get_local $3) - ;;@ ~lib/memory.ts:247:45 + ;;@ ~lib/memory.ts:142:45 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:248:10 + ;;@ ~lib/memory.ts:143:10 (set_local $4 - ;;@ ~lib/memory.ts:248:14 + ;;@ ~lib/memory.ts:143:14 (i32.load - ;;@ ~lib/memory.ts:248:24 + ;;@ ~lib/memory.ts:143:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:248:30 + ;;@ ~lib/memory.ts:143:30 (i32.const 11) ) ) ) - ;;@ ~lib/memory.ts:249:10 + ;;@ ~lib/memory.ts:144:10 (i32.store - ;;@ ~lib/memory.ts:249:21 + ;;@ ~lib/memory.ts:144:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:249:28 + ;;@ ~lib/memory.ts:144:28 (i32.const 8) ) - ;;@ ~lib/memory.ts:249:31 + ;;@ ~lib/memory.ts:144:31 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:249:36 + ;;@ ~lib/memory.ts:144:36 (i32.const 8) ) - ;;@ ~lib/memory.ts:249:40 + ;;@ ~lib/memory.ts:144:40 (i32.shl (get_local $4) - ;;@ ~lib/memory.ts:249:45 + ;;@ ~lib/memory.ts:144:45 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:250:10 + ;;@ ~lib/memory.ts:145:10 (set_local $3 - ;;@ ~lib/memory.ts:250:14 + ;;@ ~lib/memory.ts:145:14 (i32.load - ;;@ ~lib/memory.ts:250:24 + ;;@ ~lib/memory.ts:145:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:250:30 + ;;@ ~lib/memory.ts:145:30 (i32.const 15) ) ) ) - ;;@ ~lib/memory.ts:251:10 + ;;@ ~lib/memory.ts:146:10 (i32.store - ;;@ ~lib/memory.ts:251:21 + ;;@ ~lib/memory.ts:146:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:251:28 + ;;@ ~lib/memory.ts:146:28 (i32.const 12) ) - ;;@ ~lib/memory.ts:251:32 + ;;@ ~lib/memory.ts:146:32 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:251:37 + ;;@ ~lib/memory.ts:146:37 (i32.const 8) ) - ;;@ ~lib/memory.ts:251:41 + ;;@ ~lib/memory.ts:146:41 (i32.shl (get_local $3) - ;;@ ~lib/memory.ts:251:46 + ;;@ ~lib/memory.ts:146:46 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:252:10 + ;;@ ~lib/memory.ts:147:10 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:252:17 + ;;@ ~lib/memory.ts:147:17 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:252:21 + ;;@ ~lib/memory.ts:147:21 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:252:29 + ;;@ ~lib/memory.ts:147:29 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:252:33 + ;;@ ~lib/memory.ts:147:33 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:252:38 + ;;@ ~lib/memory.ts:147:38 (i32.const 16) ) ) @@ -1766,24 +1764,24 @@ ) ) ) - ;;@ ~lib/memory.ts:254:8 + ;;@ ~lib/memory.ts:149:8 (br $break|2) ) ) ) - ;;@ ~lib/memory.ts:260:2 + ;;@ ~lib/memory.ts:155:2 (if - ;;@ ~lib/memory.ts:260:6 + ;;@ ~lib/memory.ts:155:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:260:10 + ;;@ ~lib/memory.ts:155:10 (i32.const 16) ) - ;;@ ~lib/memory.ts:260:14 + ;;@ ~lib/memory.ts:155:14 (block - ;;@ ~lib/memory.ts:261:4 + ;;@ ~lib/memory.ts:156:4 (i32.store8 - ;;@ ~lib/memory.ts:261:14 + ;;@ ~lib/memory.ts:156:14 (block (result i32) (set_local $5 (get_local $0) @@ -1796,9 +1794,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:261:22 + ;;@ ~lib/memory.ts:156:22 (i32.load8_u - ;;@ ~lib/memory.ts:261:31 + ;;@ ~lib/memory.ts:156:31 (block (result i32) (set_local $5 (get_local $1) @@ -1813,9 +1811,9 @@ ) ) ) - ;;@ ~lib/memory.ts:262:4 + ;;@ ~lib/memory.ts:157:4 (i32.store8 - ;;@ ~lib/memory.ts:262:14 + ;;@ ~lib/memory.ts:157:14 (block (result i32) (set_local $5 (get_local $0) @@ -1828,9 +1826,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:262:22 + ;;@ ~lib/memory.ts:157:22 (i32.load8_u - ;;@ ~lib/memory.ts:262:31 + ;;@ ~lib/memory.ts:157:31 (block (result i32) (set_local $5 (get_local $1) @@ -1845,9 +1843,9 @@ ) ) ) - ;;@ ~lib/memory.ts:263:4 + ;;@ ~lib/memory.ts:158:4 (i32.store8 - ;;@ ~lib/memory.ts:263:14 + ;;@ ~lib/memory.ts:158:14 (block (result i32) (set_local $5 (get_local $0) @@ -1860,9 +1858,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:263:22 + ;;@ ~lib/memory.ts:158:22 (i32.load8_u - ;;@ ~lib/memory.ts:263:31 + ;;@ ~lib/memory.ts:158:31 (block (result i32) (set_local $5 (get_local $1) @@ -1877,9 +1875,9 @@ ) ) ) - ;;@ ~lib/memory.ts:264:4 + ;;@ ~lib/memory.ts:159:4 (i32.store8 - ;;@ ~lib/memory.ts:264:14 + ;;@ ~lib/memory.ts:159:14 (block (result i32) (set_local $5 (get_local $0) @@ -1892,9 +1890,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:264:22 + ;;@ ~lib/memory.ts:159:22 (i32.load8_u - ;;@ ~lib/memory.ts:264:31 + ;;@ ~lib/memory.ts:159:31 (block (result i32) (set_local $5 (get_local $1) @@ -1909,9 +1907,9 @@ ) ) ) - ;;@ ~lib/memory.ts:265:4 + ;;@ ~lib/memory.ts:160:4 (i32.store8 - ;;@ ~lib/memory.ts:265:14 + ;;@ ~lib/memory.ts:160:14 (block (result i32) (set_local $5 (get_local $0) @@ -1924,9 +1922,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:265:22 + ;;@ ~lib/memory.ts:160:22 (i32.load8_u - ;;@ ~lib/memory.ts:265:31 + ;;@ ~lib/memory.ts:160:31 (block (result i32) (set_local $5 (get_local $1) @@ -1941,9 +1939,9 @@ ) ) ) - ;;@ ~lib/memory.ts:266:4 + ;;@ ~lib/memory.ts:161:4 (i32.store8 - ;;@ ~lib/memory.ts:266:14 + ;;@ ~lib/memory.ts:161:14 (block (result i32) (set_local $5 (get_local $0) @@ -1956,9 +1954,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:266:22 + ;;@ ~lib/memory.ts:161:22 (i32.load8_u - ;;@ ~lib/memory.ts:266:31 + ;;@ ~lib/memory.ts:161:31 (block (result i32) (set_local $5 (get_local $1) @@ -1973,9 +1971,9 @@ ) ) ) - ;;@ ~lib/memory.ts:267:4 + ;;@ ~lib/memory.ts:162:4 (i32.store8 - ;;@ ~lib/memory.ts:267:14 + ;;@ ~lib/memory.ts:162:14 (block (result i32) (set_local $5 (get_local $0) @@ -1988,9 +1986,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:267:22 + ;;@ ~lib/memory.ts:162:22 (i32.load8_u - ;;@ ~lib/memory.ts:267:31 + ;;@ ~lib/memory.ts:162:31 (block (result i32) (set_local $5 (get_local $1) @@ -2005,9 +2003,9 @@ ) ) ) - ;;@ ~lib/memory.ts:268:4 + ;;@ ~lib/memory.ts:163:4 (i32.store8 - ;;@ ~lib/memory.ts:268:14 + ;;@ ~lib/memory.ts:163:14 (block (result i32) (set_local $5 (get_local $0) @@ -2020,9 +2018,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:268:22 + ;;@ ~lib/memory.ts:163:22 (i32.load8_u - ;;@ ~lib/memory.ts:268:31 + ;;@ ~lib/memory.ts:163:31 (block (result i32) (set_local $5 (get_local $1) @@ -2037,9 +2035,9 @@ ) ) ) - ;;@ ~lib/memory.ts:269:4 + ;;@ ~lib/memory.ts:164:4 (i32.store8 - ;;@ ~lib/memory.ts:269:14 + ;;@ ~lib/memory.ts:164:14 (block (result i32) (set_local $5 (get_local $0) @@ -2052,9 +2050,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:269:22 + ;;@ ~lib/memory.ts:164:22 (i32.load8_u - ;;@ ~lib/memory.ts:269:31 + ;;@ ~lib/memory.ts:164:31 (block (result i32) (set_local $5 (get_local $1) @@ -2069,9 +2067,9 @@ ) ) ) - ;;@ ~lib/memory.ts:270:4 + ;;@ ~lib/memory.ts:165:4 (i32.store8 - ;;@ ~lib/memory.ts:270:14 + ;;@ ~lib/memory.ts:165:14 (block (result i32) (set_local $5 (get_local $0) @@ -2084,9 +2082,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:270:22 + ;;@ ~lib/memory.ts:165:22 (i32.load8_u - ;;@ ~lib/memory.ts:270:31 + ;;@ ~lib/memory.ts:165:31 (block (result i32) (set_local $5 (get_local $1) @@ -2101,9 +2099,9 @@ ) ) ) - ;;@ ~lib/memory.ts:271:4 + ;;@ ~lib/memory.ts:166:4 (i32.store8 - ;;@ ~lib/memory.ts:271:14 + ;;@ ~lib/memory.ts:166:14 (block (result i32) (set_local $5 (get_local $0) @@ -2116,9 +2114,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:271:22 + ;;@ ~lib/memory.ts:166:22 (i32.load8_u - ;;@ ~lib/memory.ts:271:31 + ;;@ ~lib/memory.ts:166:31 (block (result i32) (set_local $5 (get_local $1) @@ -2133,9 +2131,9 @@ ) ) ) - ;;@ ~lib/memory.ts:272:4 + ;;@ ~lib/memory.ts:167:4 (i32.store8 - ;;@ ~lib/memory.ts:272:14 + ;;@ ~lib/memory.ts:167:14 (block (result i32) (set_local $5 (get_local $0) @@ -2148,9 +2146,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:272:22 + ;;@ ~lib/memory.ts:167:22 (i32.load8_u - ;;@ ~lib/memory.ts:272:31 + ;;@ ~lib/memory.ts:167:31 (block (result i32) (set_local $5 (get_local $1) @@ -2165,9 +2163,9 @@ ) ) ) - ;;@ ~lib/memory.ts:273:4 + ;;@ ~lib/memory.ts:168:4 (i32.store8 - ;;@ ~lib/memory.ts:273:14 + ;;@ ~lib/memory.ts:168:14 (block (result i32) (set_local $5 (get_local $0) @@ -2180,9 +2178,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:273:22 + ;;@ ~lib/memory.ts:168:22 (i32.load8_u - ;;@ ~lib/memory.ts:273:31 + ;;@ ~lib/memory.ts:168:31 (block (result i32) (set_local $5 (get_local $1) @@ -2197,9 +2195,9 @@ ) ) ) - ;;@ ~lib/memory.ts:274:4 + ;;@ ~lib/memory.ts:169:4 (i32.store8 - ;;@ ~lib/memory.ts:274:14 + ;;@ ~lib/memory.ts:169:14 (block (result i32) (set_local $5 (get_local $0) @@ -2212,9 +2210,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:274:22 + ;;@ ~lib/memory.ts:169:22 (i32.load8_u - ;;@ ~lib/memory.ts:274:31 + ;;@ ~lib/memory.ts:169:31 (block (result i32) (set_local $5 (get_local $1) @@ -2229,9 +2227,9 @@ ) ) ) - ;;@ ~lib/memory.ts:275:4 + ;;@ ~lib/memory.ts:170:4 (i32.store8 - ;;@ ~lib/memory.ts:275:14 + ;;@ ~lib/memory.ts:170:14 (block (result i32) (set_local $5 (get_local $0) @@ -2244,9 +2242,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:275:22 + ;;@ ~lib/memory.ts:170:22 (i32.load8_u - ;;@ ~lib/memory.ts:275:31 + ;;@ ~lib/memory.ts:170:31 (block (result i32) (set_local $5 (get_local $1) @@ -2261,9 +2259,9 @@ ) ) ) - ;;@ ~lib/memory.ts:276:4 + ;;@ ~lib/memory.ts:171:4 (i32.store8 - ;;@ ~lib/memory.ts:276:14 + ;;@ ~lib/memory.ts:171:14 (block (result i32) (set_local $5 (get_local $0) @@ -2276,9 +2274,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:276:22 + ;;@ ~lib/memory.ts:171:22 (i32.load8_u - ;;@ ~lib/memory.ts:276:31 + ;;@ ~lib/memory.ts:171:31 (block (result i32) (set_local $5 (get_local $1) @@ -2295,19 +2293,19 @@ ) ) ) - ;;@ ~lib/memory.ts:278:2 + ;;@ ~lib/memory.ts:173:2 (if - ;;@ ~lib/memory.ts:278:6 + ;;@ ~lib/memory.ts:173:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:278:10 + ;;@ ~lib/memory.ts:173:10 (i32.const 8) ) - ;;@ ~lib/memory.ts:278:13 + ;;@ ~lib/memory.ts:173:13 (block - ;;@ ~lib/memory.ts:279:4 + ;;@ ~lib/memory.ts:174:4 (i32.store8 - ;;@ ~lib/memory.ts:279:14 + ;;@ ~lib/memory.ts:174:14 (block (result i32) (set_local $5 (get_local $0) @@ -2320,9 +2318,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:279:22 + ;;@ ~lib/memory.ts:174:22 (i32.load8_u - ;;@ ~lib/memory.ts:279:31 + ;;@ ~lib/memory.ts:174:31 (block (result i32) (set_local $5 (get_local $1) @@ -2337,9 +2335,9 @@ ) ) ) - ;;@ ~lib/memory.ts:280:4 + ;;@ ~lib/memory.ts:175:4 (i32.store8 - ;;@ ~lib/memory.ts:280:14 + ;;@ ~lib/memory.ts:175:14 (block (result i32) (set_local $5 (get_local $0) @@ -2352,9 +2350,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:280:22 + ;;@ ~lib/memory.ts:175:22 (i32.load8_u - ;;@ ~lib/memory.ts:280:31 + ;;@ ~lib/memory.ts:175:31 (block (result i32) (set_local $5 (get_local $1) @@ -2369,9 +2367,9 @@ ) ) ) - ;;@ ~lib/memory.ts:281:4 + ;;@ ~lib/memory.ts:176:4 (i32.store8 - ;;@ ~lib/memory.ts:281:14 + ;;@ ~lib/memory.ts:176:14 (block (result i32) (set_local $5 (get_local $0) @@ -2384,9 +2382,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:281:22 + ;;@ ~lib/memory.ts:176:22 (i32.load8_u - ;;@ ~lib/memory.ts:281:31 + ;;@ ~lib/memory.ts:176:31 (block (result i32) (set_local $5 (get_local $1) @@ -2401,9 +2399,9 @@ ) ) ) - ;;@ ~lib/memory.ts:282:4 + ;;@ ~lib/memory.ts:177:4 (i32.store8 - ;;@ ~lib/memory.ts:282:14 + ;;@ ~lib/memory.ts:177:14 (block (result i32) (set_local $5 (get_local $0) @@ -2416,9 +2414,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:282:22 + ;;@ ~lib/memory.ts:177:22 (i32.load8_u - ;;@ ~lib/memory.ts:282:31 + ;;@ ~lib/memory.ts:177:31 (block (result i32) (set_local $5 (get_local $1) @@ -2433,9 +2431,9 @@ ) ) ) - ;;@ ~lib/memory.ts:283:4 + ;;@ ~lib/memory.ts:178:4 (i32.store8 - ;;@ ~lib/memory.ts:283:14 + ;;@ ~lib/memory.ts:178:14 (block (result i32) (set_local $5 (get_local $0) @@ -2448,9 +2446,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:283:22 + ;;@ ~lib/memory.ts:178:22 (i32.load8_u - ;;@ ~lib/memory.ts:283:31 + ;;@ ~lib/memory.ts:178:31 (block (result i32) (set_local $5 (get_local $1) @@ -2465,9 +2463,9 @@ ) ) ) - ;;@ ~lib/memory.ts:284:4 + ;;@ ~lib/memory.ts:179:4 (i32.store8 - ;;@ ~lib/memory.ts:284:14 + ;;@ ~lib/memory.ts:179:14 (block (result i32) (set_local $5 (get_local $0) @@ -2480,9 +2478,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:284:22 + ;;@ ~lib/memory.ts:179:22 (i32.load8_u - ;;@ ~lib/memory.ts:284:31 + ;;@ ~lib/memory.ts:179:31 (block (result i32) (set_local $5 (get_local $1) @@ -2497,9 +2495,9 @@ ) ) ) - ;;@ ~lib/memory.ts:285:4 + ;;@ ~lib/memory.ts:180:4 (i32.store8 - ;;@ ~lib/memory.ts:285:14 + ;;@ ~lib/memory.ts:180:14 (block (result i32) (set_local $5 (get_local $0) @@ -2512,9 +2510,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:285:22 + ;;@ ~lib/memory.ts:180:22 (i32.load8_u - ;;@ ~lib/memory.ts:285:31 + ;;@ ~lib/memory.ts:180:31 (block (result i32) (set_local $5 (get_local $1) @@ -2529,9 +2527,9 @@ ) ) ) - ;;@ ~lib/memory.ts:286:4 + ;;@ ~lib/memory.ts:181:4 (i32.store8 - ;;@ ~lib/memory.ts:286:14 + ;;@ ~lib/memory.ts:181:14 (block (result i32) (set_local $5 (get_local $0) @@ -2544,9 +2542,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:286:22 + ;;@ ~lib/memory.ts:181:22 (i32.load8_u - ;;@ ~lib/memory.ts:286:31 + ;;@ ~lib/memory.ts:181:31 (block (result i32) (set_local $5 (get_local $1) @@ -2563,19 +2561,19 @@ ) ) ) - ;;@ ~lib/memory.ts:288:2 + ;;@ ~lib/memory.ts:183:2 (if - ;;@ ~lib/memory.ts:288:6 + ;;@ ~lib/memory.ts:183:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:288:10 + ;;@ ~lib/memory.ts:183:10 (i32.const 4) ) - ;;@ ~lib/memory.ts:288:13 + ;;@ ~lib/memory.ts:183:13 (block - ;;@ ~lib/memory.ts:289:4 + ;;@ ~lib/memory.ts:184:4 (i32.store8 - ;;@ ~lib/memory.ts:289:14 + ;;@ ~lib/memory.ts:184:14 (block (result i32) (set_local $5 (get_local $0) @@ -2588,9 +2586,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:289:22 + ;;@ ~lib/memory.ts:184:22 (i32.load8_u - ;;@ ~lib/memory.ts:289:31 + ;;@ ~lib/memory.ts:184:31 (block (result i32) (set_local $5 (get_local $1) @@ -2605,9 +2603,9 @@ ) ) ) - ;;@ ~lib/memory.ts:290:4 + ;;@ ~lib/memory.ts:185:4 (i32.store8 - ;;@ ~lib/memory.ts:290:14 + ;;@ ~lib/memory.ts:185:14 (block (result i32) (set_local $5 (get_local $0) @@ -2620,9 +2618,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:290:22 + ;;@ ~lib/memory.ts:185:22 (i32.load8_u - ;;@ ~lib/memory.ts:290:31 + ;;@ ~lib/memory.ts:185:31 (block (result i32) (set_local $5 (get_local $1) @@ -2637,9 +2635,9 @@ ) ) ) - ;;@ ~lib/memory.ts:291:4 + ;;@ ~lib/memory.ts:186:4 (i32.store8 - ;;@ ~lib/memory.ts:291:14 + ;;@ ~lib/memory.ts:186:14 (block (result i32) (set_local $5 (get_local $0) @@ -2652,9 +2650,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:291:22 + ;;@ ~lib/memory.ts:186:22 (i32.load8_u - ;;@ ~lib/memory.ts:291:31 + ;;@ ~lib/memory.ts:186:31 (block (result i32) (set_local $5 (get_local $1) @@ -2669,9 +2667,9 @@ ) ) ) - ;;@ ~lib/memory.ts:292:4 + ;;@ ~lib/memory.ts:187:4 (i32.store8 - ;;@ ~lib/memory.ts:292:14 + ;;@ ~lib/memory.ts:187:14 (block (result i32) (set_local $5 (get_local $0) @@ -2684,9 +2682,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:292:22 + ;;@ ~lib/memory.ts:187:22 (i32.load8_u - ;;@ ~lib/memory.ts:292:31 + ;;@ ~lib/memory.ts:187:31 (block (result i32) (set_local $5 (get_local $1) @@ -2703,19 +2701,19 @@ ) ) ) - ;;@ ~lib/memory.ts:294:2 + ;;@ ~lib/memory.ts:189:2 (if - ;;@ ~lib/memory.ts:294:6 + ;;@ ~lib/memory.ts:189:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:294:10 + ;;@ ~lib/memory.ts:189:10 (i32.const 2) ) - ;;@ ~lib/memory.ts:294:13 + ;;@ ~lib/memory.ts:189:13 (block - ;;@ ~lib/memory.ts:295:4 + ;;@ ~lib/memory.ts:190:4 (i32.store8 - ;;@ ~lib/memory.ts:295:14 + ;;@ ~lib/memory.ts:190:14 (block (result i32) (set_local $5 (get_local $0) @@ -2728,9 +2726,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:295:22 + ;;@ ~lib/memory.ts:190:22 (i32.load8_u - ;;@ ~lib/memory.ts:295:31 + ;;@ ~lib/memory.ts:190:31 (block (result i32) (set_local $5 (get_local $1) @@ -2745,9 +2743,9 @@ ) ) ) - ;;@ ~lib/memory.ts:296:4 + ;;@ ~lib/memory.ts:191:4 (i32.store8 - ;;@ ~lib/memory.ts:296:14 + ;;@ ~lib/memory.ts:191:14 (block (result i32) (set_local $5 (get_local $0) @@ -2760,9 +2758,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:296:22 + ;;@ ~lib/memory.ts:191:22 (i32.load8_u - ;;@ ~lib/memory.ts:296:31 + ;;@ ~lib/memory.ts:191:31 (block (result i32) (set_local $5 (get_local $1) @@ -2779,17 +2777,17 @@ ) ) ) - ;;@ ~lib/memory.ts:298:2 + ;;@ ~lib/memory.ts:193:2 (if - ;;@ ~lib/memory.ts:298:6 + ;;@ ~lib/memory.ts:193:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:298:10 + ;;@ ~lib/memory.ts:193:10 (i32.const 1) ) - ;;@ ~lib/memory.ts:298:13 + ;;@ ~lib/memory.ts:193:13 (i32.store8 - ;;@ ~lib/memory.ts:299:14 + ;;@ ~lib/memory.ts:194:14 (block (result i32) (set_local $5 (get_local $0) @@ -2802,9 +2800,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:299:22 + ;;@ ~lib/memory.ts:194:22 (i32.load8_u - ;;@ ~lib/memory.ts:299:31 + ;;@ ~lib/memory.ts:194:31 (block (result i32) (set_local $5 (get_local $1) @@ -2821,123 +2819,123 @@ ) ) ) - (func $~lib/memory/memory.copy (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memmove (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - ;;@ ~lib/memory.ts:79:4 + ;;@ ~lib/memory.ts:200:2 (if - ;;@ ~lib/memory.ts:79:8 + ;;@ ~lib/memory.ts:200:6 (i32.eq (get_local $0) - ;;@ ~lib/memory.ts:79:16 + ;;@ ~lib/memory.ts:200:14 (get_local $1) ) - ;;@ ~lib/memory.ts:79:21 + ;;@ ~lib/memory.ts:200:19 (return) ) - ;;@ ~lib/memory.ts:80:4 + ;;@ ~lib/memory.ts:201:2 (if - ;;@ ~lib/memory.ts:80:8 + ;;@ ~lib/memory.ts:201:6 (if (result i32) (tee_local $3 (i32.le_u (i32.add (get_local $1) - ;;@ ~lib/memory.ts:80:14 + ;;@ ~lib/memory.ts:201:12 (get_local $2) ) - ;;@ ~lib/memory.ts:80:19 + ;;@ ~lib/memory.ts:201:17 (get_local $0) ) ) (get_local $3) - ;;@ ~lib/memory.ts:80:27 + ;;@ ~lib/memory.ts:201:25 (i32.le_u (i32.add (get_local $0) - ;;@ ~lib/memory.ts:80:34 + ;;@ ~lib/memory.ts:201:32 (get_local $2) ) - ;;@ ~lib/memory.ts:80:39 + ;;@ ~lib/memory.ts:201:37 (get_local $1) ) ) - ;;@ ~lib/memory.ts:80:44 + ;;@ ~lib/memory.ts:201:42 (block - ;;@ ~lib/memory.ts:81:6 + ;;@ ~lib/memory.ts:202:4 (call $~lib/memory/memcpy - ;;@ ~lib/memory.ts:81:13 + ;;@ ~lib/memory.ts:202:11 (get_local $0) - ;;@ ~lib/memory.ts:81:19 + ;;@ ~lib/memory.ts:202:17 (get_local $1) - ;;@ ~lib/memory.ts:81:24 + ;;@ ~lib/memory.ts:202:22 (get_local $2) ) - ;;@ ~lib/memory.ts:82:6 + ;;@ ~lib/memory.ts:203:4 (return) ) ) - ;;@ ~lib/memory.ts:84:4 + ;;@ ~lib/memory.ts:205:2 (if - ;;@ ~lib/memory.ts:84:8 + ;;@ ~lib/memory.ts:205:6 (i32.lt_u (get_local $0) - ;;@ ~lib/memory.ts:84:15 + ;;@ ~lib/memory.ts:205:13 (get_local $1) ) - ;;@ ~lib/memory.ts:84:20 + ;;@ ~lib/memory.ts:205:18 (block - ;;@ ~lib/memory.ts:85:6 + ;;@ ~lib/memory.ts:206:4 (if - ;;@ ~lib/memory.ts:85:10 + ;;@ ~lib/memory.ts:206:8 (i32.eq (i32.and - ;;@ ~lib/memory.ts:85:11 + ;;@ ~lib/memory.ts:206:9 (get_local $1) - ;;@ ~lib/memory.ts:85:17 + ;;@ ~lib/memory.ts:206:15 (i32.const 7) ) - ;;@ ~lib/memory.ts:85:23 + ;;@ ~lib/memory.ts:206:21 (i32.and - ;;@ ~lib/memory.ts:85:24 + ;;@ ~lib/memory.ts:206:22 (get_local $0) - ;;@ ~lib/memory.ts:85:31 + ;;@ ~lib/memory.ts:206:29 (i32.const 7) ) ) - ;;@ ~lib/memory.ts:85:35 + ;;@ ~lib/memory.ts:206:33 (block (block $break|0 (loop $continue|0 (if - ;;@ ~lib/memory.ts:86:15 + ;;@ ~lib/memory.ts:207:13 (i32.and (get_local $0) - ;;@ ~lib/memory.ts:86:22 + ;;@ ~lib/memory.ts:207:20 (i32.const 7) ) (block (block - ;;@ ~lib/memory.ts:87:10 + ;;@ ~lib/memory.ts:208:8 (if - ;;@ ~lib/memory.ts:87:14 + ;;@ ~lib/memory.ts:208:12 (i32.eqz - ;;@ ~lib/memory.ts:87:15 + ;;@ ~lib/memory.ts:208:13 (get_local $2) ) - ;;@ ~lib/memory.ts:87:18 + ;;@ ~lib/memory.ts:208:16 (return) ) - ;;@ ~lib/memory.ts:88:10 + ;;@ ~lib/memory.ts:209:8 (set_local $2 (i32.sub - ;;@ ~lib/memory.ts:88:12 + ;;@ ~lib/memory.ts:209:10 (get_local $2) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:89:10 + ;;@ ~lib/memory.ts:210:8 (i32.store8 - ;;@ ~lib/memory.ts:89:20 + ;;@ ~lib/memory.ts:210:18 (block (result i32) (set_local $3 (get_local $0) @@ -2950,9 +2948,9 @@ ) (get_local $3) ) - ;;@ ~lib/memory.ts:89:28 + ;;@ ~lib/memory.ts:210:26 (i32.load8_u - ;;@ ~lib/memory.ts:89:37 + ;;@ ~lib/memory.ts:210:35 (block (result i32) (set_local $3 (get_local $1) @@ -2973,49 +2971,49 @@ ) ) ) - ;;@ ~lib/memory.ts:91:8 + ;;@ ~lib/memory.ts:212:6 (block $break|1 (loop $continue|1 (if - ;;@ ~lib/memory.ts:91:15 + ;;@ ~lib/memory.ts:212:13 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:91:20 + ;;@ ~lib/memory.ts:212:18 (i32.const 8) ) (block (block - ;;@ ~lib/memory.ts:92:10 + ;;@ ~lib/memory.ts:213:8 (i64.store - ;;@ ~lib/memory.ts:92:21 + ;;@ ~lib/memory.ts:213:19 (get_local $0) - ;;@ ~lib/memory.ts:92:27 + ;;@ ~lib/memory.ts:213:25 (i64.load - ;;@ ~lib/memory.ts:92:37 + ;;@ ~lib/memory.ts:213:35 (get_local $1) ) ) - ;;@ ~lib/memory.ts:93:10 + ;;@ ~lib/memory.ts:214:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:93:18 + ;;@ ~lib/memory.ts:214:16 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:94:10 + ;;@ ~lib/memory.ts:215:8 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:94:18 + ;;@ ~lib/memory.ts:215:16 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:95:10 + ;;@ ~lib/memory.ts:216:8 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:95:18 + ;;@ ~lib/memory.ts:216:16 (i32.const 8) ) ) @@ -3027,17 +3025,17 @@ ) ) ) - ;;@ ~lib/memory.ts:98:6 + ;;@ ~lib/memory.ts:219:4 (block $break|2 (loop $continue|2 (if - ;;@ ~lib/memory.ts:98:13 + ;;@ ~lib/memory.ts:219:11 (get_local $2) (block (block - ;;@ ~lib/memory.ts:99:8 + ;;@ ~lib/memory.ts:220:6 (i32.store8 - ;;@ ~lib/memory.ts:99:18 + ;;@ ~lib/memory.ts:220:16 (block (result i32) (set_local $3 (get_local $0) @@ -3050,9 +3048,9 @@ ) (get_local $3) ) - ;;@ ~lib/memory.ts:99:26 + ;;@ ~lib/memory.ts:220:24 (i32.load8_u - ;;@ ~lib/memory.ts:99:35 + ;;@ ~lib/memory.ts:220:33 (block (result i32) (set_local $3 (get_local $1) @@ -3067,10 +3065,10 @@ ) ) ) - ;;@ ~lib/memory.ts:100:8 + ;;@ ~lib/memory.ts:221:6 (set_local $2 (i32.sub - ;;@ ~lib/memory.ts:100:10 + ;;@ ~lib/memory.ts:221:8 (get_local $2) (i32.const 1) ) @@ -3082,74 +3080,74 @@ ) ) ) - ;;@ ~lib/memory.ts:102:11 + ;;@ ~lib/memory.ts:223:9 (block - ;;@ ~lib/memory.ts:103:6 + ;;@ ~lib/memory.ts:224:4 (if - ;;@ ~lib/memory.ts:103:10 + ;;@ ~lib/memory.ts:224:8 (i32.eq (i32.and - ;;@ ~lib/memory.ts:103:11 + ;;@ ~lib/memory.ts:224:9 (get_local $1) - ;;@ ~lib/memory.ts:103:17 + ;;@ ~lib/memory.ts:224:15 (i32.const 7) ) - ;;@ ~lib/memory.ts:103:23 + ;;@ ~lib/memory.ts:224:21 (i32.and - ;;@ ~lib/memory.ts:103:24 + ;;@ ~lib/memory.ts:224:22 (get_local $0) - ;;@ ~lib/memory.ts:103:31 + ;;@ ~lib/memory.ts:224:29 (i32.const 7) ) ) - ;;@ ~lib/memory.ts:103:35 + ;;@ ~lib/memory.ts:224:33 (block (block $break|3 (loop $continue|3 (if - ;;@ ~lib/memory.ts:104:15 + ;;@ ~lib/memory.ts:225:13 (i32.and (i32.add - ;;@ ~lib/memory.ts:104:16 + ;;@ ~lib/memory.ts:225:14 (get_local $0) - ;;@ ~lib/memory.ts:104:23 + ;;@ ~lib/memory.ts:225:21 (get_local $2) ) - ;;@ ~lib/memory.ts:104:28 + ;;@ ~lib/memory.ts:225:26 (i32.const 7) ) (block (block - ;;@ ~lib/memory.ts:105:10 + ;;@ ~lib/memory.ts:226:8 (if - ;;@ ~lib/memory.ts:105:14 + ;;@ ~lib/memory.ts:226:12 (i32.eqz - ;;@ ~lib/memory.ts:105:15 + ;;@ ~lib/memory.ts:226:13 (get_local $2) ) - ;;@ ~lib/memory.ts:105:18 + ;;@ ~lib/memory.ts:226:16 (return) ) - ;;@ ~lib/memory.ts:106:10 + ;;@ ~lib/memory.ts:227:8 (i32.store8 - ;;@ ~lib/memory.ts:106:20 + ;;@ ~lib/memory.ts:227:18 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:106:27 + ;;@ ~lib/memory.ts:227:25 (tee_local $2 (i32.sub - ;;@ ~lib/memory.ts:106:29 + ;;@ ~lib/memory.ts:227:27 (get_local $2) (i32.const 1) ) ) ) - ;;@ ~lib/memory.ts:106:32 + ;;@ ~lib/memory.ts:227:30 (i32.load8_u - ;;@ ~lib/memory.ts:106:41 + ;;@ ~lib/memory.ts:227:39 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:106:47 + ;;@ ~lib/memory.ts:227:45 (get_local $2) ) ) @@ -3160,40 +3158,40 @@ ) ) ) - ;;@ ~lib/memory.ts:108:8 + ;;@ ~lib/memory.ts:229:6 (block $break|4 (loop $continue|4 (if - ;;@ ~lib/memory.ts:108:15 + ;;@ ~lib/memory.ts:229:13 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:108:20 + ;;@ ~lib/memory.ts:229:18 (i32.const 8) ) (block (block - ;;@ ~lib/memory.ts:109:10 + ;;@ ~lib/memory.ts:230:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:109:15 + ;;@ ~lib/memory.ts:230:13 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:110:10 + ;;@ ~lib/memory.ts:231:8 (i64.store - ;;@ ~lib/memory.ts:110:21 + ;;@ ~lib/memory.ts:231:19 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:110:28 + ;;@ ~lib/memory.ts:231:26 (get_local $2) ) - ;;@ ~lib/memory.ts:110:31 + ;;@ ~lib/memory.ts:231:29 (i64.load - ;;@ ~lib/memory.ts:110:41 + ;;@ ~lib/memory.ts:231:39 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:110:47 + ;;@ ~lib/memory.ts:231:45 (get_local $2) ) ) @@ -3206,33 +3204,33 @@ ) ) ) - ;;@ ~lib/memory.ts:113:6 + ;;@ ~lib/memory.ts:234:4 (block $break|5 (loop $continue|5 (if - ;;@ ~lib/memory.ts:113:13 + ;;@ ~lib/memory.ts:234:11 (get_local $2) (block - ;;@ ~lib/memory.ts:113:16 + ;;@ ~lib/memory.ts:234:14 (i32.store8 - ;;@ ~lib/memory.ts:114:18 + ;;@ ~lib/memory.ts:235:16 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:114:25 + ;;@ ~lib/memory.ts:235:23 (tee_local $2 (i32.sub - ;;@ ~lib/memory.ts:114:27 + ;;@ ~lib/memory.ts:235:25 (get_local $2) (i32.const 1) ) ) ) - ;;@ ~lib/memory.ts:114:30 + ;;@ ~lib/memory.ts:235:28 (i32.load8_u - ;;@ ~lib/memory.ts:114:39 + ;;@ ~lib/memory.ts:235:37 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:114:45 + ;;@ ~lib/memory.ts:235:43 (get_local $2) ) ) @@ -3245,43 +3243,54 @@ ) ) ) - (func $~lib/memory/memory.compare (; 6 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.copy (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + ;;@ ~lib/memory.ts:16:4 + (call $~lib/memory/memmove + ;;@ ~lib/memory.ts:16:12 + (get_local $0) + ;;@ ~lib/memory.ts:16:18 + (get_local $1) + ;;@ ~lib/memory.ts:16:23 + (get_local $2) + ) + ) + (func $~lib/memory/memcmp (; 6 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - ;;@ ~lib/memory.ts:122:4 + ;;@ ~lib/memory.ts:302:2 (if - ;;@ ~lib/memory.ts:122:8 + ;;@ ~lib/memory.ts:302:6 (i32.eq (get_local $0) - ;;@ ~lib/memory.ts:122:14 + ;;@ ~lib/memory.ts:302:12 (get_local $1) ) - ;;@ ~lib/memory.ts:122:25 + ;;@ ~lib/memory.ts:302:23 (return (i32.const 0) ) ) - ;;@ ~lib/memory.ts:123:4 + ;;@ ~lib/memory.ts:303:2 (block $break|0 (loop $continue|0 (if - ;;@ ~lib/memory.ts:123:11 + ;;@ ~lib/memory.ts:303:9 (if (result i32) (tee_local $3 (i32.ne (get_local $2) - ;;@ ~lib/memory.ts:123:16 + ;;@ ~lib/memory.ts:303:14 (i32.const 0) ) ) - ;;@ ~lib/memory.ts:123:21 + ;;@ ~lib/memory.ts:303:19 (i32.eq (i32.load8_u - ;;@ ~lib/memory.ts:123:30 + ;;@ ~lib/memory.ts:303:28 (get_local $0) ) - ;;@ ~lib/memory.ts:123:37 + ;;@ ~lib/memory.ts:303:35 (i32.load8_u - ;;@ ~lib/memory.ts:123:46 + ;;@ ~lib/memory.ts:303:44 (get_local $1) ) ) @@ -3289,21 +3298,21 @@ ) (block (block - ;;@ ~lib/memory.ts:124:6 + ;;@ ~lib/memory.ts:304:4 (set_local $2 (i32.sub (get_local $2) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:124:11 + ;;@ ~lib/memory.ts:304:9 (set_local $0 (i32.add (get_local $0) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:124:17 + ;;@ ~lib/memory.ts:304:15 (set_local $1 (i32.add (get_local $1) @@ -3316,27 +3325,38 @@ ) ) ) - ;;@ ~lib/memory.ts:126:55 + ;;@ ~lib/memory.ts:306:53 (if (result i32) - ;;@ ~lib/memory.ts:126:11 + ;;@ ~lib/memory.ts:306:9 (get_local $2) - ;;@ ~lib/memory.ts:126:15 + ;;@ ~lib/memory.ts:306:13 (i32.sub (i32.load8_u - ;;@ ~lib/memory.ts:126:29 + ;;@ ~lib/memory.ts:306:27 (get_local $0) ) - ;;@ ~lib/memory.ts:126:35 + ;;@ ~lib/memory.ts:306:33 (i32.load8_u - ;;@ ~lib/memory.ts:126:49 + ;;@ ~lib/memory.ts:306:47 (get_local $1) ) ) - ;;@ ~lib/memory.ts:126:55 + ;;@ ~lib/memory.ts:306:53 (i32.const 0) ) ) - (func $~lib/allocator/buddy/update_max_ptr (; 7 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.compare (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + ;;@ ~lib/memory.ts:21:27 + (call $~lib/memory/memcmp + ;;@ ~lib/memory.ts:21:18 + (get_local $0) + ;;@ ~lib/memory.ts:21:22 + (get_local $1) + ;;@ ~lib/memory.ts:21:26 + (get_local $2) + ) + ) + (func $~lib/allocator/buddy/update_max_ptr (; 8 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) ;;@ ~lib/allocator/buddy.ts:175:2 @@ -3352,7 +3372,7 @@ ;;@ ~lib/allocator/buddy.ts:179:4 (set_local $1 ;;@ ~lib/allocator/buddy.ts:179:19 - (call $~lib/memory/memory.size) + (current_memory) ) ;;@ ~lib/allocator/buddy.ts:180:4 (set_local $2 @@ -3403,7 +3423,7 @@ ;;@ ~lib/allocator/buddy.ts:182:8 (i32.lt_s ;;@ ~lib/allocator/buddy.ts:182:15 - (call $~lib/memory/memory.grow + (grow_memory ;;@ ~lib/allocator/buddy.ts:182:20 (i32.sub (get_local $2) @@ -3434,7 +3454,7 @@ ;;@ ~lib/allocator/buddy.ts:188:9 (i32.const 1) ) - (func $~lib/allocator/buddy/buckets$get (; 8 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/buddy/buckets$get (; 9 ;) (type $ii) (param $0 i32) (result i32) ;;@ ~lib/allocator/buddy.ts:101:2 (if (i32.eqz @@ -3442,7 +3462,7 @@ (i32.lt_u (get_local $0) ;;@ ~lib/allocator/buddy.ts:101:17 - (i32.const 27) + (get_global $~lib/allocator/buddy/BUCKET_COUNT) ) ) (block @@ -3463,11 +3483,11 @@ (i32.mul (get_local $0) ;;@ ~lib/allocator/buddy.ts:102:50 - (i32.const 8) + (get_global $~lib/allocator/buddy/List.SIZE) ) ) ) - (func $~lib/allocator/buddy/list_init (; 9 ;) (type $iv) (param $0 i32) + (func $~lib/allocator/buddy/list_init (; 10 ;) (type $iv) (param $0 i32) ;;@ ~lib/allocator/buddy.ts:197:2 (i32.store (get_local $0) @@ -3481,7 +3501,7 @@ (get_local $0) ) ) - (func $~lib/allocator/buddy/list_push (; 10 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/allocator/buddy/list_push (; 11 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) ;;@ ~lib/allocator/buddy.ts:206:2 (set_local $2 @@ -3515,14 +3535,14 @@ (get_local $1) ) ) - (func $~lib/allocator/buddy/bucket_for_request (; 11 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/buddy/bucket_for_request (; 12 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) ;;@ ~lib/allocator/buddy.ts:279:2 (set_local $1 ;;@ ~lib/allocator/buddy.ts:279:15 (i32.sub - (i32.const 27) + (get_global $~lib/allocator/buddy/BUCKET_COUNT) ;;@ ~lib/allocator/buddy.ts:279:30 (i32.const 1) ) @@ -3530,7 +3550,7 @@ ;;@ ~lib/allocator/buddy.ts:280:2 (set_local $2 ;;@ ~lib/allocator/buddy.ts:280:13 - (i32.const 16) + (get_global $~lib/allocator/buddy/MIN_ALLOC) ) ;;@ ~lib/allocator/buddy.ts:282:2 (block $break|0 @@ -3568,7 +3588,7 @@ ;;@ ~lib/allocator/buddy.ts:287:9 (get_local $1) ) - (func $~lib/allocator/buddy/node_for_ptr (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/buddy/node_for_ptr (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) ;;@ ~lib/allocator/buddy.ts:252:75 (i32.sub ;;@ ~lib/allocator/buddy.ts:252:9 @@ -3584,7 +3604,7 @@ ;;@ ~lib/allocator/buddy.ts:252:30 (i32.sub ;;@ ~lib/allocator/buddy.ts:252:31 - (i32.const 30) + (get_global $~lib/allocator/buddy/MAX_ALLOC_LOG2) ;;@ ~lib/allocator/buddy.ts:252:48 (get_local $1) ) @@ -3601,7 +3621,7 @@ (i32.const 1) ) ) - (func $~lib/allocator/buddy/node_is_split$get (; 13 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/buddy/node_is_split$get (; 14 ;) (type $ii) (param $0 i32) (result i32) ;;@ ~lib/allocator/buddy.ts:147:2 (if (i32.eqz @@ -3609,7 +3629,7 @@ (i32.lt_u (get_local $0) ;;@ ~lib/allocator/buddy.ts:147:17 - (i32.const 8388608) + (get_global $~lib/allocator/buddy/SPLIT_COUNT) ) ) (block @@ -3632,7 +3652,7 @@ ) ) ) - (func $~lib/allocator/buddy/parent_is_split (; 14 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/buddy/parent_is_split (; 15 ;) (type $ii) (param $0 i32) (result i32) ;;@ ~lib/allocator/buddy.ts:259:2 (set_local $0 ;;@ ~lib/allocator/buddy.ts:259:10 @@ -3677,7 +3697,7 @@ (i32.const 1) ) ) - (func $~lib/allocator/buddy/list_remove (; 15 ;) (type $iv) (param $0 i32) + (func $~lib/allocator/buddy/list_remove (; 16 ;) (type $iv) (param $0 i32) (local $1 i32) (local $2 i32) ;;@ ~lib/allocator/buddy.ts:220:2 @@ -3707,7 +3727,7 @@ (get_local $1) ) ) - (func $~lib/allocator/buddy/ptr_for_node (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/buddy/ptr_for_node (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) ;;@ ~lib/allocator/buddy.ts:243:77 (i32.add ;;@ ~lib/allocator/buddy.ts:243:9 @@ -3733,14 +3753,14 @@ ;;@ ~lib/allocator/buddy.ts:243:52 (i32.sub ;;@ ~lib/allocator/buddy.ts:243:53 - (i32.const 30) + (get_global $~lib/allocator/buddy/MAX_ALLOC_LOG2) ;;@ ~lib/allocator/buddy.ts:243:70 (get_local $1) ) ) ) ) - (func $~lib/allocator/buddy/node_is_split$set (; 17 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/allocator/buddy/node_is_split$set (; 18 ;) (type $iiv) (param $0 i32) (param $1 i32) ;;@ ~lib/allocator/buddy.ts:152:2 (if (i32.eqz @@ -3748,7 +3768,7 @@ (i32.lt_u (get_local $0) ;;@ ~lib/allocator/buddy.ts:152:17 - (i32.const 8388608) + (get_global $~lib/allocator/buddy/SPLIT_COUNT) ) ) (block @@ -3773,7 +3793,7 @@ (get_local $1) ) ) - (func $~lib/allocator/buddy/flip_parent_is_split (; 18 ;) (type $iv) (param $0 i32) + (func $~lib/allocator/buddy/flip_parent_is_split (; 19 ;) (type $iv) (param $0 i32) (local $1 i32) ;;@ ~lib/allocator/buddy.ts:267:2 (set_local $0 @@ -3823,7 +3843,7 @@ ) ) ) - (func $~lib/allocator/buddy/lower_bucket_limit (; 19 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/buddy/lower_bucket_limit (; 20 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) ;;@ ~lib/allocator/buddy.ts:296:2 @@ -3920,7 +3940,7 @@ (i32.add (get_local $2) ;;@ ~lib/allocator/buddy.ts:322:38 - (i32.const 8) + (get_global $~lib/allocator/buddy/List.SIZE) ) ) ) @@ -3994,7 +4014,7 @@ ;;@ ~lib/allocator/buddy.ts:338:9 (i32.const 1) ) - (func $~lib/allocator/buddy/list_pop (; 20 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/buddy/list_pop (; 21 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) ;;@ ~lib/allocator/buddy.ts:230:2 (set_local $1 @@ -4024,7 +4044,7 @@ ;;@ ~lib/allocator/buddy.ts:233:9 (get_local $1) ) - (func $~lib/allocator/buddy/__memory_allocate (; 21 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/buddy/__memory_allocate (; 22 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4039,9 +4059,9 @@ (get_local $0) ;;@ ~lib/allocator/buddy.ts:350:16 (i32.sub - (i32.const 1073741824) + (get_global $~lib/allocator/buddy/MAX_ALLOC) ;;@ ~lib/allocator/buddy.ts:350:28 - (i32.const 8) + (get_global $~lib/allocator/buddy/HEADER_SIZE) ) ) ;;@ ~lib/allocator/buddy.ts:350:41 @@ -4079,7 +4099,7 @@ (set_global $~lib/allocator/buddy/max_ptr ;;@ ~lib/allocator/buddy.ts:360:14 (i32.shl - (call $~lib/memory/memory.size) + (current_memory) ;;@ ~lib/allocator/buddy.ts:360:38 (i32.const 16) ) @@ -4088,7 +4108,7 @@ (set_global $~lib/allocator/buddy/bucket_limit ;;@ ~lib/allocator/buddy.ts:361:19 (i32.sub - (i32.const 27) + (get_global $~lib/allocator/buddy/BUCKET_COUNT) ;;@ ~lib/allocator/buddy.ts:361:34 (i32.const 1) ) @@ -4103,7 +4123,7 @@ (i32.add (get_global $~lib/allocator/buddy/base_ptr) ;;@ ~lib/allocator/buddy.ts:362:35 - (i32.const 8) + (get_global $~lib/allocator/buddy/List.SIZE) ) ) ) @@ -4119,7 +4139,7 @@ (call $~lib/allocator/buddy/buckets$get ;;@ ~lib/allocator/buddy.ts:365:26 (i32.sub - (i32.const 27) + (get_global $~lib/allocator/buddy/BUCKET_COUNT) ;;@ ~lib/allocator/buddy.ts:365:41 (i32.const 1) ) @@ -4131,7 +4151,7 @@ (call $~lib/allocator/buddy/buckets$get ;;@ ~lib/allocator/buddy.ts:366:26 (i32.sub - (i32.const 27) + (get_global $~lib/allocator/buddy/BUCKET_COUNT) ;;@ ~lib/allocator/buddy.ts:366:41 (i32.const 1) ) @@ -4149,7 +4169,7 @@ (i32.add (get_local $0) ;;@ ~lib/allocator/buddy.ts:373:40 - (i32.const 8) + (get_global $~lib/allocator/buddy/HEADER_SIZE) ) ) ) @@ -4283,7 +4303,7 @@ ;;@ ~lib/allocator/buddy.ts:425:16 (i32.sub ;;@ ~lib/allocator/buddy.ts:425:17 - (i32.const 30) + (get_global $~lib/allocator/buddy/MAX_ALLOC_LOG2) ;;@ ~lib/allocator/buddy.ts:425:34 (get_local $2) ) @@ -4306,7 +4326,7 @@ (i32.const 2) ) ;;@ ~lib/allocator/buddy.ts:426:57 - (i32.const 8) + (get_global $~lib/allocator/buddy/List.SIZE) ) ;;@ ~lib/allocator/buddy.ts:426:69 (get_local $3) @@ -4443,7 +4463,7 @@ (i32.add (get_local $6) ;;@ ~lib/allocator/buddy.ts:470:17 - (i32.const 8) + (get_global $~lib/allocator/buddy/HEADER_SIZE) ) ) ) @@ -4453,17 +4473,17 @@ ;;@ ~lib/allocator/buddy.ts:473:9 (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 22 ;) (type $ii) (param $0 i32) (result i32) - ;;@ ~lib/memory.ts:142:4 + (func $~lib/memory/memory.allocate (; 23 ;) (type $ii) (param $0 i32) (result i32) + ;;@ ~lib/memory.ts:37:4 (return - ;;@ ~lib/memory.ts:142:45 + ;;@ ~lib/memory.ts:37:45 (call $~lib/allocator/buddy/__memory_allocate - ;;@ ~lib/memory.ts:142:63 + ;;@ ~lib/memory.ts:37:63 (get_local $0) ) ) ) - (func $~lib/allocator/buddy/__memory_free (; 23 ;) (type $iv) (param $0 i32) + (func $~lib/allocator/buddy/__memory_free (; 24 ;) (type $iv) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4483,7 +4503,7 @@ (i32.sub (get_local $0) ;;@ ~lib/allocator/buddy.ts:492:14 - (i32.const 8) + (get_global $~lib/allocator/buddy/HEADER_SIZE) ) ) ;;@ ~lib/allocator/buddy.ts:493:2 @@ -4497,7 +4517,7 @@ (get_local $0) ) ;;@ ~lib/allocator/buddy.ts:493:49 - (i32.const 8) + (get_global $~lib/allocator/buddy/HEADER_SIZE) ) ) ) @@ -4616,26 +4636,26 @@ ) ) ) - (func $~lib/memory/memory.free (; 24 ;) (type $iv) (param $0 i32) - ;;@ ~lib/memory.ts:148:36 + (func $~lib/memory/memory.free (; 25 ;) (type $iv) (param $0 i32) + ;;@ ~lib/memory.ts:43:36 (call $~lib/allocator/buddy/__memory_free - ;;@ ~lib/memory.ts:148:50 + ;;@ ~lib/memory.ts:43:50 (get_local $0) ) - ;;@ ~lib/memory.ts:148:56 + ;;@ ~lib/memory.ts:43:56 (return) ) - (func $~lib/allocator/buddy/__memory_reset (; 25 ;) (type $v) + (func $~lib/allocator/buddy/__memory_reset (; 26 ;) (type $v) ;;@ ~lib/allocator/buddy.ts:544:2 (unreachable) ) - (func $~lib/memory/memory.reset (; 26 ;) (type $v) - ;;@ ~lib/memory.ts:154:37 + (func $~lib/memory/memory.reset (; 27 ;) (type $v) + ;;@ ~lib/memory.ts:49:37 (call $~lib/allocator/buddy/__memory_reset) - ;;@ ~lib/memory.ts:154:55 + ;;@ ~lib/memory.ts:49:55 (return) ) - (func $start (; 27 ;) (type $v) + (func $start (; 28 ;) (type $v) (set_global $~lib/allocator/buddy/BUCKETS_START ;;@ ~lib/allocator/buddy.ts:97:27 (get_global $HEAP_BASE) @@ -4646,9 +4666,9 @@ (get_global $~lib/allocator/buddy/BUCKETS_START) ;;@ ~lib/allocator/buddy.ts:98:41 (i32.mul - (i32.const 27) + (get_global $~lib/allocator/buddy/BUCKET_COUNT) ;;@ ~lib/allocator/buddy.ts:98:56 - (i32.const 8) + (get_global $~lib/allocator/buddy/List.SIZE) ) ) ) @@ -4662,7 +4682,7 @@ (get_global $~lib/allocator/buddy/NODE_IS_SPLIT_START) ;;@ ~lib/allocator/buddy.ts:144:53 (i32.mul - (i32.const 8388608) + (get_global $~lib/allocator/buddy/SPLIT_COUNT) ;;@ ~lib/allocator/buddy.ts:144:67 (i32.const 1) ) diff --git a/tests/allocators/tlsf/optimized.wat b/tests/allocators/tlsf/optimized.wat index 6ed4b593..33eb34d5 100644 --- a/tests/allocators/tlsf/optimized.wat +++ b/tests/allocators/tlsf/optimized.wat @@ -1,209 +1,194 @@ (module - (type $i (func (result i32))) - (type $ii (func (param i32) (result i32))) (type $iiiv (func (param i32 i32 i32))) (type $iiii (func (param i32 i32 i32) (result i32))) + (type $ii (func (param i32) (result i32))) (type $iiv (func (param i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $iii (func (param i32 i32) (result i32))) (type $iv (func (param i32))) (type $v (func)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $HEAP_BASE i32 (i32.const 8)) (memory $0 0) - (export "memory.size" (func $~lib/memory/memory.size)) - (export "memory.grow" (func $~lib/memory/memory.grow)) + (export "memory" (memory $0)) (export "memory.fill" (func $~lib/memory/memory.fill)) (export "memory.copy" (func $~lib/memory/memory.copy)) (export "memory.compare" (func $~lib/memory/memory.compare)) (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" (memory $0)) - (func $~lib/memory/memory.size (; 0 ;) (type $i) (result i32) - ;;@ ~lib/memory.ts:4:25 - (current_memory) - ) - (func $~lib/memory/memory.grow (; 1 ;) (type $ii) (param $0 i32) (result i32) - ;;@ ~lib/memory.ts:8:30 - (grow_memory - ;;@ ~lib/memory.ts:8:25 - (get_local $0) - ) - ) - (func $~lib/memory/memory.fill (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 0 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i64) (local $4 i32) - ;;@ ~lib/memory.ts:17:4 + ;;@ ~lib/memory.ts:244:2 (if - ;;@ ~lib/memory.ts:17:8 + ;;@ ~lib/memory.ts:244:6 (i32.eqz - ;;@ ~lib/memory.ts:17:9 + ;;@ ~lib/memory.ts:244:7 (get_local $2) ) - ;;@ ~lib/memory.ts:17:12 + ;;@ ~lib/memory.ts:244:10 (return) ) - ;;@ ~lib/memory.ts:18:4 + ;;@ ~lib/memory.ts:245:2 (i32.store8 - ;;@ ~lib/memory.ts:18:14 + ;;@ ~lib/memory.ts:245:12 (get_local $0) - ;;@ ~lib/memory.ts:18:20 + ;;@ ~lib/memory.ts:245:18 (get_local $1) ) - ;;@ ~lib/memory.ts:19:4 + ;;@ ~lib/memory.ts:246:2 (i32.store8 - ;;@ ~lib/memory.ts:19:14 + ;;@ ~lib/memory.ts:246:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:19:21 + ;;@ ~lib/memory.ts:246:19 (get_local $2) ) - ;;@ ~lib/memory.ts:19:25 + ;;@ ~lib/memory.ts:246:23 (i32.const 1) ) - ;;@ ~lib/memory.ts:19:28 + ;;@ ~lib/memory.ts:246:26 (get_local $1) ) - ;;@ ~lib/memory.ts:20:4 + ;;@ ~lib/memory.ts:247:2 (if - ;;@ ~lib/memory.ts:20:8 + ;;@ ~lib/memory.ts:247:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:20:13 + ;;@ ~lib/memory.ts:247:11 (i32.const 2) ) - ;;@ ~lib/memory.ts:20:16 + ;;@ ~lib/memory.ts:247:14 (return) ) - ;;@ ~lib/memory.ts:22:4 + ;;@ ~lib/memory.ts:249:2 (i32.store8 - ;;@ ~lib/memory.ts:22:14 + ;;@ ~lib/memory.ts:249:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:22:21 + ;;@ ~lib/memory.ts:249:19 (i32.const 1) ) - ;;@ ~lib/memory.ts:22:24 + ;;@ ~lib/memory.ts:249:22 (get_local $1) ) - ;;@ ~lib/memory.ts:23:4 + ;;@ ~lib/memory.ts:250:2 (i32.store8 - ;;@ ~lib/memory.ts:23:14 + ;;@ ~lib/memory.ts:250:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:23:21 + ;;@ ~lib/memory.ts:250:19 (i32.const 2) ) - ;;@ ~lib/memory.ts:23:24 + ;;@ ~lib/memory.ts:250:22 (get_local $1) ) - ;;@ ~lib/memory.ts:24:4 + ;;@ ~lib/memory.ts:251:2 (i32.store8 - ;;@ ~lib/memory.ts:24:14 + ;;@ ~lib/memory.ts:251:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:24:21 + ;;@ ~lib/memory.ts:251:19 (get_local $2) ) - ;;@ ~lib/memory.ts:24:25 + ;;@ ~lib/memory.ts:251:23 (i32.const 2) ) - ;;@ ~lib/memory.ts:24:28 + ;;@ ~lib/memory.ts:251:26 (get_local $1) ) - ;;@ ~lib/memory.ts:25:4 + ;;@ ~lib/memory.ts:252:2 (i32.store8 - ;;@ ~lib/memory.ts:25:14 + ;;@ ~lib/memory.ts:252:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:25:21 + ;;@ ~lib/memory.ts:252:19 (get_local $2) ) - ;;@ ~lib/memory.ts:25:25 + ;;@ ~lib/memory.ts:252:23 (i32.const 3) ) - ;;@ ~lib/memory.ts:25:28 + ;;@ ~lib/memory.ts:252:26 (get_local $1) ) - ;;@ ~lib/memory.ts:26:4 + ;;@ ~lib/memory.ts:253:2 (if - ;;@ ~lib/memory.ts:26:8 + ;;@ ~lib/memory.ts:253:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:26:13 + ;;@ ~lib/memory.ts:253:11 (i32.const 6) ) - ;;@ ~lib/memory.ts:26:16 + ;;@ ~lib/memory.ts:253:14 (return) ) - ;;@ ~lib/memory.ts:27:4 + ;;@ ~lib/memory.ts:254:2 (i32.store8 - ;;@ ~lib/memory.ts:27:14 + ;;@ ~lib/memory.ts:254:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:27:21 + ;;@ ~lib/memory.ts:254:19 (i32.const 3) ) - ;;@ ~lib/memory.ts:27:24 + ;;@ ~lib/memory.ts:254:22 (get_local $1) ) - ;;@ ~lib/memory.ts:28:4 + ;;@ ~lib/memory.ts:255:2 (i32.store8 - ;;@ ~lib/memory.ts:28:14 + ;;@ ~lib/memory.ts:255:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:28:21 + ;;@ ~lib/memory.ts:255:19 (get_local $2) ) - ;;@ ~lib/memory.ts:28:25 + ;;@ ~lib/memory.ts:255:23 (i32.const 4) ) - ;;@ ~lib/memory.ts:28:28 + ;;@ ~lib/memory.ts:255:26 (get_local $1) ) - ;;@ ~lib/memory.ts:29:4 + ;;@ ~lib/memory.ts:256:2 (if - ;;@ ~lib/memory.ts:29:8 + ;;@ ~lib/memory.ts:256:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:29:13 + ;;@ ~lib/memory.ts:256:11 (i32.const 8) ) - ;;@ ~lib/memory.ts:29:16 + ;;@ ~lib/memory.ts:256:14 (return) ) - ;;@ ~lib/memory.ts:40:4 + ;;@ ~lib/memory.ts:267:2 (i32.store - ;;@ ~lib/memory.ts:33:4 + ;;@ ~lib/memory.ts:260:2 (tee_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:32:4 + ;;@ ~lib/memory.ts:259:2 (tee_local $4 - ;;@ ~lib/memory.ts:32:19 + ;;@ ~lib/memory.ts:259:17 (i32.and (i32.sub (i32.const 0) - ;;@ ~lib/memory.ts:32:20 + ;;@ ~lib/memory.ts:259:18 (get_local $0) ) - ;;@ ~lib/memory.ts:32:27 + ;;@ ~lib/memory.ts:259:25 (i32.const 3) ) ) ) ) - ;;@ ~lib/memory.ts:37:4 + ;;@ ~lib/memory.ts:264:2 (tee_local $1 - ;;@ ~lib/memory.ts:37:19 + ;;@ ~lib/memory.ts:264:17 (i32.mul (i32.and - ;;@ ~lib/memory.ts:37:35 + ;;@ ~lib/memory.ts:264:33 (get_local $1) (i32.const 255) ) @@ -211,319 +196,319 @@ ) ) ) - ;;@ ~lib/memory.ts:41:4 + ;;@ ~lib/memory.ts:268:2 (i32.store - ;;@ ~lib/memory.ts:41:15 + ;;@ ~lib/memory.ts:268:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:35:4 + ;;@ ~lib/memory.ts:262:2 (tee_local $2 (i32.and (i32.sub - ;;@ ~lib/memory.ts:34:4 + ;;@ ~lib/memory.ts:261:2 (get_local $2) - ;;@ ~lib/memory.ts:34:9 + ;;@ ~lib/memory.ts:261:7 (get_local $4) ) - ;;@ ~lib/memory.ts:35:9 + ;;@ ~lib/memory.ts:262:7 (i32.const -4) ) ) ) - ;;@ ~lib/memory.ts:41:26 + ;;@ ~lib/memory.ts:268:24 (i32.const 4) ) - ;;@ ~lib/memory.ts:41:29 + ;;@ ~lib/memory.ts:268:27 (get_local $1) ) - ;;@ ~lib/memory.ts:42:4 + ;;@ ~lib/memory.ts:269:2 (if - ;;@ ~lib/memory.ts:42:8 + ;;@ ~lib/memory.ts:269:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:42:13 + ;;@ ~lib/memory.ts:269:11 (i32.const 8) ) - ;;@ ~lib/memory.ts:42:16 + ;;@ ~lib/memory.ts:269:14 (return) ) - ;;@ ~lib/memory.ts:43:4 + ;;@ ~lib/memory.ts:270:2 (i32.store - ;;@ ~lib/memory.ts:43:15 + ;;@ ~lib/memory.ts:270:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:43:22 + ;;@ ~lib/memory.ts:270:20 (i32.const 4) ) - ;;@ ~lib/memory.ts:43:25 + ;;@ ~lib/memory.ts:270:23 (get_local $1) ) - ;;@ ~lib/memory.ts:44:4 + ;;@ ~lib/memory.ts:271:2 (i32.store - ;;@ ~lib/memory.ts:44:15 + ;;@ ~lib/memory.ts:271:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:44:22 + ;;@ ~lib/memory.ts:271:20 (i32.const 8) ) - ;;@ ~lib/memory.ts:44:25 + ;;@ ~lib/memory.ts:271:23 (get_local $1) ) - ;;@ ~lib/memory.ts:45:4 + ;;@ ~lib/memory.ts:272:2 (i32.store - ;;@ ~lib/memory.ts:45:15 + ;;@ ~lib/memory.ts:272:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:45:22 + ;;@ ~lib/memory.ts:272:20 (get_local $2) ) - ;;@ ~lib/memory.ts:45:26 + ;;@ ~lib/memory.ts:272:24 (i32.const 12) ) - ;;@ ~lib/memory.ts:45:30 + ;;@ ~lib/memory.ts:272:28 (get_local $1) ) - ;;@ ~lib/memory.ts:46:4 + ;;@ ~lib/memory.ts:273:2 (i32.store - ;;@ ~lib/memory.ts:46:15 + ;;@ ~lib/memory.ts:273:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:46:22 + ;;@ ~lib/memory.ts:273:20 (get_local $2) ) - ;;@ ~lib/memory.ts:46:26 + ;;@ ~lib/memory.ts:273:24 (i32.const 8) ) - ;;@ ~lib/memory.ts:46:29 + ;;@ ~lib/memory.ts:273:27 (get_local $1) ) - ;;@ ~lib/memory.ts:47:4 + ;;@ ~lib/memory.ts:274:2 (if - ;;@ ~lib/memory.ts:47:8 + ;;@ ~lib/memory.ts:274:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:47:13 + ;;@ ~lib/memory.ts:274:11 (i32.const 24) ) - ;;@ ~lib/memory.ts:47:17 + ;;@ ~lib/memory.ts:274:15 (return) ) - ;;@ ~lib/memory.ts:48:4 + ;;@ ~lib/memory.ts:275:2 (i32.store - ;;@ ~lib/memory.ts:48:15 + ;;@ ~lib/memory.ts:275:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:48:22 + ;;@ ~lib/memory.ts:275:20 (i32.const 12) ) - ;;@ ~lib/memory.ts:48:26 + ;;@ ~lib/memory.ts:275:24 (get_local $1) ) - ;;@ ~lib/memory.ts:49:4 + ;;@ ~lib/memory.ts:276:2 (i32.store - ;;@ ~lib/memory.ts:49:15 + ;;@ ~lib/memory.ts:276:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:49:22 + ;;@ ~lib/memory.ts:276:20 (i32.const 16) ) - ;;@ ~lib/memory.ts:49:26 + ;;@ ~lib/memory.ts:276:24 (get_local $1) ) - ;;@ ~lib/memory.ts:50:4 + ;;@ ~lib/memory.ts:277:2 (i32.store - ;;@ ~lib/memory.ts:50:15 + ;;@ ~lib/memory.ts:277:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:50:22 + ;;@ ~lib/memory.ts:277:20 (i32.const 20) ) - ;;@ ~lib/memory.ts:50:26 + ;;@ ~lib/memory.ts:277:24 (get_local $1) ) - ;;@ ~lib/memory.ts:51:4 + ;;@ ~lib/memory.ts:278:2 (i32.store - ;;@ ~lib/memory.ts:51:15 + ;;@ ~lib/memory.ts:278:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:51:22 + ;;@ ~lib/memory.ts:278:20 (i32.const 24) ) - ;;@ ~lib/memory.ts:51:26 + ;;@ ~lib/memory.ts:278:24 (get_local $1) ) - ;;@ ~lib/memory.ts:52:4 + ;;@ ~lib/memory.ts:279:2 (i32.store - ;;@ ~lib/memory.ts:52:15 + ;;@ ~lib/memory.ts:279:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:52:22 + ;;@ ~lib/memory.ts:279:20 (get_local $2) ) - ;;@ ~lib/memory.ts:52:26 + ;;@ ~lib/memory.ts:279:24 (i32.const 28) ) - ;;@ ~lib/memory.ts:52:30 + ;;@ ~lib/memory.ts:279:28 (get_local $1) ) - ;;@ ~lib/memory.ts:53:4 + ;;@ ~lib/memory.ts:280:2 (i32.store - ;;@ ~lib/memory.ts:53:15 + ;;@ ~lib/memory.ts:280:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:53:22 + ;;@ ~lib/memory.ts:280:20 (get_local $2) ) - ;;@ ~lib/memory.ts:53:26 + ;;@ ~lib/memory.ts:280:24 (i32.const 24) ) - ;;@ ~lib/memory.ts:53:30 + ;;@ ~lib/memory.ts:280:28 (get_local $1) ) - ;;@ ~lib/memory.ts:54:4 + ;;@ ~lib/memory.ts:281:2 (i32.store - ;;@ ~lib/memory.ts:54:15 + ;;@ ~lib/memory.ts:281:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:54:22 + ;;@ ~lib/memory.ts:281:20 (get_local $2) ) - ;;@ ~lib/memory.ts:54:26 + ;;@ ~lib/memory.ts:281:24 (i32.const 20) ) - ;;@ ~lib/memory.ts:54:30 + ;;@ ~lib/memory.ts:281:28 (get_local $1) ) - ;;@ ~lib/memory.ts:55:4 + ;;@ ~lib/memory.ts:282:2 (i32.store - ;;@ ~lib/memory.ts:55:15 + ;;@ ~lib/memory.ts:282:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:55:22 + ;;@ ~lib/memory.ts:282:20 (get_local $2) ) - ;;@ ~lib/memory.ts:55:26 + ;;@ ~lib/memory.ts:282:24 (i32.const 16) ) - ;;@ ~lib/memory.ts:55:30 + ;;@ ~lib/memory.ts:282:28 (get_local $1) ) - ;;@ ~lib/memory.ts:59:4 + ;;@ ~lib/memory.ts:286:2 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:58:4 + ;;@ ~lib/memory.ts:285:2 (tee_local $4 - ;;@ ~lib/memory.ts:58:8 + ;;@ ~lib/memory.ts:285:6 (i32.add - ;;@ ~lib/memory.ts:58:13 + ;;@ ~lib/memory.ts:285:11 (i32.and - ;;@ ~lib/memory.ts:58:14 + ;;@ ~lib/memory.ts:285:12 (get_local $0) - ;;@ ~lib/memory.ts:58:21 + ;;@ ~lib/memory.ts:285:19 (i32.const 4) ) - ;;@ ~lib/memory.ts:58:8 + ;;@ ~lib/memory.ts:285:6 (i32.const 24) ) ) ) ) - ;;@ ~lib/memory.ts:60:4 + ;;@ ~lib/memory.ts:287:2 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:60:9 + ;;@ ~lib/memory.ts:287:7 (get_local $4) ) ) - ;;@ ~lib/memory.ts:63:4 + ;;@ ~lib/memory.ts:290:2 (set_local $3 - ;;@ ~lib/memory.ts:63:19 + ;;@ ~lib/memory.ts:290:17 (i64.or (i64.extend_u/i32 (get_local $1) ) - ;;@ ~lib/memory.ts:63:30 + ;;@ ~lib/memory.ts:290:28 (i64.shl - ;;@ ~lib/memory.ts:63:31 + ;;@ ~lib/memory.ts:290:29 (i64.extend_u/i32 (get_local $1) ) - ;;@ ~lib/memory.ts:63:43 + ;;@ ~lib/memory.ts:290:41 (i64.const 32) ) ) ) (loop $continue|0 (if - ;;@ ~lib/memory.ts:64:11 + ;;@ ~lib/memory.ts:291:9 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:64:16 + ;;@ ~lib/memory.ts:291:14 (i32.const 32) ) (block - ;;@ ~lib/memory.ts:65:6 + ;;@ ~lib/memory.ts:292:4 (i64.store - ;;@ ~lib/memory.ts:65:17 + ;;@ ~lib/memory.ts:292:15 (get_local $0) - ;;@ ~lib/memory.ts:65:23 + ;;@ ~lib/memory.ts:292:21 (get_local $3) ) - ;;@ ~lib/memory.ts:66:6 + ;;@ ~lib/memory.ts:293:4 (i64.store - ;;@ ~lib/memory.ts:66:17 + ;;@ ~lib/memory.ts:293:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:66:24 + ;;@ ~lib/memory.ts:293:22 (i32.const 8) ) - ;;@ ~lib/memory.ts:66:27 + ;;@ ~lib/memory.ts:293:25 (get_local $3) ) - ;;@ ~lib/memory.ts:67:6 + ;;@ ~lib/memory.ts:294:4 (i64.store - ;;@ ~lib/memory.ts:67:17 + ;;@ ~lib/memory.ts:294:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:67:24 + ;;@ ~lib/memory.ts:294:22 (i32.const 16) ) - ;;@ ~lib/memory.ts:67:28 + ;;@ ~lib/memory.ts:294:26 (get_local $3) ) - ;;@ ~lib/memory.ts:68:6 + ;;@ ~lib/memory.ts:295:4 (i64.store - ;;@ ~lib/memory.ts:68:17 + ;;@ ~lib/memory.ts:295:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:68:24 + ;;@ ~lib/memory.ts:295:22 (i32.const 24) ) - ;;@ ~lib/memory.ts:68:28 + ;;@ ~lib/memory.ts:295:26 (get_local $3) ) - ;;@ ~lib/memory.ts:69:6 + ;;@ ~lib/memory.ts:296:4 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:69:11 + ;;@ ~lib/memory.ts:296:9 (i32.const 32) ) ) - ;;@ ~lib/memory.ts:70:6 + ;;@ ~lib/memory.ts:297:4 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:70:14 + ;;@ ~lib/memory.ts:297:12 (i32.const 32) ) ) @@ -532,37 +517,48 @@ ) ) ) - (func $~lib/memory/memcpy (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 1 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + ;;@ ~lib/memory.ts:11:4 + (call $~lib/memory/memset + ;;@ ~lib/memory.ts:11:11 + (get_local $0) + ;;@ ~lib/memory.ts:11:17 + (get_local $1) + ;;@ ~lib/memory.ts:11:20 + (get_local $2) + ) + ) + (func $~lib/memory/memcpy (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (loop $continue|0 (if (select - ;;@ ~lib/memory.ts:164:14 + ;;@ ~lib/memory.ts:59:14 (i32.and - ;;@ ~lib/memory.ts:164:15 + ;;@ ~lib/memory.ts:59:15 (get_local $1) - ;;@ ~lib/memory.ts:164:21 + ;;@ ~lib/memory.ts:59:21 (i32.const 3) ) (get_local $2) - ;;@ ~lib/memory.ts:164:9 + ;;@ ~lib/memory.ts:59:9 (get_local $2) ) (block (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:165:14 + ;;@ ~lib/memory.ts:60:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:165:4 + ;;@ ~lib/memory.ts:60:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:165:31 + ;;@ ~lib/memory.ts:60:31 (block (result i32) (set_local $1 (i32.add @@ -572,13 +568,13 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:165:22 + ;;@ ~lib/memory.ts:60:22 (i32.load8_u (get_local $3) ) ) ) - ;;@ ~lib/memory.ts:166:4 + ;;@ ~lib/memory.ts:61:4 (set_local $2 (i32.sub (get_local $2) @@ -589,113 +585,113 @@ ) ) ) - ;;@ ~lib/memory.ts:170:2 + ;;@ ~lib/memory.ts:65:2 (if (i32.eqz - ;;@ ~lib/memory.ts:170:6 + ;;@ ~lib/memory.ts:65:6 (i32.and - ;;@ ~lib/memory.ts:170:7 + ;;@ ~lib/memory.ts:65:7 (get_local $0) - ;;@ ~lib/memory.ts:170:14 + ;;@ ~lib/memory.ts:65:14 (i32.const 3) ) ) - ;;@ ~lib/memory.ts:170:23 + ;;@ ~lib/memory.ts:65:23 (block (loop $continue|1 (if - ;;@ ~lib/memory.ts:171:11 + ;;@ ~lib/memory.ts:66:11 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:171:16 + ;;@ ~lib/memory.ts:66:16 (i32.const 16) ) (block - ;;@ ~lib/memory.ts:172:6 + ;;@ ~lib/memory.ts:67:6 (i32.store - ;;@ ~lib/memory.ts:172:17 + ;;@ ~lib/memory.ts:67:17 (get_local $0) - ;;@ ~lib/memory.ts:172:28 + ;;@ ~lib/memory.ts:67:28 (i32.load - ;;@ ~lib/memory.ts:172:38 + ;;@ ~lib/memory.ts:67:38 (get_local $1) ) ) - ;;@ ~lib/memory.ts:173:6 + ;;@ ~lib/memory.ts:68:6 (i32.store - ;;@ ~lib/memory.ts:173:17 + ;;@ ~lib/memory.ts:68:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:173:25 + ;;@ ~lib/memory.ts:68:25 (i32.const 4) ) - ;;@ ~lib/memory.ts:173:28 + ;;@ ~lib/memory.ts:68:28 (i32.load - ;;@ ~lib/memory.ts:173:38 + ;;@ ~lib/memory.ts:68:38 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:173:45 + ;;@ ~lib/memory.ts:68:45 (i32.const 4) ) ) ) - ;;@ ~lib/memory.ts:174:6 + ;;@ ~lib/memory.ts:69:6 (i32.store - ;;@ ~lib/memory.ts:174:17 + ;;@ ~lib/memory.ts:69:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:174:25 + ;;@ ~lib/memory.ts:69:25 (i32.const 8) ) - ;;@ ~lib/memory.ts:174:28 + ;;@ ~lib/memory.ts:69:28 (i32.load - ;;@ ~lib/memory.ts:174:38 + ;;@ ~lib/memory.ts:69:38 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:174:45 + ;;@ ~lib/memory.ts:69:45 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:175:6 + ;;@ ~lib/memory.ts:70:6 (i32.store - ;;@ ~lib/memory.ts:175:17 + ;;@ ~lib/memory.ts:70:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:175:24 + ;;@ ~lib/memory.ts:70:24 (i32.const 12) ) - ;;@ ~lib/memory.ts:175:28 + ;;@ ~lib/memory.ts:70:28 (i32.load - ;;@ ~lib/memory.ts:175:38 + ;;@ ~lib/memory.ts:70:38 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:175:44 + ;;@ ~lib/memory.ts:70:44 (i32.const 12) ) ) ) - ;;@ ~lib/memory.ts:176:6 + ;;@ ~lib/memory.ts:71:6 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:176:13 + ;;@ ~lib/memory.ts:71:13 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:176:17 + ;;@ ~lib/memory.ts:71:17 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:176:25 + ;;@ ~lib/memory.ts:71:25 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:176:29 + ;;@ ~lib/memory.ts:71:29 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:176:34 + ;;@ ~lib/memory.ts:71:34 (i32.const 16) ) ) @@ -703,160 +699,160 @@ ) ) ) - ;;@ ~lib/memory.ts:178:4 + ;;@ ~lib/memory.ts:73:4 (if - ;;@ ~lib/memory.ts:178:8 + ;;@ ~lib/memory.ts:73:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:178:12 + ;;@ ~lib/memory.ts:73:12 (i32.const 8) ) - ;;@ ~lib/memory.ts:178:15 + ;;@ ~lib/memory.ts:73:15 (block - ;;@ ~lib/memory.ts:179:6 + ;;@ ~lib/memory.ts:74:6 (i32.store - ;;@ ~lib/memory.ts:179:17 + ;;@ ~lib/memory.ts:74:17 (get_local $0) - ;;@ ~lib/memory.ts:179:27 + ;;@ ~lib/memory.ts:74:27 (i32.load - ;;@ ~lib/memory.ts:179:37 + ;;@ ~lib/memory.ts:74:37 (get_local $1) ) ) - ;;@ ~lib/memory.ts:180:6 + ;;@ ~lib/memory.ts:75:6 (i32.store - ;;@ ~lib/memory.ts:180:17 + ;;@ ~lib/memory.ts:75:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:180:24 + ;;@ ~lib/memory.ts:75:24 (i32.const 4) ) - ;;@ ~lib/memory.ts:180:27 + ;;@ ~lib/memory.ts:75:27 (i32.load - ;;@ ~lib/memory.ts:180:37 + ;;@ ~lib/memory.ts:75:37 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:180:43 + ;;@ ~lib/memory.ts:75:43 (i32.const 4) ) ) ) - ;;@ ~lib/memory.ts:181:6 + ;;@ ~lib/memory.ts:76:6 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:181:14 + ;;@ ~lib/memory.ts:76:14 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:181:17 + ;;@ ~lib/memory.ts:76:17 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:181:24 + ;;@ ~lib/memory.ts:76:24 (i32.const 8) ) ) ) ) - ;;@ ~lib/memory.ts:183:4 + ;;@ ~lib/memory.ts:78:4 (if - ;;@ ~lib/memory.ts:183:8 + ;;@ ~lib/memory.ts:78:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:183:12 + ;;@ ~lib/memory.ts:78:12 (i32.const 4) ) - ;;@ ~lib/memory.ts:183:15 + ;;@ ~lib/memory.ts:78:15 (block - ;;@ ~lib/memory.ts:184:6 + ;;@ ~lib/memory.ts:79:6 (i32.store - ;;@ ~lib/memory.ts:184:17 + ;;@ ~lib/memory.ts:79:17 (get_local $0) - ;;@ ~lib/memory.ts:184:23 + ;;@ ~lib/memory.ts:79:23 (i32.load - ;;@ ~lib/memory.ts:184:33 + ;;@ ~lib/memory.ts:79:33 (get_local $1) ) ) - ;;@ ~lib/memory.ts:185:6 + ;;@ ~lib/memory.ts:80:6 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:185:14 + ;;@ ~lib/memory.ts:80:14 (i32.const 4) ) ) - ;;@ ~lib/memory.ts:185:17 + ;;@ ~lib/memory.ts:80:17 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:185:24 + ;;@ ~lib/memory.ts:80:24 (i32.const 4) ) ) ) ) - ;;@ ~lib/memory.ts:187:4 + ;;@ ~lib/memory.ts:82:4 (if - ;;@ ~lib/memory.ts:187:8 + ;;@ ~lib/memory.ts:82:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:187:12 + ;;@ ~lib/memory.ts:82:12 (i32.const 2) ) - ;;@ ~lib/memory.ts:187:15 + ;;@ ~lib/memory.ts:82:15 (block - ;;@ ~lib/memory.ts:188:6 + ;;@ ~lib/memory.ts:83:6 (i32.store16 - ;;@ ~lib/memory.ts:188:17 + ;;@ ~lib/memory.ts:83:17 (get_local $0) - ;;@ ~lib/memory.ts:188:23 + ;;@ ~lib/memory.ts:83:23 (i32.load16_u - ;;@ ~lib/memory.ts:188:33 + ;;@ ~lib/memory.ts:83:33 (get_local $1) ) ) - ;;@ ~lib/memory.ts:189:6 + ;;@ ~lib/memory.ts:84:6 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:189:14 + ;;@ ~lib/memory.ts:84:14 (i32.const 2) ) ) - ;;@ ~lib/memory.ts:189:17 + ;;@ ~lib/memory.ts:84:17 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:189:24 + ;;@ ~lib/memory.ts:84:24 (i32.const 2) ) ) ) ) - ;;@ ~lib/memory.ts:191:4 + ;;@ ~lib/memory.ts:86:4 (if - ;;@ ~lib/memory.ts:191:8 + ;;@ ~lib/memory.ts:86:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:191:12 + ;;@ ~lib/memory.ts:86:12 (i32.const 1) ) - ;;@ ~lib/memory.ts:192:16 + ;;@ ~lib/memory.ts:87:16 (block (set_local $3 (get_local $0) ) - ;;@ ~lib/memory.ts:191:15 + ;;@ ~lib/memory.ts:86:15 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:192:33 + ;;@ ~lib/memory.ts:87:33 (block (result i32) (set_local $3 (get_local $1) ) - ;;@ ~lib/memory.ts:192:24 + ;;@ ~lib/memory.ts:87:24 (i32.load8_u (get_local $3) ) @@ -864,19 +860,19 @@ ) ) ) - ;;@ ~lib/memory.ts:194:4 + ;;@ ~lib/memory.ts:89:4 (return) ) ) - ;;@ ~lib/memory.ts:199:2 + ;;@ ~lib/memory.ts:94:2 (if - ;;@ ~lib/memory.ts:199:6 + ;;@ ~lib/memory.ts:94:6 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:199:11 + ;;@ ~lib/memory.ts:94:11 (i32.const 32) ) - ;;@ ~lib/memory.ts:199:15 + ;;@ ~lib/memory.ts:94:15 (block $break|2 (block $case2|2 (block $case1|2 @@ -884,10 +880,10 @@ (block $tablify|0 (br_table $case0|2 $case1|2 $case2|2 $tablify|0 (i32.sub - ;;@ ~lib/memory.ts:200:12 + ;;@ ~lib/memory.ts:95:12 (i32.and (get_local $0) - ;;@ ~lib/memory.ts:200:19 + ;;@ ~lib/memory.ts:95:19 (i32.const 3) ) (i32.const 1) @@ -896,27 +892,27 @@ ) (br $break|2) ) - ;;@ ~lib/memory.ts:203:8 + ;;@ ~lib/memory.ts:98:8 (set_local $4 - ;;@ ~lib/memory.ts:203:12 + ;;@ ~lib/memory.ts:98:12 (i32.load - ;;@ ~lib/memory.ts:203:22 + ;;@ ~lib/memory.ts:98:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:204:18 + ;;@ ~lib/memory.ts:99:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:204:8 + ;;@ ~lib/memory.ts:99:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:204:35 + ;;@ ~lib/memory.ts:99:35 (block (result i32) (set_local $1 (i32.add @@ -926,7 +922,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:204:26 + ;;@ ~lib/memory.ts:99:26 (i32.load8_u (get_local $3) ) @@ -935,16 +931,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:205:18 + ;;@ ~lib/memory.ts:100:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:205:8 + ;;@ ~lib/memory.ts:100:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:205:35 + ;;@ ~lib/memory.ts:100:35 (block (result i32) (set_local $1 (i32.add @@ -954,7 +950,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:205:26 + ;;@ ~lib/memory.ts:100:26 (i32.load8_u (get_local $3) ) @@ -963,16 +959,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:206:18 + ;;@ ~lib/memory.ts:101:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:206:8 + ;;@ ~lib/memory.ts:101:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:206:35 + ;;@ ~lib/memory.ts:101:35 (block (result i32) (set_local $1 (i32.add @@ -982,182 +978,182 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:206:26 + ;;@ ~lib/memory.ts:101:26 (i32.load8_u (get_local $3) ) ) ) - ;;@ ~lib/memory.ts:207:8 + ;;@ ~lib/memory.ts:102:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:207:13 + ;;@ ~lib/memory.ts:102:13 (i32.const 3) ) ) (loop $continue|3 (if - ;;@ ~lib/memory.ts:208:15 + ;;@ ~lib/memory.ts:103:15 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:208:20 + ;;@ ~lib/memory.ts:103:20 (i32.const 17) ) (block - ;;@ ~lib/memory.ts:210:10 + ;;@ ~lib/memory.ts:105:10 (i32.store - ;;@ ~lib/memory.ts:210:21 + ;;@ ~lib/memory.ts:105:21 (get_local $0) - ;;@ ~lib/memory.ts:210:27 + ;;@ ~lib/memory.ts:105:27 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:210:32 + ;;@ ~lib/memory.ts:105:32 (i32.const 24) ) - ;;@ ~lib/memory.ts:210:37 + ;;@ ~lib/memory.ts:105:37 (i32.shl - ;;@ ~lib/memory.ts:209:10 + ;;@ ~lib/memory.ts:104:10 (tee_local $3 - ;;@ ~lib/memory.ts:209:14 + ;;@ ~lib/memory.ts:104:14 (i32.load - ;;@ ~lib/memory.ts:209:24 + ;;@ ~lib/memory.ts:104:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:209:30 + ;;@ ~lib/memory.ts:104:30 (i32.const 1) ) ) ) - ;;@ ~lib/memory.ts:210:42 + ;;@ ~lib/memory.ts:105:42 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:212:10 + ;;@ ~lib/memory.ts:107:10 (i32.store - ;;@ ~lib/memory.ts:212:21 + ;;@ ~lib/memory.ts:107:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:212:28 + ;;@ ~lib/memory.ts:107:28 (i32.const 4) ) - ;;@ ~lib/memory.ts:212:31 + ;;@ ~lib/memory.ts:107:31 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:212:36 + ;;@ ~lib/memory.ts:107:36 (i32.const 24) ) - ;;@ ~lib/memory.ts:212:41 + ;;@ ~lib/memory.ts:107:41 (i32.shl - ;;@ ~lib/memory.ts:211:10 + ;;@ ~lib/memory.ts:106:10 (tee_local $4 - ;;@ ~lib/memory.ts:211:14 + ;;@ ~lib/memory.ts:106:14 (i32.load - ;;@ ~lib/memory.ts:211:24 + ;;@ ~lib/memory.ts:106:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:211:30 + ;;@ ~lib/memory.ts:106:30 (i32.const 5) ) ) ) - ;;@ ~lib/memory.ts:212:46 + ;;@ ~lib/memory.ts:107:46 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:214:10 + ;;@ ~lib/memory.ts:109:10 (i32.store - ;;@ ~lib/memory.ts:214:21 + ;;@ ~lib/memory.ts:109:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:214:28 + ;;@ ~lib/memory.ts:109:28 (i32.const 8) ) - ;;@ ~lib/memory.ts:214:31 + ;;@ ~lib/memory.ts:109:31 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:214:36 + ;;@ ~lib/memory.ts:109:36 (i32.const 24) ) - ;;@ ~lib/memory.ts:214:41 + ;;@ ~lib/memory.ts:109:41 (i32.shl - ;;@ ~lib/memory.ts:213:10 + ;;@ ~lib/memory.ts:108:10 (tee_local $3 - ;;@ ~lib/memory.ts:213:14 + ;;@ ~lib/memory.ts:108:14 (i32.load - ;;@ ~lib/memory.ts:213:24 + ;;@ ~lib/memory.ts:108:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:213:30 + ;;@ ~lib/memory.ts:108:30 (i32.const 9) ) ) ) - ;;@ ~lib/memory.ts:214:46 + ;;@ ~lib/memory.ts:109:46 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:216:10 + ;;@ ~lib/memory.ts:111:10 (i32.store - ;;@ ~lib/memory.ts:216:21 + ;;@ ~lib/memory.ts:111:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:216:28 + ;;@ ~lib/memory.ts:111:28 (i32.const 12) ) - ;;@ ~lib/memory.ts:216:32 + ;;@ ~lib/memory.ts:111:32 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:216:37 + ;;@ ~lib/memory.ts:111:37 (i32.const 24) ) - ;;@ ~lib/memory.ts:216:42 + ;;@ ~lib/memory.ts:111:42 (i32.shl - ;;@ ~lib/memory.ts:215:10 + ;;@ ~lib/memory.ts:110:10 (tee_local $4 - ;;@ ~lib/memory.ts:215:14 + ;;@ ~lib/memory.ts:110:14 (i32.load - ;;@ ~lib/memory.ts:215:24 + ;;@ ~lib/memory.ts:110:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:215:30 + ;;@ ~lib/memory.ts:110:30 (i32.const 13) ) ) ) - ;;@ ~lib/memory.ts:216:47 + ;;@ ~lib/memory.ts:111:47 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:217:10 + ;;@ ~lib/memory.ts:112:10 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:217:17 + ;;@ ~lib/memory.ts:112:17 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:217:21 + ;;@ ~lib/memory.ts:112:21 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:217:29 + ;;@ ~lib/memory.ts:112:29 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:217:33 + ;;@ ~lib/memory.ts:112:33 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:217:38 + ;;@ ~lib/memory.ts:112:38 (i32.const 16) ) ) @@ -1165,30 +1161,30 @@ ) ) ) - ;;@ ~lib/memory.ts:219:8 + ;;@ ~lib/memory.ts:114:8 (br $break|2) ) - ;;@ ~lib/memory.ts:222:8 + ;;@ ~lib/memory.ts:117:8 (set_local $4 - ;;@ ~lib/memory.ts:222:12 + ;;@ ~lib/memory.ts:117:12 (i32.load - ;;@ ~lib/memory.ts:222:22 + ;;@ ~lib/memory.ts:117:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:223:18 + ;;@ ~lib/memory.ts:118:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:223:8 + ;;@ ~lib/memory.ts:118:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:223:35 + ;;@ ~lib/memory.ts:118:35 (block (result i32) (set_local $1 (i32.add @@ -1198,7 +1194,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:223:26 + ;;@ ~lib/memory.ts:118:26 (i32.load8_u (get_local $3) ) @@ -1207,16 +1203,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:224:18 + ;;@ ~lib/memory.ts:119:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:224:8 + ;;@ ~lib/memory.ts:119:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:224:35 + ;;@ ~lib/memory.ts:119:35 (block (result i32) (set_local $1 (i32.add @@ -1226,182 +1222,182 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:224:26 + ;;@ ~lib/memory.ts:119:26 (i32.load8_u (get_local $3) ) ) ) - ;;@ ~lib/memory.ts:225:8 + ;;@ ~lib/memory.ts:120:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:225:13 + ;;@ ~lib/memory.ts:120:13 (i32.const 2) ) ) (loop $continue|4 (if - ;;@ ~lib/memory.ts:226:15 + ;;@ ~lib/memory.ts:121:15 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:226:20 + ;;@ ~lib/memory.ts:121:20 (i32.const 18) ) (block - ;;@ ~lib/memory.ts:228:10 + ;;@ ~lib/memory.ts:123:10 (i32.store - ;;@ ~lib/memory.ts:228:21 + ;;@ ~lib/memory.ts:123:21 (get_local $0) - ;;@ ~lib/memory.ts:228:27 + ;;@ ~lib/memory.ts:123:27 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:228:32 + ;;@ ~lib/memory.ts:123:32 (i32.const 16) ) - ;;@ ~lib/memory.ts:228:37 + ;;@ ~lib/memory.ts:123:37 (i32.shl - ;;@ ~lib/memory.ts:227:10 + ;;@ ~lib/memory.ts:122:10 (tee_local $3 - ;;@ ~lib/memory.ts:227:14 + ;;@ ~lib/memory.ts:122:14 (i32.load - ;;@ ~lib/memory.ts:227:24 + ;;@ ~lib/memory.ts:122:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:227:30 + ;;@ ~lib/memory.ts:122:30 (i32.const 2) ) ) ) - ;;@ ~lib/memory.ts:228:42 + ;;@ ~lib/memory.ts:123:42 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:230:10 + ;;@ ~lib/memory.ts:125:10 (i32.store - ;;@ ~lib/memory.ts:230:21 + ;;@ ~lib/memory.ts:125:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:230:28 + ;;@ ~lib/memory.ts:125:28 (i32.const 4) ) - ;;@ ~lib/memory.ts:230:31 + ;;@ ~lib/memory.ts:125:31 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:230:36 + ;;@ ~lib/memory.ts:125:36 (i32.const 16) ) - ;;@ ~lib/memory.ts:230:41 + ;;@ ~lib/memory.ts:125:41 (i32.shl - ;;@ ~lib/memory.ts:229:10 + ;;@ ~lib/memory.ts:124:10 (tee_local $4 - ;;@ ~lib/memory.ts:229:14 + ;;@ ~lib/memory.ts:124:14 (i32.load - ;;@ ~lib/memory.ts:229:24 + ;;@ ~lib/memory.ts:124:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:229:30 + ;;@ ~lib/memory.ts:124:30 (i32.const 6) ) ) ) - ;;@ ~lib/memory.ts:230:46 + ;;@ ~lib/memory.ts:125:46 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:232:10 + ;;@ ~lib/memory.ts:127:10 (i32.store - ;;@ ~lib/memory.ts:232:21 + ;;@ ~lib/memory.ts:127:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:232:28 + ;;@ ~lib/memory.ts:127:28 (i32.const 8) ) - ;;@ ~lib/memory.ts:232:31 + ;;@ ~lib/memory.ts:127:31 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:232:36 + ;;@ ~lib/memory.ts:127:36 (i32.const 16) ) - ;;@ ~lib/memory.ts:232:41 + ;;@ ~lib/memory.ts:127:41 (i32.shl - ;;@ ~lib/memory.ts:231:10 + ;;@ ~lib/memory.ts:126:10 (tee_local $3 - ;;@ ~lib/memory.ts:231:14 + ;;@ ~lib/memory.ts:126:14 (i32.load - ;;@ ~lib/memory.ts:231:24 + ;;@ ~lib/memory.ts:126:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:231:30 + ;;@ ~lib/memory.ts:126:30 (i32.const 10) ) ) ) - ;;@ ~lib/memory.ts:232:46 + ;;@ ~lib/memory.ts:127:46 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:234:10 + ;;@ ~lib/memory.ts:129:10 (i32.store - ;;@ ~lib/memory.ts:234:21 + ;;@ ~lib/memory.ts:129:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:234:28 + ;;@ ~lib/memory.ts:129:28 (i32.const 12) ) - ;;@ ~lib/memory.ts:234:32 + ;;@ ~lib/memory.ts:129:32 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:234:37 + ;;@ ~lib/memory.ts:129:37 (i32.const 16) ) - ;;@ ~lib/memory.ts:234:42 + ;;@ ~lib/memory.ts:129:42 (i32.shl - ;;@ ~lib/memory.ts:233:10 + ;;@ ~lib/memory.ts:128:10 (tee_local $4 - ;;@ ~lib/memory.ts:233:14 + ;;@ ~lib/memory.ts:128:14 (i32.load - ;;@ ~lib/memory.ts:233:24 + ;;@ ~lib/memory.ts:128:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:233:30 + ;;@ ~lib/memory.ts:128:30 (i32.const 14) ) ) ) - ;;@ ~lib/memory.ts:234:47 + ;;@ ~lib/memory.ts:129:47 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:235:10 + ;;@ ~lib/memory.ts:130:10 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:235:17 + ;;@ ~lib/memory.ts:130:17 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:235:21 + ;;@ ~lib/memory.ts:130:21 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:235:29 + ;;@ ~lib/memory.ts:130:29 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:235:33 + ;;@ ~lib/memory.ts:130:33 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:235:38 + ;;@ ~lib/memory.ts:130:38 (i32.const 16) ) ) @@ -1409,30 +1405,30 @@ ) ) ) - ;;@ ~lib/memory.ts:237:8 + ;;@ ~lib/memory.ts:132:8 (br $break|2) ) - ;;@ ~lib/memory.ts:240:8 + ;;@ ~lib/memory.ts:135:8 (set_local $4 - ;;@ ~lib/memory.ts:240:12 + ;;@ ~lib/memory.ts:135:12 (i32.load - ;;@ ~lib/memory.ts:240:22 + ;;@ ~lib/memory.ts:135:22 (get_local $1) ) ) (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:241:18 + ;;@ ~lib/memory.ts:136:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:241:8 + ;;@ ~lib/memory.ts:136:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:241:35 + ;;@ ~lib/memory.ts:136:35 (block (result i32) (set_local $1 (i32.add @@ -1442,182 +1438,182 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:241:26 + ;;@ ~lib/memory.ts:136:26 (i32.load8_u (get_local $3) ) ) ) - ;;@ ~lib/memory.ts:242:8 + ;;@ ~lib/memory.ts:137:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:242:13 + ;;@ ~lib/memory.ts:137:13 (i32.const 1) ) ) (loop $continue|5 (if - ;;@ ~lib/memory.ts:243:15 + ;;@ ~lib/memory.ts:138:15 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:243:20 + ;;@ ~lib/memory.ts:138:20 (i32.const 19) ) (block - ;;@ ~lib/memory.ts:245:10 + ;;@ ~lib/memory.ts:140:10 (i32.store - ;;@ ~lib/memory.ts:245:21 + ;;@ ~lib/memory.ts:140:21 (get_local $0) - ;;@ ~lib/memory.ts:245:27 + ;;@ ~lib/memory.ts:140:27 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:245:32 + ;;@ ~lib/memory.ts:140:32 (i32.const 8) ) - ;;@ ~lib/memory.ts:245:36 + ;;@ ~lib/memory.ts:140:36 (i32.shl - ;;@ ~lib/memory.ts:244:10 + ;;@ ~lib/memory.ts:139:10 (tee_local $3 - ;;@ ~lib/memory.ts:244:14 + ;;@ ~lib/memory.ts:139:14 (i32.load - ;;@ ~lib/memory.ts:244:24 + ;;@ ~lib/memory.ts:139:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:244:30 + ;;@ ~lib/memory.ts:139:30 (i32.const 3) ) ) ) - ;;@ ~lib/memory.ts:245:41 + ;;@ ~lib/memory.ts:140:41 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:247:10 + ;;@ ~lib/memory.ts:142:10 (i32.store - ;;@ ~lib/memory.ts:247:21 + ;;@ ~lib/memory.ts:142:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:247:28 + ;;@ ~lib/memory.ts:142:28 (i32.const 4) ) - ;;@ ~lib/memory.ts:247:31 + ;;@ ~lib/memory.ts:142:31 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:247:36 + ;;@ ~lib/memory.ts:142:36 (i32.const 8) ) - ;;@ ~lib/memory.ts:247:40 + ;;@ ~lib/memory.ts:142:40 (i32.shl - ;;@ ~lib/memory.ts:246:10 + ;;@ ~lib/memory.ts:141:10 (tee_local $4 - ;;@ ~lib/memory.ts:246:14 + ;;@ ~lib/memory.ts:141:14 (i32.load - ;;@ ~lib/memory.ts:246:24 + ;;@ ~lib/memory.ts:141:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:246:30 + ;;@ ~lib/memory.ts:141:30 (i32.const 7) ) ) ) - ;;@ ~lib/memory.ts:247:45 + ;;@ ~lib/memory.ts:142:45 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:249:10 + ;;@ ~lib/memory.ts:144:10 (i32.store - ;;@ ~lib/memory.ts:249:21 + ;;@ ~lib/memory.ts:144:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:249:28 + ;;@ ~lib/memory.ts:144:28 (i32.const 8) ) - ;;@ ~lib/memory.ts:249:31 + ;;@ ~lib/memory.ts:144:31 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:249:36 + ;;@ ~lib/memory.ts:144:36 (i32.const 8) ) - ;;@ ~lib/memory.ts:249:40 + ;;@ ~lib/memory.ts:144:40 (i32.shl - ;;@ ~lib/memory.ts:248:10 + ;;@ ~lib/memory.ts:143:10 (tee_local $3 - ;;@ ~lib/memory.ts:248:14 + ;;@ ~lib/memory.ts:143:14 (i32.load - ;;@ ~lib/memory.ts:248:24 + ;;@ ~lib/memory.ts:143:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:248:30 + ;;@ ~lib/memory.ts:143:30 (i32.const 11) ) ) ) - ;;@ ~lib/memory.ts:249:45 + ;;@ ~lib/memory.ts:144:45 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:251:10 + ;;@ ~lib/memory.ts:146:10 (i32.store - ;;@ ~lib/memory.ts:251:21 + ;;@ ~lib/memory.ts:146:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:251:28 + ;;@ ~lib/memory.ts:146:28 (i32.const 12) ) - ;;@ ~lib/memory.ts:251:32 + ;;@ ~lib/memory.ts:146:32 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:251:37 + ;;@ ~lib/memory.ts:146:37 (i32.const 8) ) - ;;@ ~lib/memory.ts:251:41 + ;;@ ~lib/memory.ts:146:41 (i32.shl - ;;@ ~lib/memory.ts:250:10 + ;;@ ~lib/memory.ts:145:10 (tee_local $4 - ;;@ ~lib/memory.ts:250:14 + ;;@ ~lib/memory.ts:145:14 (i32.load - ;;@ ~lib/memory.ts:250:24 + ;;@ ~lib/memory.ts:145:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:250:30 + ;;@ ~lib/memory.ts:145:30 (i32.const 15) ) ) ) - ;;@ ~lib/memory.ts:251:46 + ;;@ ~lib/memory.ts:146:46 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:252:10 + ;;@ ~lib/memory.ts:147:10 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:252:17 + ;;@ ~lib/memory.ts:147:17 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:252:21 + ;;@ ~lib/memory.ts:147:21 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:252:29 + ;;@ ~lib/memory.ts:147:29 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:252:33 + ;;@ ~lib/memory.ts:147:33 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:252:38 + ;;@ ~lib/memory.ts:147:38 (i32.const 16) ) ) @@ -1627,29 +1623,29 @@ ) ) ) - ;;@ ~lib/memory.ts:260:2 + ;;@ ~lib/memory.ts:155:2 (if - ;;@ ~lib/memory.ts:260:6 + ;;@ ~lib/memory.ts:155:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:260:10 + ;;@ ~lib/memory.ts:155:10 (i32.const 16) ) - ;;@ ~lib/memory.ts:260:14 + ;;@ ~lib/memory.ts:155:14 (block (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:261:14 + ;;@ ~lib/memory.ts:156:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:261:4 + ;;@ ~lib/memory.ts:156:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:261:31 + ;;@ ~lib/memory.ts:156:31 (block (result i32) (set_local $1 (i32.add @@ -1659,7 +1655,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:261:22 + ;;@ ~lib/memory.ts:156:22 (i32.load8_u (get_local $3) ) @@ -1668,16 +1664,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:262:14 + ;;@ ~lib/memory.ts:157:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:262:4 + ;;@ ~lib/memory.ts:157:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:262:31 + ;;@ ~lib/memory.ts:157:31 (block (result i32) (set_local $1 (i32.add @@ -1687,7 +1683,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:262:22 + ;;@ ~lib/memory.ts:157:22 (i32.load8_u (get_local $3) ) @@ -1696,16 +1692,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:263:14 + ;;@ ~lib/memory.ts:158:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:263:4 + ;;@ ~lib/memory.ts:158:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:263:31 + ;;@ ~lib/memory.ts:158:31 (block (result i32) (set_local $1 (i32.add @@ -1715,7 +1711,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:263:22 + ;;@ ~lib/memory.ts:158:22 (i32.load8_u (get_local $3) ) @@ -1724,16 +1720,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:264:14 + ;;@ ~lib/memory.ts:159:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:264:4 + ;;@ ~lib/memory.ts:159:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:264:31 + ;;@ ~lib/memory.ts:159:31 (block (result i32) (set_local $1 (i32.add @@ -1743,7 +1739,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:264:22 + ;;@ ~lib/memory.ts:159:22 (i32.load8_u (get_local $3) ) @@ -1752,16 +1748,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:265:14 + ;;@ ~lib/memory.ts:160:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:265:4 + ;;@ ~lib/memory.ts:160:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:265:31 + ;;@ ~lib/memory.ts:160:31 (block (result i32) (set_local $1 (i32.add @@ -1771,7 +1767,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:265:22 + ;;@ ~lib/memory.ts:160:22 (i32.load8_u (get_local $3) ) @@ -1780,16 +1776,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:266:14 + ;;@ ~lib/memory.ts:161:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:266:4 + ;;@ ~lib/memory.ts:161:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:266:31 + ;;@ ~lib/memory.ts:161:31 (block (result i32) (set_local $1 (i32.add @@ -1799,7 +1795,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:266:22 + ;;@ ~lib/memory.ts:161:22 (i32.load8_u (get_local $3) ) @@ -1808,16 +1804,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:267:14 + ;;@ ~lib/memory.ts:162:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:267:4 + ;;@ ~lib/memory.ts:162:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:267:31 + ;;@ ~lib/memory.ts:162:31 (block (result i32) (set_local $1 (i32.add @@ -1827,7 +1823,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:267:22 + ;;@ ~lib/memory.ts:162:22 (i32.load8_u (get_local $3) ) @@ -1836,16 +1832,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:268:14 + ;;@ ~lib/memory.ts:163:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:268:4 + ;;@ ~lib/memory.ts:163:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:268:31 + ;;@ ~lib/memory.ts:163:31 (block (result i32) (set_local $1 (i32.add @@ -1855,7 +1851,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:268:22 + ;;@ ~lib/memory.ts:163:22 (i32.load8_u (get_local $3) ) @@ -1864,16 +1860,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:269:14 + ;;@ ~lib/memory.ts:164:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:269:4 + ;;@ ~lib/memory.ts:164:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:269:31 + ;;@ ~lib/memory.ts:164:31 (block (result i32) (set_local $1 (i32.add @@ -1883,7 +1879,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:269:22 + ;;@ ~lib/memory.ts:164:22 (i32.load8_u (get_local $3) ) @@ -1892,16 +1888,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:270:14 + ;;@ ~lib/memory.ts:165:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:270:4 + ;;@ ~lib/memory.ts:165:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:270:31 + ;;@ ~lib/memory.ts:165:31 (block (result i32) (set_local $1 (i32.add @@ -1911,7 +1907,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:270:22 + ;;@ ~lib/memory.ts:165:22 (i32.load8_u (get_local $3) ) @@ -1920,16 +1916,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:271:14 + ;;@ ~lib/memory.ts:166:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:271:4 + ;;@ ~lib/memory.ts:166:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:271:31 + ;;@ ~lib/memory.ts:166:31 (block (result i32) (set_local $1 (i32.add @@ -1939,7 +1935,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:271:22 + ;;@ ~lib/memory.ts:166:22 (i32.load8_u (get_local $3) ) @@ -1948,16 +1944,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:272:14 + ;;@ ~lib/memory.ts:167:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:272:4 + ;;@ ~lib/memory.ts:167:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:272:31 + ;;@ ~lib/memory.ts:167:31 (block (result i32) (set_local $1 (i32.add @@ -1967,7 +1963,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:272:22 + ;;@ ~lib/memory.ts:167:22 (i32.load8_u (get_local $3) ) @@ -1976,16 +1972,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:273:14 + ;;@ ~lib/memory.ts:168:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:273:4 + ;;@ ~lib/memory.ts:168:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:273:31 + ;;@ ~lib/memory.ts:168:31 (block (result i32) (set_local $1 (i32.add @@ -1995,7 +1991,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:273:22 + ;;@ ~lib/memory.ts:168:22 (i32.load8_u (get_local $3) ) @@ -2004,16 +2000,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:274:14 + ;;@ ~lib/memory.ts:169:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:274:4 + ;;@ ~lib/memory.ts:169:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:274:31 + ;;@ ~lib/memory.ts:169:31 (block (result i32) (set_local $1 (i32.add @@ -2023,7 +2019,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:274:22 + ;;@ ~lib/memory.ts:169:22 (i32.load8_u (get_local $3) ) @@ -2032,16 +2028,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:275:14 + ;;@ ~lib/memory.ts:170:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:275:4 + ;;@ ~lib/memory.ts:170:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:275:31 + ;;@ ~lib/memory.ts:170:31 (block (result i32) (set_local $1 (i32.add @@ -2051,7 +2047,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:275:22 + ;;@ ~lib/memory.ts:170:22 (i32.load8_u (get_local $3) ) @@ -2060,16 +2056,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:276:14 + ;;@ ~lib/memory.ts:171:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:276:4 + ;;@ ~lib/memory.ts:171:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:276:31 + ;;@ ~lib/memory.ts:171:31 (block (result i32) (set_local $1 (i32.add @@ -2079,7 +2075,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:276:22 + ;;@ ~lib/memory.ts:171:22 (i32.load8_u (get_local $3) ) @@ -2087,29 +2083,29 @@ ) ) ) - ;;@ ~lib/memory.ts:278:2 + ;;@ ~lib/memory.ts:173:2 (if - ;;@ ~lib/memory.ts:278:6 + ;;@ ~lib/memory.ts:173:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:278:10 + ;;@ ~lib/memory.ts:173:10 (i32.const 8) ) - ;;@ ~lib/memory.ts:278:13 + ;;@ ~lib/memory.ts:173:13 (block (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:279:14 + ;;@ ~lib/memory.ts:174:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:279:4 + ;;@ ~lib/memory.ts:174:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:279:31 + ;;@ ~lib/memory.ts:174:31 (block (result i32) (set_local $1 (i32.add @@ -2119,7 +2115,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:279:22 + ;;@ ~lib/memory.ts:174:22 (i32.load8_u (get_local $3) ) @@ -2128,16 +2124,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:280:14 + ;;@ ~lib/memory.ts:175:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:280:4 + ;;@ ~lib/memory.ts:175:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:280:31 + ;;@ ~lib/memory.ts:175:31 (block (result i32) (set_local $1 (i32.add @@ -2147,7 +2143,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:280:22 + ;;@ ~lib/memory.ts:175:22 (i32.load8_u (get_local $3) ) @@ -2156,16 +2152,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:281:14 + ;;@ ~lib/memory.ts:176:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:281:4 + ;;@ ~lib/memory.ts:176:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:281:31 + ;;@ ~lib/memory.ts:176:31 (block (result i32) (set_local $1 (i32.add @@ -2175,7 +2171,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:281:22 + ;;@ ~lib/memory.ts:176:22 (i32.load8_u (get_local $3) ) @@ -2184,16 +2180,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:282:14 + ;;@ ~lib/memory.ts:177:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:282:4 + ;;@ ~lib/memory.ts:177:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:282:31 + ;;@ ~lib/memory.ts:177:31 (block (result i32) (set_local $1 (i32.add @@ -2203,7 +2199,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:282:22 + ;;@ ~lib/memory.ts:177:22 (i32.load8_u (get_local $3) ) @@ -2212,16 +2208,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:283:14 + ;;@ ~lib/memory.ts:178:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:283:4 + ;;@ ~lib/memory.ts:178:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:283:31 + ;;@ ~lib/memory.ts:178:31 (block (result i32) (set_local $1 (i32.add @@ -2231,7 +2227,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:283:22 + ;;@ ~lib/memory.ts:178:22 (i32.load8_u (get_local $3) ) @@ -2240,16 +2236,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:284:14 + ;;@ ~lib/memory.ts:179:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:284:4 + ;;@ ~lib/memory.ts:179:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:284:31 + ;;@ ~lib/memory.ts:179:31 (block (result i32) (set_local $1 (i32.add @@ -2259,7 +2255,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:284:22 + ;;@ ~lib/memory.ts:179:22 (i32.load8_u (get_local $3) ) @@ -2268,16 +2264,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:285:14 + ;;@ ~lib/memory.ts:180:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:285:4 + ;;@ ~lib/memory.ts:180:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:285:31 + ;;@ ~lib/memory.ts:180:31 (block (result i32) (set_local $1 (i32.add @@ -2287,7 +2283,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:285:22 + ;;@ ~lib/memory.ts:180:22 (i32.load8_u (get_local $3) ) @@ -2296,16 +2292,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:286:14 + ;;@ ~lib/memory.ts:181:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:286:4 + ;;@ ~lib/memory.ts:181:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:286:31 + ;;@ ~lib/memory.ts:181:31 (block (result i32) (set_local $1 (i32.add @@ -2315,7 +2311,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:286:22 + ;;@ ~lib/memory.ts:181:22 (i32.load8_u (get_local $3) ) @@ -2323,29 +2319,29 @@ ) ) ) - ;;@ ~lib/memory.ts:288:2 + ;;@ ~lib/memory.ts:183:2 (if - ;;@ ~lib/memory.ts:288:6 + ;;@ ~lib/memory.ts:183:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:288:10 + ;;@ ~lib/memory.ts:183:10 (i32.const 4) ) - ;;@ ~lib/memory.ts:288:13 + ;;@ ~lib/memory.ts:183:13 (block (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:289:14 + ;;@ ~lib/memory.ts:184:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:289:4 + ;;@ ~lib/memory.ts:184:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:289:31 + ;;@ ~lib/memory.ts:184:31 (block (result i32) (set_local $1 (i32.add @@ -2355,7 +2351,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:289:22 + ;;@ ~lib/memory.ts:184:22 (i32.load8_u (get_local $3) ) @@ -2364,16 +2360,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:290:14 + ;;@ ~lib/memory.ts:185:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:290:4 + ;;@ ~lib/memory.ts:185:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:290:31 + ;;@ ~lib/memory.ts:185:31 (block (result i32) (set_local $1 (i32.add @@ -2383,7 +2379,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:290:22 + ;;@ ~lib/memory.ts:185:22 (i32.load8_u (get_local $3) ) @@ -2392,16 +2388,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:291:14 + ;;@ ~lib/memory.ts:186:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:291:4 + ;;@ ~lib/memory.ts:186:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:291:31 + ;;@ ~lib/memory.ts:186:31 (block (result i32) (set_local $1 (i32.add @@ -2411,7 +2407,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:291:22 + ;;@ ~lib/memory.ts:186:22 (i32.load8_u (get_local $3) ) @@ -2420,16 +2416,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:292:14 + ;;@ ~lib/memory.ts:187:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:292:4 + ;;@ ~lib/memory.ts:187:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:292:31 + ;;@ ~lib/memory.ts:187:31 (block (result i32) (set_local $1 (i32.add @@ -2439,7 +2435,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:292:22 + ;;@ ~lib/memory.ts:187:22 (i32.load8_u (get_local $3) ) @@ -2447,29 +2443,29 @@ ) ) ) - ;;@ ~lib/memory.ts:294:2 + ;;@ ~lib/memory.ts:189:2 (if - ;;@ ~lib/memory.ts:294:6 + ;;@ ~lib/memory.ts:189:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:294:10 + ;;@ ~lib/memory.ts:189:10 (i32.const 2) ) - ;;@ ~lib/memory.ts:294:13 + ;;@ ~lib/memory.ts:189:13 (block (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:295:14 + ;;@ ~lib/memory.ts:190:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:295:4 + ;;@ ~lib/memory.ts:190:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:295:31 + ;;@ ~lib/memory.ts:190:31 (block (result i32) (set_local $1 (i32.add @@ -2479,7 +2475,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:295:22 + ;;@ ~lib/memory.ts:190:22 (i32.load8_u (get_local $3) ) @@ -2488,16 +2484,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:296:14 + ;;@ ~lib/memory.ts:191:14 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:296:4 + ;;@ ~lib/memory.ts:191:4 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:296:31 + ;;@ ~lib/memory.ts:191:31 (block (result i32) (set_local $1 (i32.add @@ -2507,7 +2503,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:296:22 + ;;@ ~lib/memory.ts:191:22 (i32.load8_u (get_local $3) ) @@ -2515,28 +2511,28 @@ ) ) ) - ;;@ ~lib/memory.ts:298:2 + ;;@ ~lib/memory.ts:193:2 (if - ;;@ ~lib/memory.ts:298:6 + ;;@ ~lib/memory.ts:193:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:298:10 + ;;@ ~lib/memory.ts:193:10 (i32.const 1) ) - ;;@ ~lib/memory.ts:299:14 + ;;@ ~lib/memory.ts:194:14 (block (set_local $3 (get_local $0) ) - ;;@ ~lib/memory.ts:298:13 + ;;@ ~lib/memory.ts:193:13 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:299:31 + ;;@ ~lib/memory.ts:194:31 (block (result i32) (set_local $3 (get_local $1) ) - ;;@ ~lib/memory.ts:299:22 + ;;@ ~lib/memory.ts:194:22 (i32.load8_u (get_local $3) ) @@ -2545,114 +2541,114 @@ ) ) ) - (func $~lib/memory/memory.copy (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memmove (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - ;;@ ~lib/memory.ts:79:4 + ;;@ ~lib/memory.ts:200:2 (if - ;;@ ~lib/memory.ts:79:8 + ;;@ ~lib/memory.ts:200:6 (i32.eq (get_local $0) - ;;@ ~lib/memory.ts:79:16 + ;;@ ~lib/memory.ts:200:14 (get_local $1) ) - ;;@ ~lib/memory.ts:79:21 + ;;@ ~lib/memory.ts:200:19 (return) ) - ;;@ ~lib/memory.ts:80:4 + ;;@ ~lib/memory.ts:201:2 (if - ;;@ ~lib/memory.ts:80:8 + ;;@ ~lib/memory.ts:201:6 (if (result i32) (tee_local $3 (i32.le_u (i32.add (get_local $1) - ;;@ ~lib/memory.ts:80:14 + ;;@ ~lib/memory.ts:201:12 (get_local $2) ) - ;;@ ~lib/memory.ts:80:19 + ;;@ ~lib/memory.ts:201:17 (get_local $0) ) ) (get_local $3) - ;;@ ~lib/memory.ts:80:27 + ;;@ ~lib/memory.ts:201:25 (i32.le_u (i32.add (get_local $0) - ;;@ ~lib/memory.ts:80:34 + ;;@ ~lib/memory.ts:201:32 (get_local $2) ) - ;;@ ~lib/memory.ts:80:39 + ;;@ ~lib/memory.ts:201:37 (get_local $1) ) ) - ;;@ ~lib/memory.ts:80:44 + ;;@ ~lib/memory.ts:201:42 (block - ;;@ ~lib/memory.ts:81:6 + ;;@ ~lib/memory.ts:202:4 (call $~lib/memory/memcpy - ;;@ ~lib/memory.ts:81:13 + ;;@ ~lib/memory.ts:202:11 (get_local $0) - ;;@ ~lib/memory.ts:81:19 + ;;@ ~lib/memory.ts:202:17 (get_local $1) - ;;@ ~lib/memory.ts:81:24 + ;;@ ~lib/memory.ts:202:22 (get_local $2) ) - ;;@ ~lib/memory.ts:82:6 + ;;@ ~lib/memory.ts:203:4 (return) ) ) - ;;@ ~lib/memory.ts:84:4 + ;;@ ~lib/memory.ts:205:2 (if - ;;@ ~lib/memory.ts:84:8 + ;;@ ~lib/memory.ts:205:6 (i32.lt_u (get_local $0) - ;;@ ~lib/memory.ts:84:15 + ;;@ ~lib/memory.ts:205:13 (get_local $1) ) - ;;@ ~lib/memory.ts:84:20 + ;;@ ~lib/memory.ts:205:18 (block - ;;@ ~lib/memory.ts:85:6 + ;;@ ~lib/memory.ts:206:4 (if - ;;@ ~lib/memory.ts:85:10 + ;;@ ~lib/memory.ts:206:8 (i32.eq (i32.and - ;;@ ~lib/memory.ts:85:11 + ;;@ ~lib/memory.ts:206:9 (get_local $1) - ;;@ ~lib/memory.ts:85:17 + ;;@ ~lib/memory.ts:206:15 (i32.const 7) ) - ;;@ ~lib/memory.ts:85:23 + ;;@ ~lib/memory.ts:206:21 (i32.and - ;;@ ~lib/memory.ts:85:24 + ;;@ ~lib/memory.ts:206:22 (get_local $0) - ;;@ ~lib/memory.ts:85:31 + ;;@ ~lib/memory.ts:206:29 (i32.const 7) ) ) - ;;@ ~lib/memory.ts:85:35 + ;;@ ~lib/memory.ts:206:33 (block (loop $continue|0 (if - ;;@ ~lib/memory.ts:86:15 + ;;@ ~lib/memory.ts:207:13 (i32.and (get_local $0) - ;;@ ~lib/memory.ts:86:22 + ;;@ ~lib/memory.ts:207:20 (i32.const 7) ) (block - ;;@ ~lib/memory.ts:87:10 + ;;@ ~lib/memory.ts:208:8 (if - ;;@ ~lib/memory.ts:87:14 + ;;@ ~lib/memory.ts:208:12 (i32.eqz - ;;@ ~lib/memory.ts:87:15 + ;;@ ~lib/memory.ts:208:13 (get_local $2) ) - ;;@ ~lib/memory.ts:87:18 + ;;@ ~lib/memory.ts:208:16 (return) ) - ;;@ ~lib/memory.ts:88:10 + ;;@ ~lib/memory.ts:209:8 (set_local $2 (i32.sub - ;;@ ~lib/memory.ts:88:12 + ;;@ ~lib/memory.ts:209:10 (get_local $2) (i32.const 1) ) @@ -2660,16 +2656,16 @@ (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:89:20 + ;;@ ~lib/memory.ts:210:18 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:89:10 + ;;@ ~lib/memory.ts:210:8 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:89:37 + ;;@ ~lib/memory.ts:210:35 (block (result i32) (set_local $1 (i32.add @@ -2679,7 +2675,7 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:89:28 + ;;@ ~lib/memory.ts:210:26 (i32.load8_u (get_local $3) ) @@ -2691,44 +2687,44 @@ ) (loop $continue|1 (if - ;;@ ~lib/memory.ts:91:15 + ;;@ ~lib/memory.ts:212:13 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:91:20 + ;;@ ~lib/memory.ts:212:18 (i32.const 8) ) (block - ;;@ ~lib/memory.ts:92:10 + ;;@ ~lib/memory.ts:213:8 (i64.store - ;;@ ~lib/memory.ts:92:21 + ;;@ ~lib/memory.ts:213:19 (get_local $0) - ;;@ ~lib/memory.ts:92:27 + ;;@ ~lib/memory.ts:213:25 (i64.load - ;;@ ~lib/memory.ts:92:37 + ;;@ ~lib/memory.ts:213:35 (get_local $1) ) ) - ;;@ ~lib/memory.ts:93:10 + ;;@ ~lib/memory.ts:214:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:93:18 + ;;@ ~lib/memory.ts:214:16 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:94:10 + ;;@ ~lib/memory.ts:215:8 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:94:18 + ;;@ ~lib/memory.ts:215:16 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:95:10 + ;;@ ~lib/memory.ts:216:8 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:95:18 + ;;@ ~lib/memory.ts:216:16 (i32.const 8) ) ) @@ -2740,22 +2736,22 @@ ) (loop $continue|2 (if - ;;@ ~lib/memory.ts:98:13 + ;;@ ~lib/memory.ts:219:11 (get_local $2) (block (set_local $0 (i32.add (tee_local $3 - ;;@ ~lib/memory.ts:99:18 + ;;@ ~lib/memory.ts:220:16 (get_local $0) ) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:99:8 + ;;@ ~lib/memory.ts:220:6 (i32.store8 (get_local $3) - ;;@ ~lib/memory.ts:99:35 + ;;@ ~lib/memory.ts:220:33 (block (result i32) (set_local $1 (i32.add @@ -2765,16 +2761,16 @@ (i32.const 1) ) ) - ;;@ ~lib/memory.ts:99:26 + ;;@ ~lib/memory.ts:220:24 (i32.load8_u (get_local $3) ) ) ) - ;;@ ~lib/memory.ts:100:8 + ;;@ ~lib/memory.ts:221:6 (set_local $2 (i32.sub - ;;@ ~lib/memory.ts:100:10 + ;;@ ~lib/memory.ts:221:8 (get_local $2) (i32.const 1) ) @@ -2784,72 +2780,72 @@ ) ) ) - ;;@ ~lib/memory.ts:102:11 + ;;@ ~lib/memory.ts:223:9 (block - ;;@ ~lib/memory.ts:103:6 + ;;@ ~lib/memory.ts:224:4 (if - ;;@ ~lib/memory.ts:103:10 + ;;@ ~lib/memory.ts:224:8 (i32.eq (i32.and - ;;@ ~lib/memory.ts:103:11 + ;;@ ~lib/memory.ts:224:9 (get_local $1) - ;;@ ~lib/memory.ts:103:17 + ;;@ ~lib/memory.ts:224:15 (i32.const 7) ) - ;;@ ~lib/memory.ts:103:23 + ;;@ ~lib/memory.ts:224:21 (i32.and - ;;@ ~lib/memory.ts:103:24 + ;;@ ~lib/memory.ts:224:22 (get_local $0) - ;;@ ~lib/memory.ts:103:31 + ;;@ ~lib/memory.ts:224:29 (i32.const 7) ) ) - ;;@ ~lib/memory.ts:103:35 + ;;@ ~lib/memory.ts:224:33 (block (loop $continue|3 (if - ;;@ ~lib/memory.ts:104:15 + ;;@ ~lib/memory.ts:225:13 (i32.and (i32.add - ;;@ ~lib/memory.ts:104:16 + ;;@ ~lib/memory.ts:225:14 (get_local $0) - ;;@ ~lib/memory.ts:104:23 + ;;@ ~lib/memory.ts:225:21 (get_local $2) ) - ;;@ ~lib/memory.ts:104:28 + ;;@ ~lib/memory.ts:225:26 (i32.const 7) ) (block - ;;@ ~lib/memory.ts:105:10 + ;;@ ~lib/memory.ts:226:8 (if - ;;@ ~lib/memory.ts:105:14 + ;;@ ~lib/memory.ts:226:12 (i32.eqz - ;;@ ~lib/memory.ts:105:15 + ;;@ ~lib/memory.ts:226:13 (get_local $2) ) - ;;@ ~lib/memory.ts:105:18 + ;;@ ~lib/memory.ts:226:16 (return) ) - ;;@ ~lib/memory.ts:106:10 + ;;@ ~lib/memory.ts:227:8 (i32.store8 - ;;@ ~lib/memory.ts:106:20 + ;;@ ~lib/memory.ts:227:18 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:106:27 + ;;@ ~lib/memory.ts:227:25 (tee_local $2 (i32.sub - ;;@ ~lib/memory.ts:106:29 + ;;@ ~lib/memory.ts:227:27 (get_local $2) (i32.const 1) ) ) ) - ;;@ ~lib/memory.ts:106:32 + ;;@ ~lib/memory.ts:227:30 (i32.load8_u - ;;@ ~lib/memory.ts:106:41 + ;;@ ~lib/memory.ts:227:39 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:106:47 + ;;@ ~lib/memory.ts:227:45 (get_local $2) ) ) @@ -2860,33 +2856,33 @@ ) (loop $continue|4 (if - ;;@ ~lib/memory.ts:108:15 + ;;@ ~lib/memory.ts:229:13 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:108:20 + ;;@ ~lib/memory.ts:229:18 (i32.const 8) ) (block - ;;@ ~lib/memory.ts:110:10 + ;;@ ~lib/memory.ts:231:8 (i64.store - ;;@ ~lib/memory.ts:110:21 + ;;@ ~lib/memory.ts:231:19 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:109:10 + ;;@ ~lib/memory.ts:230:8 (tee_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:109:15 + ;;@ ~lib/memory.ts:230:13 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:110:31 + ;;@ ~lib/memory.ts:231:29 (i64.load - ;;@ ~lib/memory.ts:110:41 + ;;@ ~lib/memory.ts:231:39 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:110:47 + ;;@ ~lib/memory.ts:231:45 (get_local $2) ) ) @@ -2899,29 +2895,29 @@ ) (loop $continue|5 (if - ;;@ ~lib/memory.ts:113:13 + ;;@ ~lib/memory.ts:234:11 (get_local $2) (block - ;;@ ~lib/memory.ts:113:16 + ;;@ ~lib/memory.ts:234:14 (i32.store8 - ;;@ ~lib/memory.ts:114:18 + ;;@ ~lib/memory.ts:235:16 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:114:25 + ;;@ ~lib/memory.ts:235:23 (tee_local $2 (i32.sub - ;;@ ~lib/memory.ts:114:27 + ;;@ ~lib/memory.ts:235:25 (get_local $2) (i32.const 1) ) ) ) - ;;@ ~lib/memory.ts:114:30 + ;;@ ~lib/memory.ts:235:28 (i32.load8_u - ;;@ ~lib/memory.ts:114:39 + ;;@ ~lib/memory.ts:235:37 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:114:45 + ;;@ ~lib/memory.ts:235:43 (get_local $2) ) ) @@ -2933,62 +2929,73 @@ ) ) ) - (func $~lib/memory/memory.compare (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.copy (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + ;;@ ~lib/memory.ts:16:4 + (call $~lib/memory/memmove + ;;@ ~lib/memory.ts:16:12 + (get_local $0) + ;;@ ~lib/memory.ts:16:18 + (get_local $1) + ;;@ ~lib/memory.ts:16:23 + (get_local $2) + ) + ) + (func $~lib/memory/memcmp (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - ;;@ ~lib/memory.ts:122:4 + ;;@ ~lib/memory.ts:302:2 (if - ;;@ ~lib/memory.ts:122:8 + ;;@ ~lib/memory.ts:302:6 (i32.eq (get_local $0) - ;;@ ~lib/memory.ts:122:14 + ;;@ ~lib/memory.ts:302:12 (get_local $1) ) - ;;@ ~lib/memory.ts:122:25 + ;;@ ~lib/memory.ts:302:23 (return (i32.const 0) ) ) (loop $continue|0 (if - ;;@ ~lib/memory.ts:123:11 + ;;@ ~lib/memory.ts:303:9 (if (result i32) (tee_local $3 (i32.ne (get_local $2) - ;;@ ~lib/memory.ts:123:16 + ;;@ ~lib/memory.ts:303:14 (i32.const 0) ) ) - ;;@ ~lib/memory.ts:123:21 + ;;@ ~lib/memory.ts:303:19 (i32.eq (i32.load8_u - ;;@ ~lib/memory.ts:123:30 + ;;@ ~lib/memory.ts:303:28 (get_local $0) ) - ;;@ ~lib/memory.ts:123:37 + ;;@ ~lib/memory.ts:303:35 (i32.load8_u - ;;@ ~lib/memory.ts:123:46 + ;;@ ~lib/memory.ts:303:44 (get_local $1) ) ) (get_local $3) ) (block - ;;@ ~lib/memory.ts:124:6 + ;;@ ~lib/memory.ts:304:4 (set_local $2 (i32.sub (get_local $2) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:124:11 + ;;@ ~lib/memory.ts:304:9 (set_local $0 (i32.add (get_local $0) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:124:17 + ;;@ ~lib/memory.ts:304:15 (set_local $1 (i32.add (get_local $1) @@ -2999,27 +3006,38 @@ ) ) ) - ;;@ ~lib/memory.ts:126:55 + ;;@ ~lib/memory.ts:306:53 (if (result i32) - ;;@ ~lib/memory.ts:126:11 + ;;@ ~lib/memory.ts:306:9 (get_local $2) - ;;@ ~lib/memory.ts:126:15 + ;;@ ~lib/memory.ts:306:13 (i32.sub (i32.load8_u - ;;@ ~lib/memory.ts:126:29 + ;;@ ~lib/memory.ts:306:27 (get_local $0) ) - ;;@ ~lib/memory.ts:126:35 + ;;@ ~lib/memory.ts:306:33 (i32.load8_u - ;;@ ~lib/memory.ts:126:49 + ;;@ ~lib/memory.ts:306:47 (get_local $1) ) ) - ;;@ ~lib/memory.ts:126:55 + ;;@ ~lib/memory.ts:306:53 (i32.const 0) ) ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 6 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.compare (; 6 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + ;;@ ~lib/memory.ts:21:27 + (call $~lib/memory/memcmp + ;;@ ~lib/memory.ts:21:18 + (get_local $0) + ;;@ ~lib/memory.ts:21:22 + (get_local $1) + ;;@ ~lib/memory.ts:21:26 + (get_local $2) + ) + ) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 7 ;) (type $iiv) (param $0 i32) (param $1 i32) ;;@ ~lib/allocator/tlsf.ts:181:30 (i32.store ;;@ ~lib/allocator/tlsf.ts:181:43 @@ -3028,7 +3046,7 @@ (get_local $1) ) ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) ;;@ ~lib/allocator/tlsf.ts:145:4 (i32.store offset=4 ;;@ ~lib/allocator/tlsf.ts:145:15 @@ -3045,7 +3063,7 @@ (get_local $2) ) ) - (func $~lib/allocator/tlsf/Root#setHead (; 8 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 9 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) ;;@ ~lib/allocator/tlsf.ts:169:4 (i32.store offset=96 ;;@ ~lib/allocator/tlsf.ts:170:6 @@ -3057,7 +3075,6 @@ ;;@ ~lib/allocator/tlsf.ts:170:33 (i32.shl (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:170:38 (i32.const 5) ) ;;@ ~lib/allocator/tlsf.ts:170:48 @@ -3071,13 +3088,12 @@ (get_local $3) ) ) - (func $~lib/allocator/tlsf/Block#get:right (; 9 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 10 ;) (type $ii) (param $0 i32) (result i32) ;;@ ~lib/allocator/tlsf.ts:94:4 (i32.add ;;@ ~lib/allocator/tlsf.ts:92:8 (i32.add (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:92:34 (i32.const 8) ) ;;@ ~lib/allocator/tlsf.ts:92:47 @@ -3090,7 +3106,7 @@ ) ) ) - (func $~lib/allocator/tlsf/fls (; 10 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 11 ;) (type $ii) (param $0 i32) (result i32) ;;@ ~lib/allocator/tlsf.ts:430:26 (i32.sub ;;@ ~lib/allocator/tlsf.ts:430:9 @@ -3102,7 +3118,7 @@ ) ) ) - (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 (; 12 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) ;;@ ~lib/allocator/tlsf.ts:162:20 (i32.load offset=96 ;;@ ~lib/allocator/tlsf.ts:161:6 @@ -3114,7 +3130,6 @@ ;;@ ~lib/allocator/tlsf.ts:161:33 (i32.shl (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:161:38 (i32.const 5) ) ;;@ ~lib/allocator/tlsf.ts:161:48 @@ -3126,7 +3141,7 @@ ) ) ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) ;;@ ~lib/allocator/tlsf.ts:139:68 (i32.load offset=4 ;;@ ~lib/allocator/tlsf.ts:139:21 @@ -3141,7 +3156,7 @@ ) ) ) - (func $~lib/allocator/tlsf/Root#remove (; 13 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 14 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3162,7 +3177,6 @@ (i32.const -4) ) ) - ;;@ ~lib/allocator/tlsf.ts:264:15 (i32.const 256) ) ;;@ ~lib/allocator/tlsf.ts:264:24 @@ -3173,7 +3187,6 @@ (i32.div_u ;;@ ~lib/allocator/tlsf.ts:266:17 (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:266:24 (i32.const 8) ) ) @@ -3200,7 +3213,6 @@ (get_local $2) ) ) - ;;@ ~lib/allocator/tlsf.ts:269:32 (i32.const 5) ) ) @@ -3210,7 +3222,6 @@ (i32.sub ;;@ ~lib/allocator/tlsf.ts:270:6 (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:270:12 (i32.const 7) ) ) @@ -3350,7 +3361,7 @@ ) ) ) - (func $~lib/allocator/tlsf/Root#insert (; 14 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 15 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3380,7 +3391,6 @@ ) ) ) - ;;@ ~lib/allocator/tlsf.ts:201:20 (i32.const 1) ) ;;@ ~lib/allocator/tlsf.ts:201:26 @@ -3408,7 +3418,6 @@ (get_local $5) (i32.const -4) ) - ;;@ ~lib/allocator/tlsf.ts:203:33 (i32.const 8) ) ) @@ -3434,7 +3443,6 @@ ;;@ ~lib/allocator/tlsf.ts:210:8 (i32.and (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:210:20 (i32.const 2) ) ;;@ ~lib/allocator/tlsf.ts:210:31 @@ -3478,7 +3486,6 @@ (get_local $2) (i32.const -4) ) - ;;@ ~lib/allocator/tlsf.ts:215:31 (i32.const 8) ) ) @@ -3497,7 +3504,6 @@ ;;@ ~lib/allocator/tlsf.ts:221:17 (i32.or (get_local $5) - ;;@ ~lib/allocator/tlsf.ts:221:29 (i32.const 2) ) ) @@ -3529,7 +3535,6 @@ (i32.const -4) ) ) - ;;@ ~lib/allocator/tlsf.ts:230:15 (i32.const 256) ) ;;@ ~lib/allocator/tlsf.ts:230:24 @@ -3540,7 +3545,6 @@ (i32.div_u ;;@ ~lib/allocator/tlsf.ts:232:17 (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:232:24 (i32.const 8) ) ) @@ -3567,7 +3571,6 @@ (get_local $3) ) ) - ;;@ ~lib/allocator/tlsf.ts:235:32 (i32.const 5) ) ) @@ -3577,7 +3580,6 @@ (i32.sub ;;@ ~lib/allocator/tlsf.ts:236:6 (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:236:12 (i32.const 7) ) ) @@ -3662,7 +3664,7 @@ ) ) ) - (func $~lib/allocator/tlsf/Root#addMemory (; 15 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 16 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) ;;@ ~lib/allocator/tlsf.ts:383:4 @@ -3679,7 +3681,6 @@ (i32.eq (i32.sub (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:387:18 (i32.const 8) ) ;;@ ~lib/allocator/tlsf.ts:387:32 @@ -3691,7 +3692,6 @@ (set_local $1 (i32.sub (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:388:17 (i32.const 8) ) ) @@ -3718,7 +3718,6 @@ (get_local $1) ) ) - ;;@ ~lib/allocator/tlsf.ts:398:45 (i32.const 32) ) ;;@ ~lib/allocator/tlsf.ts:398:57 @@ -3739,14 +3738,12 @@ (get_local $2) (i32.const 16) ) - ;;@ ~lib/allocator/tlsf.ts:405:27 (i32.const 1) ) ;;@ ~lib/allocator/tlsf.ts:405:34 (i32.and ;;@ ~lib/allocator/tlsf.ts:405:35 (get_local $4) - ;;@ ~lib/allocator/tlsf.ts:405:46 (i32.const 2) ) ) @@ -3775,7 +3772,6 @@ ;;@ ~lib/allocator/tlsf.ts:410:41 (get_local $2) ) - ;;@ ~lib/allocator/tlsf.ts:410:48 (i32.const 8) ) ) @@ -3797,7 +3793,7 @@ ;;@ ~lib/allocator/tlsf.ts:416:11 (i32.const 1) ) - (func $~lib/allocator/tlsf/Root#search (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (set_local $1 ;;@ ~lib/allocator/tlsf.ts:300:4 @@ -3805,14 +3801,12 @@ ;;@ ~lib/allocator/tlsf.ts:300:8 (i32.lt_u (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:300:15 (i32.const 256) ) ;;@ ~lib/allocator/tlsf.ts:302:11 (i32.div_u ;;@ ~lib/allocator/tlsf.ts:302:17 (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:302:24 (i32.const 8) ) ;;@ ~lib/allocator/tlsf.ts:303:11 @@ -3835,7 +3829,6 @@ (get_local $1) ) ) - ;;@ ~lib/allocator/tlsf.ts:306:32 (i32.const 5) ) ) @@ -3846,7 +3839,6 @@ (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:307:12 (i32.const 7) ) ) @@ -3855,7 +3847,6 @@ ;;@ ~lib/allocator/tlsf.ts:309:10 (i32.lt_u (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:309:15 (i32.const 31) ) (i32.add @@ -3967,7 +3958,7 @@ ) ) ) - (func $~lib/allocator/tlsf/Root#use (; 17 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 18 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) ;;@ ~lib/allocator/tlsf.ts:347:4 @@ -4001,7 +3992,6 @@ (get_local $2) ) ) - ;;@ ~lib/allocator/tlsf.ts:356:34 (i32.const 24) ) ;;@ ~lib/allocator/tlsf.ts:356:50 @@ -4016,7 +4006,6 @@ (i32.and ;;@ ~lib/allocator/tlsf.ts:357:27 (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:357:39 (i32.const 2) ) ) @@ -4030,7 +4019,6 @@ ;;@ ~lib/allocator/tlsf.ts:360:8 (i32.add (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:360:35 (i32.const 8) ) ;;@ ~lib/allocator/tlsf.ts:360:48 @@ -4042,10 +4030,8 @@ (i32.sub ;;@ ~lib/allocator/tlsf.ts:362:20 (get_local $4) - ;;@ ~lib/allocator/tlsf.ts:362:32 (i32.const 8) ) - ;;@ ~lib/allocator/tlsf.ts:362:46 (i32.const 1) ) ) @@ -4092,11 +4078,10 @@ (i32.add ;;@ ~lib/allocator/tlsf.ts:372:11 (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:372:38 (i32.const 8) ) ) - (func $~lib/allocator/tlsf/__memory_allocate (; 18 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__memory_allocate (; 19 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4129,16 +4114,7 @@ (i32.add ;;@ ~lib/allocator/tlsf.ts:445:4 (tee_local $4 - ;;@ ~lib/allocator/tlsf.ts:445:21 - (i32.and - (i32.add - ;;@ ~lib/allocator/tlsf.ts:445:22 - (get_global $HEAP_BASE) - ;;@ ~lib/allocator/tlsf.ts:445:34 - (i32.const 7) - ) - (i32.const -8) - ) + (i32.const 8) ) (i32.const 68451) ) @@ -4150,12 +4126,14 @@ ) ;;@ ~lib/allocator/tlsf.ts:446:4 (tee_local $5 + ;;@ ~lib/allocator/tlsf.ts:446:29 (current_memory) ) ) ) ;;@ ~lib/allocator/tlsf.ts:448:37 (i32.lt_s + ;;@ ~lib/allocator/tlsf.ts:448:44 (grow_memory ;;@ ~lib/allocator/tlsf.ts:448:49 (i32.sub @@ -4204,7 +4182,6 @@ ;;@ ~lib/allocator/tlsf.ts:452:28 (i32.ge_u (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:452:33 (i32.const 22) ) ) @@ -4229,7 +4206,6 @@ ;;@ ~lib/allocator/tlsf.ts:454:28 (i32.ge_u (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:454:33 (i32.const 32) ) ) @@ -4282,6 +4258,7 @@ ) ;;@ ~lib/allocator/tlsf.ts:458:66 (i32.shl + ;;@ ~lib/allocator/tlsf.ts:458:73 (current_memory) ;;@ ~lib/allocator/tlsf.ts:458:83 (i32.const 16) @@ -4306,7 +4283,6 @@ ;;@ ~lib/allocator/tlsf.ts:464:8 (i32.gt_u (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:464:15 (i32.const 1073741824) ) ;;@ ~lib/allocator/tlsf.ts:464:31 @@ -4332,17 +4308,17 @@ (i32.add ;;@ ~lib/allocator/tlsf.ts:466:23 (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:466:30 (i32.const 7) ) (i32.const -8) ) ) - ;;@ ~lib/allocator/tlsf.ts:466:51 - (i32.const 16) + (tee_local $5 + (i32.const 16) + ) (i32.gt_u (get_local $1) - (i32.const 16) + (get_local $5) ) ) ) @@ -4355,12 +4331,14 @@ (if ;;@ ~lib/allocator/tlsf.ts:475:10 (i32.lt_s + ;;@ ~lib/allocator/tlsf.ts:475:17 (grow_memory ;;@ ~lib/allocator/tlsf.ts:474:24 (select (tee_local $3 ;;@ ~lib/allocator/tlsf.ts:472:6 (tee_local $5 + ;;@ ~lib/allocator/tlsf.ts:472:31 (current_memory) ) ) @@ -4398,6 +4376,7 @@ (if ;;@ ~lib/allocator/tlsf.ts:476:12 (i32.lt_s + ;;@ ~lib/allocator/tlsf.ts:476:19 (grow_memory ;;@ ~lib/allocator/tlsf.ts:476:24 (get_local $4) @@ -4422,6 +4401,7 @@ ) ;;@ ~lib/allocator/tlsf.ts:481:47 (i32.shl + ;;@ ~lib/allocator/tlsf.ts:480:30 (current_memory) ;;@ ~lib/allocator/tlsf.ts:481:68 (i32.const 16) @@ -4457,14 +4437,14 @@ ;;@ ~lib/allocator/tlsf.ts:489:9 (get_local $4) ) - (func $~lib/memory/memory.allocate (; 19 ;) (type $ii) (param $0 i32) (result i32) - ;;@ ~lib/memory.ts:142:45 + (func $~lib/memory/memory.allocate (; 20 ;) (type $ii) (param $0 i32) (result i32) + ;;@ ~lib/memory.ts:37:45 (call $~lib/allocator/tlsf/__memory_allocate - ;;@ ~lib/memory.ts:142:63 + ;;@ ~lib/memory.ts:37:63 (get_local $0) ) ) - (func $~lib/allocator/tlsf/__memory_free (; 20 ;) (type $iv) (param $0 i32) + (func $~lib/allocator/tlsf/__memory_free (; 21 ;) (type $iv) (param $0 i32) (local $1 i32) (local $2 i32) ;;@ ~lib/allocator/tlsf.ts:495:2 @@ -4488,7 +4468,6 @@ (i32.sub ;;@ ~lib/allocator/tlsf.ts:498:36 (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:498:43 (i32.const 8) ) ) @@ -4498,7 +4477,6 @@ (i32.load (get_local $2) ) - ;;@ ~lib/allocator/tlsf.ts:501:31 (i32.const 1) ) ) @@ -4510,7 +4488,6 @@ (i32.sub ;;@ ~lib/allocator/tlsf.ts:502:36 (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:502:43 (i32.const 8) ) ) @@ -4518,14 +4495,14 @@ ) ) ) - (func $~lib/memory/memory.free (; 21 ;) (type $iv) (param $0 i32) - ;;@ ~lib/memory.ts:148:36 + (func $~lib/memory/memory.free (; 22 ;) (type $iv) (param $0 i32) + ;;@ ~lib/memory.ts:43:36 (call $~lib/allocator/tlsf/__memory_free - ;;@ ~lib/memory.ts:148:50 + ;;@ ~lib/memory.ts:43:50 (get_local $0) ) ) - (func $~lib/memory/memory.reset (; 22 ;) (type $v) + (func $~lib/memory/memory.reset (; 23 ;) (type $v) (unreachable) ) ) diff --git a/tests/allocators/tlsf/untouched.wat b/tests/allocators/tlsf/untouched.wat index 6359b3cd..26986726 100644 --- a/tests/allocators/tlsf/untouched.wat +++ b/tests/allocators/tlsf/untouched.wat @@ -1,9 +1,8 @@ (module (type $iiiiv (func (param i32 i32 i32 i32))) - (type $i (func (result i32))) - (type $ii (func (param i32) (result i32))) (type $iiiv (func (param i32 i32 i32))) (type $iiii (func (param i32 i32 i32) (result i32))) + (type $ii (func (param i32) (result i32))) (type $iiv (func (param i32 i32))) (type $iii (func (param i32 i32) (result i32))) (type $iv (func (param i32))) @@ -22,543 +21,538 @@ (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) + (global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4)) + (global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92)) + (global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96)) + (global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912)) + (global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916)) + (global $~lib/allocator/tlsf/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 $HEAP_BASE i32 (i32.const 56)) (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") - (export "memory.size" (func $~lib/memory/memory.size)) - (export "memory.grow" (func $~lib/memory/memory.grow)) + (export "memory" (memory $0)) (export "memory.fill" (func $~lib/memory/memory.fill)) (export "memory.copy" (func $~lib/memory/memory.copy)) (export "memory.compare" (func $~lib/memory/memory.compare)) (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" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 1 ;) (type $i) (result i32) - ;;@ ~lib/memory.ts:4:25 - (current_memory) - ) - (func $~lib/memory/memory.grow (; 2 ;) (type $ii) (param $0 i32) (result i32) - ;;@ ~lib/memory.ts:8:30 - (grow_memory - ;;@ ~lib/memory.ts:8:25 - (get_local $0) - ) - ) - (func $~lib/memory/memory.fill (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 1 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) - ;;@ ~lib/memory.ts:17:4 + ;;@ ~lib/memory.ts:244:2 (if - ;;@ ~lib/memory.ts:17:8 + ;;@ ~lib/memory.ts:244:6 (i32.eqz - ;;@ ~lib/memory.ts:17:9 + ;;@ ~lib/memory.ts:244:7 (get_local $2) ) - ;;@ ~lib/memory.ts:17:12 + ;;@ ~lib/memory.ts:244:10 (return) ) - ;;@ ~lib/memory.ts:18:4 + ;;@ ~lib/memory.ts:245:2 (i32.store8 - ;;@ ~lib/memory.ts:18:14 + ;;@ ~lib/memory.ts:245:12 (get_local $0) - ;;@ ~lib/memory.ts:18:20 + ;;@ ~lib/memory.ts:245:18 (get_local $1) ) - ;;@ ~lib/memory.ts:19:4 + ;;@ ~lib/memory.ts:246:2 (i32.store8 - ;;@ ~lib/memory.ts:19:14 + ;;@ ~lib/memory.ts:246:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:19:21 + ;;@ ~lib/memory.ts:246:19 (get_local $2) ) - ;;@ ~lib/memory.ts:19:25 + ;;@ ~lib/memory.ts:246:23 (i32.const 1) ) - ;;@ ~lib/memory.ts:19:28 + ;;@ ~lib/memory.ts:246:26 (get_local $1) ) - ;;@ ~lib/memory.ts:20:4 + ;;@ ~lib/memory.ts:247:2 (if - ;;@ ~lib/memory.ts:20:8 + ;;@ ~lib/memory.ts:247:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:20:13 + ;;@ ~lib/memory.ts:247:11 (i32.const 2) ) - ;;@ ~lib/memory.ts:20:16 + ;;@ ~lib/memory.ts:247:14 (return) ) - ;;@ ~lib/memory.ts:22:4 + ;;@ ~lib/memory.ts:249:2 (i32.store8 - ;;@ ~lib/memory.ts:22:14 + ;;@ ~lib/memory.ts:249:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:22:21 + ;;@ ~lib/memory.ts:249:19 (i32.const 1) ) - ;;@ ~lib/memory.ts:22:24 + ;;@ ~lib/memory.ts:249:22 (get_local $1) ) - ;;@ ~lib/memory.ts:23:4 + ;;@ ~lib/memory.ts:250:2 (i32.store8 - ;;@ ~lib/memory.ts:23:14 + ;;@ ~lib/memory.ts:250:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:23:21 + ;;@ ~lib/memory.ts:250:19 (i32.const 2) ) - ;;@ ~lib/memory.ts:23:24 + ;;@ ~lib/memory.ts:250:22 (get_local $1) ) - ;;@ ~lib/memory.ts:24:4 + ;;@ ~lib/memory.ts:251:2 (i32.store8 - ;;@ ~lib/memory.ts:24:14 + ;;@ ~lib/memory.ts:251:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:24:21 + ;;@ ~lib/memory.ts:251:19 (get_local $2) ) - ;;@ ~lib/memory.ts:24:25 + ;;@ ~lib/memory.ts:251:23 (i32.const 2) ) - ;;@ ~lib/memory.ts:24:28 + ;;@ ~lib/memory.ts:251:26 (get_local $1) ) - ;;@ ~lib/memory.ts:25:4 + ;;@ ~lib/memory.ts:252:2 (i32.store8 - ;;@ ~lib/memory.ts:25:14 + ;;@ ~lib/memory.ts:252:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:25:21 + ;;@ ~lib/memory.ts:252:19 (get_local $2) ) - ;;@ ~lib/memory.ts:25:25 + ;;@ ~lib/memory.ts:252:23 (i32.const 3) ) - ;;@ ~lib/memory.ts:25:28 + ;;@ ~lib/memory.ts:252:26 (get_local $1) ) - ;;@ ~lib/memory.ts:26:4 + ;;@ ~lib/memory.ts:253:2 (if - ;;@ ~lib/memory.ts:26:8 + ;;@ ~lib/memory.ts:253:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:26:13 + ;;@ ~lib/memory.ts:253:11 (i32.const 6) ) - ;;@ ~lib/memory.ts:26:16 + ;;@ ~lib/memory.ts:253:14 (return) ) - ;;@ ~lib/memory.ts:27:4 + ;;@ ~lib/memory.ts:254:2 (i32.store8 - ;;@ ~lib/memory.ts:27:14 + ;;@ ~lib/memory.ts:254:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:27:21 + ;;@ ~lib/memory.ts:254:19 (i32.const 3) ) - ;;@ ~lib/memory.ts:27:24 + ;;@ ~lib/memory.ts:254:22 (get_local $1) ) - ;;@ ~lib/memory.ts:28:4 + ;;@ ~lib/memory.ts:255:2 (i32.store8 - ;;@ ~lib/memory.ts:28:14 + ;;@ ~lib/memory.ts:255:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:28:21 + ;;@ ~lib/memory.ts:255:19 (get_local $2) ) - ;;@ ~lib/memory.ts:28:25 + ;;@ ~lib/memory.ts:255:23 (i32.const 4) ) - ;;@ ~lib/memory.ts:28:28 + ;;@ ~lib/memory.ts:255:26 (get_local $1) ) - ;;@ ~lib/memory.ts:29:4 + ;;@ ~lib/memory.ts:256:2 (if - ;;@ ~lib/memory.ts:29:8 + ;;@ ~lib/memory.ts:256:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:29:13 + ;;@ ~lib/memory.ts:256:11 (i32.const 8) ) - ;;@ ~lib/memory.ts:29:16 + ;;@ ~lib/memory.ts:256:14 (return) ) - ;;@ ~lib/memory.ts:32:4 + ;;@ ~lib/memory.ts:259:2 (set_local $3 - ;;@ ~lib/memory.ts:32:19 + ;;@ ~lib/memory.ts:259:17 (i32.and (i32.sub (i32.const 0) - ;;@ ~lib/memory.ts:32:20 + ;;@ ~lib/memory.ts:259:18 (get_local $0) ) - ;;@ ~lib/memory.ts:32:27 + ;;@ ~lib/memory.ts:259:25 (i32.const 3) ) ) - ;;@ ~lib/memory.ts:33:4 + ;;@ ~lib/memory.ts:260:2 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:33:12 + ;;@ ~lib/memory.ts:260:10 (get_local $3) ) ) - ;;@ ~lib/memory.ts:34:4 + ;;@ ~lib/memory.ts:261:2 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:34:9 + ;;@ ~lib/memory.ts:261:7 (get_local $3) ) ) - ;;@ ~lib/memory.ts:35:4 + ;;@ ~lib/memory.ts:262:2 (set_local $2 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:35:9 + ;;@ ~lib/memory.ts:262:7 (i32.const -4) ) ) - ;;@ ~lib/memory.ts:37:4 + ;;@ ~lib/memory.ts:264:2 (set_local $4 - ;;@ ~lib/memory.ts:37:19 + ;;@ ~lib/memory.ts:264:17 (i32.mul (i32.div_u (i32.const -1) - ;;@ ~lib/memory.ts:37:29 + ;;@ ~lib/memory.ts:264:27 (i32.const 255) ) (i32.and - ;;@ ~lib/memory.ts:37:35 + ;;@ ~lib/memory.ts:264:33 (get_local $1) (i32.const 255) ) ) ) - ;;@ ~lib/memory.ts:40:4 + ;;@ ~lib/memory.ts:267:2 (i32.store - ;;@ ~lib/memory.ts:40:15 + ;;@ ~lib/memory.ts:267:13 (get_local $0) - ;;@ ~lib/memory.ts:40:21 + ;;@ ~lib/memory.ts:267:19 (get_local $4) ) - ;;@ ~lib/memory.ts:41:4 + ;;@ ~lib/memory.ts:268:2 (i32.store - ;;@ ~lib/memory.ts:41:15 + ;;@ ~lib/memory.ts:268:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:41:22 + ;;@ ~lib/memory.ts:268:20 (get_local $2) ) - ;;@ ~lib/memory.ts:41:26 + ;;@ ~lib/memory.ts:268:24 (i32.const 4) ) - ;;@ ~lib/memory.ts:41:29 + ;;@ ~lib/memory.ts:268:27 (get_local $4) ) - ;;@ ~lib/memory.ts:42:4 + ;;@ ~lib/memory.ts:269:2 (if - ;;@ ~lib/memory.ts:42:8 + ;;@ ~lib/memory.ts:269:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:42:13 + ;;@ ~lib/memory.ts:269:11 (i32.const 8) ) - ;;@ ~lib/memory.ts:42:16 + ;;@ ~lib/memory.ts:269:14 (return) ) - ;;@ ~lib/memory.ts:43:4 + ;;@ ~lib/memory.ts:270:2 (i32.store - ;;@ ~lib/memory.ts:43:15 + ;;@ ~lib/memory.ts:270:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:43:22 + ;;@ ~lib/memory.ts:270:20 (i32.const 4) ) - ;;@ ~lib/memory.ts:43:25 + ;;@ ~lib/memory.ts:270:23 (get_local $4) ) - ;;@ ~lib/memory.ts:44:4 + ;;@ ~lib/memory.ts:271:2 (i32.store - ;;@ ~lib/memory.ts:44:15 + ;;@ ~lib/memory.ts:271:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:44:22 + ;;@ ~lib/memory.ts:271:20 (i32.const 8) ) - ;;@ ~lib/memory.ts:44:25 + ;;@ ~lib/memory.ts:271:23 (get_local $4) ) - ;;@ ~lib/memory.ts:45:4 + ;;@ ~lib/memory.ts:272:2 (i32.store - ;;@ ~lib/memory.ts:45:15 + ;;@ ~lib/memory.ts:272:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:45:22 + ;;@ ~lib/memory.ts:272:20 (get_local $2) ) - ;;@ ~lib/memory.ts:45:26 + ;;@ ~lib/memory.ts:272:24 (i32.const 12) ) - ;;@ ~lib/memory.ts:45:30 + ;;@ ~lib/memory.ts:272:28 (get_local $4) ) - ;;@ ~lib/memory.ts:46:4 + ;;@ ~lib/memory.ts:273:2 (i32.store - ;;@ ~lib/memory.ts:46:15 + ;;@ ~lib/memory.ts:273:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:46:22 + ;;@ ~lib/memory.ts:273:20 (get_local $2) ) - ;;@ ~lib/memory.ts:46:26 + ;;@ ~lib/memory.ts:273:24 (i32.const 8) ) - ;;@ ~lib/memory.ts:46:29 + ;;@ ~lib/memory.ts:273:27 (get_local $4) ) - ;;@ ~lib/memory.ts:47:4 + ;;@ ~lib/memory.ts:274:2 (if - ;;@ ~lib/memory.ts:47:8 + ;;@ ~lib/memory.ts:274:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:47:13 + ;;@ ~lib/memory.ts:274:11 (i32.const 24) ) - ;;@ ~lib/memory.ts:47:17 + ;;@ ~lib/memory.ts:274:15 (return) ) - ;;@ ~lib/memory.ts:48:4 + ;;@ ~lib/memory.ts:275:2 (i32.store - ;;@ ~lib/memory.ts:48:15 + ;;@ ~lib/memory.ts:275:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:48:22 + ;;@ ~lib/memory.ts:275:20 (i32.const 12) ) - ;;@ ~lib/memory.ts:48:26 + ;;@ ~lib/memory.ts:275:24 (get_local $4) ) - ;;@ ~lib/memory.ts:49:4 + ;;@ ~lib/memory.ts:276:2 (i32.store - ;;@ ~lib/memory.ts:49:15 + ;;@ ~lib/memory.ts:276:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:49:22 + ;;@ ~lib/memory.ts:276:20 (i32.const 16) ) - ;;@ ~lib/memory.ts:49:26 + ;;@ ~lib/memory.ts:276:24 (get_local $4) ) - ;;@ ~lib/memory.ts:50:4 + ;;@ ~lib/memory.ts:277:2 (i32.store - ;;@ ~lib/memory.ts:50:15 + ;;@ ~lib/memory.ts:277:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:50:22 + ;;@ ~lib/memory.ts:277:20 (i32.const 20) ) - ;;@ ~lib/memory.ts:50:26 + ;;@ ~lib/memory.ts:277:24 (get_local $4) ) - ;;@ ~lib/memory.ts:51:4 + ;;@ ~lib/memory.ts:278:2 (i32.store - ;;@ ~lib/memory.ts:51:15 + ;;@ ~lib/memory.ts:278:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:51:22 + ;;@ ~lib/memory.ts:278:20 (i32.const 24) ) - ;;@ ~lib/memory.ts:51:26 + ;;@ ~lib/memory.ts:278:24 (get_local $4) ) - ;;@ ~lib/memory.ts:52:4 + ;;@ ~lib/memory.ts:279:2 (i32.store - ;;@ ~lib/memory.ts:52:15 + ;;@ ~lib/memory.ts:279:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:52:22 + ;;@ ~lib/memory.ts:279:20 (get_local $2) ) - ;;@ ~lib/memory.ts:52:26 + ;;@ ~lib/memory.ts:279:24 (i32.const 28) ) - ;;@ ~lib/memory.ts:52:30 + ;;@ ~lib/memory.ts:279:28 (get_local $4) ) - ;;@ ~lib/memory.ts:53:4 + ;;@ ~lib/memory.ts:280:2 (i32.store - ;;@ ~lib/memory.ts:53:15 + ;;@ ~lib/memory.ts:280:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:53:22 + ;;@ ~lib/memory.ts:280:20 (get_local $2) ) - ;;@ ~lib/memory.ts:53:26 + ;;@ ~lib/memory.ts:280:24 (i32.const 24) ) - ;;@ ~lib/memory.ts:53:30 + ;;@ ~lib/memory.ts:280:28 (get_local $4) ) - ;;@ ~lib/memory.ts:54:4 + ;;@ ~lib/memory.ts:281:2 (i32.store - ;;@ ~lib/memory.ts:54:15 + ;;@ ~lib/memory.ts:281:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:54:22 + ;;@ ~lib/memory.ts:281:20 (get_local $2) ) - ;;@ ~lib/memory.ts:54:26 + ;;@ ~lib/memory.ts:281:24 (i32.const 20) ) - ;;@ ~lib/memory.ts:54:30 + ;;@ ~lib/memory.ts:281:28 (get_local $4) ) - ;;@ ~lib/memory.ts:55:4 + ;;@ ~lib/memory.ts:282:2 (i32.store - ;;@ ~lib/memory.ts:55:15 + ;;@ ~lib/memory.ts:282:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:55:22 + ;;@ ~lib/memory.ts:282:20 (get_local $2) ) - ;;@ ~lib/memory.ts:55:26 + ;;@ ~lib/memory.ts:282:24 (i32.const 16) ) - ;;@ ~lib/memory.ts:55:30 + ;;@ ~lib/memory.ts:282:28 (get_local $4) ) - ;;@ ~lib/memory.ts:58:4 + ;;@ ~lib/memory.ts:285:2 (set_local $3 - ;;@ ~lib/memory.ts:58:8 + ;;@ ~lib/memory.ts:285:6 (i32.add (i32.const 24) - ;;@ ~lib/memory.ts:58:13 + ;;@ ~lib/memory.ts:285:11 (i32.and - ;;@ ~lib/memory.ts:58:14 + ;;@ ~lib/memory.ts:285:12 (get_local $0) - ;;@ ~lib/memory.ts:58:21 + ;;@ ~lib/memory.ts:285:19 (i32.const 4) ) ) ) - ;;@ ~lib/memory.ts:59:4 + ;;@ ~lib/memory.ts:286:2 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:59:12 + ;;@ ~lib/memory.ts:286:10 (get_local $3) ) ) - ;;@ ~lib/memory.ts:60:4 + ;;@ ~lib/memory.ts:287:2 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:60:9 + ;;@ ~lib/memory.ts:287:7 (get_local $3) ) ) - ;;@ ~lib/memory.ts:63:4 + ;;@ ~lib/memory.ts:290:2 (set_local $5 - ;;@ ~lib/memory.ts:63:19 + ;;@ ~lib/memory.ts:290:17 (i64.or (i64.extend_u/i32 (get_local $4) ) - ;;@ ~lib/memory.ts:63:30 + ;;@ ~lib/memory.ts:290:28 (i64.shl - ;;@ ~lib/memory.ts:63:31 + ;;@ ~lib/memory.ts:290:29 (i64.extend_u/i32 (get_local $4) ) - ;;@ ~lib/memory.ts:63:43 + ;;@ ~lib/memory.ts:290:41 (i64.const 32) ) ) ) - ;;@ ~lib/memory.ts:64:4 + ;;@ ~lib/memory.ts:291:2 (block $break|0 (loop $continue|0 (if - ;;@ ~lib/memory.ts:64:11 + ;;@ ~lib/memory.ts:291:9 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:64:16 + ;;@ ~lib/memory.ts:291:14 (i32.const 32) ) (block (block - ;;@ ~lib/memory.ts:65:6 + ;;@ ~lib/memory.ts:292:4 (i64.store - ;;@ ~lib/memory.ts:65:17 + ;;@ ~lib/memory.ts:292:15 (get_local $0) - ;;@ ~lib/memory.ts:65:23 + ;;@ ~lib/memory.ts:292:21 (get_local $5) ) - ;;@ ~lib/memory.ts:66:6 + ;;@ ~lib/memory.ts:293:4 (i64.store - ;;@ ~lib/memory.ts:66:17 + ;;@ ~lib/memory.ts:293:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:66:24 + ;;@ ~lib/memory.ts:293:22 (i32.const 8) ) - ;;@ ~lib/memory.ts:66:27 + ;;@ ~lib/memory.ts:293:25 (get_local $5) ) - ;;@ ~lib/memory.ts:67:6 + ;;@ ~lib/memory.ts:294:4 (i64.store - ;;@ ~lib/memory.ts:67:17 + ;;@ ~lib/memory.ts:294:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:67:24 + ;;@ ~lib/memory.ts:294:22 (i32.const 16) ) - ;;@ ~lib/memory.ts:67:28 + ;;@ ~lib/memory.ts:294:26 (get_local $5) ) - ;;@ ~lib/memory.ts:68:6 + ;;@ ~lib/memory.ts:295:4 (i64.store - ;;@ ~lib/memory.ts:68:17 + ;;@ ~lib/memory.ts:295:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:68:24 + ;;@ ~lib/memory.ts:295:22 (i32.const 24) ) - ;;@ ~lib/memory.ts:68:28 + ;;@ ~lib/memory.ts:295:26 (get_local $5) ) - ;;@ ~lib/memory.ts:69:6 + ;;@ ~lib/memory.ts:296:4 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:69:11 + ;;@ ~lib/memory.ts:296:9 (i32.const 32) ) ) - ;;@ ~lib/memory.ts:70:6 + ;;@ ~lib/memory.ts:297:4 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:70:14 + ;;@ ~lib/memory.ts:297:12 (i32.const 32) ) ) @@ -569,31 +563,42 @@ ) ) ) - (func $~lib/memory/memcpy (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + ;;@ ~lib/memory.ts:11:4 + (call $~lib/memory/memset + ;;@ ~lib/memory.ts:11:11 + (get_local $0) + ;;@ ~lib/memory.ts:11:17 + (get_local $1) + ;;@ ~lib/memory.ts:11:20 + (get_local $2) + ) + ) + (func $~lib/memory/memcpy (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - ;;@ ~lib/memory.ts:164:2 + ;;@ ~lib/memory.ts:59:2 (block $break|0 (loop $continue|0 (if - ;;@ ~lib/memory.ts:164:9 + ;;@ ~lib/memory.ts:59:9 (if (result i32) (get_local $2) - ;;@ ~lib/memory.ts:164:14 + ;;@ ~lib/memory.ts:59:14 (i32.and - ;;@ ~lib/memory.ts:164:15 + ;;@ ~lib/memory.ts:59:15 (get_local $1) - ;;@ ~lib/memory.ts:164:21 + ;;@ ~lib/memory.ts:59:21 (i32.const 3) ) (get_local $2) ) (block (block - ;;@ ~lib/memory.ts:165:4 + ;;@ ~lib/memory.ts:60:4 (i32.store8 - ;;@ ~lib/memory.ts:165:14 + ;;@ ~lib/memory.ts:60:14 (block (result i32) (set_local $5 (get_local $0) @@ -606,9 +611,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:165:22 + ;;@ ~lib/memory.ts:60:22 (i32.load8_u - ;;@ ~lib/memory.ts:165:31 + ;;@ ~lib/memory.ts:60:31 (block (result i32) (set_local $5 (get_local $1) @@ -623,7 +628,7 @@ ) ) ) - ;;@ ~lib/memory.ts:166:4 + ;;@ ~lib/memory.ts:61:4 (set_local $2 (i32.sub (get_local $2) @@ -636,117 +641,117 @@ ) ) ) - ;;@ ~lib/memory.ts:170:2 + ;;@ ~lib/memory.ts:65:2 (if - ;;@ ~lib/memory.ts:170:6 + ;;@ ~lib/memory.ts:65:6 (i32.eq (i32.and - ;;@ ~lib/memory.ts:170:7 + ;;@ ~lib/memory.ts:65:7 (get_local $0) - ;;@ ~lib/memory.ts:170:14 + ;;@ ~lib/memory.ts:65:14 (i32.const 3) ) - ;;@ ~lib/memory.ts:170:20 + ;;@ ~lib/memory.ts:65:20 (i32.const 0) ) - ;;@ ~lib/memory.ts:170:23 + ;;@ ~lib/memory.ts:65:23 (block (block $break|1 (loop $continue|1 (if - ;;@ ~lib/memory.ts:171:11 + ;;@ ~lib/memory.ts:66:11 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:171:16 + ;;@ ~lib/memory.ts:66:16 (i32.const 16) ) (block (block - ;;@ ~lib/memory.ts:172:6 + ;;@ ~lib/memory.ts:67:6 (i32.store - ;;@ ~lib/memory.ts:172:17 + ;;@ ~lib/memory.ts:67:17 (get_local $0) - ;;@ ~lib/memory.ts:172:28 + ;;@ ~lib/memory.ts:67:28 (i32.load - ;;@ ~lib/memory.ts:172:38 + ;;@ ~lib/memory.ts:67:38 (get_local $1) ) ) - ;;@ ~lib/memory.ts:173:6 + ;;@ ~lib/memory.ts:68:6 (i32.store - ;;@ ~lib/memory.ts:173:17 + ;;@ ~lib/memory.ts:68:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:173:25 + ;;@ ~lib/memory.ts:68:25 (i32.const 4) ) - ;;@ ~lib/memory.ts:173:28 + ;;@ ~lib/memory.ts:68:28 (i32.load - ;;@ ~lib/memory.ts:173:38 + ;;@ ~lib/memory.ts:68:38 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:173:45 + ;;@ ~lib/memory.ts:68:45 (i32.const 4) ) ) ) - ;;@ ~lib/memory.ts:174:6 + ;;@ ~lib/memory.ts:69:6 (i32.store - ;;@ ~lib/memory.ts:174:17 + ;;@ ~lib/memory.ts:69:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:174:25 + ;;@ ~lib/memory.ts:69:25 (i32.const 8) ) - ;;@ ~lib/memory.ts:174:28 + ;;@ ~lib/memory.ts:69:28 (i32.load - ;;@ ~lib/memory.ts:174:38 + ;;@ ~lib/memory.ts:69:38 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:174:45 + ;;@ ~lib/memory.ts:69:45 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:175:6 + ;;@ ~lib/memory.ts:70:6 (i32.store - ;;@ ~lib/memory.ts:175:17 + ;;@ ~lib/memory.ts:70:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:175:24 + ;;@ ~lib/memory.ts:70:24 (i32.const 12) ) - ;;@ ~lib/memory.ts:175:28 + ;;@ ~lib/memory.ts:70:28 (i32.load - ;;@ ~lib/memory.ts:175:38 + ;;@ ~lib/memory.ts:70:38 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:175:44 + ;;@ ~lib/memory.ts:70:44 (i32.const 12) ) ) ) - ;;@ ~lib/memory.ts:176:6 + ;;@ ~lib/memory.ts:71:6 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:176:13 + ;;@ ~lib/memory.ts:71:13 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:176:17 + ;;@ ~lib/memory.ts:71:17 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:176:25 + ;;@ ~lib/memory.ts:71:25 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:176:29 + ;;@ ~lib/memory.ts:71:29 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:176:34 + ;;@ ~lib/memory.ts:71:34 (i32.const 16) ) ) @@ -756,149 +761,149 @@ ) ) ) - ;;@ ~lib/memory.ts:178:4 + ;;@ ~lib/memory.ts:73:4 (if - ;;@ ~lib/memory.ts:178:8 + ;;@ ~lib/memory.ts:73:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:178:12 + ;;@ ~lib/memory.ts:73:12 (i32.const 8) ) - ;;@ ~lib/memory.ts:178:15 + ;;@ ~lib/memory.ts:73:15 (block - ;;@ ~lib/memory.ts:179:6 + ;;@ ~lib/memory.ts:74:6 (i32.store - ;;@ ~lib/memory.ts:179:17 + ;;@ ~lib/memory.ts:74:17 (get_local $0) - ;;@ ~lib/memory.ts:179:27 + ;;@ ~lib/memory.ts:74:27 (i32.load - ;;@ ~lib/memory.ts:179:37 + ;;@ ~lib/memory.ts:74:37 (get_local $1) ) ) - ;;@ ~lib/memory.ts:180:6 + ;;@ ~lib/memory.ts:75:6 (i32.store - ;;@ ~lib/memory.ts:180:17 + ;;@ ~lib/memory.ts:75:17 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:180:24 + ;;@ ~lib/memory.ts:75:24 (i32.const 4) ) - ;;@ ~lib/memory.ts:180:27 + ;;@ ~lib/memory.ts:75:27 (i32.load - ;;@ ~lib/memory.ts:180:37 + ;;@ ~lib/memory.ts:75:37 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:180:43 + ;;@ ~lib/memory.ts:75:43 (i32.const 4) ) ) ) - ;;@ ~lib/memory.ts:181:6 + ;;@ ~lib/memory.ts:76:6 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:181:14 + ;;@ ~lib/memory.ts:76:14 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:181:17 + ;;@ ~lib/memory.ts:76:17 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:181:24 + ;;@ ~lib/memory.ts:76:24 (i32.const 8) ) ) ) ) - ;;@ ~lib/memory.ts:183:4 + ;;@ ~lib/memory.ts:78:4 (if - ;;@ ~lib/memory.ts:183:8 + ;;@ ~lib/memory.ts:78:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:183:12 + ;;@ ~lib/memory.ts:78:12 (i32.const 4) ) - ;;@ ~lib/memory.ts:183:15 + ;;@ ~lib/memory.ts:78:15 (block - ;;@ ~lib/memory.ts:184:6 + ;;@ ~lib/memory.ts:79:6 (i32.store - ;;@ ~lib/memory.ts:184:17 + ;;@ ~lib/memory.ts:79:17 (get_local $0) - ;;@ ~lib/memory.ts:184:23 + ;;@ ~lib/memory.ts:79:23 (i32.load - ;;@ ~lib/memory.ts:184:33 + ;;@ ~lib/memory.ts:79:33 (get_local $1) ) ) - ;;@ ~lib/memory.ts:185:6 + ;;@ ~lib/memory.ts:80:6 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:185:14 + ;;@ ~lib/memory.ts:80:14 (i32.const 4) ) ) - ;;@ ~lib/memory.ts:185:17 + ;;@ ~lib/memory.ts:80:17 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:185:24 + ;;@ ~lib/memory.ts:80:24 (i32.const 4) ) ) ) ) - ;;@ ~lib/memory.ts:187:4 + ;;@ ~lib/memory.ts:82:4 (if - ;;@ ~lib/memory.ts:187:8 + ;;@ ~lib/memory.ts:82:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:187:12 + ;;@ ~lib/memory.ts:82:12 (i32.const 2) ) - ;;@ ~lib/memory.ts:187:15 + ;;@ ~lib/memory.ts:82:15 (block - ;;@ ~lib/memory.ts:188:6 + ;;@ ~lib/memory.ts:83:6 (i32.store16 - ;;@ ~lib/memory.ts:188:17 + ;;@ ~lib/memory.ts:83:17 (get_local $0) - ;;@ ~lib/memory.ts:188:23 + ;;@ ~lib/memory.ts:83:23 (i32.load16_u - ;;@ ~lib/memory.ts:188:33 + ;;@ ~lib/memory.ts:83:33 (get_local $1) ) ) - ;;@ ~lib/memory.ts:189:6 + ;;@ ~lib/memory.ts:84:6 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:189:14 + ;;@ ~lib/memory.ts:84:14 (i32.const 2) ) ) - ;;@ ~lib/memory.ts:189:17 + ;;@ ~lib/memory.ts:84:17 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:189:24 + ;;@ ~lib/memory.ts:84:24 (i32.const 2) ) ) ) ) - ;;@ ~lib/memory.ts:191:4 + ;;@ ~lib/memory.ts:86:4 (if - ;;@ ~lib/memory.ts:191:8 + ;;@ ~lib/memory.ts:86:8 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:191:12 + ;;@ ~lib/memory.ts:86:12 (i32.const 1) ) - ;;@ ~lib/memory.ts:191:15 + ;;@ ~lib/memory.ts:86:15 (i32.store8 - ;;@ ~lib/memory.ts:192:16 + ;;@ ~lib/memory.ts:87:16 (block (result i32) (set_local $5 (get_local $0) @@ -911,9 +916,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:192:24 + ;;@ ~lib/memory.ts:87:24 (i32.load8_u - ;;@ ~lib/memory.ts:192:33 + ;;@ ~lib/memory.ts:87:33 (block (result i32) (set_local $5 (get_local $1) @@ -929,67 +934,67 @@ ) ) ) - ;;@ ~lib/memory.ts:194:4 + ;;@ ~lib/memory.ts:89:4 (return) ) ) - ;;@ ~lib/memory.ts:199:2 + ;;@ ~lib/memory.ts:94:2 (if - ;;@ ~lib/memory.ts:199:6 + ;;@ ~lib/memory.ts:94:6 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:199:11 + ;;@ ~lib/memory.ts:94:11 (i32.const 32) ) - ;;@ ~lib/memory.ts:199:15 + ;;@ ~lib/memory.ts:94:15 (block $break|2 (block $case2|2 (block $case1|2 (block $case0|2 (set_local $5 - ;;@ ~lib/memory.ts:200:12 + ;;@ ~lib/memory.ts:95:12 (i32.and (get_local $0) - ;;@ ~lib/memory.ts:200:19 + ;;@ ~lib/memory.ts:95:19 (i32.const 3) ) ) (br_if $case0|2 (i32.eq (get_local $5) - ;;@ ~lib/memory.ts:202:11 + ;;@ ~lib/memory.ts:97:11 (i32.const 1) ) ) (br_if $case1|2 (i32.eq (get_local $5) - ;;@ ~lib/memory.ts:221:11 + ;;@ ~lib/memory.ts:116:11 (i32.const 2) ) ) (br_if $case2|2 (i32.eq (get_local $5) - ;;@ ~lib/memory.ts:239:11 + ;;@ ~lib/memory.ts:134:11 (i32.const 3) ) ) (br $break|2) ) - ;;@ ~lib/memory.ts:202:14 + ;;@ ~lib/memory.ts:97:14 (block - ;;@ ~lib/memory.ts:203:8 + ;;@ ~lib/memory.ts:98:8 (set_local $3 - ;;@ ~lib/memory.ts:203:12 + ;;@ ~lib/memory.ts:98:12 (i32.load - ;;@ ~lib/memory.ts:203:22 + ;;@ ~lib/memory.ts:98:22 (get_local $1) ) ) - ;;@ ~lib/memory.ts:204:8 + ;;@ ~lib/memory.ts:99:8 (i32.store8 - ;;@ ~lib/memory.ts:204:18 + ;;@ ~lib/memory.ts:99:18 (block (result i32) (set_local $5 (get_local $0) @@ -1002,9 +1007,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:204:26 + ;;@ ~lib/memory.ts:99:26 (i32.load8_u - ;;@ ~lib/memory.ts:204:35 + ;;@ ~lib/memory.ts:99:35 (block (result i32) (set_local $5 (get_local $1) @@ -1019,9 +1024,9 @@ ) ) ) - ;;@ ~lib/memory.ts:205:8 + ;;@ ~lib/memory.ts:100:8 (i32.store8 - ;;@ ~lib/memory.ts:205:18 + ;;@ ~lib/memory.ts:100:18 (block (result i32) (set_local $5 (get_local $0) @@ -1034,9 +1039,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:205:26 + ;;@ ~lib/memory.ts:100:26 (i32.load8_u - ;;@ ~lib/memory.ts:205:35 + ;;@ ~lib/memory.ts:100:35 (block (result i32) (set_local $5 (get_local $1) @@ -1051,9 +1056,9 @@ ) ) ) - ;;@ ~lib/memory.ts:206:8 + ;;@ ~lib/memory.ts:101:8 (i32.store8 - ;;@ ~lib/memory.ts:206:18 + ;;@ ~lib/memory.ts:101:18 (block (result i32) (set_local $5 (get_local $0) @@ -1066,9 +1071,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:206:26 + ;;@ ~lib/memory.ts:101:26 (i32.load8_u - ;;@ ~lib/memory.ts:206:35 + ;;@ ~lib/memory.ts:101:35 (block (result i32) (set_local $5 (get_local $1) @@ -1083,183 +1088,183 @@ ) ) ) - ;;@ ~lib/memory.ts:207:8 + ;;@ ~lib/memory.ts:102:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:207:13 + ;;@ ~lib/memory.ts:102:13 (i32.const 3) ) ) - ;;@ ~lib/memory.ts:208:8 + ;;@ ~lib/memory.ts:103:8 (block $break|3 (loop $continue|3 (if - ;;@ ~lib/memory.ts:208:15 + ;;@ ~lib/memory.ts:103:15 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:208:20 + ;;@ ~lib/memory.ts:103:20 (i32.const 17) ) (block (block - ;;@ ~lib/memory.ts:209:10 + ;;@ ~lib/memory.ts:104:10 (set_local $4 - ;;@ ~lib/memory.ts:209:14 + ;;@ ~lib/memory.ts:104:14 (i32.load - ;;@ ~lib/memory.ts:209:24 + ;;@ ~lib/memory.ts:104:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:209:30 + ;;@ ~lib/memory.ts:104:30 (i32.const 1) ) ) ) - ;;@ ~lib/memory.ts:210:10 + ;;@ ~lib/memory.ts:105:10 (i32.store - ;;@ ~lib/memory.ts:210:21 + ;;@ ~lib/memory.ts:105:21 (get_local $0) - ;;@ ~lib/memory.ts:210:27 + ;;@ ~lib/memory.ts:105:27 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:210:32 + ;;@ ~lib/memory.ts:105:32 (i32.const 24) ) - ;;@ ~lib/memory.ts:210:37 + ;;@ ~lib/memory.ts:105:37 (i32.shl (get_local $4) - ;;@ ~lib/memory.ts:210:42 + ;;@ ~lib/memory.ts:105:42 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:211:10 + ;;@ ~lib/memory.ts:106:10 (set_local $3 - ;;@ ~lib/memory.ts:211:14 + ;;@ ~lib/memory.ts:106:14 (i32.load - ;;@ ~lib/memory.ts:211:24 + ;;@ ~lib/memory.ts:106:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:211:30 + ;;@ ~lib/memory.ts:106:30 (i32.const 5) ) ) ) - ;;@ ~lib/memory.ts:212:10 + ;;@ ~lib/memory.ts:107:10 (i32.store - ;;@ ~lib/memory.ts:212:21 + ;;@ ~lib/memory.ts:107:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:212:28 + ;;@ ~lib/memory.ts:107:28 (i32.const 4) ) - ;;@ ~lib/memory.ts:212:31 + ;;@ ~lib/memory.ts:107:31 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:212:36 + ;;@ ~lib/memory.ts:107:36 (i32.const 24) ) - ;;@ ~lib/memory.ts:212:41 + ;;@ ~lib/memory.ts:107:41 (i32.shl (get_local $3) - ;;@ ~lib/memory.ts:212:46 + ;;@ ~lib/memory.ts:107:46 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:213:10 + ;;@ ~lib/memory.ts:108:10 (set_local $4 - ;;@ ~lib/memory.ts:213:14 + ;;@ ~lib/memory.ts:108:14 (i32.load - ;;@ ~lib/memory.ts:213:24 + ;;@ ~lib/memory.ts:108:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:213:30 + ;;@ ~lib/memory.ts:108:30 (i32.const 9) ) ) ) - ;;@ ~lib/memory.ts:214:10 + ;;@ ~lib/memory.ts:109:10 (i32.store - ;;@ ~lib/memory.ts:214:21 + ;;@ ~lib/memory.ts:109:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:214:28 + ;;@ ~lib/memory.ts:109:28 (i32.const 8) ) - ;;@ ~lib/memory.ts:214:31 + ;;@ ~lib/memory.ts:109:31 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:214:36 + ;;@ ~lib/memory.ts:109:36 (i32.const 24) ) - ;;@ ~lib/memory.ts:214:41 + ;;@ ~lib/memory.ts:109:41 (i32.shl (get_local $4) - ;;@ ~lib/memory.ts:214:46 + ;;@ ~lib/memory.ts:109:46 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:215:10 + ;;@ ~lib/memory.ts:110:10 (set_local $3 - ;;@ ~lib/memory.ts:215:14 + ;;@ ~lib/memory.ts:110:14 (i32.load - ;;@ ~lib/memory.ts:215:24 + ;;@ ~lib/memory.ts:110:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:215:30 + ;;@ ~lib/memory.ts:110:30 (i32.const 13) ) ) ) - ;;@ ~lib/memory.ts:216:10 + ;;@ ~lib/memory.ts:111:10 (i32.store - ;;@ ~lib/memory.ts:216:21 + ;;@ ~lib/memory.ts:111:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:216:28 + ;;@ ~lib/memory.ts:111:28 (i32.const 12) ) - ;;@ ~lib/memory.ts:216:32 + ;;@ ~lib/memory.ts:111:32 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:216:37 + ;;@ ~lib/memory.ts:111:37 (i32.const 24) ) - ;;@ ~lib/memory.ts:216:42 + ;;@ ~lib/memory.ts:111:42 (i32.shl (get_local $3) - ;;@ ~lib/memory.ts:216:47 + ;;@ ~lib/memory.ts:111:47 (i32.const 8) ) ) ) - ;;@ ~lib/memory.ts:217:10 + ;;@ ~lib/memory.ts:112:10 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:217:17 + ;;@ ~lib/memory.ts:112:17 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:217:21 + ;;@ ~lib/memory.ts:112:21 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:217:29 + ;;@ ~lib/memory.ts:112:29 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:217:33 + ;;@ ~lib/memory.ts:112:33 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:217:38 + ;;@ ~lib/memory.ts:112:38 (i32.const 16) ) ) @@ -1269,23 +1274,23 @@ ) ) ) - ;;@ ~lib/memory.ts:219:8 + ;;@ ~lib/memory.ts:114:8 (br $break|2) ) ) - ;;@ ~lib/memory.ts:221:14 + ;;@ ~lib/memory.ts:116:14 (block - ;;@ ~lib/memory.ts:222:8 + ;;@ ~lib/memory.ts:117:8 (set_local $3 - ;;@ ~lib/memory.ts:222:12 + ;;@ ~lib/memory.ts:117:12 (i32.load - ;;@ ~lib/memory.ts:222:22 + ;;@ ~lib/memory.ts:117:22 (get_local $1) ) ) - ;;@ ~lib/memory.ts:223:8 + ;;@ ~lib/memory.ts:118:8 (i32.store8 - ;;@ ~lib/memory.ts:223:18 + ;;@ ~lib/memory.ts:118:18 (block (result i32) (set_local $5 (get_local $0) @@ -1298,9 +1303,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:223:26 + ;;@ ~lib/memory.ts:118:26 (i32.load8_u - ;;@ ~lib/memory.ts:223:35 + ;;@ ~lib/memory.ts:118:35 (block (result i32) (set_local $5 (get_local $1) @@ -1315,9 +1320,9 @@ ) ) ) - ;;@ ~lib/memory.ts:224:8 + ;;@ ~lib/memory.ts:119:8 (i32.store8 - ;;@ ~lib/memory.ts:224:18 + ;;@ ~lib/memory.ts:119:18 (block (result i32) (set_local $5 (get_local $0) @@ -1330,9 +1335,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:224:26 + ;;@ ~lib/memory.ts:119:26 (i32.load8_u - ;;@ ~lib/memory.ts:224:35 + ;;@ ~lib/memory.ts:119:35 (block (result i32) (set_local $5 (get_local $1) @@ -1347,183 +1352,183 @@ ) ) ) - ;;@ ~lib/memory.ts:225:8 + ;;@ ~lib/memory.ts:120:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:225:13 + ;;@ ~lib/memory.ts:120:13 (i32.const 2) ) ) - ;;@ ~lib/memory.ts:226:8 + ;;@ ~lib/memory.ts:121:8 (block $break|4 (loop $continue|4 (if - ;;@ ~lib/memory.ts:226:15 + ;;@ ~lib/memory.ts:121:15 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:226:20 + ;;@ ~lib/memory.ts:121:20 (i32.const 18) ) (block (block - ;;@ ~lib/memory.ts:227:10 + ;;@ ~lib/memory.ts:122:10 (set_local $4 - ;;@ ~lib/memory.ts:227:14 + ;;@ ~lib/memory.ts:122:14 (i32.load - ;;@ ~lib/memory.ts:227:24 + ;;@ ~lib/memory.ts:122:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:227:30 + ;;@ ~lib/memory.ts:122:30 (i32.const 2) ) ) ) - ;;@ ~lib/memory.ts:228:10 + ;;@ ~lib/memory.ts:123:10 (i32.store - ;;@ ~lib/memory.ts:228:21 + ;;@ ~lib/memory.ts:123:21 (get_local $0) - ;;@ ~lib/memory.ts:228:27 + ;;@ ~lib/memory.ts:123:27 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:228:32 + ;;@ ~lib/memory.ts:123:32 (i32.const 16) ) - ;;@ ~lib/memory.ts:228:37 + ;;@ ~lib/memory.ts:123:37 (i32.shl (get_local $4) - ;;@ ~lib/memory.ts:228:42 + ;;@ ~lib/memory.ts:123:42 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:229:10 + ;;@ ~lib/memory.ts:124:10 (set_local $3 - ;;@ ~lib/memory.ts:229:14 + ;;@ ~lib/memory.ts:124:14 (i32.load - ;;@ ~lib/memory.ts:229:24 + ;;@ ~lib/memory.ts:124:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:229:30 + ;;@ ~lib/memory.ts:124:30 (i32.const 6) ) ) ) - ;;@ ~lib/memory.ts:230:10 + ;;@ ~lib/memory.ts:125:10 (i32.store - ;;@ ~lib/memory.ts:230:21 + ;;@ ~lib/memory.ts:125:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:230:28 + ;;@ ~lib/memory.ts:125:28 (i32.const 4) ) - ;;@ ~lib/memory.ts:230:31 + ;;@ ~lib/memory.ts:125:31 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:230:36 + ;;@ ~lib/memory.ts:125:36 (i32.const 16) ) - ;;@ ~lib/memory.ts:230:41 + ;;@ ~lib/memory.ts:125:41 (i32.shl (get_local $3) - ;;@ ~lib/memory.ts:230:46 + ;;@ ~lib/memory.ts:125:46 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:231:10 + ;;@ ~lib/memory.ts:126:10 (set_local $4 - ;;@ ~lib/memory.ts:231:14 + ;;@ ~lib/memory.ts:126:14 (i32.load - ;;@ ~lib/memory.ts:231:24 + ;;@ ~lib/memory.ts:126:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:231:30 + ;;@ ~lib/memory.ts:126:30 (i32.const 10) ) ) ) - ;;@ ~lib/memory.ts:232:10 + ;;@ ~lib/memory.ts:127:10 (i32.store - ;;@ ~lib/memory.ts:232:21 + ;;@ ~lib/memory.ts:127:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:232:28 + ;;@ ~lib/memory.ts:127:28 (i32.const 8) ) - ;;@ ~lib/memory.ts:232:31 + ;;@ ~lib/memory.ts:127:31 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:232:36 + ;;@ ~lib/memory.ts:127:36 (i32.const 16) ) - ;;@ ~lib/memory.ts:232:41 + ;;@ ~lib/memory.ts:127:41 (i32.shl (get_local $4) - ;;@ ~lib/memory.ts:232:46 + ;;@ ~lib/memory.ts:127:46 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:233:10 + ;;@ ~lib/memory.ts:128:10 (set_local $3 - ;;@ ~lib/memory.ts:233:14 + ;;@ ~lib/memory.ts:128:14 (i32.load - ;;@ ~lib/memory.ts:233:24 + ;;@ ~lib/memory.ts:128:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:233:30 + ;;@ ~lib/memory.ts:128:30 (i32.const 14) ) ) ) - ;;@ ~lib/memory.ts:234:10 + ;;@ ~lib/memory.ts:129:10 (i32.store - ;;@ ~lib/memory.ts:234:21 + ;;@ ~lib/memory.ts:129:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:234:28 + ;;@ ~lib/memory.ts:129:28 (i32.const 12) ) - ;;@ ~lib/memory.ts:234:32 + ;;@ ~lib/memory.ts:129:32 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:234:37 + ;;@ ~lib/memory.ts:129:37 (i32.const 16) ) - ;;@ ~lib/memory.ts:234:42 + ;;@ ~lib/memory.ts:129:42 (i32.shl (get_local $3) - ;;@ ~lib/memory.ts:234:47 + ;;@ ~lib/memory.ts:129:47 (i32.const 16) ) ) ) - ;;@ ~lib/memory.ts:235:10 + ;;@ ~lib/memory.ts:130:10 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:235:17 + ;;@ ~lib/memory.ts:130:17 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:235:21 + ;;@ ~lib/memory.ts:130:21 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:235:29 + ;;@ ~lib/memory.ts:130:29 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:235:33 + ;;@ ~lib/memory.ts:130:33 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:235:38 + ;;@ ~lib/memory.ts:130:38 (i32.const 16) ) ) @@ -1533,23 +1538,23 @@ ) ) ) - ;;@ ~lib/memory.ts:237:8 + ;;@ ~lib/memory.ts:132:8 (br $break|2) ) ) - ;;@ ~lib/memory.ts:239:14 + ;;@ ~lib/memory.ts:134:14 (block - ;;@ ~lib/memory.ts:240:8 + ;;@ ~lib/memory.ts:135:8 (set_local $3 - ;;@ ~lib/memory.ts:240:12 + ;;@ ~lib/memory.ts:135:12 (i32.load - ;;@ ~lib/memory.ts:240:22 + ;;@ ~lib/memory.ts:135:22 (get_local $1) ) ) - ;;@ ~lib/memory.ts:241:8 + ;;@ ~lib/memory.ts:136:8 (i32.store8 - ;;@ ~lib/memory.ts:241:18 + ;;@ ~lib/memory.ts:136:18 (block (result i32) (set_local $5 (get_local $0) @@ -1562,9 +1567,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:241:26 + ;;@ ~lib/memory.ts:136:26 (i32.load8_u - ;;@ ~lib/memory.ts:241:35 + ;;@ ~lib/memory.ts:136:35 (block (result i32) (set_local $5 (get_local $1) @@ -1579,183 +1584,183 @@ ) ) ) - ;;@ ~lib/memory.ts:242:8 + ;;@ ~lib/memory.ts:137:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:242:13 + ;;@ ~lib/memory.ts:137:13 (i32.const 1) ) ) - ;;@ ~lib/memory.ts:243:8 + ;;@ ~lib/memory.ts:138:8 (block $break|5 (loop $continue|5 (if - ;;@ ~lib/memory.ts:243:15 + ;;@ ~lib/memory.ts:138:15 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:243:20 + ;;@ ~lib/memory.ts:138:20 (i32.const 19) ) (block (block - ;;@ ~lib/memory.ts:244:10 + ;;@ ~lib/memory.ts:139:10 (set_local $4 - ;;@ ~lib/memory.ts:244:14 + ;;@ ~lib/memory.ts:139:14 (i32.load - ;;@ ~lib/memory.ts:244:24 + ;;@ ~lib/memory.ts:139:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:244:30 + ;;@ ~lib/memory.ts:139:30 (i32.const 3) ) ) ) - ;;@ ~lib/memory.ts:245:10 + ;;@ ~lib/memory.ts:140:10 (i32.store - ;;@ ~lib/memory.ts:245:21 + ;;@ ~lib/memory.ts:140:21 (get_local $0) - ;;@ ~lib/memory.ts:245:27 + ;;@ ~lib/memory.ts:140:27 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:245:32 + ;;@ ~lib/memory.ts:140:32 (i32.const 8) ) - ;;@ ~lib/memory.ts:245:36 + ;;@ ~lib/memory.ts:140:36 (i32.shl (get_local $4) - ;;@ ~lib/memory.ts:245:41 + ;;@ ~lib/memory.ts:140:41 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:246:10 + ;;@ ~lib/memory.ts:141:10 (set_local $3 - ;;@ ~lib/memory.ts:246:14 + ;;@ ~lib/memory.ts:141:14 (i32.load - ;;@ ~lib/memory.ts:246:24 + ;;@ ~lib/memory.ts:141:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:246:30 + ;;@ ~lib/memory.ts:141:30 (i32.const 7) ) ) ) - ;;@ ~lib/memory.ts:247:10 + ;;@ ~lib/memory.ts:142:10 (i32.store - ;;@ ~lib/memory.ts:247:21 + ;;@ ~lib/memory.ts:142:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:247:28 + ;;@ ~lib/memory.ts:142:28 (i32.const 4) ) - ;;@ ~lib/memory.ts:247:31 + ;;@ ~lib/memory.ts:142:31 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:247:36 + ;;@ ~lib/memory.ts:142:36 (i32.const 8) ) - ;;@ ~lib/memory.ts:247:40 + ;;@ ~lib/memory.ts:142:40 (i32.shl (get_local $3) - ;;@ ~lib/memory.ts:247:45 + ;;@ ~lib/memory.ts:142:45 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:248:10 + ;;@ ~lib/memory.ts:143:10 (set_local $4 - ;;@ ~lib/memory.ts:248:14 + ;;@ ~lib/memory.ts:143:14 (i32.load - ;;@ ~lib/memory.ts:248:24 + ;;@ ~lib/memory.ts:143:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:248:30 + ;;@ ~lib/memory.ts:143:30 (i32.const 11) ) ) ) - ;;@ ~lib/memory.ts:249:10 + ;;@ ~lib/memory.ts:144:10 (i32.store - ;;@ ~lib/memory.ts:249:21 + ;;@ ~lib/memory.ts:144:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:249:28 + ;;@ ~lib/memory.ts:144:28 (i32.const 8) ) - ;;@ ~lib/memory.ts:249:31 + ;;@ ~lib/memory.ts:144:31 (i32.or (i32.shr_u (get_local $3) - ;;@ ~lib/memory.ts:249:36 + ;;@ ~lib/memory.ts:144:36 (i32.const 8) ) - ;;@ ~lib/memory.ts:249:40 + ;;@ ~lib/memory.ts:144:40 (i32.shl (get_local $4) - ;;@ ~lib/memory.ts:249:45 + ;;@ ~lib/memory.ts:144:45 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:250:10 + ;;@ ~lib/memory.ts:145:10 (set_local $3 - ;;@ ~lib/memory.ts:250:14 + ;;@ ~lib/memory.ts:145:14 (i32.load - ;;@ ~lib/memory.ts:250:24 + ;;@ ~lib/memory.ts:145:24 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:250:30 + ;;@ ~lib/memory.ts:145:30 (i32.const 15) ) ) ) - ;;@ ~lib/memory.ts:251:10 + ;;@ ~lib/memory.ts:146:10 (i32.store - ;;@ ~lib/memory.ts:251:21 + ;;@ ~lib/memory.ts:146:21 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:251:28 + ;;@ ~lib/memory.ts:146:28 (i32.const 12) ) - ;;@ ~lib/memory.ts:251:32 + ;;@ ~lib/memory.ts:146:32 (i32.or (i32.shr_u (get_local $4) - ;;@ ~lib/memory.ts:251:37 + ;;@ ~lib/memory.ts:146:37 (i32.const 8) ) - ;;@ ~lib/memory.ts:251:41 + ;;@ ~lib/memory.ts:146:41 (i32.shl (get_local $3) - ;;@ ~lib/memory.ts:251:46 + ;;@ ~lib/memory.ts:146:46 (i32.const 24) ) ) ) - ;;@ ~lib/memory.ts:252:10 + ;;@ ~lib/memory.ts:147:10 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:252:17 + ;;@ ~lib/memory.ts:147:17 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:252:21 + ;;@ ~lib/memory.ts:147:21 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:252:29 + ;;@ ~lib/memory.ts:147:29 (i32.const 16) ) ) - ;;@ ~lib/memory.ts:252:33 + ;;@ ~lib/memory.ts:147:33 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:252:38 + ;;@ ~lib/memory.ts:147:38 (i32.const 16) ) ) @@ -1765,24 +1770,24 @@ ) ) ) - ;;@ ~lib/memory.ts:254:8 + ;;@ ~lib/memory.ts:149:8 (br $break|2) ) ) ) - ;;@ ~lib/memory.ts:260:2 + ;;@ ~lib/memory.ts:155:2 (if - ;;@ ~lib/memory.ts:260:6 + ;;@ ~lib/memory.ts:155:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:260:10 + ;;@ ~lib/memory.ts:155:10 (i32.const 16) ) - ;;@ ~lib/memory.ts:260:14 + ;;@ ~lib/memory.ts:155:14 (block - ;;@ ~lib/memory.ts:261:4 + ;;@ ~lib/memory.ts:156:4 (i32.store8 - ;;@ ~lib/memory.ts:261:14 + ;;@ ~lib/memory.ts:156:14 (block (result i32) (set_local $5 (get_local $0) @@ -1795,9 +1800,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:261:22 + ;;@ ~lib/memory.ts:156:22 (i32.load8_u - ;;@ ~lib/memory.ts:261:31 + ;;@ ~lib/memory.ts:156:31 (block (result i32) (set_local $5 (get_local $1) @@ -1812,9 +1817,9 @@ ) ) ) - ;;@ ~lib/memory.ts:262:4 + ;;@ ~lib/memory.ts:157:4 (i32.store8 - ;;@ ~lib/memory.ts:262:14 + ;;@ ~lib/memory.ts:157:14 (block (result i32) (set_local $5 (get_local $0) @@ -1827,9 +1832,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:262:22 + ;;@ ~lib/memory.ts:157:22 (i32.load8_u - ;;@ ~lib/memory.ts:262:31 + ;;@ ~lib/memory.ts:157:31 (block (result i32) (set_local $5 (get_local $1) @@ -1844,9 +1849,9 @@ ) ) ) - ;;@ ~lib/memory.ts:263:4 + ;;@ ~lib/memory.ts:158:4 (i32.store8 - ;;@ ~lib/memory.ts:263:14 + ;;@ ~lib/memory.ts:158:14 (block (result i32) (set_local $5 (get_local $0) @@ -1859,9 +1864,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:263:22 + ;;@ ~lib/memory.ts:158:22 (i32.load8_u - ;;@ ~lib/memory.ts:263:31 + ;;@ ~lib/memory.ts:158:31 (block (result i32) (set_local $5 (get_local $1) @@ -1876,9 +1881,9 @@ ) ) ) - ;;@ ~lib/memory.ts:264:4 + ;;@ ~lib/memory.ts:159:4 (i32.store8 - ;;@ ~lib/memory.ts:264:14 + ;;@ ~lib/memory.ts:159:14 (block (result i32) (set_local $5 (get_local $0) @@ -1891,9 +1896,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:264:22 + ;;@ ~lib/memory.ts:159:22 (i32.load8_u - ;;@ ~lib/memory.ts:264:31 + ;;@ ~lib/memory.ts:159:31 (block (result i32) (set_local $5 (get_local $1) @@ -1908,9 +1913,9 @@ ) ) ) - ;;@ ~lib/memory.ts:265:4 + ;;@ ~lib/memory.ts:160:4 (i32.store8 - ;;@ ~lib/memory.ts:265:14 + ;;@ ~lib/memory.ts:160:14 (block (result i32) (set_local $5 (get_local $0) @@ -1923,9 +1928,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:265:22 + ;;@ ~lib/memory.ts:160:22 (i32.load8_u - ;;@ ~lib/memory.ts:265:31 + ;;@ ~lib/memory.ts:160:31 (block (result i32) (set_local $5 (get_local $1) @@ -1940,9 +1945,9 @@ ) ) ) - ;;@ ~lib/memory.ts:266:4 + ;;@ ~lib/memory.ts:161:4 (i32.store8 - ;;@ ~lib/memory.ts:266:14 + ;;@ ~lib/memory.ts:161:14 (block (result i32) (set_local $5 (get_local $0) @@ -1955,9 +1960,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:266:22 + ;;@ ~lib/memory.ts:161:22 (i32.load8_u - ;;@ ~lib/memory.ts:266:31 + ;;@ ~lib/memory.ts:161:31 (block (result i32) (set_local $5 (get_local $1) @@ -1972,9 +1977,9 @@ ) ) ) - ;;@ ~lib/memory.ts:267:4 + ;;@ ~lib/memory.ts:162:4 (i32.store8 - ;;@ ~lib/memory.ts:267:14 + ;;@ ~lib/memory.ts:162:14 (block (result i32) (set_local $5 (get_local $0) @@ -1987,9 +1992,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:267:22 + ;;@ ~lib/memory.ts:162:22 (i32.load8_u - ;;@ ~lib/memory.ts:267:31 + ;;@ ~lib/memory.ts:162:31 (block (result i32) (set_local $5 (get_local $1) @@ -2004,9 +2009,9 @@ ) ) ) - ;;@ ~lib/memory.ts:268:4 + ;;@ ~lib/memory.ts:163:4 (i32.store8 - ;;@ ~lib/memory.ts:268:14 + ;;@ ~lib/memory.ts:163:14 (block (result i32) (set_local $5 (get_local $0) @@ -2019,9 +2024,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:268:22 + ;;@ ~lib/memory.ts:163:22 (i32.load8_u - ;;@ ~lib/memory.ts:268:31 + ;;@ ~lib/memory.ts:163:31 (block (result i32) (set_local $5 (get_local $1) @@ -2036,9 +2041,9 @@ ) ) ) - ;;@ ~lib/memory.ts:269:4 + ;;@ ~lib/memory.ts:164:4 (i32.store8 - ;;@ ~lib/memory.ts:269:14 + ;;@ ~lib/memory.ts:164:14 (block (result i32) (set_local $5 (get_local $0) @@ -2051,9 +2056,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:269:22 + ;;@ ~lib/memory.ts:164:22 (i32.load8_u - ;;@ ~lib/memory.ts:269:31 + ;;@ ~lib/memory.ts:164:31 (block (result i32) (set_local $5 (get_local $1) @@ -2068,9 +2073,9 @@ ) ) ) - ;;@ ~lib/memory.ts:270:4 + ;;@ ~lib/memory.ts:165:4 (i32.store8 - ;;@ ~lib/memory.ts:270:14 + ;;@ ~lib/memory.ts:165:14 (block (result i32) (set_local $5 (get_local $0) @@ -2083,9 +2088,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:270:22 + ;;@ ~lib/memory.ts:165:22 (i32.load8_u - ;;@ ~lib/memory.ts:270:31 + ;;@ ~lib/memory.ts:165:31 (block (result i32) (set_local $5 (get_local $1) @@ -2100,9 +2105,9 @@ ) ) ) - ;;@ ~lib/memory.ts:271:4 + ;;@ ~lib/memory.ts:166:4 (i32.store8 - ;;@ ~lib/memory.ts:271:14 + ;;@ ~lib/memory.ts:166:14 (block (result i32) (set_local $5 (get_local $0) @@ -2115,9 +2120,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:271:22 + ;;@ ~lib/memory.ts:166:22 (i32.load8_u - ;;@ ~lib/memory.ts:271:31 + ;;@ ~lib/memory.ts:166:31 (block (result i32) (set_local $5 (get_local $1) @@ -2132,9 +2137,9 @@ ) ) ) - ;;@ ~lib/memory.ts:272:4 + ;;@ ~lib/memory.ts:167:4 (i32.store8 - ;;@ ~lib/memory.ts:272:14 + ;;@ ~lib/memory.ts:167:14 (block (result i32) (set_local $5 (get_local $0) @@ -2147,9 +2152,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:272:22 + ;;@ ~lib/memory.ts:167:22 (i32.load8_u - ;;@ ~lib/memory.ts:272:31 + ;;@ ~lib/memory.ts:167:31 (block (result i32) (set_local $5 (get_local $1) @@ -2164,9 +2169,9 @@ ) ) ) - ;;@ ~lib/memory.ts:273:4 + ;;@ ~lib/memory.ts:168:4 (i32.store8 - ;;@ ~lib/memory.ts:273:14 + ;;@ ~lib/memory.ts:168:14 (block (result i32) (set_local $5 (get_local $0) @@ -2179,9 +2184,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:273:22 + ;;@ ~lib/memory.ts:168:22 (i32.load8_u - ;;@ ~lib/memory.ts:273:31 + ;;@ ~lib/memory.ts:168:31 (block (result i32) (set_local $5 (get_local $1) @@ -2196,9 +2201,9 @@ ) ) ) - ;;@ ~lib/memory.ts:274:4 + ;;@ ~lib/memory.ts:169:4 (i32.store8 - ;;@ ~lib/memory.ts:274:14 + ;;@ ~lib/memory.ts:169:14 (block (result i32) (set_local $5 (get_local $0) @@ -2211,9 +2216,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:274:22 + ;;@ ~lib/memory.ts:169:22 (i32.load8_u - ;;@ ~lib/memory.ts:274:31 + ;;@ ~lib/memory.ts:169:31 (block (result i32) (set_local $5 (get_local $1) @@ -2228,9 +2233,9 @@ ) ) ) - ;;@ ~lib/memory.ts:275:4 + ;;@ ~lib/memory.ts:170:4 (i32.store8 - ;;@ ~lib/memory.ts:275:14 + ;;@ ~lib/memory.ts:170:14 (block (result i32) (set_local $5 (get_local $0) @@ -2243,9 +2248,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:275:22 + ;;@ ~lib/memory.ts:170:22 (i32.load8_u - ;;@ ~lib/memory.ts:275:31 + ;;@ ~lib/memory.ts:170:31 (block (result i32) (set_local $5 (get_local $1) @@ -2260,9 +2265,9 @@ ) ) ) - ;;@ ~lib/memory.ts:276:4 + ;;@ ~lib/memory.ts:171:4 (i32.store8 - ;;@ ~lib/memory.ts:276:14 + ;;@ ~lib/memory.ts:171:14 (block (result i32) (set_local $5 (get_local $0) @@ -2275,9 +2280,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:276:22 + ;;@ ~lib/memory.ts:171:22 (i32.load8_u - ;;@ ~lib/memory.ts:276:31 + ;;@ ~lib/memory.ts:171:31 (block (result i32) (set_local $5 (get_local $1) @@ -2294,19 +2299,19 @@ ) ) ) - ;;@ ~lib/memory.ts:278:2 + ;;@ ~lib/memory.ts:173:2 (if - ;;@ ~lib/memory.ts:278:6 + ;;@ ~lib/memory.ts:173:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:278:10 + ;;@ ~lib/memory.ts:173:10 (i32.const 8) ) - ;;@ ~lib/memory.ts:278:13 + ;;@ ~lib/memory.ts:173:13 (block - ;;@ ~lib/memory.ts:279:4 + ;;@ ~lib/memory.ts:174:4 (i32.store8 - ;;@ ~lib/memory.ts:279:14 + ;;@ ~lib/memory.ts:174:14 (block (result i32) (set_local $5 (get_local $0) @@ -2319,9 +2324,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:279:22 + ;;@ ~lib/memory.ts:174:22 (i32.load8_u - ;;@ ~lib/memory.ts:279:31 + ;;@ ~lib/memory.ts:174:31 (block (result i32) (set_local $5 (get_local $1) @@ -2336,9 +2341,9 @@ ) ) ) - ;;@ ~lib/memory.ts:280:4 + ;;@ ~lib/memory.ts:175:4 (i32.store8 - ;;@ ~lib/memory.ts:280:14 + ;;@ ~lib/memory.ts:175:14 (block (result i32) (set_local $5 (get_local $0) @@ -2351,9 +2356,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:280:22 + ;;@ ~lib/memory.ts:175:22 (i32.load8_u - ;;@ ~lib/memory.ts:280:31 + ;;@ ~lib/memory.ts:175:31 (block (result i32) (set_local $5 (get_local $1) @@ -2368,9 +2373,9 @@ ) ) ) - ;;@ ~lib/memory.ts:281:4 + ;;@ ~lib/memory.ts:176:4 (i32.store8 - ;;@ ~lib/memory.ts:281:14 + ;;@ ~lib/memory.ts:176:14 (block (result i32) (set_local $5 (get_local $0) @@ -2383,9 +2388,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:281:22 + ;;@ ~lib/memory.ts:176:22 (i32.load8_u - ;;@ ~lib/memory.ts:281:31 + ;;@ ~lib/memory.ts:176:31 (block (result i32) (set_local $5 (get_local $1) @@ -2400,9 +2405,9 @@ ) ) ) - ;;@ ~lib/memory.ts:282:4 + ;;@ ~lib/memory.ts:177:4 (i32.store8 - ;;@ ~lib/memory.ts:282:14 + ;;@ ~lib/memory.ts:177:14 (block (result i32) (set_local $5 (get_local $0) @@ -2415,9 +2420,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:282:22 + ;;@ ~lib/memory.ts:177:22 (i32.load8_u - ;;@ ~lib/memory.ts:282:31 + ;;@ ~lib/memory.ts:177:31 (block (result i32) (set_local $5 (get_local $1) @@ -2432,9 +2437,9 @@ ) ) ) - ;;@ ~lib/memory.ts:283:4 + ;;@ ~lib/memory.ts:178:4 (i32.store8 - ;;@ ~lib/memory.ts:283:14 + ;;@ ~lib/memory.ts:178:14 (block (result i32) (set_local $5 (get_local $0) @@ -2447,9 +2452,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:283:22 + ;;@ ~lib/memory.ts:178:22 (i32.load8_u - ;;@ ~lib/memory.ts:283:31 + ;;@ ~lib/memory.ts:178:31 (block (result i32) (set_local $5 (get_local $1) @@ -2464,9 +2469,9 @@ ) ) ) - ;;@ ~lib/memory.ts:284:4 + ;;@ ~lib/memory.ts:179:4 (i32.store8 - ;;@ ~lib/memory.ts:284:14 + ;;@ ~lib/memory.ts:179:14 (block (result i32) (set_local $5 (get_local $0) @@ -2479,9 +2484,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:284:22 + ;;@ ~lib/memory.ts:179:22 (i32.load8_u - ;;@ ~lib/memory.ts:284:31 + ;;@ ~lib/memory.ts:179:31 (block (result i32) (set_local $5 (get_local $1) @@ -2496,9 +2501,9 @@ ) ) ) - ;;@ ~lib/memory.ts:285:4 + ;;@ ~lib/memory.ts:180:4 (i32.store8 - ;;@ ~lib/memory.ts:285:14 + ;;@ ~lib/memory.ts:180:14 (block (result i32) (set_local $5 (get_local $0) @@ -2511,9 +2516,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:285:22 + ;;@ ~lib/memory.ts:180:22 (i32.load8_u - ;;@ ~lib/memory.ts:285:31 + ;;@ ~lib/memory.ts:180:31 (block (result i32) (set_local $5 (get_local $1) @@ -2528,9 +2533,9 @@ ) ) ) - ;;@ ~lib/memory.ts:286:4 + ;;@ ~lib/memory.ts:181:4 (i32.store8 - ;;@ ~lib/memory.ts:286:14 + ;;@ ~lib/memory.ts:181:14 (block (result i32) (set_local $5 (get_local $0) @@ -2543,9 +2548,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:286:22 + ;;@ ~lib/memory.ts:181:22 (i32.load8_u - ;;@ ~lib/memory.ts:286:31 + ;;@ ~lib/memory.ts:181:31 (block (result i32) (set_local $5 (get_local $1) @@ -2562,19 +2567,19 @@ ) ) ) - ;;@ ~lib/memory.ts:288:2 + ;;@ ~lib/memory.ts:183:2 (if - ;;@ ~lib/memory.ts:288:6 + ;;@ ~lib/memory.ts:183:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:288:10 + ;;@ ~lib/memory.ts:183:10 (i32.const 4) ) - ;;@ ~lib/memory.ts:288:13 + ;;@ ~lib/memory.ts:183:13 (block - ;;@ ~lib/memory.ts:289:4 + ;;@ ~lib/memory.ts:184:4 (i32.store8 - ;;@ ~lib/memory.ts:289:14 + ;;@ ~lib/memory.ts:184:14 (block (result i32) (set_local $5 (get_local $0) @@ -2587,9 +2592,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:289:22 + ;;@ ~lib/memory.ts:184:22 (i32.load8_u - ;;@ ~lib/memory.ts:289:31 + ;;@ ~lib/memory.ts:184:31 (block (result i32) (set_local $5 (get_local $1) @@ -2604,9 +2609,9 @@ ) ) ) - ;;@ ~lib/memory.ts:290:4 + ;;@ ~lib/memory.ts:185:4 (i32.store8 - ;;@ ~lib/memory.ts:290:14 + ;;@ ~lib/memory.ts:185:14 (block (result i32) (set_local $5 (get_local $0) @@ -2619,9 +2624,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:290:22 + ;;@ ~lib/memory.ts:185:22 (i32.load8_u - ;;@ ~lib/memory.ts:290:31 + ;;@ ~lib/memory.ts:185:31 (block (result i32) (set_local $5 (get_local $1) @@ -2636,9 +2641,9 @@ ) ) ) - ;;@ ~lib/memory.ts:291:4 + ;;@ ~lib/memory.ts:186:4 (i32.store8 - ;;@ ~lib/memory.ts:291:14 + ;;@ ~lib/memory.ts:186:14 (block (result i32) (set_local $5 (get_local $0) @@ -2651,9 +2656,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:291:22 + ;;@ ~lib/memory.ts:186:22 (i32.load8_u - ;;@ ~lib/memory.ts:291:31 + ;;@ ~lib/memory.ts:186:31 (block (result i32) (set_local $5 (get_local $1) @@ -2668,9 +2673,9 @@ ) ) ) - ;;@ ~lib/memory.ts:292:4 + ;;@ ~lib/memory.ts:187:4 (i32.store8 - ;;@ ~lib/memory.ts:292:14 + ;;@ ~lib/memory.ts:187:14 (block (result i32) (set_local $5 (get_local $0) @@ -2683,9 +2688,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:292:22 + ;;@ ~lib/memory.ts:187:22 (i32.load8_u - ;;@ ~lib/memory.ts:292:31 + ;;@ ~lib/memory.ts:187:31 (block (result i32) (set_local $5 (get_local $1) @@ -2702,19 +2707,19 @@ ) ) ) - ;;@ ~lib/memory.ts:294:2 + ;;@ ~lib/memory.ts:189:2 (if - ;;@ ~lib/memory.ts:294:6 + ;;@ ~lib/memory.ts:189:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:294:10 + ;;@ ~lib/memory.ts:189:10 (i32.const 2) ) - ;;@ ~lib/memory.ts:294:13 + ;;@ ~lib/memory.ts:189:13 (block - ;;@ ~lib/memory.ts:295:4 + ;;@ ~lib/memory.ts:190:4 (i32.store8 - ;;@ ~lib/memory.ts:295:14 + ;;@ ~lib/memory.ts:190:14 (block (result i32) (set_local $5 (get_local $0) @@ -2727,9 +2732,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:295:22 + ;;@ ~lib/memory.ts:190:22 (i32.load8_u - ;;@ ~lib/memory.ts:295:31 + ;;@ ~lib/memory.ts:190:31 (block (result i32) (set_local $5 (get_local $1) @@ -2744,9 +2749,9 @@ ) ) ) - ;;@ ~lib/memory.ts:296:4 + ;;@ ~lib/memory.ts:191:4 (i32.store8 - ;;@ ~lib/memory.ts:296:14 + ;;@ ~lib/memory.ts:191:14 (block (result i32) (set_local $5 (get_local $0) @@ -2759,9 +2764,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:296:22 + ;;@ ~lib/memory.ts:191:22 (i32.load8_u - ;;@ ~lib/memory.ts:296:31 + ;;@ ~lib/memory.ts:191:31 (block (result i32) (set_local $5 (get_local $1) @@ -2778,17 +2783,17 @@ ) ) ) - ;;@ ~lib/memory.ts:298:2 + ;;@ ~lib/memory.ts:193:2 (if - ;;@ ~lib/memory.ts:298:6 + ;;@ ~lib/memory.ts:193:6 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:298:10 + ;;@ ~lib/memory.ts:193:10 (i32.const 1) ) - ;;@ ~lib/memory.ts:298:13 + ;;@ ~lib/memory.ts:193:13 (i32.store8 - ;;@ ~lib/memory.ts:299:14 + ;;@ ~lib/memory.ts:194:14 (block (result i32) (set_local $5 (get_local $0) @@ -2801,9 +2806,9 @@ ) (get_local $5) ) - ;;@ ~lib/memory.ts:299:22 + ;;@ ~lib/memory.ts:194:22 (i32.load8_u - ;;@ ~lib/memory.ts:299:31 + ;;@ ~lib/memory.ts:194:31 (block (result i32) (set_local $5 (get_local $1) @@ -2820,123 +2825,123 @@ ) ) ) - (func $~lib/memory/memory.copy (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memmove (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - ;;@ ~lib/memory.ts:79:4 + ;;@ ~lib/memory.ts:200:2 (if - ;;@ ~lib/memory.ts:79:8 + ;;@ ~lib/memory.ts:200:6 (i32.eq (get_local $0) - ;;@ ~lib/memory.ts:79:16 + ;;@ ~lib/memory.ts:200:14 (get_local $1) ) - ;;@ ~lib/memory.ts:79:21 + ;;@ ~lib/memory.ts:200:19 (return) ) - ;;@ ~lib/memory.ts:80:4 + ;;@ ~lib/memory.ts:201:2 (if - ;;@ ~lib/memory.ts:80:8 + ;;@ ~lib/memory.ts:201:6 (if (result i32) (tee_local $3 (i32.le_u (i32.add (get_local $1) - ;;@ ~lib/memory.ts:80:14 + ;;@ ~lib/memory.ts:201:12 (get_local $2) ) - ;;@ ~lib/memory.ts:80:19 + ;;@ ~lib/memory.ts:201:17 (get_local $0) ) ) (get_local $3) - ;;@ ~lib/memory.ts:80:27 + ;;@ ~lib/memory.ts:201:25 (i32.le_u (i32.add (get_local $0) - ;;@ ~lib/memory.ts:80:34 + ;;@ ~lib/memory.ts:201:32 (get_local $2) ) - ;;@ ~lib/memory.ts:80:39 + ;;@ ~lib/memory.ts:201:37 (get_local $1) ) ) - ;;@ ~lib/memory.ts:80:44 + ;;@ ~lib/memory.ts:201:42 (block - ;;@ ~lib/memory.ts:81:6 + ;;@ ~lib/memory.ts:202:4 (call $~lib/memory/memcpy - ;;@ ~lib/memory.ts:81:13 + ;;@ ~lib/memory.ts:202:11 (get_local $0) - ;;@ ~lib/memory.ts:81:19 + ;;@ ~lib/memory.ts:202:17 (get_local $1) - ;;@ ~lib/memory.ts:81:24 + ;;@ ~lib/memory.ts:202:22 (get_local $2) ) - ;;@ ~lib/memory.ts:82:6 + ;;@ ~lib/memory.ts:203:4 (return) ) ) - ;;@ ~lib/memory.ts:84:4 + ;;@ ~lib/memory.ts:205:2 (if - ;;@ ~lib/memory.ts:84:8 + ;;@ ~lib/memory.ts:205:6 (i32.lt_u (get_local $0) - ;;@ ~lib/memory.ts:84:15 + ;;@ ~lib/memory.ts:205:13 (get_local $1) ) - ;;@ ~lib/memory.ts:84:20 + ;;@ ~lib/memory.ts:205:18 (block - ;;@ ~lib/memory.ts:85:6 + ;;@ ~lib/memory.ts:206:4 (if - ;;@ ~lib/memory.ts:85:10 + ;;@ ~lib/memory.ts:206:8 (i32.eq (i32.and - ;;@ ~lib/memory.ts:85:11 + ;;@ ~lib/memory.ts:206:9 (get_local $1) - ;;@ ~lib/memory.ts:85:17 + ;;@ ~lib/memory.ts:206:15 (i32.const 7) ) - ;;@ ~lib/memory.ts:85:23 + ;;@ ~lib/memory.ts:206:21 (i32.and - ;;@ ~lib/memory.ts:85:24 + ;;@ ~lib/memory.ts:206:22 (get_local $0) - ;;@ ~lib/memory.ts:85:31 + ;;@ ~lib/memory.ts:206:29 (i32.const 7) ) ) - ;;@ ~lib/memory.ts:85:35 + ;;@ ~lib/memory.ts:206:33 (block (block $break|0 (loop $continue|0 (if - ;;@ ~lib/memory.ts:86:15 + ;;@ ~lib/memory.ts:207:13 (i32.and (get_local $0) - ;;@ ~lib/memory.ts:86:22 + ;;@ ~lib/memory.ts:207:20 (i32.const 7) ) (block (block - ;;@ ~lib/memory.ts:87:10 + ;;@ ~lib/memory.ts:208:8 (if - ;;@ ~lib/memory.ts:87:14 + ;;@ ~lib/memory.ts:208:12 (i32.eqz - ;;@ ~lib/memory.ts:87:15 + ;;@ ~lib/memory.ts:208:13 (get_local $2) ) - ;;@ ~lib/memory.ts:87:18 + ;;@ ~lib/memory.ts:208:16 (return) ) - ;;@ ~lib/memory.ts:88:10 + ;;@ ~lib/memory.ts:209:8 (set_local $2 (i32.sub - ;;@ ~lib/memory.ts:88:12 + ;;@ ~lib/memory.ts:209:10 (get_local $2) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:89:10 + ;;@ ~lib/memory.ts:210:8 (i32.store8 - ;;@ ~lib/memory.ts:89:20 + ;;@ ~lib/memory.ts:210:18 (block (result i32) (set_local $3 (get_local $0) @@ -2949,9 +2954,9 @@ ) (get_local $3) ) - ;;@ ~lib/memory.ts:89:28 + ;;@ ~lib/memory.ts:210:26 (i32.load8_u - ;;@ ~lib/memory.ts:89:37 + ;;@ ~lib/memory.ts:210:35 (block (result i32) (set_local $3 (get_local $1) @@ -2972,49 +2977,49 @@ ) ) ) - ;;@ ~lib/memory.ts:91:8 + ;;@ ~lib/memory.ts:212:6 (block $break|1 (loop $continue|1 (if - ;;@ ~lib/memory.ts:91:15 + ;;@ ~lib/memory.ts:212:13 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:91:20 + ;;@ ~lib/memory.ts:212:18 (i32.const 8) ) (block (block - ;;@ ~lib/memory.ts:92:10 + ;;@ ~lib/memory.ts:213:8 (i64.store - ;;@ ~lib/memory.ts:92:21 + ;;@ ~lib/memory.ts:213:19 (get_local $0) - ;;@ ~lib/memory.ts:92:27 + ;;@ ~lib/memory.ts:213:25 (i64.load - ;;@ ~lib/memory.ts:92:37 + ;;@ ~lib/memory.ts:213:35 (get_local $1) ) ) - ;;@ ~lib/memory.ts:93:10 + ;;@ ~lib/memory.ts:214:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:93:18 + ;;@ ~lib/memory.ts:214:16 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:94:10 + ;;@ ~lib/memory.ts:215:8 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:94:18 + ;;@ ~lib/memory.ts:215:16 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:95:10 + ;;@ ~lib/memory.ts:216:8 (set_local $1 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:95:18 + ;;@ ~lib/memory.ts:216:16 (i32.const 8) ) ) @@ -3026,17 +3031,17 @@ ) ) ) - ;;@ ~lib/memory.ts:98:6 + ;;@ ~lib/memory.ts:219:4 (block $break|2 (loop $continue|2 (if - ;;@ ~lib/memory.ts:98:13 + ;;@ ~lib/memory.ts:219:11 (get_local $2) (block (block - ;;@ ~lib/memory.ts:99:8 + ;;@ ~lib/memory.ts:220:6 (i32.store8 - ;;@ ~lib/memory.ts:99:18 + ;;@ ~lib/memory.ts:220:16 (block (result i32) (set_local $3 (get_local $0) @@ -3049,9 +3054,9 @@ ) (get_local $3) ) - ;;@ ~lib/memory.ts:99:26 + ;;@ ~lib/memory.ts:220:24 (i32.load8_u - ;;@ ~lib/memory.ts:99:35 + ;;@ ~lib/memory.ts:220:33 (block (result i32) (set_local $3 (get_local $1) @@ -3066,10 +3071,10 @@ ) ) ) - ;;@ ~lib/memory.ts:100:8 + ;;@ ~lib/memory.ts:221:6 (set_local $2 (i32.sub - ;;@ ~lib/memory.ts:100:10 + ;;@ ~lib/memory.ts:221:8 (get_local $2) (i32.const 1) ) @@ -3081,74 +3086,74 @@ ) ) ) - ;;@ ~lib/memory.ts:102:11 + ;;@ ~lib/memory.ts:223:9 (block - ;;@ ~lib/memory.ts:103:6 + ;;@ ~lib/memory.ts:224:4 (if - ;;@ ~lib/memory.ts:103:10 + ;;@ ~lib/memory.ts:224:8 (i32.eq (i32.and - ;;@ ~lib/memory.ts:103:11 + ;;@ ~lib/memory.ts:224:9 (get_local $1) - ;;@ ~lib/memory.ts:103:17 + ;;@ ~lib/memory.ts:224:15 (i32.const 7) ) - ;;@ ~lib/memory.ts:103:23 + ;;@ ~lib/memory.ts:224:21 (i32.and - ;;@ ~lib/memory.ts:103:24 + ;;@ ~lib/memory.ts:224:22 (get_local $0) - ;;@ ~lib/memory.ts:103:31 + ;;@ ~lib/memory.ts:224:29 (i32.const 7) ) ) - ;;@ ~lib/memory.ts:103:35 + ;;@ ~lib/memory.ts:224:33 (block (block $break|3 (loop $continue|3 (if - ;;@ ~lib/memory.ts:104:15 + ;;@ ~lib/memory.ts:225:13 (i32.and (i32.add - ;;@ ~lib/memory.ts:104:16 + ;;@ ~lib/memory.ts:225:14 (get_local $0) - ;;@ ~lib/memory.ts:104:23 + ;;@ ~lib/memory.ts:225:21 (get_local $2) ) - ;;@ ~lib/memory.ts:104:28 + ;;@ ~lib/memory.ts:225:26 (i32.const 7) ) (block (block - ;;@ ~lib/memory.ts:105:10 + ;;@ ~lib/memory.ts:226:8 (if - ;;@ ~lib/memory.ts:105:14 + ;;@ ~lib/memory.ts:226:12 (i32.eqz - ;;@ ~lib/memory.ts:105:15 + ;;@ ~lib/memory.ts:226:13 (get_local $2) ) - ;;@ ~lib/memory.ts:105:18 + ;;@ ~lib/memory.ts:226:16 (return) ) - ;;@ ~lib/memory.ts:106:10 + ;;@ ~lib/memory.ts:227:8 (i32.store8 - ;;@ ~lib/memory.ts:106:20 + ;;@ ~lib/memory.ts:227:18 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:106:27 + ;;@ ~lib/memory.ts:227:25 (tee_local $2 (i32.sub - ;;@ ~lib/memory.ts:106:29 + ;;@ ~lib/memory.ts:227:27 (get_local $2) (i32.const 1) ) ) ) - ;;@ ~lib/memory.ts:106:32 + ;;@ ~lib/memory.ts:227:30 (i32.load8_u - ;;@ ~lib/memory.ts:106:41 + ;;@ ~lib/memory.ts:227:39 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:106:47 + ;;@ ~lib/memory.ts:227:45 (get_local $2) ) ) @@ -3159,40 +3164,40 @@ ) ) ) - ;;@ ~lib/memory.ts:108:8 + ;;@ ~lib/memory.ts:229:6 (block $break|4 (loop $continue|4 (if - ;;@ ~lib/memory.ts:108:15 + ;;@ ~lib/memory.ts:229:13 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:108:20 + ;;@ ~lib/memory.ts:229:18 (i32.const 8) ) (block (block - ;;@ ~lib/memory.ts:109:10 + ;;@ ~lib/memory.ts:230:8 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:109:15 + ;;@ ~lib/memory.ts:230:13 (i32.const 8) ) ) - ;;@ ~lib/memory.ts:110:10 + ;;@ ~lib/memory.ts:231:8 (i64.store - ;;@ ~lib/memory.ts:110:21 + ;;@ ~lib/memory.ts:231:19 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:110:28 + ;;@ ~lib/memory.ts:231:26 (get_local $2) ) - ;;@ ~lib/memory.ts:110:31 + ;;@ ~lib/memory.ts:231:29 (i64.load - ;;@ ~lib/memory.ts:110:41 + ;;@ ~lib/memory.ts:231:39 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:110:47 + ;;@ ~lib/memory.ts:231:45 (get_local $2) ) ) @@ -3205,33 +3210,33 @@ ) ) ) - ;;@ ~lib/memory.ts:113:6 + ;;@ ~lib/memory.ts:234:4 (block $break|5 (loop $continue|5 (if - ;;@ ~lib/memory.ts:113:13 + ;;@ ~lib/memory.ts:234:11 (get_local $2) (block - ;;@ ~lib/memory.ts:113:16 + ;;@ ~lib/memory.ts:234:14 (i32.store8 - ;;@ ~lib/memory.ts:114:18 + ;;@ ~lib/memory.ts:235:16 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:114:25 + ;;@ ~lib/memory.ts:235:23 (tee_local $2 (i32.sub - ;;@ ~lib/memory.ts:114:27 + ;;@ ~lib/memory.ts:235:25 (get_local $2) (i32.const 1) ) ) ) - ;;@ ~lib/memory.ts:114:30 + ;;@ ~lib/memory.ts:235:28 (i32.load8_u - ;;@ ~lib/memory.ts:114:39 + ;;@ ~lib/memory.ts:235:37 (i32.add (get_local $1) - ;;@ ~lib/memory.ts:114:45 + ;;@ ~lib/memory.ts:235:43 (get_local $2) ) ) @@ -3244,43 +3249,54 @@ ) ) ) - (func $~lib/memory/memory.compare (; 6 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.copy (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + ;;@ ~lib/memory.ts:16:4 + (call $~lib/memory/memmove + ;;@ ~lib/memory.ts:16:12 + (get_local $0) + ;;@ ~lib/memory.ts:16:18 + (get_local $1) + ;;@ ~lib/memory.ts:16:23 + (get_local $2) + ) + ) + (func $~lib/memory/memcmp (; 6 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) - ;;@ ~lib/memory.ts:122:4 + ;;@ ~lib/memory.ts:302:2 (if - ;;@ ~lib/memory.ts:122:8 + ;;@ ~lib/memory.ts:302:6 (i32.eq (get_local $0) - ;;@ ~lib/memory.ts:122:14 + ;;@ ~lib/memory.ts:302:12 (get_local $1) ) - ;;@ ~lib/memory.ts:122:25 + ;;@ ~lib/memory.ts:302:23 (return (i32.const 0) ) ) - ;;@ ~lib/memory.ts:123:4 + ;;@ ~lib/memory.ts:303:2 (block $break|0 (loop $continue|0 (if - ;;@ ~lib/memory.ts:123:11 + ;;@ ~lib/memory.ts:303:9 (if (result i32) (tee_local $3 (i32.ne (get_local $2) - ;;@ ~lib/memory.ts:123:16 + ;;@ ~lib/memory.ts:303:14 (i32.const 0) ) ) - ;;@ ~lib/memory.ts:123:21 + ;;@ ~lib/memory.ts:303:19 (i32.eq (i32.load8_u - ;;@ ~lib/memory.ts:123:30 + ;;@ ~lib/memory.ts:303:28 (get_local $0) ) - ;;@ ~lib/memory.ts:123:37 + ;;@ ~lib/memory.ts:303:35 (i32.load8_u - ;;@ ~lib/memory.ts:123:46 + ;;@ ~lib/memory.ts:303:44 (get_local $1) ) ) @@ -3288,21 +3304,21 @@ ) (block (block - ;;@ ~lib/memory.ts:124:6 + ;;@ ~lib/memory.ts:304:4 (set_local $2 (i32.sub (get_local $2) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:124:11 + ;;@ ~lib/memory.ts:304:9 (set_local $0 (i32.add (get_local $0) (i32.const 1) ) ) - ;;@ ~lib/memory.ts:124:17 + ;;@ ~lib/memory.ts:304:15 (set_local $1 (i32.add (get_local $1) @@ -3315,27 +3331,38 @@ ) ) ) - ;;@ ~lib/memory.ts:126:55 + ;;@ ~lib/memory.ts:306:53 (if (result i32) - ;;@ ~lib/memory.ts:126:11 + ;;@ ~lib/memory.ts:306:9 (get_local $2) - ;;@ ~lib/memory.ts:126:15 + ;;@ ~lib/memory.ts:306:13 (i32.sub (i32.load8_u - ;;@ ~lib/memory.ts:126:29 + ;;@ ~lib/memory.ts:306:27 (get_local $0) ) - ;;@ ~lib/memory.ts:126:35 + ;;@ ~lib/memory.ts:306:33 (i32.load8_u - ;;@ ~lib/memory.ts:126:49 + ;;@ ~lib/memory.ts:306:47 (get_local $1) ) ) - ;;@ ~lib/memory.ts:126:55 + ;;@ ~lib/memory.ts:306:53 (i32.const 0) ) ) - (func $~lib/allocator/tlsf/Root#set:tailRef (; 7 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/memory/memory.compare (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + ;;@ ~lib/memory.ts:21:27 + (call $~lib/memory/memcmp + ;;@ ~lib/memory.ts:21:18 + (get_local $0) + ;;@ ~lib/memory.ts:21:22 + (get_local $1) + ;;@ ~lib/memory.ts:21:26 + (get_local $2) + ) + ) + (func $~lib/allocator/tlsf/Root#set:tailRef (; 8 ;) (type $iiv) (param $0 i32) (param $1 i32) ;;@ ~lib/allocator/tlsf.ts:181:30 (i32.store offset=2912 ;;@ ~lib/allocator/tlsf.ts:181:43 @@ -3344,7 +3371,7 @@ (get_local $1) ) ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setSLMap (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) ;;@ ~lib/allocator/tlsf.ts:144:4 (if (i32.eqz @@ -3352,7 +3379,7 @@ (i32.lt_u (get_local $1) ;;@ ~lib/allocator/tlsf.ts:144:16 - (i32.const 22) + (get_global $~lib/allocator/tlsf/FL_BITS) ) ) (block @@ -3381,7 +3408,7 @@ (get_local $2) ) ) - (func $~lib/allocator/tlsf/Root#setHead (; 9 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $~lib/allocator/tlsf/Root#setHead (; 10 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) ;;@ ~lib/allocator/tlsf.ts:167:4 (if (i32.eqz @@ -3389,7 +3416,7 @@ (i32.lt_u (get_local $1) ;;@ ~lib/allocator/tlsf.ts:167:16 - (i32.const 22) + (get_global $~lib/allocator/tlsf/FL_BITS) ) ) (block @@ -3409,7 +3436,7 @@ (i32.lt_u (get_local $2) ;;@ ~lib/allocator/tlsf.ts:168:16 - (i32.const 32) + (get_global $~lib/allocator/tlsf/SL_SIZE) ) ) (block @@ -3434,7 +3461,7 @@ (i32.mul (get_local $1) ;;@ ~lib/allocator/tlsf.ts:170:38 - (i32.const 32) + (get_global $~lib/allocator/tlsf/SL_SIZE) ) ;;@ ~lib/allocator/tlsf.ts:170:48 (get_local $2) @@ -3447,14 +3474,14 @@ (get_local $3) ) ) - (func $~lib/allocator/tlsf/Root#get:tailRef (; 10 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Root#get:tailRef (; 11 ;) (type $ii) (param $0 i32) (result i32) ;;@ ~lib/allocator/tlsf.ts:180:58 (i32.load offset=2912 ;;@ ~lib/allocator/tlsf.ts:180:44 (i32.const 0) ) ) - (func $~lib/allocator/tlsf/Block#get:right (; 11 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:right (; 12 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) ;;@ ~lib/allocator/tlsf.ts:89:4 (if @@ -3467,7 +3494,7 @@ ;;@ ~lib/allocator/tlsf.ts:89:23 (i32.xor ;;@ ~lib/allocator/tlsf.ts:89:24 - (i32.const 3) + (get_global $~lib/allocator/tlsf/TAGS) (i32.const -1) ) ) @@ -3492,7 +3519,7 @@ (i32.add (get_local $0) ;;@ ~lib/allocator/tlsf.ts:92:34 - (i32.const 8) + (get_global $~lib/allocator/tlsf/Block.INFO) ) ;;@ ~lib/allocator/tlsf.ts:92:47 (i32.and @@ -3503,7 +3530,7 @@ ;;@ ~lib/allocator/tlsf.ts:92:60 (i32.xor ;;@ ~lib/allocator/tlsf.ts:92:61 - (i32.const 3) + (get_global $~lib/allocator/tlsf/TAGS) (i32.const -1) ) ) @@ -3522,7 +3549,7 @@ (get_local $1) ) ) - (func $~lib/allocator/tlsf/fls (; 12 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/fls (; 13 ;) (type $ii) (param $0 i32) (result i32) ;;@ ~lib/allocator/tlsf.ts:428:2 (if (i32.eqz @@ -3554,7 +3581,7 @@ ) ) ) - (func $~lib/allocator/tlsf/Root#getHead (; 13 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getHead (; 14 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) ;;@ ~lib/allocator/tlsf.ts:158:4 (if (i32.eqz @@ -3562,7 +3589,7 @@ (i32.lt_u (get_local $1) ;;@ ~lib/allocator/tlsf.ts:158:16 - (i32.const 22) + (get_global $~lib/allocator/tlsf/FL_BITS) ) ) (block @@ -3582,7 +3609,7 @@ (i32.lt_u (get_local $2) ;;@ ~lib/allocator/tlsf.ts:159:16 - (i32.const 32) + (get_global $~lib/allocator/tlsf/SL_SIZE) ) ) (block @@ -3607,7 +3634,7 @@ (i32.mul (get_local $1) ;;@ ~lib/allocator/tlsf.ts:161:38 - (i32.const 32) + (get_global $~lib/allocator/tlsf/SL_SIZE) ) ;;@ ~lib/allocator/tlsf.ts:161:48 (get_local $2) @@ -3618,7 +3645,7 @@ ) ) ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#getSLMap (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) ;;@ ~lib/allocator/tlsf.ts:138:4 (if (i32.eqz @@ -3626,7 +3653,7 @@ (i32.lt_u (get_local $1) ;;@ ~lib/allocator/tlsf.ts:138:16 - (i32.const 22) + (get_global $~lib/allocator/tlsf/FL_BITS) ) ) (block @@ -3653,7 +3680,7 @@ ) ) ) - (func $~lib/allocator/tlsf/Root#remove (; 15 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#remove (; 16 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3675,7 +3702,7 @@ (i32.and (get_local $2) ;;@ ~lib/allocator/tlsf.ts:258:23 - (i32.const 1) + (get_global $~lib/allocator/tlsf/FREE) ) ) (block @@ -3696,7 +3723,7 @@ ;;@ ~lib/allocator/tlsf.ts:259:27 (i32.xor ;;@ ~lib/allocator/tlsf.ts:259:28 - (i32.const 3) + (get_global $~lib/allocator/tlsf/TAGS) (i32.const -1) ) ) @@ -3710,14 +3737,14 @@ (i32.ge_u (get_local $3) ;;@ ~lib/allocator/tlsf.ts:260:19 - (i32.const 16) + (get_global $~lib/allocator/tlsf/Block.MIN_SIZE) ) ) ;;@ ~lib/allocator/tlsf.ts:260:37 (i32.lt_u (get_local $3) ;;@ ~lib/allocator/tlsf.ts:260:44 - (i32.const 1073741824) + (get_global $~lib/allocator/tlsf/Block.MAX_SIZE) ) (get_local $4) ) @@ -3738,7 +3765,7 @@ (i32.lt_u (get_local $3) ;;@ ~lib/allocator/tlsf.ts:264:15 - (i32.const 256) + (get_global $~lib/allocator/tlsf/SB_SIZE) ) ;;@ ~lib/allocator/tlsf.ts:264:24 (block @@ -3754,7 +3781,7 @@ ;;@ ~lib/allocator/tlsf.ts:266:17 (get_local $3) ;;@ ~lib/allocator/tlsf.ts:266:24 - (i32.const 8) + (get_global $~lib/internal/allocator/AL_SIZE) ) ) ) @@ -3781,7 +3808,7 @@ ;;@ ~lib/allocator/tlsf.ts:269:27 (get_local $5) ;;@ ~lib/allocator/tlsf.ts:269:32 - (i32.const 5) + (get_global $~lib/allocator/tlsf/SL_BITS) ) ) ;;@ ~lib/allocator/tlsf.ts:269:44 @@ -3789,7 +3816,7 @@ ;;@ ~lib/allocator/tlsf.ts:269:45 (i32.const 1) ;;@ ~lib/allocator/tlsf.ts:269:50 - (i32.const 5) + (get_global $~lib/allocator/tlsf/SL_BITS) ) ) ) @@ -3799,7 +3826,7 @@ (get_local $5) ;;@ ~lib/allocator/tlsf.ts:270:12 (i32.sub - (i32.const 8) + (get_global $~lib/allocator/tlsf/SB_BITS) ;;@ ~lib/allocator/tlsf.ts:270:22 (i32.const 1) ) @@ -3947,7 +3974,7 @@ ) ) ) - (func $~lib/allocator/tlsf/Block#get:left (; 16 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/Block#get:left (; 17 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) ;;@ ~lib/allocator/tlsf.ts:81:4 (if @@ -3958,7 +3985,7 @@ (get_local $0) ) ;;@ ~lib/allocator/tlsf.ts:81:23 - (i32.const 2) + (get_global $~lib/allocator/tlsf/LEFT_FREE) ) ) (block @@ -3998,7 +4025,7 @@ (get_local $1) ) ) - (func $~lib/allocator/tlsf/Root#setJump (; 17 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/allocator/tlsf/Root#setJump (; 18 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) ;;@ ~lib/allocator/tlsf.ts:334:4 (if (i32.eqz @@ -4008,7 +4035,7 @@ (get_local $1) ) ;;@ ~lib/allocator/tlsf.ts:334:23 - (i32.const 1) + (get_global $~lib/allocator/tlsf/FREE) ) ) (block @@ -4052,7 +4079,7 @@ (get_local $2) ) ;;@ ~lib/allocator/tlsf.ts:336:24 - (i32.const 2) + (get_global $~lib/allocator/tlsf/LEFT_FREE) ) ) (block @@ -4077,7 +4104,7 @@ (get_local $1) ) ) - (func $~lib/allocator/tlsf/Root#insert (; 18 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/allocator/tlsf/Root#insert (; 19 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4117,7 +4144,7 @@ (i32.and (get_local $2) ;;@ ~lib/allocator/tlsf.ts:191:23 - (i32.const 1) + (get_global $~lib/allocator/tlsf/FREE) ) ) (block @@ -4146,20 +4173,20 @@ ;;@ ~lib/allocator/tlsf.ts:194:27 (i32.xor ;;@ ~lib/allocator/tlsf.ts:194:28 - (i32.const 3) + (get_global $~lib/allocator/tlsf/TAGS) (i32.const -1) ) ) ) ;;@ ~lib/allocator/tlsf.ts:194:37 - (i32.const 16) + (get_global $~lib/allocator/tlsf/Block.MIN_SIZE) ) ) ;;@ ~lib/allocator/tlsf.ts:194:55 (i32.lt_u (get_local $3) ;;@ ~lib/allocator/tlsf.ts:194:62 - (i32.const 1073741824) + (get_global $~lib/allocator/tlsf/Block.MAX_SIZE) ) (get_local $4) ) @@ -4211,7 +4238,7 @@ (i32.and (get_local $6) ;;@ ~lib/allocator/tlsf.ts:201:20 - (i32.const 1) + (get_global $~lib/allocator/tlsf/FREE) ) ;;@ ~lib/allocator/tlsf.ts:201:26 (block @@ -4232,7 +4259,7 @@ (get_local $2) ;;@ ~lib/allocator/tlsf.ts:203:33 (i32.add - (i32.const 8) + (get_global $~lib/allocator/tlsf/Block.INFO) ;;@ ~lib/allocator/tlsf.ts:203:46 (i32.and ;;@ ~lib/allocator/tlsf.ts:203:47 @@ -4240,7 +4267,7 @@ ;;@ ~lib/allocator/tlsf.ts:203:59 (i32.xor ;;@ ~lib/allocator/tlsf.ts:203:60 - (i32.const 3) + (get_global $~lib/allocator/tlsf/TAGS) (i32.const -1) ) ) @@ -4270,7 +4297,7 @@ (i32.and (get_local $2) ;;@ ~lib/allocator/tlsf.ts:210:20 - (i32.const 2) + (get_global $~lib/allocator/tlsf/LEFT_FREE) ) ;;@ ~lib/allocator/tlsf.ts:210:31 (block @@ -4312,7 +4339,7 @@ (i32.and (get_local $7) ;;@ ~lib/allocator/tlsf.ts:213:24 - (i32.const 1) + (get_global $~lib/allocator/tlsf/FREE) ) ) (block @@ -4342,7 +4369,7 @@ (get_local $7) ;;@ ~lib/allocator/tlsf.ts:215:31 (i32.add - (i32.const 8) + (get_global $~lib/allocator/tlsf/Block.INFO) ;;@ ~lib/allocator/tlsf.ts:215:44 (i32.and ;;@ ~lib/allocator/tlsf.ts:215:45 @@ -4350,7 +4377,7 @@ ;;@ ~lib/allocator/tlsf.ts:215:57 (i32.xor ;;@ ~lib/allocator/tlsf.ts:215:58 - (i32.const 3) + (get_global $~lib/allocator/tlsf/TAGS) (i32.const -1) ) ) @@ -4377,7 +4404,7 @@ (i32.or (get_local $6) ;;@ ~lib/allocator/tlsf.ts:221:29 - (i32.const 2) + (get_global $~lib/allocator/tlsf/LEFT_FREE) ) ) ;;@ ~lib/allocator/tlsf.ts:222:9 @@ -4397,7 +4424,7 @@ ;;@ ~lib/allocator/tlsf.ts:225:23 (i32.xor ;;@ ~lib/allocator/tlsf.ts:225:24 - (i32.const 3) + (get_global $~lib/allocator/tlsf/TAGS) (i32.const -1) ) ) @@ -4411,14 +4438,14 @@ (i32.ge_u (get_local $3) ;;@ ~lib/allocator/tlsf.ts:226:19 - (i32.const 16) + (get_global $~lib/allocator/tlsf/Block.MIN_SIZE) ) ) ;;@ ~lib/allocator/tlsf.ts:226:37 (i32.lt_u (get_local $3) ;;@ ~lib/allocator/tlsf.ts:226:44 - (i32.const 1073741824) + (get_global $~lib/allocator/tlsf/Block.MAX_SIZE) ) (get_local $7) ) @@ -4439,7 +4466,7 @@ (i32.lt_u (get_local $3) ;;@ ~lib/allocator/tlsf.ts:230:15 - (i32.const 256) + (get_global $~lib/allocator/tlsf/SB_SIZE) ) ;;@ ~lib/allocator/tlsf.ts:230:24 (block @@ -4455,7 +4482,7 @@ ;;@ ~lib/allocator/tlsf.ts:232:17 (get_local $3) ;;@ ~lib/allocator/tlsf.ts:232:24 - (i32.const 8) + (get_global $~lib/internal/allocator/AL_SIZE) ) ) ) @@ -4482,7 +4509,7 @@ ;;@ ~lib/allocator/tlsf.ts:235:27 (get_local $8) ;;@ ~lib/allocator/tlsf.ts:235:32 - (i32.const 5) + (get_global $~lib/allocator/tlsf/SL_BITS) ) ) ;;@ ~lib/allocator/tlsf.ts:235:44 @@ -4490,7 +4517,7 @@ ;;@ ~lib/allocator/tlsf.ts:235:45 (i32.const 1) ;;@ ~lib/allocator/tlsf.ts:235:50 - (i32.const 5) + (get_global $~lib/allocator/tlsf/SL_BITS) ) ) ) @@ -4500,7 +4527,7 @@ (get_local $8) ;;@ ~lib/allocator/tlsf.ts:236:12 (i32.sub - (i32.const 8) + (get_global $~lib/allocator/tlsf/SB_BITS) ;;@ ~lib/allocator/tlsf.ts:236:22 (i32.const 1) ) @@ -4595,7 +4622,7 @@ ) ) ) - (func $~lib/allocator/tlsf/Root#addMemory (; 19 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#addMemory (; 20 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4632,7 +4659,7 @@ ;;@ ~lib/allocator/tlsf.ts:378:13 (get_local $1) ;;@ ~lib/allocator/tlsf.ts:378:21 - (i32.const 7) + (get_global $~lib/internal/allocator/AL_MASK) ) ) ) @@ -4656,7 +4683,7 @@ ;;@ ~lib/allocator/tlsf.ts:379:13 (get_local $2) ;;@ ~lib/allocator/tlsf.ts:379:19 - (i32.const 7) + (get_global $~lib/internal/allocator/AL_MASK) ) ) ) @@ -4719,7 +4746,7 @@ (i32.sub (get_local $1) ;;@ ~lib/allocator/tlsf.ts:387:18 - (i32.const 8) + (get_global $~lib/allocator/tlsf/Block.INFO) ) ;;@ ~lib/allocator/tlsf.ts:387:32 (get_local $3) @@ -4731,7 +4758,7 @@ (i32.sub (get_local $1) ;;@ ~lib/allocator/tlsf.ts:388:17 - (i32.const 8) + (get_global $~lib/allocator/tlsf/Block.INFO) ) ) ;;@ ~lib/allocator/tlsf.ts:389:8 @@ -4754,7 +4781,7 @@ (i32.add (get_local $0) ;;@ ~lib/allocator/tlsf.ts:393:48 - (i32.const 2916) + (get_global $~lib/allocator/tlsf/Root.SIZE) ) ) ) @@ -4786,12 +4813,12 @@ ;;@ ~lib/allocator/tlsf.ts:398:15 (i32.add (i32.add - (i32.const 8) + (get_global $~lib/allocator/tlsf/Block.INFO) ;;@ ~lib/allocator/tlsf.ts:398:28 - (i32.const 16) + (get_global $~lib/allocator/tlsf/Block.MIN_SIZE) ) ;;@ ~lib/allocator/tlsf.ts:398:45 - (i32.const 8) + (get_global $~lib/allocator/tlsf/Block.INFO) ) ) ;;@ ~lib/allocator/tlsf.ts:398:57 @@ -4809,7 +4836,7 @@ (i32.mul (i32.const 2) ;;@ ~lib/allocator/tlsf.ts:403:30 - (i32.const 8) + (get_global $~lib/allocator/tlsf/Block.INFO) ) ) ) @@ -4826,14 +4853,14 @@ (i32.or (get_local $6) ;;@ ~lib/allocator/tlsf.ts:405:27 - (i32.const 1) + (get_global $~lib/allocator/tlsf/FREE) ) ;;@ ~lib/allocator/tlsf.ts:405:34 (i32.and ;;@ ~lib/allocator/tlsf.ts:405:35 (get_local $4) ;;@ ~lib/allocator/tlsf.ts:405:46 - (i32.const 2) + (get_global $~lib/allocator/tlsf/LEFT_FREE) ) ) ) @@ -4860,7 +4887,7 @@ (get_local $5) ) ;;@ ~lib/allocator/tlsf.ts:410:48 - (i32.const 8) + (get_global $~lib/allocator/tlsf/Block.INFO) ) ) ;;@ ~lib/allocator/tlsf.ts:411:4 @@ -4870,7 +4897,7 @@ (i32.or (i32.const 0) ;;@ ~lib/allocator/tlsf.ts:411:20 - (i32.const 2) + (get_global $~lib/allocator/tlsf/LEFT_FREE) ) ) ;;@ ~lib/allocator/tlsf.ts:412:4 @@ -4889,7 +4916,7 @@ ;;@ ~lib/allocator/tlsf.ts:416:11 (i32.const 1) ) - (func $~lib/allocator/tlsf/ffs (; 20 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 21 ;) (type $ii) (param $0 i32) (result i32) ;;@ ~lib/allocator/tlsf.ts:422:2 (if (i32.eqz @@ -4916,7 +4943,7 @@ (get_local $0) ) ) - (func $~lib/allocator/tlsf/ffs (; 21 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/ffs (; 22 ;) (type $ii) (param $0 i32) (result i32) ;;@ ~lib/allocator/tlsf.ts:422:2 (if (i32.eqz @@ -4943,7 +4970,7 @@ (get_local $0) ) ) - (func $~lib/allocator/tlsf/Root#search (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/allocator/tlsf/Root#search (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4959,14 +4986,14 @@ (i32.ge_u (get_local $1) ;;@ ~lib/allocator/tlsf.ts:296:19 - (i32.const 16) + (get_global $~lib/allocator/tlsf/Block.MIN_SIZE) ) ) ;;@ ~lib/allocator/tlsf.ts:296:37 (i32.lt_u (get_local $1) ;;@ ~lib/allocator/tlsf.ts:296:44 - (i32.const 1073741824) + (get_global $~lib/allocator/tlsf/Block.MAX_SIZE) ) (get_local $2) ) @@ -4987,7 +5014,7 @@ (i32.lt_u (get_local $1) ;;@ ~lib/allocator/tlsf.ts:300:15 - (i32.const 256) + (get_global $~lib/allocator/tlsf/SB_SIZE) ) ;;@ ~lib/allocator/tlsf.ts:300:24 (block @@ -5003,7 +5030,7 @@ ;;@ ~lib/allocator/tlsf.ts:302:17 (get_local $1) ;;@ ~lib/allocator/tlsf.ts:302:24 - (i32.const 8) + (get_global $~lib/internal/allocator/AL_SIZE) ) ) ) @@ -5030,7 +5057,7 @@ ;;@ ~lib/allocator/tlsf.ts:306:27 (get_local $3) ;;@ ~lib/allocator/tlsf.ts:306:32 - (i32.const 5) + (get_global $~lib/allocator/tlsf/SL_BITS) ) ) ;;@ ~lib/allocator/tlsf.ts:306:44 @@ -5038,7 +5065,7 @@ ;;@ ~lib/allocator/tlsf.ts:306:45 (i32.const 1) ;;@ ~lib/allocator/tlsf.ts:306:50 - (i32.const 5) + (get_global $~lib/allocator/tlsf/SL_BITS) ) ) ) @@ -5048,7 +5075,7 @@ (get_local $3) ;;@ ~lib/allocator/tlsf.ts:307:12 (i32.sub - (i32.const 8) + (get_global $~lib/allocator/tlsf/SB_BITS) ;;@ ~lib/allocator/tlsf.ts:307:22 (i32.const 1) ) @@ -5061,7 +5088,7 @@ (get_local $4) ;;@ ~lib/allocator/tlsf.ts:309:15 (i32.sub - (i32.const 32) + (get_global $~lib/allocator/tlsf/SL_SIZE) ;;@ ~lib/allocator/tlsf.ts:309:25 (i32.const 1) ) @@ -5234,7 +5261,7 @@ ;;@ ~lib/allocator/tlsf.ts:329:11 (get_local $6) ) - (func $~lib/allocator/tlsf/Root#use (; 23 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/allocator/tlsf/Root#use (; 24 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5252,7 +5279,7 @@ (i32.and (get_local $3) ;;@ ~lib/allocator/tlsf.ts:348:23 - (i32.const 1) + (get_global $~lib/allocator/tlsf/FREE) ) ) (block @@ -5274,14 +5301,14 @@ (i32.ge_u (get_local $2) ;;@ ~lib/allocator/tlsf.ts:349:19 - (i32.const 16) + (get_global $~lib/allocator/tlsf/Block.MIN_SIZE) ) ) ;;@ ~lib/allocator/tlsf.ts:349:37 (i32.lt_u (get_local $2) ;;@ ~lib/allocator/tlsf.ts:349:44 - (i32.const 1073741824) + (get_global $~lib/allocator/tlsf/Block.MAX_SIZE) ) (get_local $4) ) @@ -5306,7 +5333,7 @@ ;;@ ~lib/allocator/tlsf.ts:350:13 (get_local $2) ;;@ ~lib/allocator/tlsf.ts:350:20 - (i32.const 7) + (get_global $~lib/internal/allocator/AL_MASK) ) ) ) @@ -5337,7 +5364,7 @@ ;;@ ~lib/allocator/tlsf.ts:355:33 (i32.xor ;;@ ~lib/allocator/tlsf.ts:355:34 - (i32.const 3) + (get_global $~lib/allocator/tlsf/TAGS) (i32.const -1) ) ) @@ -5352,9 +5379,9 @@ (get_local $5) ;;@ ~lib/allocator/tlsf.ts:356:21 (i32.add - (i32.const 8) + (get_global $~lib/allocator/tlsf/Block.INFO) ;;@ ~lib/allocator/tlsf.ts:356:34 - (i32.const 16) + (get_global $~lib/allocator/tlsf/Block.MIN_SIZE) ) ) ;;@ ~lib/allocator/tlsf.ts:356:50 @@ -5370,7 +5397,7 @@ ;;@ ~lib/allocator/tlsf.ts:357:27 (get_local $3) ;;@ ~lib/allocator/tlsf.ts:357:39 - (i32.const 2) + (get_global $~lib/allocator/tlsf/LEFT_FREE) ) ) ) @@ -5382,7 +5409,7 @@ (i32.add (get_local $1) ;;@ ~lib/allocator/tlsf.ts:360:35 - (i32.const 8) + (get_global $~lib/allocator/tlsf/Block.INFO) ) ;;@ ~lib/allocator/tlsf.ts:360:48 (get_local $2) @@ -5397,10 +5424,10 @@ ;;@ ~lib/allocator/tlsf.ts:362:20 (get_local $5) ;;@ ~lib/allocator/tlsf.ts:362:32 - (i32.const 8) + (get_global $~lib/allocator/tlsf/Block.INFO) ) ;;@ ~lib/allocator/tlsf.ts:362:46 - (i32.const 1) + (get_global $~lib/allocator/tlsf/FREE) ) ) ;;@ ~lib/allocator/tlsf.ts:363:11 @@ -5422,7 +5449,7 @@ ;;@ ~lib/allocator/tlsf.ts:367:31 (i32.xor ;;@ ~lib/allocator/tlsf.ts:367:32 - (i32.const 1) + (get_global $~lib/allocator/tlsf/FREE) (i32.const -1) ) ) @@ -5461,7 +5488,7 @@ ;;@ ~lib/allocator/tlsf.ts:369:20 (i32.xor ;;@ ~lib/allocator/tlsf.ts:369:21 - (i32.const 2) + (get_global $~lib/allocator/tlsf/LEFT_FREE) (i32.const -1) ) ) @@ -5473,10 +5500,10 @@ ;;@ ~lib/allocator/tlsf.ts:372:11 (get_local $1) ;;@ ~lib/allocator/tlsf.ts:372:38 - (i32.const 8) + (get_global $~lib/allocator/tlsf/Block.INFO) ) ) - (func $~lib/allocator/tlsf/__memory_allocate (; 24 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/tlsf/__memory_allocate (; 25 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5507,12 +5534,12 @@ ;;@ ~lib/allocator/tlsf.ts:445:22 (get_global $HEAP_BASE) ;;@ ~lib/allocator/tlsf.ts:445:34 - (i32.const 7) + (get_global $~lib/internal/allocator/AL_MASK) ) ;;@ ~lib/allocator/tlsf.ts:445:45 (i32.xor ;;@ ~lib/allocator/tlsf.ts:445:46 - (i32.const 7) + (get_global $~lib/internal/allocator/AL_MASK) (i32.const -1) ) ) @@ -5520,7 +5547,7 @@ ;;@ ~lib/allocator/tlsf.ts:446:4 (set_local $3 ;;@ ~lib/allocator/tlsf.ts:446:29 - (call $~lib/memory/memory.size) + (current_memory) ) ;;@ ~lib/allocator/tlsf.ts:447:4 (set_local $4 @@ -5535,7 +5562,7 @@ ;;@ ~lib/allocator/tlsf.ts:447:31 (get_local $2) ;;@ ~lib/allocator/tlsf.ts:447:44 - (i32.const 2916) + (get_global $~lib/allocator/tlsf/Root.SIZE) ) ;;@ ~lib/allocator/tlsf.ts:447:57 (i32.const 65535) @@ -5565,7 +5592,7 @@ ;;@ ~lib/allocator/tlsf.ts:448:37 (i32.lt_s ;;@ ~lib/allocator/tlsf.ts:448:44 - (call $~lib/memory/memory.grow + (grow_memory ;;@ ~lib/allocator/tlsf.ts:448:49 (i32.sub (get_local $4) @@ -5615,7 +5642,7 @@ (i32.lt_u (get_local $5) ;;@ ~lib/allocator/tlsf.ts:452:33 - (i32.const 22) + (get_global $~lib/allocator/tlsf/FL_BITS) ) ) ) @@ -5644,7 +5671,7 @@ (i32.lt_u (get_local $6) ;;@ ~lib/allocator/tlsf.ts:454:33 - (i32.const 32) + (get_global $~lib/allocator/tlsf/SL_SIZE) ) ) ) @@ -5694,22 +5721,22 @@ (i32.add (get_local $2) ;;@ ~lib/allocator/tlsf.ts:458:33 - (i32.const 2916) + (get_global $~lib/allocator/tlsf/Root.SIZE) ) ;;@ ~lib/allocator/tlsf.ts:458:45 - (i32.const 7) + (get_global $~lib/internal/allocator/AL_MASK) ) ;;@ ~lib/allocator/tlsf.ts:458:56 (i32.xor ;;@ ~lib/allocator/tlsf.ts:458:57 - (i32.const 7) + (get_global $~lib/internal/allocator/AL_MASK) (i32.const -1) ) ) ;;@ ~lib/allocator/tlsf.ts:458:66 (i32.shl ;;@ ~lib/allocator/tlsf.ts:458:73 - (call $~lib/memory/memory.size) + (current_memory) ;;@ ~lib/allocator/tlsf.ts:458:83 (i32.const 16) ) @@ -5734,7 +5761,7 @@ (i32.gt_u (get_local $0) ;;@ ~lib/allocator/tlsf.ts:464:15 - (i32.const 1073741824) + (get_global $~lib/allocator/tlsf/Block.MAX_SIZE) ) ;;@ ~lib/allocator/tlsf.ts:464:31 (unreachable) @@ -5750,19 +5777,19 @@ ;;@ ~lib/allocator/tlsf.ts:466:23 (get_local $0) ;;@ ~lib/allocator/tlsf.ts:466:30 - (i32.const 7) + (get_global $~lib/internal/allocator/AL_MASK) ) ;;@ ~lib/allocator/tlsf.ts:466:41 (i32.xor ;;@ ~lib/allocator/tlsf.ts:466:42 - (i32.const 7) + (get_global $~lib/internal/allocator/AL_MASK) (i32.const -1) ) ) ) (tee_local $3 ;;@ ~lib/allocator/tlsf.ts:466:51 - (i32.const 16) + (get_global $~lib/allocator/tlsf/Block.MIN_SIZE) ) (i32.gt_u (get_local $4) @@ -5792,7 +5819,7 @@ ;;@ ~lib/allocator/tlsf.ts:472:6 (set_local $3 ;;@ ~lib/allocator/tlsf.ts:472:31 - (call $~lib/memory/memory.size) + (current_memory) ) ;;@ ~lib/allocator/tlsf.ts:473:6 (set_local $2 @@ -5841,7 +5868,7 @@ ;;@ ~lib/allocator/tlsf.ts:475:10 (i32.lt_s ;;@ ~lib/allocator/tlsf.ts:475:17 - (call $~lib/memory/memory.grow + (grow_memory ;;@ ~lib/allocator/tlsf.ts:475:22 (get_local $5) ) @@ -5853,7 +5880,7 @@ ;;@ ~lib/allocator/tlsf.ts:476:12 (i32.lt_s ;;@ ~lib/allocator/tlsf.ts:476:19 - (call $~lib/memory/memory.grow + (grow_memory ;;@ ~lib/allocator/tlsf.ts:476:24 (get_local $2) ) @@ -5867,7 +5894,7 @@ ;;@ ~lib/allocator/tlsf.ts:480:6 (set_local $6 ;;@ ~lib/allocator/tlsf.ts:480:30 - (call $~lib/memory/memory.size) + (current_memory) ) ;;@ ~lib/allocator/tlsf.ts:481:11 (drop @@ -5930,7 +5957,7 @@ ;;@ ~lib/allocator/tlsf.ts:485:25 (i32.xor ;;@ ~lib/allocator/tlsf.ts:485:26 - (i32.const 3) + (get_global $~lib/allocator/tlsf/TAGS) (i32.const -1) ) ) @@ -5965,17 +5992,17 @@ ;;@ ~lib/allocator/tlsf.ts:489:9 (get_local $7) ) - (func $~lib/memory/memory.allocate (; 25 ;) (type $ii) (param $0 i32) (result i32) - ;;@ ~lib/memory.ts:142:4 + (func $~lib/memory/memory.allocate (; 26 ;) (type $ii) (param $0 i32) (result i32) + ;;@ ~lib/memory.ts:37:4 (return - ;;@ ~lib/memory.ts:142:45 + ;;@ ~lib/memory.ts:37:45 (call $~lib/allocator/tlsf/__memory_allocate - ;;@ ~lib/memory.ts:142:63 + ;;@ ~lib/memory.ts:37:63 (get_local $0) ) ) ) - (func $~lib/allocator/tlsf/__memory_free (; 26 ;) (type $iv) (param $0 i32) + (func $~lib/allocator/tlsf/__memory_free (; 27 ;) (type $iv) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6003,7 +6030,7 @@ ;;@ ~lib/allocator/tlsf.ts:498:36 (get_local $0) ;;@ ~lib/allocator/tlsf.ts:498:43 - (i32.const 8) + (get_global $~lib/allocator/tlsf/Block.INFO) ) ) ;;@ ~lib/allocator/tlsf.ts:499:6 @@ -6023,7 +6050,7 @@ ;;@ ~lib/allocator/tlsf.ts:500:15 (get_local $3) ;;@ ~lib/allocator/tlsf.ts:500:27 - (i32.const 1) + (get_global $~lib/allocator/tlsf/FREE) ) ) ) @@ -6044,7 +6071,7 @@ (i32.or (get_local $3) ;;@ ~lib/allocator/tlsf.ts:501:31 - (i32.const 1) + (get_global $~lib/allocator/tlsf/FREE) ) ) ;;@ ~lib/allocator/tlsf.ts:502:11 @@ -6056,7 +6083,7 @@ ;;@ ~lib/allocator/tlsf.ts:502:36 (get_local $0) ;;@ ~lib/allocator/tlsf.ts:502:43 - (i32.const 8) + (get_global $~lib/allocator/tlsf/Block.INFO) ) ) ) @@ -6064,26 +6091,26 @@ ) ) ) - (func $~lib/memory/memory.free (; 27 ;) (type $iv) (param $0 i32) - ;;@ ~lib/memory.ts:148:36 + (func $~lib/memory/memory.free (; 28 ;) (type $iv) (param $0 i32) + ;;@ ~lib/memory.ts:43:36 (call $~lib/allocator/tlsf/__memory_free - ;;@ ~lib/memory.ts:148:50 + ;;@ ~lib/memory.ts:43:50 (get_local $0) ) - ;;@ ~lib/memory.ts:148:56 + ;;@ ~lib/memory.ts:43:56 (return) ) - (func $~lib/allocator/tlsf/__memory_reset (; 28 ;) (type $v) + (func $~lib/allocator/tlsf/__memory_reset (; 29 ;) (type $v) ;;@ ~lib/allocator/tlsf.ts:509:2 (unreachable) ) - (func $~lib/memory/memory.reset (; 29 ;) (type $v) - ;;@ ~lib/memory.ts:154:37 + (func $~lib/memory/memory.reset (; 30 ;) (type $v) + ;;@ ~lib/memory.ts:49:37 (call $~lib/allocator/tlsf/__memory_reset) - ;;@ ~lib/memory.ts:154:55 + ;;@ ~lib/memory.ts:49:55 (return) ) - (func $start (; 30 ;) (type $v) + (func $start (; 31 ;) (type $v) ;;@ ~lib/allocator/tlsf.ts:122:0 (if (i32.eqz @@ -6093,7 +6120,7 @@ ;;@ ~lib/allocator/tlsf.ts:122:8 (i32.const 1) ;;@ ~lib/allocator/tlsf.ts:122:13 - (i32.const 5) + (get_global $~lib/allocator/tlsf/SL_BITS) ) ;;@ ~lib/allocator/tlsf.ts:122:25 (i32.const 32) diff --git a/tests/compiler/binary.optimized.wat b/tests/compiler/binary.optimized.wat index 45343ae9..f9e5b54b 100644 --- a/tests/compiler/binary.optimized.wat +++ b/tests/compiler/binary.optimized.wat @@ -1555,7 +1555,7 @@ (f64.const 1.e+300) ) ) - (func $isNaN (; 2 ;) (type $fi) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 2 ;) (type $fi) (param $0 f32) (result i32) (f32.ne (get_local $0) (get_local $0) @@ -1613,7 +1613,7 @@ ) ) (set_local $3 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) @@ -3201,7 +3201,7 @@ (f32.const 1.0000000031710769e-30) ) ) - (func $isNaN (; 6 ;) (type $Fi) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 6 ;) (type $Fi) (param $0 f64) (result i32) (f64.ne (get_local $0) (get_local $0) @@ -3267,7 +3267,7 @@ ) ) (set_local $7 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) diff --git a/tests/compiler/binary.untouched.wat b/tests/compiler/binary.untouched.wat index 6ae5ff78..b4c1378e 100644 --- a/tests/compiler/binary.untouched.wat +++ b/tests/compiler/binary.untouched.wat @@ -1692,7 +1692,7 @@ (get_local $13) ) ) - (func $isNaN (; 2 ;) (type $fi) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 2 ;) (type $fi) (param $0 f32) (result i32) (f32.ne (get_local $0) (get_local $0) @@ -1754,7 +1754,7 @@ ) ) (get_local $7) - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) @@ -3550,7 +3550,7 @@ (get_local $11) ) ) - (func $isNaN (; 6 ;) (type $Fi) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 6 ;) (type $Fi) (param $0 f64) (result i32) (f64.ne (get_local $0) (get_local $0) @@ -3618,7 +3618,7 @@ ) ) (get_local $7) - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) diff --git a/tests/compiler/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index 17c4c586..207ca668 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -2,8 +2,6 @@ (type $iiiiv (func (param i32 i32 i32 i32))) (type $fi (func (param f32) (result i32))) (type $Fi (func (param f64) (result i32))) - (type $i (func (result i32))) - (type $ii (func (param i32) (result i32))) (type $iiv (func (param i32 i32))) (type $v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -25,13 +23,13 @@ (export "table" (table $0)) (export "test" (func $builtins/test)) (start $start) - (func $isNaN (; 1 ;) (type $fi) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 1 ;) (type $fi) (param $0 f32) (result i32) (f32.ne (get_local $0) (get_local $0) ) ) - (func $isFinite (; 2 ;) (type $fi) (param $0 f32) (result i32) + (func $~lib/builtins/isFinite (; 2 ;) (type $fi) (param $0 f32) (result i32) (f32.eq (f32.sub (get_local $0) @@ -40,13 +38,13 @@ (f32.const 0) ) ) - (func $isNaN (; 3 ;) (type $Fi) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 3 ;) (type $Fi) (param $0 f64) (result i32) (f64.ne (get_local $0) (get_local $0) ) ) - (func $isFinite (; 4 ;) (type $Fi) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 4 ;) (type $Fi) (param $0 f64) (result i32) (f64.eq (f64.sub (get_local $0) @@ -55,21 +53,13 @@ (f64.const 0) ) ) - (func $~lib/memory/memory.size (; 5 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 6 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $start~anonymous|0 (; 7 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $start~anonymous|0 (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32) (nop) ) - (func $builtins/test (; 8 ;) (type $v) + (func $builtins/test (; 6 ;) (type $v) (nop) ) - (func $start (; 9 ;) (type $v) + (func $start (; 7 ;) (type $v) (set_global $builtins/i (i32.const 31) ) @@ -209,7 +199,7 @@ ) ) (if - (call $isNaN + (call $~lib/builtins/isNaN (f32.const 1.25) ) (block @@ -224,7 +214,7 @@ ) (if (i32.ne - (call $isNaN + (call $~lib/builtins/isNaN (f32.const nan:0x400000) ) (i32.const 1) @@ -241,7 +231,7 @@ ) (if (i32.ne - (call $isFinite + (call $~lib/builtins/isFinite (f32.const 1.25) ) (i32.const 1) @@ -257,7 +247,7 @@ ) ) (if - (call $isFinite + (call $~lib/builtins/isFinite (f32.const inf) ) (block @@ -271,7 +261,7 @@ ) ) (if - (call $isFinite + (call $~lib/builtins/isFinite (f32.const -inf) ) (block @@ -285,7 +275,7 @@ ) ) (if - (call $isFinite + (call $~lib/builtins/isFinite (f32.const nan:0x400000) ) (block @@ -332,17 +322,17 @@ (f32.const 1) ) (set_global $builtins/b - (call $isNaN + (call $~lib/builtins/isNaN (f32.const 1.25) ) ) (set_global $builtins/b - (call $isFinite + (call $~lib/builtins/isFinite (f32.const 1.25) ) ) (if - (call $isNaN + (call $~lib/builtins/isNaN (f64.const 1.25) ) (block @@ -357,7 +347,7 @@ ) (if (i32.ne - (call $isNaN + (call $~lib/builtins/isNaN (f64.const nan:0x8000000000000) ) (i32.const 1) @@ -374,7 +364,7 @@ ) (if (i32.ne - (call $isFinite + (call $~lib/builtins/isFinite (f64.const 1.25) ) (i32.const 1) @@ -390,7 +380,7 @@ ) ) (if - (call $isFinite + (call $~lib/builtins/isFinite (f64.const inf) ) (block @@ -404,7 +394,7 @@ ) ) (if - (call $isFinite + (call $~lib/builtins/isFinite (f64.const -inf) ) (block @@ -418,7 +408,7 @@ ) ) (if - (call $isFinite + (call $~lib/builtins/isFinite (f64.const nan:0x8000000000000) ) (block @@ -465,12 +455,12 @@ (f64.const 1) ) (set_global $builtins/b - (call $isNaN + (call $~lib/builtins/isNaN (f64.const 1.25) ) ) (set_global $builtins/b - (call $isFinite + (call $~lib/builtins/isFinite (f64.const 1.25) ) ) @@ -739,18 +729,18 @@ (f64.const 1.24e-322) ) (drop - (call $~lib/memory/memory.size) + (current_memory) ) (drop - (call $~lib/memory/memory.grow + (grow_memory (i32.const 1) ) ) (set_global $builtins/s - (call $~lib/memory/memory.size) + (current_memory) ) (set_global $builtins/s - (call $~lib/memory/memory.grow + (grow_memory (i32.const 1) ) ) @@ -779,7 +769,7 @@ ) (if (i32.eqz - (call $isNaN + (call $~lib/builtins/isNaN (f32.const nan:0x400000) ) ) @@ -795,7 +785,7 @@ ) (if (i32.eqz - (call $isNaN + (call $~lib/builtins/isNaN (f64.const nan:0x8000000000000) ) ) @@ -810,7 +800,7 @@ ) ) (if - (call $isFinite + (call $~lib/builtins/isFinite (f32.const nan:0x400000) ) (block @@ -824,7 +814,7 @@ ) ) (if - (call $isFinite + (call $~lib/builtins/isFinite (f32.const inf) ) (block @@ -838,7 +828,7 @@ ) ) (if - (call $isFinite + (call $~lib/builtins/isFinite (f64.const nan:0x8000000000000) ) (block @@ -852,7 +842,7 @@ ) ) (if - (call $isFinite + (call $~lib/builtins/isFinite (f64.const inf) ) (block @@ -867,7 +857,7 @@ ) (if (i32.eqz - (call $isFinite + (call $~lib/builtins/isFinite (f32.const 0) ) ) @@ -883,7 +873,7 @@ ) (if (i32.eqz - (call $isFinite + (call $~lib/builtins/isFinite (f64.const 0) ) ) @@ -1004,7 +994,7 @@ (f64.const 1) ) (drop - (call $isNaN + (call $~lib/builtins/isNaN (f64.const 1) ) ) diff --git a/tests/compiler/builtins.untouched.wat b/tests/compiler/builtins.untouched.wat index 338c2e40..b4a995a4 100644 --- a/tests/compiler/builtins.untouched.wat +++ b/tests/compiler/builtins.untouched.wat @@ -2,8 +2,6 @@ (type $iiiiv (func (param i32 i32 i32 i32))) (type $fi (func (param f32) (result i32))) (type $Fi (func (param f64) (result i32))) - (type $i (func (result i32))) - (type $ii (func (param i32) (result i32))) (type $iiv (func (param i32 i32))) (type $v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -19,34 +17,34 @@ (global $builtins/U (mut i64) (i64.const 0)) (global $builtins/s (mut i32) (i32.const 0)) (global $builtins/fn (mut i32) (i32.const 0)) - (global $i8.MIN_VALUE i32 (i32.const -128)) - (global $i8.MAX_VALUE i32 (i32.const 127)) - (global $i16.MIN_VALUE i32 (i32.const -32768)) - (global $i16.MAX_VALUE i32 (i32.const 32767)) - (global $i32.MIN_VALUE i32 (i32.const -2147483648)) - (global $i32.MAX_VALUE i32 (i32.const 2147483647)) - (global $i64.MIN_VALUE i64 (i64.const -9223372036854775808)) - (global $i64.MAX_VALUE i64 (i64.const 9223372036854775807)) - (global $u8.MIN_VALUE i32 (i32.const 0)) - (global $u8.MAX_VALUE i32 (i32.const 255)) - (global $u16.MIN_VALUE i32 (i32.const 0)) - (global $u16.MAX_VALUE i32 (i32.const 65535)) - (global $u32.MIN_VALUE i32 (i32.const 0)) - (global $u32.MAX_VALUE i32 (i32.const -1)) - (global $u64.MIN_VALUE i64 (i64.const 0)) - (global $u64.MAX_VALUE i64 (i64.const -1)) - (global $bool.MIN_VALUE i32 (i32.const 0)) - (global $bool.MAX_VALUE i32 (i32.const 1)) - (global $f32.MIN_VALUE f32 (f32.const -3402823466385288598117041e14)) - (global $f32.MAX_VALUE f32 (f32.const 3402823466385288598117041e14)) - (global $f32.MIN_SAFE_INTEGER f32 (f32.const -16777215)) - (global $f32.MAX_SAFE_INTEGER f32 (f32.const 16777215)) - (global $f32.EPSILON f32 (f32.const 1.1920928955078125e-07)) - (global $f64.MIN_VALUE f64 (f64.const -1797693134862315708145274e284)) - (global $f64.MAX_VALUE f64 (f64.const 1797693134862315708145274e284)) - (global $f64.MIN_SAFE_INTEGER f64 (f64.const -9007199254740991)) - (global $f64.MAX_SAFE_INTEGER f64 (f64.const 9007199254740991)) - (global $f64.EPSILON f64 (f64.const 2.220446049250313e-16)) + (global $~lib/builtins/i8.MIN_VALUE i32 (i32.const -128)) + (global $~lib/builtins/i8.MAX_VALUE i32 (i32.const 127)) + (global $~lib/builtins/i16.MIN_VALUE i32 (i32.const -32768)) + (global $~lib/builtins/i16.MAX_VALUE i32 (i32.const 32767)) + (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) + (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) + (global $~lib/builtins/i64.MIN_VALUE i64 (i64.const -9223372036854775808)) + (global $~lib/builtins/i64.MAX_VALUE i64 (i64.const 9223372036854775807)) + (global $~lib/builtins/u8.MIN_VALUE i32 (i32.const 0)) + (global $~lib/builtins/u8.MAX_VALUE i32 (i32.const 255)) + (global $~lib/builtins/u16.MIN_VALUE i32 (i32.const 0)) + (global $~lib/builtins/u16.MAX_VALUE i32 (i32.const 65535)) + (global $~lib/builtins/u32.MIN_VALUE i32 (i32.const 0)) + (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) + (global $~lib/builtins/u64.MIN_VALUE i64 (i64.const 0)) + (global $~lib/builtins/u64.MAX_VALUE i64 (i64.const -1)) + (global $~lib/builtins/bool.MIN_VALUE i32 (i32.const 0)) + (global $~lib/builtins/bool.MAX_VALUE i32 (i32.const 1)) + (global $~lib/builtins/f32.MIN_VALUE f32 (f32.const -3402823466385288598117041e14)) + (global $~lib/builtins/f32.MAX_VALUE f32 (f32.const 3402823466385288598117041e14)) + (global $~lib/builtins/f32.MIN_SAFE_INTEGER f32 (f32.const -16777215)) + (global $~lib/builtins/f32.MAX_SAFE_INTEGER f32 (f32.const 16777215)) + (global $~lib/builtins/f32.EPSILON f32 (f32.const 1.1920928955078125e-07)) + (global $~lib/builtins/f64.MIN_VALUE f64 (f64.const -1797693134862315708145274e284)) + (global $~lib/builtins/f64.MAX_VALUE f64 (f64.const 1797693134862315708145274e284)) + (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 $HEAP_BASE i32 (i32.const 44)) (table 1 1 anyfunc) (elem (i32.const 0) $start~anonymous|0) @@ -57,13 +55,13 @@ (export "table" (table $0)) (export "test" (func $builtins/test)) (start $start) - (func $isNaN (; 1 ;) (type $fi) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 1 ;) (type $fi) (param $0 f32) (result i32) (f32.ne (get_local $0) (get_local $0) ) ) - (func $isFinite (; 2 ;) (type $fi) (param $0 f32) (result i32) + (func $~lib/builtins/isFinite (; 2 ;) (type $fi) (param $0 f32) (result i32) (f32.eq (f32.sub (get_local $0) @@ -72,13 +70,13 @@ (f32.const 0) ) ) - (func $isNaN (; 3 ;) (type $Fi) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 3 ;) (type $Fi) (param $0 f64) (result i32) (f64.ne (get_local $0) (get_local $0) ) ) - (func $isFinite (; 4 ;) (type $Fi) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 4 ;) (type $Fi) (param $0 f64) (result i32) (f64.eq (f64.sub (get_local $0) @@ -87,21 +85,13 @@ (f64.const 0) ) ) - (func $~lib/memory/memory.size (; 5 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 6 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $start~anonymous|0 (; 7 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $start~anonymous|0 (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32) (nop) ) - (func $builtins/test (; 8 ;) (type $v) + (func $builtins/test (; 6 ;) (type $v) (nop) ) - (func $start (; 9 ;) (type $v) + (func $start (; 7 ;) (type $v) (local $0 i32) (local $1 i32) (local $2 i64) @@ -847,7 +837,7 @@ (if (i32.eqz (i32.eq - (call $isNaN + (call $~lib/builtins/isNaN (f32.const 1.25) ) (i32.const 0) @@ -866,7 +856,7 @@ (if (i32.eqz (i32.eq - (call $isNaN + (call $~lib/builtins/isNaN (f32.const nan:0x400000) ) (i32.const 1) @@ -885,7 +875,7 @@ (if (i32.eqz (i32.eq - (call $isFinite + (call $~lib/builtins/isFinite (f32.const 1.25) ) (i32.const 1) @@ -904,7 +894,7 @@ (if (i32.eqz (i32.eq - (call $isFinite + (call $~lib/builtins/isFinite (f32.const inf) ) (i32.const 0) @@ -923,7 +913,7 @@ (if (i32.eqz (i32.eq - (call $isFinite + (call $~lib/builtins/isFinite (f32.neg (f32.const inf) ) @@ -944,7 +934,7 @@ (if (i32.eqz (i32.eq - (call $isFinite + (call $~lib/builtins/isFinite (f32.const nan:0x400000) ) (i32.const 0) @@ -1015,12 +1005,12 @@ ) ) (set_global $builtins/b - (call $isNaN + (call $~lib/builtins/isNaN (f32.const 1.25) ) ) (set_global $builtins/b - (call $isFinite + (call $~lib/builtins/isFinite (f32.const 1.25) ) ) @@ -1087,7 +1077,7 @@ (if (i32.eqz (i32.eq - (call $isNaN + (call $~lib/builtins/isNaN (f64.const 1.25) ) (i32.const 0) @@ -1106,7 +1096,7 @@ (if (i32.eqz (i32.eq - (call $isNaN + (call $~lib/builtins/isNaN (f64.const nan:0x8000000000000) ) (i32.const 1) @@ -1125,7 +1115,7 @@ (if (i32.eqz (i32.eq - (call $isFinite + (call $~lib/builtins/isFinite (f64.const 1.25) ) (i32.const 1) @@ -1144,7 +1134,7 @@ (if (i32.eqz (i32.eq - (call $isFinite + (call $~lib/builtins/isFinite (f64.const inf) ) (i32.const 0) @@ -1163,7 +1153,7 @@ (if (i32.eqz (i32.eq - (call $isFinite + (call $~lib/builtins/isFinite (f64.neg (f64.const inf) ) @@ -1184,7 +1174,7 @@ (if (i32.eqz (i32.eq - (call $isFinite + (call $~lib/builtins/isFinite (f64.const nan:0x8000000000000) ) (i32.const 0) @@ -1255,12 +1245,12 @@ ) ) (set_global $builtins/b - (call $isNaN + (call $~lib/builtins/isNaN (f64.const 1.25) ) ) (set_global $builtins/b - (call $isFinite + (call $~lib/builtins/isFinite (f64.const 1.25) ) ) @@ -1559,18 +1549,18 @@ ) ) (drop - (call $~lib/memory/memory.size) + (current_memory) ) (drop - (call $~lib/memory/memory.grow + (grow_memory (i32.const 1) ) ) (set_global $builtins/s - (call $~lib/memory/memory.size) + (current_memory) ) (set_global $builtins/s - (call $~lib/memory/memory.grow + (grow_memory (i32.const 1) ) ) @@ -1955,7 +1945,7 @@ ) (if (i32.eqz - (call $isNaN + (call $~lib/builtins/isNaN (f32.const nan:0x400000) ) ) @@ -1971,7 +1961,7 @@ ) (if (i32.eqz - (call $isNaN + (call $~lib/builtins/isNaN (f64.const nan:0x8000000000000) ) ) @@ -1988,7 +1978,7 @@ (if (i32.eqz (i32.eqz - (call $isFinite + (call $~lib/builtins/isFinite (f32.const nan:0x400000) ) ) @@ -2006,7 +1996,7 @@ (if (i32.eqz (i32.eqz - (call $isFinite + (call $~lib/builtins/isFinite (f32.const inf) ) ) @@ -2024,7 +2014,7 @@ (if (i32.eqz (i32.eqz - (call $isFinite + (call $~lib/builtins/isFinite (f64.const nan:0x8000000000000) ) ) @@ -2042,7 +2032,7 @@ (if (i32.eqz (i32.eqz - (call $isFinite + (call $~lib/builtins/isFinite (f64.const inf) ) ) @@ -2059,7 +2049,7 @@ ) (if (i32.eqz - (call $isFinite + (call $~lib/builtins/isFinite (f32.const 0) ) ) @@ -2075,7 +2065,7 @@ ) (if (i32.eqz - (call $isFinite + (call $~lib/builtins/isFinite (f64.const 0) ) ) @@ -2092,7 +2082,7 @@ (if (i32.eqz (i32.eq - (get_global $i8.MIN_VALUE) + (get_global $~lib/builtins/i8.MIN_VALUE) (i32.shr_s (i32.shl (i32.const 128) @@ -2115,7 +2105,7 @@ (if (i32.eqz (i32.eq - (get_global $i8.MAX_VALUE) + (get_global $~lib/builtins/i8.MAX_VALUE) (i32.const 127) ) ) @@ -2132,7 +2122,7 @@ (if (i32.eqz (i32.eq - (get_global $i16.MIN_VALUE) + (get_global $~lib/builtins/i16.MIN_VALUE) (i32.shr_s (i32.shl (i32.const 32768) @@ -2155,7 +2145,7 @@ (if (i32.eqz (i32.eq - (get_global $i16.MAX_VALUE) + (get_global $~lib/builtins/i16.MAX_VALUE) (i32.const 32767) ) ) @@ -2172,7 +2162,7 @@ (if (i32.eqz (i32.eq - (get_global $i32.MIN_VALUE) + (get_global $~lib/builtins/i32.MIN_VALUE) (i32.const -2147483648) ) ) @@ -2189,7 +2179,7 @@ (if (i32.eqz (i32.eq - (get_global $i32.MAX_VALUE) + (get_global $~lib/builtins/i32.MAX_VALUE) (i32.const 2147483647) ) ) @@ -2206,7 +2196,7 @@ (if (i32.eqz (i64.eq - (get_global $i64.MIN_VALUE) + (get_global $~lib/builtins/i64.MIN_VALUE) (i64.const -9223372036854775808) ) ) @@ -2223,7 +2213,7 @@ (if (i32.eqz (i64.eq - (get_global $i64.MAX_VALUE) + (get_global $~lib/builtins/i64.MAX_VALUE) (i64.const 9223372036854775807) ) ) @@ -2240,7 +2230,7 @@ (if (i32.eqz (i32.eq - (get_global $u8.MIN_VALUE) + (get_global $~lib/builtins/u8.MIN_VALUE) (i32.const 0) ) ) @@ -2257,7 +2247,7 @@ (if (i32.eqz (i32.eq - (get_global $u8.MAX_VALUE) + (get_global $~lib/builtins/u8.MAX_VALUE) (i32.const 255) ) ) @@ -2274,7 +2264,7 @@ (if (i32.eqz (i32.eq - (get_global $u16.MIN_VALUE) + (get_global $~lib/builtins/u16.MIN_VALUE) (i32.const 0) ) ) @@ -2291,7 +2281,7 @@ (if (i32.eqz (i32.eq - (get_global $u16.MAX_VALUE) + (get_global $~lib/builtins/u16.MAX_VALUE) (i32.const 65535) ) ) @@ -2308,7 +2298,7 @@ (if (i32.eqz (i32.eq - (get_global $u32.MIN_VALUE) + (get_global $~lib/builtins/u32.MIN_VALUE) (i32.const 0) ) ) @@ -2325,7 +2315,7 @@ (if (i32.eqz (i32.eq - (get_global $u32.MAX_VALUE) + (get_global $~lib/builtins/u32.MAX_VALUE) (i32.const -1) ) ) @@ -2342,7 +2332,7 @@ (if (i32.eqz (i64.eq - (get_global $u64.MIN_VALUE) + (get_global $~lib/builtins/u64.MIN_VALUE) (i64.const 0) ) ) @@ -2359,7 +2349,7 @@ (if (i32.eqz (i64.eq - (get_global $u64.MAX_VALUE) + (get_global $~lib/builtins/u64.MAX_VALUE) (i64.const -1) ) ) @@ -2376,7 +2366,7 @@ (if (i32.eqz (i32.eq - (get_global $bool.MIN_VALUE) + (get_global $~lib/builtins/bool.MIN_VALUE) (i32.const 0) ) ) @@ -2393,7 +2383,7 @@ (if (i32.eqz (i32.eq - (get_global $bool.MIN_VALUE) + (get_global $~lib/builtins/bool.MIN_VALUE) (i32.const 0) ) ) @@ -2410,7 +2400,7 @@ (if (i32.eqz (i32.eq - (get_global $bool.MAX_VALUE) + (get_global $~lib/builtins/bool.MAX_VALUE) (i32.const 1) ) ) @@ -2427,7 +2417,7 @@ (if (i32.eqz (i32.eq - (get_global $bool.MAX_VALUE) + (get_global $~lib/builtins/bool.MAX_VALUE) (i32.const 1) ) ) @@ -2444,7 +2434,7 @@ (if (i32.eqz (f32.eq - (get_global $f32.MIN_VALUE) + (get_global $~lib/builtins/f32.MIN_VALUE) (f32.const -3402823466385288598117041e14) ) ) @@ -2461,7 +2451,7 @@ (if (i32.eqz (f32.eq - (get_global $f32.MAX_VALUE) + (get_global $~lib/builtins/f32.MAX_VALUE) (f32.const 3402823466385288598117041e14) ) ) @@ -2478,7 +2468,7 @@ (if (i32.eqz (f32.eq - (get_global $f32.MIN_SAFE_INTEGER) + (get_global $~lib/builtins/f32.MIN_SAFE_INTEGER) (f32.const -16777215) ) ) @@ -2495,7 +2485,7 @@ (if (i32.eqz (f32.eq - (get_global $f32.MAX_SAFE_INTEGER) + (get_global $~lib/builtins/f32.MAX_SAFE_INTEGER) (f32.const 16777215) ) ) @@ -2512,7 +2502,7 @@ (if (i32.eqz (f32.eq - (get_global $f32.EPSILON) + (get_global $~lib/builtins/f32.EPSILON) (f32.const 1.1920928955078125e-07) ) ) @@ -2529,7 +2519,7 @@ (if (i32.eqz (f64.eq - (get_global $f64.MIN_VALUE) + (get_global $~lib/builtins/f64.MIN_VALUE) (f64.const -1797693134862315708145274e284) ) ) @@ -2546,7 +2536,7 @@ (if (i32.eqz (f64.eq - (get_global $f64.MAX_VALUE) + (get_global $~lib/builtins/f64.MAX_VALUE) (f64.const 1797693134862315708145274e284) ) ) @@ -2563,7 +2553,7 @@ (if (i32.eqz (f64.eq - (get_global $f64.MIN_SAFE_INTEGER) + (get_global $~lib/builtins/f64.MIN_SAFE_INTEGER) (f64.const -9007199254740991) ) ) @@ -2580,7 +2570,7 @@ (if (i32.eqz (f64.eq - (get_global $f64.MAX_SAFE_INTEGER) + (get_global $~lib/builtins/f64.MAX_SAFE_INTEGER) (f64.const 9007199254740991) ) ) @@ -2597,7 +2587,7 @@ (if (i32.eqz (f64.eq - (get_global $f64.EPSILON) + (get_global $~lib/builtins/f64.EPSILON) (f64.const 2.220446049250313e-16) ) ) @@ -2888,7 +2878,7 @@ ) ) (drop - (call $isNaN + (call $~lib/builtins/isNaN (f64.const 1) ) ) diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index 943c8a64..a0b9e587 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -58,15 +58,7 @@ (func $exports/Car.getNumTires (; 2 ;) (type $i) (result i32) (i32.const 4) ) - (func $~lib/memory/memory.size (; 3 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 4 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -98,14 +90,14 @@ ) (i32.shl (tee_local $2 - (call $~lib/memory/memory.size) + (current_memory) ) (i32.const 16) ) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (select (get_local $2) (tee_local $3 @@ -133,7 +125,7 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $3) ) (i32.const 0) @@ -152,12 +144,12 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) - (func $exports/Car#constructor (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (if (i32.eqz (get_local $0) @@ -177,21 +169,21 @@ ) (get_local $0) ) - (func $exports/Car#get:numDoors (; 8 ;) (type $ii) (param $0 i32) (result i32) + (func $exports/Car#get:numDoors (; 6 ;) (type $ii) (param $0 i32) (result i32) (i32.load (get_local $0) ) ) - (func $exports/Car#set:numDoors (; 9 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $exports/Car#set:numDoors (; 7 ;) (type $iiv) (param $0 i32) (param $1 i32) (i32.store (get_local $0) (get_local $1) ) ) - (func $exports/Car#openDoors (; 10 ;) (type $iv) (param $0 i32) + (func $exports/Car#openDoors (; 8 ;) (type $iv) (param $0 i32) (nop) ) - (func $start (; 11 ;) (type $v) + (func $start (; 9 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.const 8) ) @@ -199,7 +191,7 @@ (get_global $~lib/allocator/arena/startOffset) ) ) - (func $exports/subOpt|trampoline (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt|trampoline (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (block $1of1 (block $0of1 (block $outOfRange @@ -221,12 +213,12 @@ (get_local $1) ) ) - (func $~setargc (; 13 ;) (type $iv) (param $0 i32) + (func $~setargc (; 11 ;) (type $iv) (param $0 i32) (set_global $~argc (get_local $0) ) ) - (func $exports/Car#constructor|trampoline (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor|trampoline (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (block $1of1 (block $0of1 (block $outOfRange diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 9f99de87..c4ad7060 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -69,15 +69,7 @@ (func $exports/Car.getNumTires (; 3 ;) (type $i) (result i32) (get_global $exports/Car.TIRES) ) - (func $~lib/memory/memory.size (; 4 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 5 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -113,7 +105,7 @@ ) ) (set_local $3 - (call $~lib/memory/memory.size) + (current_memory) ) (if (i32.gt_u @@ -158,14 +150,14 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $5) ) (i32.const 0) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $4) ) (i32.const 0) @@ -185,14 +177,14 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 7 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 5 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) ) - (func $exports/Car#constructor (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (i32.store (tee_local $0 @@ -219,24 +211,24 @@ ) (get_local $0) ) - (func $exports/Car#get:numDoors (; 9 ;) (type $ii) (param $0 i32) (result i32) + (func $exports/Car#get:numDoors (; 7 ;) (type $ii) (param $0 i32) (result i32) (i32.load (get_local $0) ) ) - (func $exports/Car#set:numDoors (; 10 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $exports/Car#set:numDoors (; 8 ;) (type $iiv) (param $0 i32) (param $1 i32) (i32.store (get_local $0) (get_local $1) ) ) - (func $exports/Car#openDoors (; 11 ;) (type $iv) (param $0 i32) + (func $exports/Car#openDoors (; 9 ;) (type $iv) (param $0 i32) (nop) ) - (func $exports/vehicles.Car.getNumTires (; 12 ;) (type $i) (result i32) + (func $exports/vehicles.Car.getNumTires (; 10 ;) (type $i) (result i32) (get_global $exports/vehicles.Car.TIRES) ) - (func $exports/vehicles.Car#constructor (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/vehicles.Car#constructor (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (i32.store (tee_local $0 @@ -263,21 +255,21 @@ ) (get_local $0) ) - (func $exports/vehicles.Car#get:numDoors (; 14 ;) (type $ii) (param $0 i32) (result i32) + (func $exports/vehicles.Car#get:numDoors (; 12 ;) (type $ii) (param $0 i32) (result i32) (i32.load (get_local $0) ) ) - (func $exports/vehicles.Car#set:numDoors (; 15 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $exports/vehicles.Car#set:numDoors (; 13 ;) (type $iiv) (param $0 i32) (param $1 i32) (i32.store (get_local $0) (get_local $1) ) ) - (func $exports/vehicles.Car#openDoors (; 16 ;) (type $iv) (param $0 i32) + (func $exports/vehicles.Car#openDoors (; 14 ;) (type $iv) (param $0 i32) (nop) ) - (func $start (; 17 ;) (type $v) + (func $start (; 15 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.and (i32.add @@ -294,7 +286,7 @@ (get_global $~lib/allocator/arena/startOffset) ) ) - (func $exports/subOpt|trampoline (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/subOpt|trampoline (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (block $1of1 (block $0of1 (block $outOfRange @@ -316,12 +308,12 @@ (get_local $1) ) ) - (func $~setargc (; 19 ;) (type $iv) (param $0 i32) + (func $~setargc (; 17 ;) (type $iv) (param $0 i32) (set_global $~argc (get_local $0) ) ) - (func $exports/Car#constructor|trampoline (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/Car#constructor|trampoline (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (block $1of1 (block $0of1 (block $outOfRange @@ -340,18 +332,18 @@ (get_local $1) ) ) - (func $Car#get:doors (; 21 ;) (type $ii) (param $0 i32) (result i32) + (func $Car#get:doors (; 19 ;) (type $ii) (param $0 i32) (result i32) (i32.load (get_local $0) ) ) - (func $Car#set:doors (; 22 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $Car#set:doors (; 20 ;) (type $iiv) (param $0 i32) (param $1 i32) (i32.store (get_local $0) (get_local $1) ) ) - (func $exports/vehicles.Car#constructor|trampoline (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $exports/vehicles.Car#constructor|trampoline (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (block $1of1 (block $0of1 (block $outOfRange @@ -370,12 +362,12 @@ (get_local $1) ) ) - (func $vehicles.Car#get:doors (; 24 ;) (type $ii) (param $0 i32) (result i32) + (func $vehicles.Car#get:doors (; 22 ;) (type $ii) (param $0 i32) (result i32) (i32.load (get_local $0) ) ) - (func $vehicles.Car#set:doors (; 25 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $vehicles.Car#set:doors (; 23 ;) (type $iiv) (param $0 i32) (param $1 i32) (i32.store (get_local $0) (get_local $1) diff --git a/tests/compiler/limits.untouched.wat b/tests/compiler/limits.untouched.wat index 296accfd..0b04ce4d 100644 --- a/tests/compiler/limits.untouched.wat +++ b/tests/compiler/limits.untouched.wat @@ -1,113 +1,113 @@ (module (type $v (func)) - (global $i8.MIN_VALUE i32 (i32.const -128)) - (global $i8.MAX_VALUE i32 (i32.const 127)) - (global $i16.MIN_VALUE i32 (i32.const -32768)) - (global $i16.MAX_VALUE i32 (i32.const 32767)) - (global $i32.MIN_VALUE i32 (i32.const -2147483648)) - (global $i32.MAX_VALUE i32 (i32.const 2147483647)) - (global $i64.MIN_VALUE i64 (i64.const -9223372036854775808)) - (global $i64.MAX_VALUE i64 (i64.const 9223372036854775807)) - (global $isize.MIN_VALUE i32 (i32.const -2147483648)) - (global $isize.MAX_VALUE i32 (i32.const 2147483647)) - (global $u8.MIN_VALUE i32 (i32.const 0)) - (global $u8.MAX_VALUE i32 (i32.const 255)) - (global $u16.MIN_VALUE i32 (i32.const 0)) - (global $u16.MAX_VALUE i32 (i32.const 65535)) - (global $u32.MIN_VALUE i32 (i32.const 0)) - (global $u32.MAX_VALUE i32 (i32.const -1)) - (global $u64.MIN_VALUE i64 (i64.const 0)) - (global $u64.MAX_VALUE i64 (i64.const -1)) - (global $usize.MIN_VALUE i32 (i32.const 0)) - (global $usize.MAX_VALUE i32 (i32.const -1)) - (global $bool.MIN_VALUE i32 (i32.const 0)) - (global $bool.MAX_VALUE i32 (i32.const 1)) - (global $f32.MIN_SAFE_INTEGER f32 (f32.const -16777215)) - (global $f32.MAX_SAFE_INTEGER f32 (f32.const 16777215)) - (global $f64.MIN_SAFE_INTEGER f64 (f64.const -9007199254740991)) - (global $f64.MAX_SAFE_INTEGER f64 (f64.const 9007199254740991)) + (global $~lib/builtins/i8.MIN_VALUE i32 (i32.const -128)) + (global $~lib/builtins/i8.MAX_VALUE i32 (i32.const 127)) + (global $~lib/builtins/i16.MIN_VALUE i32 (i32.const -32768)) + (global $~lib/builtins/i16.MAX_VALUE i32 (i32.const 32767)) + (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) + (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) + (global $~lib/builtins/i64.MIN_VALUE i64 (i64.const -9223372036854775808)) + (global $~lib/builtins/i64.MAX_VALUE i64 (i64.const 9223372036854775807)) + (global $~lib/builtins/isize.MIN_VALUE i32 (i32.const -2147483648)) + (global $~lib/builtins/isize.MAX_VALUE i32 (i32.const 2147483647)) + (global $~lib/builtins/u8.MIN_VALUE i32 (i32.const 0)) + (global $~lib/builtins/u8.MAX_VALUE i32 (i32.const 255)) + (global $~lib/builtins/u16.MIN_VALUE i32 (i32.const 0)) + (global $~lib/builtins/u16.MAX_VALUE i32 (i32.const 65535)) + (global $~lib/builtins/u32.MIN_VALUE i32 (i32.const 0)) + (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) + (global $~lib/builtins/u64.MIN_VALUE i64 (i64.const 0)) + (global $~lib/builtins/u64.MAX_VALUE i64 (i64.const -1)) + (global $~lib/builtins/usize.MIN_VALUE i32 (i32.const 0)) + (global $~lib/builtins/usize.MAX_VALUE i32 (i32.const -1)) + (global $~lib/builtins/bool.MIN_VALUE i32 (i32.const 0)) + (global $~lib/builtins/bool.MAX_VALUE i32 (i32.const 1)) + (global $~lib/builtins/f32.MIN_SAFE_INTEGER f32 (f32.const -16777215)) + (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 $HEAP_BASE i32 (i32.const 8)) (memory $0 0) (export "memory" (memory $0)) (start $start) (func $start (; 0 ;) (type $v) (drop - (get_global $i8.MIN_VALUE) + (get_global $~lib/builtins/i8.MIN_VALUE) ) (drop - (get_global $i8.MAX_VALUE) + (get_global $~lib/builtins/i8.MAX_VALUE) ) (drop - (get_global $i16.MIN_VALUE) + (get_global $~lib/builtins/i16.MIN_VALUE) ) (drop - (get_global $i16.MAX_VALUE) + (get_global $~lib/builtins/i16.MAX_VALUE) ) (drop - (get_global $i32.MIN_VALUE) + (get_global $~lib/builtins/i32.MIN_VALUE) ) (drop - (get_global $i32.MAX_VALUE) + (get_global $~lib/builtins/i32.MAX_VALUE) ) (drop - (get_global $i64.MIN_VALUE) + (get_global $~lib/builtins/i64.MIN_VALUE) ) (drop - (get_global $i64.MAX_VALUE) + (get_global $~lib/builtins/i64.MAX_VALUE) ) (drop - (get_global $isize.MIN_VALUE) + (get_global $~lib/builtins/isize.MIN_VALUE) ) (drop - (get_global $isize.MAX_VALUE) + (get_global $~lib/builtins/isize.MAX_VALUE) ) (drop - (get_global $u8.MIN_VALUE) + (get_global $~lib/builtins/u8.MIN_VALUE) ) (drop - (get_global $u8.MAX_VALUE) + (get_global $~lib/builtins/u8.MAX_VALUE) ) (drop - (get_global $u16.MIN_VALUE) + (get_global $~lib/builtins/u16.MIN_VALUE) ) (drop - (get_global $u16.MAX_VALUE) + (get_global $~lib/builtins/u16.MAX_VALUE) ) (drop - (get_global $u32.MIN_VALUE) + (get_global $~lib/builtins/u32.MIN_VALUE) ) (drop - (get_global $u32.MAX_VALUE) + (get_global $~lib/builtins/u32.MAX_VALUE) ) (drop - (get_global $u64.MIN_VALUE) + (get_global $~lib/builtins/u64.MIN_VALUE) ) (drop - (get_global $u64.MAX_VALUE) + (get_global $~lib/builtins/u64.MAX_VALUE) ) (drop - (get_global $usize.MIN_VALUE) + (get_global $~lib/builtins/usize.MIN_VALUE) ) (drop - (get_global $usize.MAX_VALUE) + (get_global $~lib/builtins/usize.MAX_VALUE) ) (drop - (get_global $bool.MIN_VALUE) + (get_global $~lib/builtins/bool.MIN_VALUE) ) (drop - (get_global $bool.MAX_VALUE) + (get_global $~lib/builtins/bool.MAX_VALUE) ) (drop - (get_global $f32.MIN_SAFE_INTEGER) + (get_global $~lib/builtins/f32.MIN_SAFE_INTEGER) ) (drop - (get_global $f32.MAX_SAFE_INTEGER) + (get_global $~lib/builtins/f32.MAX_SAFE_INTEGER) ) (drop - (get_global $f64.MIN_SAFE_INTEGER) + (get_global $~lib/builtins/f64.MIN_SAFE_INTEGER) ) (drop - (get_global $f64.MAX_SAFE_INTEGER) + (get_global $~lib/builtins/f64.MAX_SAFE_INTEGER) ) ) ) diff --git a/tests/compiler/mandelbrot.optimized.wat b/tests/compiler/mandelbrot.optimized.wat index 3a5007dd..93a7f1bc 100644 --- a/tests/compiler/mandelbrot.optimized.wat +++ b/tests/compiler/mandelbrot.optimized.wat @@ -268,7 +268,7 @@ ) ) ) - (func $isFinite (; 1 ;) (type $Fi) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 1 ;) (type $Fi) (param $0 f64) (result i32) (f64.eq (f64.sub (get_local $0) @@ -499,7 +499,7 @@ ) (tee_local $2 (if (result i32) - (call $isFinite + (call $~lib/builtins/isFinite (tee_local $6 (f64.div (call $~lib/math/NativeMath.log diff --git a/tests/compiler/mandelbrot.untouched.wat b/tests/compiler/mandelbrot.untouched.wat index 685f8bde..2aa859fe 100644 --- a/tests/compiler/mandelbrot.untouched.wat +++ b/tests/compiler/mandelbrot.untouched.wat @@ -310,7 +310,7 @@ ) ) ) - (func $isFinite (; 1 ;) (type $Fi) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 1 ;) (type $Fi) (param $0 f64) (result i32) (f64.eq (f64.sub (get_local $0) @@ -577,7 +577,7 @@ ) (set_local $17 (if (result i32) - (call $isFinite + (call $~lib/builtins/isFinite (get_local $15) ) (i32.trunc_u/f64 diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index 169018d1..065b7136 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -1,6 +1,5 @@ (module (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $iv (func (param i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $iii (func (param i32 i32) (result i32))) @@ -14,15 +13,7 @@ (data (i32.const 36) "\11\00\00\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") (export "memory" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 1 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 2 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -54,14 +45,14 @@ ) (i32.shl (tee_local $2 - (call $~lib/memory/memory.size) + (current_memory) ) (i32.const 16) ) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (select (get_local $2) (tee_local $3 @@ -89,7 +80,7 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $3) ) (i32.const 0) @@ -108,12 +99,12 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) - (func $~lib/memory/memcmp (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memcmp (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.eq @@ -183,14 +174,14 @@ ) ) ) - (func $~lib/memory/memory.compare (; 6 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.compare (; 4 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (call $~lib/memory/memcmp (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/string/String.__eq (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.eq @@ -253,7 +244,7 @@ ) ) ) - (func $object-literal/bar (; 8 ;) (type $iv) (param $0 i32) + (func $object-literal/bar (; 6 ;) (type $iv) (param $0 i32) (if (i32.ne (i32.load @@ -291,7 +282,7 @@ ) ) ) - (func $object-literal/bar2 (; 9 ;) (type $iv) (param $0 i32) + (func $object-literal/bar2 (; 7 ;) (type $iv) (param $0 i32) (if (i32.ne (i32.load @@ -310,7 +301,7 @@ ) ) ) - (func $object-literal/Foo2#test (; 10 ;) (type $iv) (param $0 i32) + (func $object-literal/Foo2#test (; 8 ;) (type $iv) (param $0 i32) (if (i32.ne (i32.load @@ -329,7 +320,7 @@ ) ) ) - (func $start (; 11 ;) (type $v) + (func $start (; 9 ;) (type $v) (local $0 i32) (set_global $~lib/allocator/arena/startOffset (i32.const 80) diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index 4c34a267..63c0d36e 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -1,6 +1,5 @@ (module (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $iv (func (param i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $iii (func (param i32 i32) (result i32))) @@ -20,15 +19,7 @@ (data (i32.const 36) "\11\00\00\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") (export "memory" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 1 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 2 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -64,7 +55,7 @@ ) ) (set_local $3 - (call $~lib/memory/memory.size) + (current_memory) ) (if (i32.gt_u @@ -109,14 +100,14 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $5) ) (i32.const 0) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $4) ) (i32.const 0) @@ -136,14 +127,14 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) ) - (func $~lib/memory/memcmp (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memcmp (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.eq @@ -213,14 +204,14 @@ (i32.const 0) ) ) - (func $~lib/memory/memory.compare (; 6 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.compare (; 4 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (call $~lib/memory/memcmp (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/string/String.__eq (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (if @@ -283,7 +274,7 @@ ) ) ) - (func $object-literal/bar (; 8 ;) (type $iv) (param $0 i32) + (func $object-literal/bar (; 6 ;) (type $iv) (param $0 i32) (if (i32.eqz (i32.eq @@ -323,7 +314,7 @@ ) ) ) - (func $object-literal/bar2 (; 9 ;) (type $iv) (param $0 i32) + (func $object-literal/bar2 (; 7 ;) (type $iv) (param $0 i32) (if (i32.eqz (i32.eq @@ -344,7 +335,7 @@ ) ) ) - (func $object-literal/Foo2#test (; 10 ;) (type $iv) (param $0 i32) + (func $object-literal/Foo2#test (; 8 ;) (type $iv) (param $0 i32) (if (i32.eqz (i32.eq @@ -365,7 +356,7 @@ ) ) ) - (func $start (; 11 ;) (type $v) + (func $start (; 9 ;) (type $v) (local $0 i32) (local $1 i32) (local $2 i32) diff --git a/tests/compiler/retain-i32.untouched.wat b/tests/compiler/retain-i32.untouched.wat index 0cdccdf7..fd09652f 100644 --- a/tests/compiler/retain-i32.untouched.wat +++ b/tests/compiler/retain-i32.untouched.wat @@ -3,15 +3,15 @@ (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $i8.MAX_VALUE i32 (i32.const 127)) - (global $i8.MIN_VALUE i32 (i32.const -128)) - (global $u8.MAX_VALUE i32 (i32.const 255)) - (global $i16.MIN_VALUE i32 (i32.const -32768)) - (global $i16.MAX_VALUE i32 (i32.const 32767)) - (global $u16.MAX_VALUE i32 (i32.const 65535)) - (global $i32.MAX_VALUE i32 (i32.const 2147483647)) - (global $i32.MIN_VALUE i32 (i32.const -2147483648)) - (global $u32.MAX_VALUE i32 (i32.const -1)) + (global $~lib/builtins/i8.MAX_VALUE i32 (i32.const 127)) + (global $~lib/builtins/i8.MIN_VALUE i32 (i32.const -128)) + (global $~lib/builtins/u8.MAX_VALUE i32 (i32.const 255)) + (global $~lib/builtins/i16.MIN_VALUE i32 (i32.const -32768)) + (global $~lib/builtins/i16.MAX_VALUE i32 (i32.const 32767)) + (global $~lib/builtins/u16.MAX_VALUE i32 (i32.const 65535)) + (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) + (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) + (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 $HEAP_BASE i32 (i32.const 40)) @@ -473,106 +473,106 @@ (local $0 i32) (call $retain-i32/test (i32.const 0) - (get_global $i8.MAX_VALUE) + (get_global $~lib/builtins/i8.MAX_VALUE) ) (call $retain-i32/test - (get_global $i8.MAX_VALUE) + (get_global $~lib/builtins/i8.MAX_VALUE) (i32.const 0) ) (call $retain-i32/test (i32.const 1) - (get_global $i8.MAX_VALUE) + (get_global $~lib/builtins/i8.MAX_VALUE) ) (call $retain-i32/test - (get_global $i8.MAX_VALUE) + (get_global $~lib/builtins/i8.MAX_VALUE) (i32.const 1) ) (call $retain-i32/test (i32.const -1) - (get_global $i8.MAX_VALUE) + (get_global $~lib/builtins/i8.MAX_VALUE) ) (call $retain-i32/test - (get_global $i8.MAX_VALUE) + (get_global $~lib/builtins/i8.MAX_VALUE) (i32.const -1) ) (call $retain-i32/test (i32.const 0) - (get_global $i8.MIN_VALUE) + (get_global $~lib/builtins/i8.MIN_VALUE) ) (call $retain-i32/test - (get_global $i8.MIN_VALUE) + (get_global $~lib/builtins/i8.MIN_VALUE) (i32.const 0) ) (call $retain-i32/test (i32.const 1) - (get_global $i8.MIN_VALUE) + (get_global $~lib/builtins/i8.MIN_VALUE) ) (call $retain-i32/test - (get_global $i8.MIN_VALUE) + (get_global $~lib/builtins/i8.MIN_VALUE) (i32.const 1) ) (call $retain-i32/test (i32.const -1) - (get_global $i8.MIN_VALUE) + (get_global $~lib/builtins/i8.MIN_VALUE) ) (call $retain-i32/test - (get_global $i8.MIN_VALUE) + (get_global $~lib/builtins/i8.MIN_VALUE) (i32.const -1) ) (call $retain-i32/test - (get_global $i8.MAX_VALUE) - (get_global $i8.MAX_VALUE) + (get_global $~lib/builtins/i8.MAX_VALUE) + (get_global $~lib/builtins/i8.MAX_VALUE) ) (call $retain-i32/test - (get_global $i8.MIN_VALUE) - (get_global $i8.MIN_VALUE) + (get_global $~lib/builtins/i8.MIN_VALUE) + (get_global $~lib/builtins/i8.MIN_VALUE) ) (call $retain-i32/test - (get_global $i8.MAX_VALUE) - (get_global $i8.MIN_VALUE) + (get_global $~lib/builtins/i8.MAX_VALUE) + (get_global $~lib/builtins/i8.MIN_VALUE) ) (call $retain-i32/test - (get_global $i8.MIN_VALUE) - (get_global $i8.MAX_VALUE) + (get_global $~lib/builtins/i8.MIN_VALUE) + (get_global $~lib/builtins/i8.MAX_VALUE) ) (call $retain-i32/test (i32.const 0) - (get_global $u8.MAX_VALUE) + (get_global $~lib/builtins/u8.MAX_VALUE) ) (call $retain-i32/test - (get_global $u8.MAX_VALUE) + (get_global $~lib/builtins/u8.MAX_VALUE) (i32.const 0) ) (call $retain-i32/test (i32.const 1) - (get_global $u8.MAX_VALUE) + (get_global $~lib/builtins/u8.MAX_VALUE) ) (call $retain-i32/test - (get_global $u8.MAX_VALUE) + (get_global $~lib/builtins/u8.MAX_VALUE) (i32.const 1) ) (call $retain-i32/test (i32.const -1) - (get_global $u8.MAX_VALUE) + (get_global $~lib/builtins/u8.MAX_VALUE) ) (call $retain-i32/test - (get_global $u8.MAX_VALUE) + (get_global $~lib/builtins/u8.MAX_VALUE) (i32.const -1) ) (call $retain-i32/test - (get_global $u8.MAX_VALUE) - (get_global $u8.MAX_VALUE) + (get_global $~lib/builtins/u8.MAX_VALUE) + (get_global $~lib/builtins/u8.MAX_VALUE) ) (block $break|0 (set_local $0 - (get_global $i8.MIN_VALUE) + (get_global $~lib/builtins/i8.MIN_VALUE) ) (loop $repeat|0 (br_if $break|0 (i32.eqz (i32.le_s (get_local $0) - (get_global $u8.MAX_VALUE) + (get_global $~lib/builtins/u8.MAX_VALUE) ) ) ) @@ -590,39 +590,39 @@ (get_local $0) ) (call $retain-i32/test - (get_global $i8.MIN_VALUE) + (get_global $~lib/builtins/i8.MIN_VALUE) (get_local $0) ) (call $retain-i32/test - (get_global $i8.MAX_VALUE) + (get_global $~lib/builtins/i8.MAX_VALUE) (get_local $0) ) (call $retain-i32/test - (get_global $u8.MAX_VALUE) + (get_global $~lib/builtins/u8.MAX_VALUE) (get_local $0) ) (call $retain-i32/test - (get_global $i16.MIN_VALUE) + (get_global $~lib/builtins/i16.MIN_VALUE) (get_local $0) ) (call $retain-i32/test - (get_global $i16.MAX_VALUE) + (get_global $~lib/builtins/i16.MAX_VALUE) (get_local $0) ) (call $retain-i32/test - (get_global $u16.MAX_VALUE) + (get_global $~lib/builtins/u16.MAX_VALUE) (get_local $0) ) (call $retain-i32/test - (get_global $i32.MAX_VALUE) + (get_global $~lib/builtins/i32.MAX_VALUE) (get_local $0) ) (call $retain-i32/test - (get_global $i32.MIN_VALUE) + (get_global $~lib/builtins/i32.MIN_VALUE) (get_local $0) ) (call $retain-i32/test - (get_global $u32.MAX_VALUE) + (get_global $~lib/builtins/u32.MAX_VALUE) (get_local $0) ) ) diff --git a/tests/compiler/std/allocator_arena.optimized.wat b/tests/compiler/std/allocator_arena.optimized.wat index dd6c13a9..a238fd5d 100644 --- a/tests/compiler/std/allocator_arena.optimized.wat +++ b/tests/compiler/std/allocator_arena.optimized.wat @@ -1,6 +1,5 @@ (module (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiv (func (param i32 i32 i32))) (type $iiii (func (param i32 i32 i32) (result i32))) @@ -16,15 +15,7 @@ (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") (export "memory" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 1 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 2 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -56,14 +47,14 @@ ) (i32.shl (tee_local $2 - (call $~lib/memory/memory.size) + (current_memory) ) (i32.const 16) ) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (select (get_local $2) (tee_local $3 @@ -91,7 +82,7 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $3) ) (i32.const 0) @@ -110,12 +101,12 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) - (func $~lib/memory/memset (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) (if @@ -445,14 +436,14 @@ ) ) ) - (func $~lib/memory/memory.fill (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memset (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/memory/memcpy (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memcpy (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1838,7 +1829,7 @@ ) ) ) - (func $~lib/memory/memmove (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memmove (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (if @@ -2130,14 +2121,14 @@ ) ) ) - (func $~lib/memory/memory.copy (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memmove (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/memory/memcmp (; 10 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memcmp (; 8 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.eq @@ -2207,30 +2198,30 @@ ) ) ) - (func $~lib/memory/memory.compare (; 11 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.compare (; 9 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (call $~lib/memory/memcmp (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/allocator/arena/__memory_free (; 12 ;) (type $iv) (param $0 i32) + (func $~lib/allocator/arena/__memory_free (; 10 ;) (type $iv) (param $0 i32) (nop) ) - (func $~lib/memory/memory.free (; 13 ;) (type $iv) (param $0 i32) + (func $~lib/memory/memory.free (; 11 ;) (type $iv) (param $0 i32) (call $~lib/allocator/arena/__memory_free (get_local $0) ) ) - (func $~lib/allocator/arena/__memory_reset (; 14 ;) (type $v) + (func $~lib/allocator/arena/__memory_reset (; 12 ;) (type $v) (set_global $~lib/allocator/arena/offset (get_global $~lib/allocator/arena/startOffset) ) ) - (func $~lib/memory/memory.reset (; 15 ;) (type $v) + (func $~lib/memory/memory.reset (; 13 ;) (type $v) (call $~lib/allocator/arena/__memory_reset) ) - (func $start (; 16 ;) (type $v) + (func $start (; 14 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.const 56) ) diff --git a/tests/compiler/std/allocator_arena.untouched.wat b/tests/compiler/std/allocator_arena.untouched.wat index cd1ba09b..afba45d2 100644 --- a/tests/compiler/std/allocator_arena.untouched.wat +++ b/tests/compiler/std/allocator_arena.untouched.wat @@ -1,6 +1,5 @@ (module (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiv (func (param i32 i32 i32))) (type $iiii (func (param i32 i32 i32) (result i32))) @@ -22,15 +21,7 @@ (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") (export "memory" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 1 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 2 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -66,7 +57,7 @@ ) ) (set_local $3 - (call $~lib/memory/memory.size) + (current_memory) ) (if (i32.gt_u @@ -111,14 +102,14 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $5) ) (i32.const 0) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $4) ) (i32.const 0) @@ -138,14 +129,14 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) ) - (func $~lib/memory/memset (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) @@ -497,14 +488,14 @@ ) ) ) - (func $~lib/memory/memory.fill (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memset (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/memory/memcpy (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memcpy (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2306,7 +2297,7 @@ ) ) ) - (func $~lib/memory/memmove (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memmove (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (if (i32.eq @@ -2624,14 +2615,14 @@ ) ) ) - (func $~lib/memory/memory.copy (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memmove (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/memory/memcmp (; 10 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memcmp (; 8 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.eq @@ -2701,32 +2692,32 @@ (i32.const 0) ) ) - (func $~lib/memory/memory.compare (; 11 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.compare (; 9 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (call $~lib/memory/memcmp (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/allocator/arena/__memory_free (; 12 ;) (type $iv) (param $0 i32) + (func $~lib/allocator/arena/__memory_free (; 10 ;) (type $iv) (param $0 i32) (nop) ) - (func $~lib/memory/memory.free (; 13 ;) (type $iv) (param $0 i32) + (func $~lib/memory/memory.free (; 11 ;) (type $iv) (param $0 i32) (call $~lib/allocator/arena/__memory_free (get_local $0) ) (return) ) - (func $~lib/allocator/arena/__memory_reset (; 14 ;) (type $v) + (func $~lib/allocator/arena/__memory_reset (; 12 ;) (type $v) (set_global $~lib/allocator/arena/offset (get_global $~lib/allocator/arena/startOffset) ) ) - (func $~lib/memory/memory.reset (; 15 ;) (type $v) + (func $~lib/memory/memory.reset (; 13 ;) (type $v) (call $~lib/allocator/arena/__memory_reset) (return) ) - (func $start (; 16 ;) (type $v) + (func $start (; 14 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.and (i32.add diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 0e7de69b..825155c5 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -2,7 +2,6 @@ (type $ii (func (param i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $iii (func (param i32 i32) (result i32))) - (type $i (func (result i32))) (type $iiiv (func (param i32 i32 i32))) (type $v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -67,15 +66,7 @@ ) ) ) - (func $~lib/memory/memory.size (; 4 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 5 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -107,14 +98,14 @@ ) (i32.shl (tee_local $2 - (call $~lib/memory/memory.size) + (current_memory) ) (i32.const 16) ) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (select (get_local $2) (tee_local $3 @@ -142,7 +133,7 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $3) ) (i32.const 0) @@ -161,12 +152,12 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 7 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 5 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) - (func $~lib/internal/arraybuffer/allocUnsafe (; 8 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocUnsafe (; 6 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (i32.gt_u @@ -195,7 +186,7 @@ ) (get_local $1) ) - (func $~lib/memory/memset (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) (if @@ -525,14 +516,14 @@ ) ) ) - (func $~lib/memory/memory.fill (; 10 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memset (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/array/Array#constructor (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (if @@ -597,7 +588,7 @@ ) (get_local $0) ) - (func $~lib/array/Array#__unchecked_set (; 12 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 10 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (i32.store offset=8 (i32.add (i32.load @@ -611,7 +602,7 @@ (get_local $2) ) ) - (func $start (; 13 ;) (type $v) + (func $start (; 11 ;) (type $v) (local $0 i32) (set_global $~lib/allocator/arena/startOffset (i32.const 184) diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index a3dcf114..70c26658 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -2,7 +2,6 @@ (type $ii (func (param i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $iii (func (param i32 i32) (result i32))) - (type $i (func (result i32))) (type $iiiv (func (param i32 i32 i32))) (type $v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -79,15 +78,7 @@ ) ) ) - (func $~lib/memory/memory.size (; 4 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 5 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -123,7 +114,7 @@ ) ) (set_local $3 - (call $~lib/memory/memory.size) + (current_memory) ) (if (i32.gt_u @@ -168,14 +159,14 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $5) ) (i32.const 0) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $4) ) (i32.const 0) @@ -195,14 +186,14 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 7 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 5 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) ) - (func $~lib/internal/arraybuffer/allocUnsafe (; 8 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocUnsafe (; 6 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (i32.eqz @@ -234,7 +225,7 @@ ) (get_local $1) ) - (func $~lib/memory/memset (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) @@ -586,14 +577,14 @@ ) ) ) - (func $~lib/memory/memory.fill (; 10 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memset (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/array/Array#constructor (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -664,7 +655,7 @@ ) (get_local $0) ) - (func $~lib/array/Array#__unchecked_set (; 12 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 10 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (block $~lib/internal/arraybuffer/storeUnsafe|inlined.0 (set_local $3 @@ -684,7 +675,7 @@ ) ) ) - (func $start (; 13 ;) (type $v) + (func $start (; 11 ;) (type $v) (local $0 i32) (set_global $~lib/allocator/arena/startOffset (i32.and diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index a9a2df34..dc002a14 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2,7 +2,6 @@ (type $iii (func (param i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $iiiv (func (param i32 i32 i32))) (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiv (func (param i32 i32))) @@ -89,15 +88,7 @@ ) ) ) - (func $~lib/memory/memory.size (; 3 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 4 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -129,14 +120,14 @@ ) (i32.shl (tee_local $2 - (call $~lib/memory/memory.size) + (current_memory) ) (i32.const 16) ) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (select (get_local $2) (tee_local $3 @@ -164,7 +155,7 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $3) ) (i32.const 0) @@ -183,12 +174,12 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) - (func $~lib/internal/arraybuffer/allocUnsafe (; 7 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocUnsafe (; 5 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (i32.gt_u @@ -217,7 +208,7 @@ ) (get_local $1) ) - (func $~lib/memory/memset (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) (if @@ -547,14 +538,14 @@ ) ) ) - (func $~lib/memory/memory.fill (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memset (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/array/Array#constructor (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (if @@ -619,12 +610,12 @@ ) (get_local $0) ) - (func $~lib/array/Array#get:length (; 11 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 9 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=4 (get_local $0) ) ) - (func $std/array/internalCapacity (; 12 ;) (type $ii) (param $0 i32) (result i32) + (func $std/array/internalCapacity (; 10 ;) (type $ii) (param $0 i32) (result i32) (i32.shr_s (i32.load (i32.load @@ -634,7 +625,7 @@ (i32.const 2) ) ) - (func $~lib/memory/memcpy (; 13 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memcpy (; 11 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2020,7 +2011,7 @@ ) ) ) - (func $~lib/memory/memmove (; 14 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memmove (; 12 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (if @@ -2312,14 +2303,14 @@ ) ) ) - (func $~lib/memory/memory.copy (; 15 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 13 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memmove (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/internal/arraybuffer/reallocUnsafe (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/arraybuffer/reallocUnsafe (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (if @@ -2443,7 +2434,7 @@ ) (get_local $0) ) - (func $~lib/array/Array#push (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2517,7 +2508,7 @@ ) (get_local $3) ) - (func $~lib/array/Array#__get (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (tee_local $0 (if (result i32) (i32.lt_u @@ -2546,7 +2537,7 @@ ) ) ) - (func $~lib/array/Array#pop (; 19 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 17 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (if @@ -2592,7 +2583,7 @@ ) (get_local $2) ) - (func $~lib/array/Array#unshift (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#unshift (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2688,7 +2679,7 @@ ) (get_local $3) ) - (func $~lib/array/Array#shift (; 21 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 19 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2755,7 +2746,7 @@ ) (get_local $3) ) - (func $~lib/array/Array#reverse (; 22 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/array/Array#reverse (; 20 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2837,7 +2828,7 @@ ) (get_local $0) ) - (func $~lib/array/Array#indexOf (; 23 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 21 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (if @@ -2927,7 +2918,7 @@ ) (i32.const -1) ) - (func $~lib/array/Array#includes (; 24 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 22 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (if @@ -3017,7 +3008,7 @@ ) (i32.const 0) ) - (func $~lib/array/Array#splice (; 25 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#splice (; 23 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (if @@ -3118,7 +3109,7 @@ ) ) ) - (func $~lib/array/Array#__set (; 26 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 24 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (if @@ -3185,12 +3176,12 @@ (get_local $2) ) ) - (func $start~anonymous|0 (; 27 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|0 (; 25 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.eqz (get_local $0) ) ) - (func $~lib/array/Array#findIndex (; 28 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 26 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3266,19 +3257,19 @@ ) (i32.const -1) ) - (func $start~anonymous|1 (; 29 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|1 (; 27 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.eq (get_local $0) (i32.const 1) ) ) - (func $start~anonymous|2 (; 30 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|2 (; 28 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.eq (get_local $0) (i32.const 100) ) ) - (func $start~anonymous|3 (; 31 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|3 (; 29 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#push (get_local $2) @@ -3290,7 +3281,7 @@ (i32.const 100) ) ) - (func $start~anonymous|5 (; 32 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|5 (; 30 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#pop (get_local $2) @@ -3301,13 +3292,13 @@ (i32.const 100) ) ) - (func $start~anonymous|6 (; 33 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|6 (; 31 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.ge_s (get_local $0) (i32.const 0) ) ) - (func $~lib/array/Array#every (; 34 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 32 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3383,13 +3374,13 @@ ) (i32.const 1) ) - (func $start~anonymous|7 (; 35 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|7 (; 33 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.le_s (get_local $0) (i32.const 0) ) ) - (func $start~anonymous|8 (; 36 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|8 (; 34 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#push (get_local $2) @@ -3401,13 +3392,13 @@ (i32.const 10) ) ) - (func $start~anonymous|9 (; 37 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|9 (; 35 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.lt_s (get_local $0) (i32.const 10) ) ) - (func $start~anonymous|10 (; 38 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|10 (; 36 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#pop (get_local $2) @@ -3418,13 +3409,13 @@ (i32.const 3) ) ) - (func $start~anonymous|11 (; 39 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|11 (; 37 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.ge_s (get_local $0) (i32.const 3) ) ) - (func $~lib/array/Array#some (; 40 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 38 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3500,13 +3491,13 @@ ) (i32.const 0) ) - (func $start~anonymous|12 (; 41 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|12 (; 39 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.le_s (get_local $0) (i32.const -1) ) ) - (func $start~anonymous|13 (; 42 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|13 (; 40 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#push (get_local $2) @@ -3518,13 +3509,13 @@ (i32.const 10) ) ) - (func $start~anonymous|14 (; 43 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|14 (; 41 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.gt_s (get_local $0) (i32.const 10) ) ) - (func $start~anonymous|15 (; 44 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|15 (; 42 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#pop (get_local $2) @@ -3535,7 +3526,7 @@ (i32.const 3) ) ) - (func $start~anonymous|16 (; 45 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start~anonymous|16 (; 43 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (set_global $std/array/i (i32.add (get_global $std/array/i) @@ -3543,7 +3534,7 @@ ) ) ) - (func $~lib/array/Array#forEach (; 46 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 44 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3608,7 +3599,7 @@ ) ) ) - (func $start~anonymous|17 (; 47 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start~anonymous|17 (; 45 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (drop (call $~lib/array/Array#push (get_local $2) @@ -3622,7 +3613,7 @@ ) ) ) - (func $start~anonymous|19 (; 48 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start~anonymous|19 (; 46 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (drop (call $~lib/array/Array#pop (get_local $2) @@ -3635,12 +3626,12 @@ ) ) ) - (func $start~anonymous|20 (; 49 ;) (type $iiif) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start~anonymous|20 (; 47 ;) (type $iiif) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) (f32.convert_s/i32 (get_local $0) ) ) - (func $~lib/array/Array#map (; 50 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 48 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3726,7 +3717,7 @@ ) (get_local $6) ) - (func $~lib/array/Array#__get (; 51 ;) (type $iif) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 49 ;) (type $iif) (param $0 i32) (param $1 i32) (result f32) (if (result f32) (i32.lt_u (get_local $1) @@ -3753,7 +3744,7 @@ (unreachable) ) ) - (func $start~anonymous|21 (; 52 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|21 (; 50 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#push (get_local $2) @@ -3768,7 +3759,7 @@ ) (get_local $0) ) - (func $~lib/array/Array#map (; 53 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 51 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3854,7 +3845,7 @@ ) (get_local $6) ) - (func $start~anonymous|22 (; 54 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|22 (; 52 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (set_global $std/array/i (i32.add (get_global $std/array/i) @@ -3863,7 +3854,7 @@ ) (get_local $0) ) - (func $start~anonymous|23 (; 55 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|23 (; 53 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#pop (get_local $2) @@ -3877,13 +3868,13 @@ ) (get_local $0) ) - (func $start~anonymous|24 (; 56 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|24 (; 54 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.ge_s (get_local $0) (i32.const 2) ) ) - (func $~lib/array/Array#filter (; 57 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 55 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3970,7 +3961,7 @@ ) (get_local $4) ) - (func $start~anonymous|25 (; 58 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|25 (; 56 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#push (get_local $2) @@ -3988,7 +3979,7 @@ (i32.const 2) ) ) - (func $start~anonymous|26 (; 59 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|26 (; 57 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (set_global $std/array/i (i32.add (get_global $std/array/i) @@ -4000,7 +3991,7 @@ (i32.const 2) ) ) - (func $start~anonymous|27 (; 60 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|27 (; 58 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#pop (get_local $2) @@ -4017,13 +4008,13 @@ (i32.const 2) ) ) - (func $start~anonymous|28 (; 61 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start~anonymous|28 (; 59 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (i32.add (get_local $0) (get_local $1) ) ) - (func $~lib/array/Array#reduce (; 62 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 60 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4092,7 +4083,7 @@ ) (get_local $2) ) - (func $start~anonymous|30 (; 63 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start~anonymous|30 (; 61 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (if (result i32) (i32.and (get_local $0) @@ -4105,7 +4096,7 @@ ) ) ) - (func $start~anonymous|31 (; 64 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start~anonymous|31 (; 62 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (if (result i32) (i32.and (get_local $0) @@ -4118,7 +4109,7 @@ ) ) ) - (func $start~anonymous|32 (; 65 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start~anonymous|32 (; 63 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (drop (call $~lib/array/Array#push (get_local $3) @@ -4130,7 +4121,7 @@ (get_local $1) ) ) - (func $start~anonymous|34 (; 66 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start~anonymous|34 (; 64 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (drop (call $~lib/array/Array#pop (get_local $3) @@ -4141,7 +4132,7 @@ (get_local $1) ) ) - (func $~lib/array/Array#reduceRight (; 67 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 65 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $4 @@ -4196,7 +4187,7 @@ ) (get_local $2) ) - (func $~lib/math/murmurHash3 (; 68 ;) (type $II) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 66 ;) (type $II) (param $0 i64) (result i64) (i64.xor (tee_local $0 (i64.mul @@ -4227,7 +4218,7 @@ ) ) ) - (func $~lib/math/NativeMath.seedRandom (; 69 ;) (type $Iv) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 67 ;) (type $Iv) (param $0 i64) (if (i64.eqz (get_local $0) @@ -4256,7 +4247,7 @@ ) ) ) - (func $std/array/createReverseOrderedArray (; 70 ;) (type $ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 68 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (set_local $1 (call $~lib/array/Array#constructor @@ -4301,7 +4292,7 @@ ) (get_local $1) ) - (func $~lib/math/NativeMath.random (; 71 ;) (type $F) (result f64) + (func $~lib/math/NativeMath.random (; 69 ;) (type $F) (result f64) (local $0 i64) (local $1 i64) (if @@ -4370,7 +4361,7 @@ (f64.const 1) ) ) - (func $std/array/createRandomOrderedArray (; 72 ;) (type $ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 70 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (set_local $0 (call $~lib/array/Array#constructor @@ -4413,7 +4404,7 @@ ) (get_local $0) ) - (func $std/array/assertSortedDefault~anonymous|42 (; 73 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/assertSortedDefault~anonymous|42 (; 71 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.sub (i32.gt_s (get_local $0) @@ -4425,7 +4416,7 @@ ) ) ) - (func $~lib/internal/array/insertionSort (; 74 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/array/insertionSort (; 72 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4552,15 +4543,15 @@ ) (get_local $0) ) - (func $~lib/allocator/arena/__memory_free (; 75 ;) (type $iv) (param $0 i32) + (func $~lib/allocator/arena/__memory_free (; 73 ;) (type $iv) (param $0 i32) (nop) ) - (func $~lib/memory/memory.free (; 76 ;) (type $iv) (param $0 i32) + (func $~lib/memory/memory.free (; 74 ;) (type $iv) (param $0 i32) (call $~lib/allocator/arena/__memory_free (get_local $0) ) ) - (func $~lib/internal/array/weakHeapSort (; 77 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/array/weakHeapSort (; 75 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4964,7 +4955,7 @@ ) (get_local $0) ) - (func $~lib/array/Array#sort (; 78 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 76 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5067,7 +5058,7 @@ ) ) ) - (func $std/array/isSorted (; 79 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 77 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (block $break|0 @@ -5124,7 +5115,7 @@ ) (i32.const 1) ) - (func $std/array/assertSorted (; 80 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 78 ;) (type $iiv) (param $0 i32) (param $1 i32) (if (i32.eqz (call $std/array/isSorted @@ -5146,13 +5137,13 @@ ) ) ) - (func $std/array/assertSortedDefault (; 81 ;) (type $iv) (param $0 i32) + (func $std/array/assertSortedDefault (; 79 ;) (type $iv) (param $0 i32) (call $std/array/assertSorted (get_local $0) (i32.const 42) ) ) - (func $std/array/isArraysEqual (; 82 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 80 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.eqz @@ -5215,19 +5206,19 @@ ) (i32.const 1) ) - (func $start~anonymous|43 (; 83 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $start~anonymous|43 (; 81 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.sub (get_local $0) (get_local $1) ) ) - (func $start~anonymous|44 (; 84 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $start~anonymous|44 (; 82 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.sub (get_local $1) (get_local $0) ) ) - (func $std/array/createReverseOrderedNestedArray (; 85 ;) (type $ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 83 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (set_local $1 (call $~lib/array/Array#constructor @@ -5283,7 +5274,7 @@ ) (get_local $1) ) - (func $start~anonymous|47 (; 86 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $start~anonymous|47 (; 84 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.sub (call $~lib/array/Array#__get (get_local $0) @@ -5295,7 +5286,7 @@ ) ) ) - (func $~lib/array/Array>#sort (; 87 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 85 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5386,7 +5377,7 @@ (get_local $1) ) ) - (func $std/array/assertSorted> (; 88 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 86 ;) (type $iiv) (param $0 i32) (param $1 i32) (if (i32.eqz (call $std/array/isSorted @@ -5408,7 +5399,7 @@ ) ) ) - (func $std/array/Proxy#constructor (; 89 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/Proxy#constructor (; 87 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (if (i32.eqz (get_local $0) @@ -5424,7 +5415,7 @@ ) (get_local $0) ) - (func $std/array/createReverseOrderedElementsArray (; 90 ;) (type $ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 88 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (set_local $1 (call $~lib/array/Array#constructor @@ -5472,7 +5463,7 @@ ) (get_local $1) ) - (func $start~anonymous|48 (; 91 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $start~anonymous|48 (; 89 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.sub (i32.load (get_local $0) @@ -5482,7 +5473,7 @@ ) ) ) - (func $~lib/memory/memcmp (; 92 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memcmp (; 90 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.eq @@ -5552,14 +5543,14 @@ ) ) ) - (func $~lib/memory/memory.compare (; 93 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.compare (; 91 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (call $~lib/memory/memcmp (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/string/String.__gt (; 94 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 92 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (if @@ -5643,7 +5634,7 @@ (i32.const 0) ) ) - (func $~lib/string/String.__lt (; 95 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 93 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (if @@ -5727,7 +5718,7 @@ (i32.const 0) ) ) - (func $start~anonymous|49 (; 96 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $start~anonymous|49 (; 94 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.sub (call $~lib/string/String.__gt (get_local $0) @@ -5739,7 +5730,7 @@ ) ) ) - (func $~lib/string/String.__eq (; 97 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 95 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.eq @@ -5802,7 +5793,7 @@ ) ) ) - (func $~lib/string/String.__ne (; 98 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 96 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.eqz (call $~lib/string/String.__eq (get_local $0) @@ -5810,7 +5801,7 @@ ) ) ) - (func $std/array/isArraysEqual (; 99 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 97 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.eqz @@ -5873,7 +5864,7 @@ ) (i32.const 1) ) - (func $~lib/internal/string/allocate (; 100 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/string/allocate (; 98 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (tee_local $1 @@ -5919,7 +5910,7 @@ ) (get_local $1) ) - (func $~lib/string/String#charAt (; 101 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#charAt (; 99 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.eqz @@ -5964,7 +5955,7 @@ ) (get_local $2) ) - (func $~lib/string/String#concat (; 102 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 100 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6050,7 +6041,7 @@ ) (get_local $2) ) - (func $~lib/string/String.__concat (; 103 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 101 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (if (i32.eqz (get_local $0) @@ -6064,7 +6055,7 @@ (get_local $1) ) ) - (func $std/array/createRandomString (; 104 ;) (type $ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 102 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (set_local $1 @@ -6109,7 +6100,7 @@ ) (get_local $1) ) - (func $std/array/createRandomStringArray (; 105 ;) (type $ii) (param $0 i32) (result i32) + (func $std/array/createRandomStringArray (; 103 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (set_local $1 (call $~lib/array/Array#constructor @@ -6153,7 +6144,7 @@ ) (get_local $1) ) - (func $start (; 106 ;) (type $v) + (func $start (; 104 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.const 792) ) diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 81c42a41..d23b28d9 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -2,7 +2,6 @@ (type $iii (func (param i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $iiiv (func (param i32 i32 i32))) (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiv (func (param i32 i32))) @@ -102,15 +101,7 @@ ) ) ) - (func $~lib/memory/memory.size (; 3 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 4 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -146,7 +137,7 @@ ) ) (set_local $3 - (call $~lib/memory/memory.size) + (current_memory) ) (if (i32.gt_u @@ -191,14 +182,14 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $5) ) (i32.const 0) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $4) ) (i32.const 0) @@ -218,14 +209,14 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) ) - (func $~lib/internal/arraybuffer/allocUnsafe (; 7 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocUnsafe (; 5 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (i32.eqz @@ -257,7 +248,7 @@ ) (get_local $1) ) - (func $~lib/memory/memset (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) @@ -609,14 +600,14 @@ ) ) ) - (func $~lib/memory/memory.fill (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memset (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/array/Array#constructor (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -687,12 +678,12 @@ ) (get_local $0) ) - (func $~lib/array/Array#get:length (; 11 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 9 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=4 (get_local $0) ) ) - (func $std/array/internalCapacity (; 12 ;) (type $ii) (param $0 i32) (result i32) + (func $std/array/internalCapacity (; 10 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (set_local $1 (i32.load @@ -706,7 +697,7 @@ (i32.const 2) ) ) - (func $~lib/memory/memcpy (; 13 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memcpy (; 11 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2508,7 +2499,7 @@ ) ) ) - (func $~lib/memory/memmove (; 14 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memmove (; 12 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (if (i32.eq @@ -2826,14 +2817,14 @@ ) ) ) - (func $~lib/memory/memory.copy (; 15 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 13 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memmove (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/internal/arraybuffer/reallocUnsafe (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/arraybuffer/reallocUnsafe (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (set_local $2 @@ -2963,7 +2954,7 @@ ) (get_local $0) ) - (func $~lib/array/Array#push (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#push (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3046,7 +3037,7 @@ ) (get_local $5) ) - (func $~lib/array/Array#__get (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (set_local $2 (i32.load @@ -3077,7 +3068,7 @@ (unreachable) ) ) - (func $~lib/array/Array#pop (; 19 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/array/Array#pop (; 17 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3134,7 +3125,7 @@ ) (get_local $4) ) - (func $~lib/array/Array#unshift (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#unshift (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3249,7 +3240,7 @@ ) (get_local $5) ) - (func $~lib/array/Array#shift (; 21 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/array/Array#shift (; 19 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3340,7 +3331,7 @@ ) (get_local $4) ) - (func $~lib/array/Array#reverse (; 22 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/array/Array#reverse (; 20 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -3445,7 +3436,7 @@ ) (get_local $0) ) - (func $~lib/array/Array#indexOf (; 23 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#indexOf (; 21 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3543,7 +3534,7 @@ ) (i32.const -1) ) - (func $~lib/array/Array#includes (; 24 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#includes (; 22 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3641,7 +3632,7 @@ ) (i32.const 0) ) - (func $~lib/array/Array#splice (; 25 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#splice (; 23 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3747,7 +3738,7 @@ ) ) ) - (func $~lib/array/Array#__set (; 26 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 24 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -3822,13 +3813,13 @@ ) ) ) - (func $start~anonymous|0 (; 27 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|0 (; 25 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.eq (get_local $0) (i32.const 0) ) ) - (func $~lib/array/Array#findIndex (; 28 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#findIndex (; 26 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3909,19 +3900,19 @@ ) (i32.const -1) ) - (func $start~anonymous|1 (; 29 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|1 (; 27 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.eq (get_local $0) (i32.const 1) ) ) - (func $start~anonymous|2 (; 30 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|2 (; 28 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.eq (get_local $0) (i32.const 100) ) ) - (func $start~anonymous|3 (; 31 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|3 (; 29 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#push (get_local $2) @@ -3933,13 +3924,13 @@ (i32.const 100) ) ) - (func $start~anonymous|4 (; 32 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|4 (; 30 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.eq (get_local $0) (i32.const 100) ) ) - (func $start~anonymous|5 (; 33 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|5 (; 31 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#pop (get_local $2) @@ -3950,13 +3941,13 @@ (i32.const 100) ) ) - (func $start~anonymous|6 (; 34 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|6 (; 32 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.ge_s (get_local $0) (i32.const 0) ) ) - (func $~lib/array/Array#every (; 35 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#every (; 33 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4039,13 +4030,13 @@ ) (i32.const 1) ) - (func $start~anonymous|7 (; 36 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|7 (; 34 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.le_s (get_local $0) (i32.const 0) ) ) - (func $start~anonymous|8 (; 37 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|8 (; 35 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#push (get_local $2) @@ -4057,13 +4048,13 @@ (i32.const 10) ) ) - (func $start~anonymous|9 (; 38 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|9 (; 36 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.lt_s (get_local $0) (i32.const 10) ) ) - (func $start~anonymous|10 (; 39 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|10 (; 37 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#pop (get_local $2) @@ -4074,13 +4065,13 @@ (i32.const 3) ) ) - (func $start~anonymous|11 (; 40 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|11 (; 38 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.ge_s (get_local $0) (i32.const 3) ) ) - (func $~lib/array/Array#some (; 41 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#some (; 39 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4161,13 +4152,13 @@ ) (i32.const 0) ) - (func $start~anonymous|12 (; 42 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|12 (; 40 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.le_s (get_local $0) (i32.const -1) ) ) - (func $start~anonymous|13 (; 43 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|13 (; 41 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#push (get_local $2) @@ -4179,13 +4170,13 @@ (i32.const 10) ) ) - (func $start~anonymous|14 (; 44 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|14 (; 42 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.gt_s (get_local $0) (i32.const 10) ) ) - (func $start~anonymous|15 (; 45 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|15 (; 43 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#pop (get_local $2) @@ -4196,7 +4187,7 @@ (i32.const 3) ) ) - (func $start~anonymous|16 (; 46 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start~anonymous|16 (; 44 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (set_global $std/array/i (i32.add (get_global $std/array/i) @@ -4204,7 +4195,7 @@ ) ) ) - (func $~lib/array/Array#forEach (; 47 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/array/Array#forEach (; 45 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4276,7 +4267,7 @@ ) ) ) - (func $start~anonymous|17 (; 48 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start~anonymous|17 (; 46 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (drop (call $~lib/array/Array#push (get_local $2) @@ -4290,7 +4281,7 @@ ) ) ) - (func $start~anonymous|18 (; 49 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start~anonymous|18 (; 47 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (set_global $std/array/i (i32.add (get_global $std/array/i) @@ -4298,7 +4289,7 @@ ) ) ) - (func $start~anonymous|19 (; 50 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $start~anonymous|19 (; 48 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (drop (call $~lib/array/Array#pop (get_local $2) @@ -4311,12 +4302,12 @@ ) ) ) - (func $start~anonymous|20 (; 51 ;) (type $iiif) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) + (func $start~anonymous|20 (; 49 ;) (type $iiif) (param $0 i32) (param $1 i32) (param $2 i32) (result f32) (f32.convert_s/i32 (get_local $0) ) ) - (func $~lib/array/Array#constructor (; 52 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 50 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4387,7 +4378,7 @@ ) (get_local $0) ) - (func $~lib/array/Array#map (; 53 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 51 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4486,12 +4477,12 @@ ) (get_local $4) ) - (func $~lib/array/Array#get:length (; 54 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 52 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=4 (get_local $0) ) ) - (func $~lib/array/Array#__get (; 55 ;) (type $iif) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 53 ;) (type $iif) (param $0 i32) (param $1 i32) (result f32) (local $2 i32) (set_local $2 (i32.load @@ -4522,7 +4513,7 @@ (unreachable) ) ) - (func $start~anonymous|21 (; 56 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|21 (; 54 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#push (get_local $2) @@ -4537,7 +4528,7 @@ ) (get_local $0) ) - (func $~lib/array/Array#map (; 57 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#map (; 55 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4635,7 +4626,7 @@ ) (get_local $4) ) - (func $start~anonymous|22 (; 58 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|22 (; 56 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (set_global $std/array/i (i32.add (get_global $std/array/i) @@ -4644,7 +4635,7 @@ ) (get_local $0) ) - (func $start~anonymous|23 (; 59 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|23 (; 57 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#pop (get_local $2) @@ -4658,13 +4649,13 @@ ) (get_local $0) ) - (func $start~anonymous|24 (; 60 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|24 (; 58 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (i32.ge_s (get_local $0) (i32.const 2) ) ) - (func $~lib/array/Array#filter (; 61 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#filter (; 59 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4758,7 +4749,7 @@ ) (get_local $4) ) - (func $start~anonymous|25 (; 62 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|25 (; 60 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#push (get_local $2) @@ -4776,7 +4767,7 @@ (i32.const 2) ) ) - (func $start~anonymous|26 (; 63 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|26 (; 61 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (set_global $std/array/i (i32.add (get_global $std/array/i) @@ -4788,7 +4779,7 @@ (i32.const 2) ) ) - (func $start~anonymous|27 (; 64 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $start~anonymous|27 (; 62 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (drop (call $~lib/array/Array#pop (get_local $2) @@ -4805,13 +4796,13 @@ (i32.const 2) ) ) - (func $start~anonymous|28 (; 65 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start~anonymous|28 (; 63 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (i32.add (get_local $0) (get_local $1) ) ) - (func $~lib/array/Array#reduce (; 66 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 64 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4891,13 +4882,13 @@ ) (get_local $3) ) - (func $start~anonymous|29 (; 67 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start~anonymous|29 (; 65 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (i32.add (get_local $0) (get_local $1) ) ) - (func $start~anonymous|30 (; 68 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start~anonymous|30 (; 66 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (if (result i32) (i32.and (get_local $0) @@ -4910,7 +4901,7 @@ ) ) ) - (func $~lib/array/Array#reduce (; 69 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduce (; 67 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4990,7 +4981,7 @@ ) (get_local $3) ) - (func $start~anonymous|31 (; 70 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start~anonymous|31 (; 68 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (if (result i32) (i32.and (get_local $0) @@ -5003,7 +4994,7 @@ ) ) ) - (func $start~anonymous|32 (; 71 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start~anonymous|32 (; 69 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (drop (call $~lib/array/Array#push (get_local $3) @@ -5015,13 +5006,13 @@ (get_local $1) ) ) - (func $start~anonymous|33 (; 72 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start~anonymous|33 (; 70 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (i32.add (get_local $0) (get_local $1) ) ) - (func $start~anonymous|34 (; 73 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start~anonymous|34 (; 71 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (drop (call $~lib/array/Array#pop (get_local $3) @@ -5032,13 +5023,13 @@ (get_local $1) ) ) - (func $start~anonymous|35 (; 74 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start~anonymous|35 (; 72 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (i32.add (get_local $0) (get_local $1) ) ) - (func $~lib/array/Array#reduceRight (; 75 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 73 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5103,13 +5094,13 @@ ) (get_local $3) ) - (func $start~anonymous|36 (; 76 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start~anonymous|36 (; 74 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (i32.add (get_local $0) (get_local $1) ) ) - (func $start~anonymous|37 (; 77 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start~anonymous|37 (; 75 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (if (result i32) (i32.and (get_local $0) @@ -5122,7 +5113,7 @@ ) ) ) - (func $~lib/array/Array#reduceRight (; 78 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/array/Array#reduceRight (; 76 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5187,7 +5178,7 @@ ) (get_local $3) ) - (func $start~anonymous|38 (; 79 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start~anonymous|38 (; 77 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (if (result i32) (i32.and (get_local $0) @@ -5200,7 +5191,7 @@ ) ) ) - (func $start~anonymous|39 (; 80 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start~anonymous|39 (; 78 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (drop (call $~lib/array/Array#push (get_local $3) @@ -5212,13 +5203,13 @@ (get_local $1) ) ) - (func $start~anonymous|40 (; 81 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start~anonymous|40 (; 79 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (i32.add (get_local $0) (get_local $1) ) ) - (func $start~anonymous|41 (; 82 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) + (func $start~anonymous|41 (; 80 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (drop (call $~lib/array/Array#pop (get_local $3) @@ -5229,7 +5220,7 @@ (get_local $1) ) ) - (func $~lib/math/murmurHash3 (; 83 ;) (type $II) (param $0 i64) (result i64) + (func $~lib/math/murmurHash3 (; 81 ;) (type $II) (param $0 i64) (result i64) (set_local $0 (i64.xor (get_local $0) @@ -5271,7 +5262,7 @@ ) (get_local $0) ) - (func $~lib/math/NativeMath.seedRandom (; 84 ;) (type $Iv) (param $0 i64) + (func $~lib/math/NativeMath.seedRandom (; 82 ;) (type $Iv) (param $0 i64) (if (i64.eqz (get_local $0) @@ -5300,7 +5291,7 @@ ) ) ) - (func $std/array/createReverseOrderedArray (; 85 ;) (type $ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedArray (; 83 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (set_local $1 @@ -5348,7 +5339,7 @@ ) (get_local $1) ) - (func $~lib/math/NativeMath.random (; 86 ;) (type $F) (result f64) + (func $~lib/math/NativeMath.random (; 84 ;) (type $F) (result f64) (local $0 i64) (local $1 i64) (local $2 i64) @@ -5430,7 +5421,7 @@ (f64.const 1) ) ) - (func $std/array/createRandomOrderedArray (; 87 ;) (type $ii) (param $0 i32) (result i32) + (func $std/array/createRandomOrderedArray (; 85 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (set_local $1 @@ -5479,7 +5470,7 @@ ) (get_local $1) ) - (func $std/array/assertSortedDefault~anonymous|42 (; 88 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/assertSortedDefault~anonymous|42 (; 86 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.sub (i32.gt_s (get_local $0) @@ -5491,7 +5482,7 @@ ) ) ) - (func $~lib/internal/array/insertionSort (; 89 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/array/insertionSort (; 87 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5647,16 +5638,16 @@ ) (get_local $0) ) - (func $~lib/allocator/arena/__memory_free (; 90 ;) (type $iv) (param $0 i32) + (func $~lib/allocator/arena/__memory_free (; 88 ;) (type $iv) (param $0 i32) (nop) ) - (func $~lib/memory/memory.free (; 91 ;) (type $iv) (param $0 i32) + (func $~lib/memory/memory.free (; 89 ;) (type $iv) (param $0 i32) (call $~lib/allocator/arena/__memory_free (get_local $0) ) (return) ) - (func $~lib/internal/array/weakHeapSort (; 92 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/array/weakHeapSort (; 90 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6205,7 +6196,7 @@ ) (get_local $0) ) - (func $~lib/array/Array#sort (; 93 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 91 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6351,7 +6342,7 @@ ) ) ) - (func $std/array/isSorted (; 94 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 92 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (block $break|0 @@ -6412,7 +6403,7 @@ ) (i32.const 1) ) - (func $std/array/assertSorted (; 95 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 93 ;) (type $iiv) (param $0 i32) (param $1 i32) (if (i32.eqz (call $std/array/isSorted @@ -6434,7 +6425,7 @@ ) ) ) - (func $std/array/assertSortedDefault (; 96 ;) (type $iv) (param $0 i32) + (func $std/array/assertSortedDefault (; 94 ;) (type $iv) (param $0 i32) (call $std/array/assertSorted (get_local $0) (block $~lib/internal/array/defaultComparator|inlined.0 (result i32) @@ -6442,7 +6433,7 @@ ) ) ) - (func $std/array/isArraysEqual (; 97 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 95 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.eqz @@ -6508,31 +6499,31 @@ ) (i32.const 1) ) - (func $start~anonymous|43 (; 98 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $start~anonymous|43 (; 96 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.sub (get_local $0) (get_local $1) ) ) - (func $start~anonymous|44 (; 99 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $start~anonymous|44 (; 97 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.sub (get_local $1) (get_local $0) ) ) - (func $start~anonymous|45 (; 100 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $start~anonymous|45 (; 98 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.sub (get_local $0) (get_local $1) ) ) - (func $start~anonymous|46 (; 101 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $start~anonymous|46 (; 99 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.sub (get_local $1) (get_local $0) ) ) - (func $~lib/array/Array>#constructor (; 102 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 100 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6603,12 +6594,12 @@ ) (get_local $0) ) - (func $~lib/array/Array>#get:length (; 103 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#get:length (; 101 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=4 (get_local $0) ) ) - (func $~lib/array/Array>#__set (; 104 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__set (; 102 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -6683,7 +6674,7 @@ ) ) ) - (func $~lib/array/Array>#__get (; 105 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__get (; 103 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (set_local $2 (i32.load @@ -6714,7 +6705,7 @@ (unreachable) ) ) - (func $std/array/createReverseOrderedNestedArray (; 106 ;) (type $ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedNestedArray (; 104 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (set_local $1 @@ -6775,7 +6766,7 @@ ) (get_local $1) ) - (func $start~anonymous|47 (; 107 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $start~anonymous|47 (; 105 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.sub (call $~lib/array/Array#__get (get_local $0) @@ -6787,7 +6778,7 @@ ) ) ) - (func $~lib/internal/array/insertionSort> (; 108 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/array/insertionSort> (; 106 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6943,7 +6934,7 @@ ) (get_local $0) ) - (func $~lib/array/Array>#sort (; 109 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 107 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7079,7 +7070,7 @@ ) ) ) - (func $std/array/isSorted> (; 110 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 108 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (block $break|0 @@ -7140,7 +7131,7 @@ ) (i32.const 1) ) - (func $std/array/assertSorted> (; 111 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 109 ;) (type $iiv) (param $0 i32) (param $1 i32) (if (i32.eqz (call $std/array/isSorted> @@ -7162,7 +7153,7 @@ ) ) ) - (func $~lib/array/Array>#constructor (; 112 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#constructor (; 110 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7233,12 +7224,12 @@ ) (get_local $0) ) - (func $~lib/array/Array>#get:length (; 113 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/array/Array>#get:length (; 111 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=4 (get_local $0) ) ) - (func $std/array/Proxy#constructor (; 114 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/Proxy#constructor (; 112 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (tee_local $0 (if (result i32) @@ -7261,7 +7252,7 @@ ) ) ) - (func $~lib/array/Array>#__set (; 115 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array>#__set (; 113 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -7336,7 +7327,7 @@ ) ) ) - (func $std/array/createReverseOrderedElementsArray (; 116 ;) (type $ii) (param $0 i32) (result i32) + (func $std/array/createReverseOrderedElementsArray (; 114 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (set_local $1 @@ -7387,7 +7378,7 @@ ) (get_local $1) ) - (func $start~anonymous|48 (; 117 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $start~anonymous|48 (; 115 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.sub (i32.load (get_local $0) @@ -7397,7 +7388,7 @@ ) ) ) - (func $~lib/internal/array/insertionSort> (; 118 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/array/insertionSort> (; 116 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7553,7 +7544,7 @@ ) (get_local $0) ) - (func $~lib/array/Array>#sort (; 119 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#sort (; 117 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7689,7 +7680,7 @@ ) ) ) - (func $~lib/array/Array>#__get (; 120 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array>#__get (; 118 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (set_local $2 (i32.load @@ -7720,7 +7711,7 @@ (unreachable) ) ) - (func $std/array/isSorted> (; 121 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted> (; 119 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (block $break|0 @@ -7781,7 +7772,7 @@ ) (i32.const 1) ) - (func $std/array/assertSorted> (; 122 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted> (; 120 ;) (type $iiv) (param $0 i32) (param $1 i32) (if (i32.eqz (call $std/array/isSorted> @@ -7803,7 +7794,7 @@ ) ) ) - (func $~lib/memory/memcmp (; 123 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memcmp (; 121 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.eq @@ -7873,14 +7864,14 @@ (i32.const 0) ) ) - (func $~lib/memory/memory.compare (; 124 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.compare (; 122 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (call $~lib/memory/memcmp (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/string/String.__gt (; 125 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 123 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7971,7 +7962,7 @@ (i32.const 0) ) ) - (func $~lib/string/String.__lt (; 126 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 124 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8062,7 +8053,7 @@ (i32.const 0) ) ) - (func $start~anonymous|49 (; 127 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $start~anonymous|49 (; 125 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.sub (call $~lib/string/String.__gt (get_local $0) @@ -8074,12 +8065,12 @@ ) ) ) - (func $~lib/array/Array#get:length (; 128 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 126 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=4 (get_local $0) ) ) - (func $~lib/internal/array/insertionSort (; 129 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/array/insertionSort (; 127 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8235,7 +8226,7 @@ ) (get_local $0) ) - (func $~lib/array/Array#sort (; 130 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#sort (; 128 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8371,7 +8362,7 @@ ) ) ) - (func $~lib/array/Array#__get (; 131 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 129 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (set_local $2 (i32.load @@ -8402,7 +8393,7 @@ (unreachable) ) ) - (func $std/array/isSorted (; 132 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/array/isSorted (; 130 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (block $break|0 @@ -8463,7 +8454,7 @@ ) (i32.const 1) ) - (func $std/array/assertSorted (; 133 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $std/array/assertSorted (; 131 ;) (type $iiv) (param $0 i32) (param $1 i32) (if (i32.eqz (call $std/array/isSorted @@ -8485,7 +8476,7 @@ ) ) ) - (func $~lib/string/String.__eq (; 134 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 132 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (if @@ -8548,7 +8539,7 @@ ) ) ) - (func $~lib/string/String.__ne (; 135 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 133 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.eqz (call $~lib/string/String.__eq (get_local $0) @@ -8556,7 +8547,7 @@ ) ) ) - (func $std/array/isArraysEqual (; 136 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/array/isArraysEqual (; 134 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.eqz @@ -8622,7 +8613,7 @@ ) (i32.const 1) ) - (func $~lib/array/Array#constructor (; 137 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 135 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8693,7 +8684,7 @@ ) (get_local $0) ) - (func $~lib/internal/string/allocate (; 138 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/string/allocate (; 136 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (if @@ -8739,7 +8730,7 @@ ) (get_local $2) ) - (func $~lib/string/String#charAt (; 139 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#charAt (; 137 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.eqz @@ -8788,7 +8779,7 @@ ) (get_local $2) ) - (func $~lib/string/String#concat (; 140 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 138 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8885,7 +8876,7 @@ ) (get_local $5) ) - (func $~lib/string/String.__concat (; 141 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 139 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (if (i32.eqz (get_local $0) @@ -8899,7 +8890,7 @@ (get_local $1) ) ) - (func $std/array/createRandomString (; 142 ;) (type $ii) (param $0 i32) (result i32) + (func $std/array/createRandomString (; 140 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 f64) @@ -8955,7 +8946,7 @@ ) (get_local $1) ) - (func $~lib/array/Array#__set (; 143 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 141 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -9030,7 +9021,7 @@ ) ) ) - (func $std/array/createRandomStringArray (; 144 ;) (type $ii) (param $0 i32) (result i32) + (func $std/array/createRandomStringArray (; 142 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (set_local $1 @@ -9077,7 +9068,7 @@ ) (get_local $1) ) - (func $start~anonymous|50 (; 145 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $start~anonymous|50 (; 143 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.sub (call $~lib/string/String.__gt (get_local $0) @@ -9089,7 +9080,7 @@ ) ) ) - (func $start (; 146 ;) (type $v) + (func $start (; 144 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.and (i32.add diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index be174a73..5d4e4ce8 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -2,7 +2,6 @@ (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $iiiv (func (param i32 i32 i32))) (type $v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -31,15 +30,7 @@ ) ) ) - (func $~lib/memory/memory.size (; 2 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 3 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -71,14 +62,14 @@ ) (i32.shl (tee_local $2 - (call $~lib/memory/memory.size) + (current_memory) ) (i32.const 16) ) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (select (get_local $2) (tee_local $3 @@ -106,7 +97,7 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $3) ) (i32.const 0) @@ -125,12 +116,12 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) - (func $~lib/internal/arraybuffer/allocUnsafe (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocUnsafe (; 4 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (i32.gt_u @@ -159,7 +150,7 @@ ) (get_local $1) ) - (func $~lib/memory/memset (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) (if @@ -489,14 +480,14 @@ ) ) ) - (func $~lib/memory/memory.fill (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memset (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 9 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.gt_u @@ -536,7 +527,7 @@ ) (get_local $3) ) - (func $~lib/memory/memcpy (; 10 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memcpy (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1922,7 +1913,7 @@ ) ) ) - (func $~lib/memory/memmove (; 11 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memmove (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (if @@ -2214,14 +2205,14 @@ ) ) ) - (func $~lib/memory/memory.copy (; 12 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 10 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memmove (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 13 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 11 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $4 @@ -2324,7 +2315,7 @@ ) (get_local $2) ) - (func $~lib/arraybuffer/ArrayBuffer#slice|trampoline (; 14 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice|trampoline (; 12 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (block $2of2 (block $1of2 (block $0of2 @@ -2349,7 +2340,7 @@ (get_local $2) ) ) - (func $start (; 15 ;) (type $v) + (func $start (; 13 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.const 152) ) diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index f8bf6103..dfff6835 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -2,7 +2,6 @@ (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $iiiv (func (param i32 i32 i32))) (type $v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -41,15 +40,7 @@ ) ) ) - (func $~lib/memory/memory.size (; 2 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 3 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -85,7 +76,7 @@ ) ) (set_local $3 - (call $~lib/memory/memory.size) + (current_memory) ) (if (i32.gt_u @@ -130,14 +121,14 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $5) ) (i32.const 0) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $4) ) (i32.const 0) @@ -157,14 +148,14 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) ) - (func $~lib/internal/arraybuffer/allocUnsafe (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocUnsafe (; 4 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (i32.eqz @@ -196,7 +187,7 @@ ) (get_local $1) ) - (func $~lib/memory/memset (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) @@ -548,14 +539,14 @@ ) ) ) - (func $~lib/memory/memory.fill (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memset (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 9 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.gt_u @@ -595,7 +586,7 @@ ) (get_local $3) ) - (func $~lib/memory/memcpy (; 10 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memcpy (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2397,7 +2388,7 @@ ) ) ) - (func $~lib/memory/memmove (; 11 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memmove (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (if (i32.eq @@ -2715,14 +2706,14 @@ ) ) ) - (func $~lib/memory/memory.copy (; 12 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 10 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memmove (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/arraybuffer/ArrayBuffer#slice (; 13 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice (; 11 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2845,7 +2836,7 @@ ) (get_local $7) ) - (func $~lib/arraybuffer/ArrayBuffer#slice|trampoline (; 14 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#slice|trampoline (; 12 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (block $2of2 (block $1of2 (block $0of2 @@ -2870,7 +2861,7 @@ (get_local $2) ) ) - (func $start (; 15 ;) (type $v) + (func $start (; 13 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.and (i32.add diff --git a/tests/compiler/std/constructor.optimized.wat b/tests/compiler/std/constructor.optimized.wat index 6093c75c..fa51bb3a 100644 --- a/tests/compiler/std/constructor.optimized.wat +++ b/tests/compiler/std/constructor.optimized.wat @@ -1,6 +1,5 @@ (module (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $v (func)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) @@ -18,15 +17,7 @@ (memory $0 0) (export "memory" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 0 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 1 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -58,14 +49,14 @@ ) (i32.shl (tee_local $2 - (call $~lib/memory/memory.size) + (current_memory) ) (i32.const 16) ) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (select (get_local $2) (tee_local $3 @@ -93,7 +84,7 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $3) ) (i32.const 0) @@ -112,12 +103,12 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) - (func $std/constructor/EmptyCtor#constructor (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $std/constructor/EmptyCtor#constructor (; 2 ;) (type $ii) (param $0 i32) (result i32) (if (result i32) (get_local $0) (get_local $0) @@ -126,7 +117,7 @@ ) ) ) - (func $std/constructor/EmptyCtorWithFieldInit#constructor (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $std/constructor/EmptyCtorWithFieldInit#constructor (; 3 ;) (type $ii) (param $0 i32) (result i32) (if (i32.eqz (get_local $0) @@ -142,7 +133,7 @@ ) (get_local $0) ) - (func $std/constructor/EmptyCtorWithFieldNoInit#constructor (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $std/constructor/EmptyCtorWithFieldNoInit#constructor (; 4 ;) (type $ii) (param $0 i32) (result i32) (if (i32.eqz (get_local $0) @@ -158,12 +149,12 @@ ) (get_local $0) ) - (func $std/constructor/CtorReturns#constructor (; 7 ;) (type $ii) (param $0 i32) (result i32) + (func $std/constructor/CtorReturns#constructor (; 5 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/memory/memory.allocate (i32.const 0) ) ) - (func $std/constructor/CtorConditionallyReturns#constructor (; 8 ;) (type $ii) (param $0 i32) (result i32) + (func $std/constructor/CtorConditionallyReturns#constructor (; 6 ;) (type $ii) (param $0 i32) (result i32) (if (get_global $std/constructor/b) (return @@ -180,7 +171,7 @@ ) ) ) - (func $std/constructor/CtorConditionallyAllocates#constructor (; 9 ;) (type $ii) (param $0 i32) (result i32) + (func $std/constructor/CtorConditionallyAllocates#constructor (; 7 ;) (type $ii) (param $0 i32) (result i32) (if (get_global $std/constructor/b) (if @@ -206,7 +197,7 @@ ) (get_local $0) ) - (func $start (; 10 ;) (type $v) + (func $start (; 8 ;) (type $v) (local $0 i32) (set_global $~lib/allocator/arena/startOffset (i32.const 8) diff --git a/tests/compiler/std/constructor.untouched.wat b/tests/compiler/std/constructor.untouched.wat index e78d598c..d2ded3be 100644 --- a/tests/compiler/std/constructor.untouched.wat +++ b/tests/compiler/std/constructor.untouched.wat @@ -1,6 +1,5 @@ (module (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $v (func)) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) @@ -23,15 +22,7 @@ (memory $0 0) (export "memory" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 0 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 1 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -67,7 +58,7 @@ ) ) (set_local $3 - (call $~lib/memory/memory.size) + (current_memory) ) (if (i32.gt_u @@ -112,14 +103,14 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $5) ) (i32.const 0) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $4) ) (i32.const 0) @@ -139,14 +130,14 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) ) - (func $std/constructor/EmptyCtor#constructor (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $std/constructor/EmptyCtor#constructor (; 2 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (tee_local $0 (if (result i32) @@ -165,7 +156,7 @@ ) ) ) - (func $std/constructor/EmptyCtorWithFieldInit#constructor (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $std/constructor/EmptyCtorWithFieldInit#constructor (; 3 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (tee_local $0 (if (result i32) @@ -188,7 +179,7 @@ ) ) ) - (func $std/constructor/EmptyCtorWithFieldNoInit#constructor (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $std/constructor/EmptyCtorWithFieldNoInit#constructor (; 4 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (tee_local $0 (if (result i32) @@ -211,12 +202,12 @@ ) ) ) - (func $std/constructor/CtorReturns#constructor (; 7 ;) (type $ii) (param $0 i32) (result i32) + (func $std/constructor/CtorReturns#constructor (; 5 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/memory/memory.allocate (i32.const 0) ) ) - (func $std/constructor/CtorConditionallyReturns#constructor (; 8 ;) (type $ii) (param $0 i32) (result i32) + (func $std/constructor/CtorConditionallyReturns#constructor (; 6 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (get_global $std/constructor/b) @@ -243,7 +234,7 @@ ) ) ) - (func $std/constructor/CtorAllocates#constructor (; 9 ;) (type $ii) (param $0 i32) (result i32) + (func $std/constructor/CtorAllocates#constructor (; 7 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (drop (tee_local $0 @@ -265,7 +256,7 @@ ) (get_local $0) ) - (func $std/constructor/CtorConditionallyAllocates#constructor (; 10 ;) (type $ii) (param $0 i32) (result i32) + (func $std/constructor/CtorConditionallyAllocates#constructor (; 8 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (get_global $std/constructor/b) @@ -305,7 +296,7 @@ ) ) ) - (func $start (; 11 ;) (type $v) + (func $start (; 9 ;) (type $v) (local $0 i32) (set_global $~lib/allocator/arena/startOffset (i32.and diff --git a/tests/compiler/std/gc-integration.optimized.wat b/tests/compiler/std/gc-integration.optimized.wat index 93881603..13f2cf8c 100644 --- a/tests/compiler/std/gc-integration.optimized.wat +++ b/tests/compiler/std/gc-integration.optimized.wat @@ -34,7 +34,7 @@ (i32.const 0) (i32.const 8) (i32.const 14) - (i32.const 43) + (i32.const 40) ) (unreachable) ) diff --git a/tests/compiler/std/gc-integration.ts b/tests/compiler/std/gc-integration.ts index 9dd6095b..edc29305 100644 --- a/tests/compiler/std/gc-integration.ts +++ b/tests/compiler/std/gc-integration.ts @@ -11,5 +11,5 @@ var a_ref: A | null = changetype(24); var b_ref: B = changetype(32); var i: i32 = 0; -__gc_iterate_roots((ref: usize): void => { assert(ref == ++i << 3); }); +gc.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 index 12a96718..798bc16f 100644 --- a/tests/compiler/std/gc-integration.untouched.wat +++ b/tests/compiler/std/gc-integration.untouched.wat @@ -41,7 +41,7 @@ (i32.const 0) (i32.const 8) (i32.const 14) - (i32.const 43) + (i32.const 40) ) (unreachable) ) diff --git a/tests/compiler/std/gc.optimized.wat b/tests/compiler/std/gc.optimized.wat index 8bf08b20..67b5bea4 100644 --- a/tests/compiler/std/gc.optimized.wat +++ b/tests/compiler/std/gc.optimized.wat @@ -3,7 +3,6 @@ (type $iii (func (param i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $iiv (func (param i32 i32))) (type $v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -25,15 +24,7 @@ (func $std/gc/MyObject_visit (; 1 ;) (type $iv) (param $0 i32) (nop) ) - (func $~lib/memory/memory.size (; 2 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 3 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -65,14 +56,14 @@ ) (i32.shl (tee_local $2 - (call $~lib/memory/memory.size) + (current_memory) ) (i32.const 16) ) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (select (get_local $2) (tee_local $3 @@ -100,7 +91,7 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $3) ) (i32.const 0) @@ -119,12 +110,12 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) - (func $~lib/collector/itcm/ManagedObject#makeWhite (; 6 ;) (type $iv) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#makeWhite (; 4 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (i32.or @@ -138,7 +129,7 @@ ) ) ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 7 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#set:next (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32) (i32.store (get_local $0) (i32.or @@ -152,7 +143,7 @@ ) ) ) - (func $~lib/collector/itcm/ManagedObject#insert (; 8 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#insert (; 6 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (set_local $2 (i32.load offset=4 @@ -176,7 +167,7 @@ (get_local $1) ) ) - (func $~lib/collector/itcm/gc.alloc (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/collector/itcm/gc.alloc (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.gt_u @@ -216,7 +207,7 @@ (i32.const 16) ) ) - (func $start (; 10 ;) (type $v) + (func $start (; 8 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.const 80) ) diff --git a/tests/compiler/std/gc.untouched.wat b/tests/compiler/std/gc.untouched.wat index d118f8f2..4b39ecc7 100644 --- a/tests/compiler/std/gc.untouched.wat +++ b/tests/compiler/std/gc.untouched.wat @@ -3,7 +3,6 @@ (type $iii (func (param i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $iiv (func (param i32 i32))) (type $v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -40,15 +39,7 @@ (func $std/gc/MyObject_visit (; 1 ;) (type $iv) (param $0 i32) (nop) ) - (func $~lib/memory/memory.size (; 2 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 3 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -84,7 +75,7 @@ ) ) (set_local $3 - (call $~lib/memory/memory.size) + (current_memory) ) (if (i32.gt_u @@ -129,14 +120,14 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $5) ) (i32.const 0) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $4) ) (i32.const 0) @@ -156,14 +147,14 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) ) - (func $~lib/collector/itcm/ManagedObject#makeWhite (; 6 ;) (type $iv) (param $0 i32) + (func $~lib/collector/itcm/ManagedObject#makeWhite (; 4 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (i32.or @@ -180,7 +171,7 @@ ) ) ) - (func $~lib/collector/itcm/ManagedObject#set:next (; 7 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#set:next (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32) (i32.store (get_local $0) (i32.or @@ -194,7 +185,7 @@ ) ) ) - (func $~lib/collector/itcm/ManagedObject#insert (; 8 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/collector/itcm/ManagedObject#insert (; 6 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (set_local $2 (i32.load offset=4 @@ -218,7 +209,7 @@ (get_local $1) ) ) - (func $~lib/collector/itcm/gc.alloc (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/collector/itcm/gc.alloc (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.eqz @@ -264,7 +255,7 @@ (get_global $~lib/collector/itcm/ManagedObject.SIZE) ) ) - (func $start (; 10 ;) (type $v) + (func $start (; 8 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.and (i32.add diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index 7f78932e..834fea7b 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -1308,7 +1308,7 @@ (get_local $0) ) ) - (func $isNaN (; 12 ;) (type $Fi) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 12 ;) (type $Fi) (param $0 f64) (result i32) (f64.ne (get_local $0) (get_local $0) @@ -1346,7 +1346,7 @@ ) (block (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) (return @@ -1797,13 +1797,13 @@ (if (i32.eqz (tee_local $2 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) ) (set_local $2 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) ) @@ -2390,7 +2390,7 @@ ) (block (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) (return @@ -2943,7 +2943,7 @@ ) (block (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) (return diff --git a/tests/compiler/std/libm.untouched.wat b/tests/compiler/std/libm.untouched.wat index 642e3ab7..a601a0a4 100644 --- a/tests/compiler/std/libm.untouched.wat +++ b/tests/compiler/std/libm.untouched.wat @@ -21,7 +21,7 @@ (global $~lib/math/NativeMath.SQRT2 f64 (f64.const 1.4142135623730951)) (global $std/libm/SQRT2 f64 (f64.const 1.4142135623730951)) (global $NaN f64 (f64.const nan:0x8000000000000)) - (global $f64.EPSILON f64 (f64.const 2.220446049250313e-16)) + (global $~lib/builtins/f64.EPSILON f64 (f64.const 2.220446049250313e-16)) (global $HEAP_BASE i32 (i32.const 8)) (memory $0 0) (export "memory" (memory $0)) @@ -1503,7 +1503,7 @@ (get_local $0) ) ) - (func $isNaN (; 12 ;) (type $Fi) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 12 ;) (type $Fi) (param $0 f64) (result i32) (f64.ne (get_local $0) (get_local $0) @@ -1547,7 +1547,7 @@ ) (block (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) (return @@ -2045,12 +2045,12 @@ (if (if (result i32) (tee_local $2 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) (get_local $2) - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) ) @@ -2807,7 +2807,7 @@ ) (block (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) (return @@ -3394,7 +3394,7 @@ ) (block (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) (return diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 5fc7c4be..1e0dde64 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -1,7 +1,6 @@ (module (type $v (func)) (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $iv (func (param i32))) (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) @@ -27,15 +26,7 @@ (data (i32.const 112) "\n\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s") (export "memory" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 1 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 2 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -67,14 +58,14 @@ ) (i32.shl (tee_local $2 - (call $~lib/memory/memory.size) + (current_memory) ) (i32.const 16) ) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (select (get_local $2) (tee_local $3 @@ -102,7 +93,7 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $3) ) (i32.const 0) @@ -121,12 +112,12 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) - (func $~lib/internal/arraybuffer/computeSize (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $ii) (param $0 i32) (result i32) (i32.shl (i32.const 1) (i32.sub @@ -140,7 +131,7 @@ ) ) ) - (func $~lib/internal/arraybuffer/allocUnsafe (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocUnsafe (; 4 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (i32.gt_u @@ -169,7 +160,7 @@ ) (get_local $1) ) - (func $~lib/memory/memset (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) (if @@ -499,14 +490,14 @@ ) ) ) - (func $~lib/memory/memory.fill (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memset (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 9 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.gt_u @@ -546,7 +537,7 @@ ) (get_local $3) ) - (func $~lib/map/Map#clear (; 10 ;) (type $iv) (param $0 i32) + (func $~lib/map/Map#clear (; 8 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -580,7 +571,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#constructor (; 11 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 9 ;) (type $ii) (param $0 i32) (result i32) (if (i32.eqz (get_local $0) @@ -621,7 +612,7 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hash8 (; 12 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash8 (; 10 ;) (type $ii) (param $0 i32) (result i32) (i32.mul (i32.xor (get_local $0) @@ -630,7 +621,7 @@ (i32.const 16777619) ) ) - (func $~lib/map/Map#find (; 13 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 11 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (set_local $2 (i32.load offset=8 (i32.add @@ -696,7 +687,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#has (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -714,7 +705,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#rehash (; 15 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 13 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -877,7 +868,7 @@ ) ) ) - (func $~lib/map/Map#set (; 16 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 14 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1020,7 +1011,7 @@ ) ) ) - (func $~lib/map/Map#get (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (tee_local $0 (if (result i32) (tee_local $0 @@ -1045,12 +1036,12 @@ ) ) ) - (func $~lib/map/Map#get:size (; 18 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 16 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/map/Map#delete (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.eqz @@ -1151,7 +1142,7 @@ ) (i32.const 1) ) - (func $std/map/test (; 20 ;) (type $v) + (func $std/map/test (; 18 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $1 @@ -1637,7 +1628,7 @@ ) ) ) - (func $~lib/map/Map#has (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -1652,7 +1643,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#rehash (; 22 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 20 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1815,7 +1806,7 @@ ) ) ) - (func $~lib/map/Map#set (; 23 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 21 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1955,7 +1946,7 @@ ) ) ) - (func $~lib/map/Map#get (; 24 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (tee_local $0 (if (result i32) (tee_local $0 @@ -1977,7 +1968,7 @@ ) ) ) - (func $~lib/map/Map#delete (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.eqz @@ -2075,7 +2066,7 @@ ) (i32.const 1) ) - (func $std/map/test (; 26 ;) (type $v) + (func $std/map/test (; 24 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $1 @@ -2540,7 +2531,7 @@ ) ) ) - (func $~lib/internal/hash/hash16 (; 27 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash16 (; 25 ;) (type $ii) (param $0 i32) (result i32) (i32.mul (i32.xor (i32.mul @@ -2561,7 +2552,7 @@ (i32.const 16777619) ) ) - (func $~lib/map/Map#find (; 28 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 26 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (set_local $2 (i32.load offset=8 (i32.add @@ -2627,7 +2618,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#has (; 29 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 27 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -2645,7 +2636,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#rehash (; 30 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 28 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2808,7 +2799,7 @@ ) ) ) - (func $~lib/map/Map#set (; 31 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 29 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2951,7 +2942,7 @@ ) ) ) - (func $~lib/map/Map#get (; 32 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 30 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (tee_local $0 (if (result i32) (tee_local $0 @@ -2976,7 +2967,7 @@ ) ) ) - (func $~lib/map/Map#delete (; 33 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 31 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.eqz @@ -3077,7 +3068,7 @@ ) (i32.const 1) ) - (func $std/map/test (; 34 ;) (type $v) + (func $std/map/test (; 32 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $1 @@ -3563,7 +3554,7 @@ ) ) ) - (func $~lib/map/Map#has (; 35 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 33 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -3578,7 +3569,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#rehash (; 36 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 34 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3741,7 +3732,7 @@ ) ) ) - (func $~lib/map/Map#set (; 37 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 35 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3881,7 +3872,7 @@ ) ) ) - (func $~lib/map/Map#get (; 38 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 36 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (tee_local $0 (if (result i32) (tee_local $0 @@ -3903,7 +3894,7 @@ ) ) ) - (func $~lib/map/Map#delete (; 39 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 37 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.eqz @@ -4001,7 +3992,7 @@ ) (i32.const 1) ) - (func $std/map/test (; 40 ;) (type $v) + (func $std/map/test (; 38 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $1 @@ -4466,7 +4457,7 @@ ) ) ) - (func $~lib/internal/hash/hash32 (; 41 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash32 (; 39 ;) (type $ii) (param $0 i32) (result i32) (i32.mul (i32.xor (i32.mul @@ -4511,7 +4502,7 @@ (i32.const 16777619) ) ) - (func $~lib/map/Map#find (; 42 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 40 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (set_local $2 (i32.load offset=8 (i32.add @@ -4574,7 +4565,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#has (; 43 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 41 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -4586,7 +4577,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#rehash (; 44 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 42 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4749,7 +4740,7 @@ ) ) ) - (func $~lib/map/Map#set (; 45 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 43 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4886,7 +4877,7 @@ ) ) ) - (func $~lib/map/Map#get (; 46 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 44 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (tee_local $0 (if (result i32) (tee_local $0 @@ -4905,7 +4896,7 @@ ) ) ) - (func $~lib/map/Map#delete (; 47 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 45 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.eqz @@ -5000,7 +4991,7 @@ ) (i32.const 1) ) - (func $std/map/test (; 48 ;) (type $v) + (func $std/map/test (; 46 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $1 @@ -5444,7 +5435,7 @@ ) ) ) - (func $std/map/test (; 49 ;) (type $v) + (func $std/map/test (; 47 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $1 @@ -5888,7 +5879,7 @@ ) ) ) - (func $~lib/map/Map#clear (; 50 ;) (type $iv) (param $0 i32) + (func $~lib/map/Map#clear (; 48 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -5922,7 +5913,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#constructor (; 51 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 49 ;) (type $ii) (param $0 i32) (result i32) (if (i32.eqz (get_local $0) @@ -5963,7 +5954,7 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hash64 (; 52 ;) (type $Ii) (param $0 i64) (result i32) + (func $~lib/internal/hash/hash64 (; 50 ;) (type $Ii) (param $0 i64) (result i32) (local $1 i32) (i32.mul (i32.xor @@ -6062,7 +6053,7 @@ (i32.const 16777619) ) ) - (func $~lib/map/Map#find (; 53 ;) (type $iIii) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 51 ;) (type $iIii) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (set_local $2 (i32.load offset=8 (i32.add @@ -6125,7 +6116,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#has (; 54 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 52 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -6137,7 +6128,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#rehash (; 55 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 53 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6300,7 +6291,7 @@ ) ) ) - (func $~lib/map/Map#set (; 56 ;) (type $iIiv) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 54 ;) (type $iIiv) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -6437,7 +6428,7 @@ ) ) ) - (func $~lib/map/Map#get (; 57 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 55 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) (tee_local $0 (if (result i32) (tee_local $0 @@ -6456,7 +6447,7 @@ ) ) ) - (func $~lib/map/Map#delete (; 58 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 56 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (local $3 i32) (if @@ -6552,7 +6543,7 @@ ) (i32.const 1) ) - (func $std/map/test (; 59 ;) (type $v) + (func $std/map/test (; 57 ;) (type $v) (local $0 i64) (local $1 i32) (set_local $1 @@ -7010,7 +7001,7 @@ ) ) ) - (func $std/map/test (; 60 ;) (type $v) + (func $std/map/test (; 58 ;) (type $v) (local $0 i64) (local $1 i32) (set_local $1 @@ -7468,7 +7459,7 @@ ) ) ) - (func $~lib/map/Map#find (; 61 ;) (type $ifii) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 59 ;) (type $ifii) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (set_local $2 (i32.load offset=8 (i32.add @@ -7531,7 +7522,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#has (; 62 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 60 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -7545,7 +7536,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#rehash (; 63 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 61 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7710,7 +7701,7 @@ ) ) ) - (func $~lib/map/Map#set (; 64 ;) (type $ifiv) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/map/Map#set (; 62 ;) (type $ifiv) (param $0 i32) (param $1 f32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7849,7 +7840,7 @@ ) ) ) - (func $~lib/map/Map#get (; 65 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 63 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) (tee_local $0 (if (result i32) (tee_local $0 @@ -7870,7 +7861,7 @@ ) ) ) - (func $~lib/map/Map#delete (; 66 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#delete (; 64 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) (if @@ -7968,7 +7959,7 @@ ) (i32.const 1) ) - (func $std/map/test (; 67 ;) (type $v) + (func $std/map/test (; 65 ;) (type $v) (local $0 f32) (local $1 i32) (set_local $1 @@ -8434,7 +8425,7 @@ ) ) ) - (func $~lib/map/Map#find (; 68 ;) (type $iFii) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 66 ;) (type $iFii) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (set_local $2 (i32.load offset=8 (i32.add @@ -8497,7 +8488,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#has (; 69 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 67 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -8511,7 +8502,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#rehash (; 70 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 68 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8676,7 +8667,7 @@ ) ) ) - (func $~lib/map/Map#set (; 71 ;) (type $iFiv) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/map/Map#set (; 69 ;) (type $iFiv) (param $0 i32) (param $1 f64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8815,7 +8806,7 @@ ) ) ) - (func $~lib/map/Map#get (; 72 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 70 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) (tee_local $0 (if (result i32) (tee_local $0 @@ -8836,7 +8827,7 @@ ) ) ) - (func $~lib/map/Map#delete (; 73 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#delete (; 71 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) (if @@ -8934,7 +8925,7 @@ ) (i32.const 1) ) - (func $std/map/test (; 74 ;) (type $v) + (func $std/map/test (; 72 ;) (type $v) (local $0 f64) (local $1 i32) (set_local $1 @@ -9400,7 +9391,7 @@ ) ) ) - (func $start (; 75 ;) (type $v) + (func $start (; 73 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.const 136) ) diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index f796c90b..ed6f6fab 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -1,7 +1,6 @@ (module (type $v (func)) (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $iv (func (param i32))) (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) @@ -41,15 +40,7 @@ (data (i32.const 112) "\n\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") (export "memory" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 1 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 2 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -85,7 +76,7 @@ ) ) (set_local $3 - (call $~lib/memory/memory.size) + (current_memory) ) (if (i32.gt_u @@ -130,14 +121,14 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $5) ) (i32.const 0) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $4) ) (i32.const 0) @@ -157,14 +148,14 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) ) - (func $~lib/internal/arraybuffer/computeSize (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $ii) (param $0 i32) (result i32) (i32.shl (i32.const 1) (i32.sub @@ -181,7 +172,7 @@ ) ) ) - (func $~lib/internal/arraybuffer/allocUnsafe (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocUnsafe (; 4 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (i32.eqz @@ -213,7 +204,7 @@ ) (get_local $1) ) - (func $~lib/memory/memset (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) @@ -565,14 +556,14 @@ ) ) ) - (func $~lib/memory/memory.fill (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memset (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 9 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.gt_u @@ -612,7 +603,7 @@ ) (get_local $3) ) - (func $~lib/map/Map#clear (; 10 ;) (type $iv) (param $0 i32) + (func $~lib/map/Map#clear (; 8 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -649,7 +640,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#constructor (; 11 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 9 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/map/Map#clear (tee_local $0 @@ -695,7 +686,7 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hash8 (; 12 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash8 (; 10 ;) (type $ii) (param $0 i32) (result i32) (i32.mul (i32.xor (get_global $~lib/internal/hash/FNV_OFFSET) @@ -704,7 +695,7 @@ (get_global $~lib/internal/hash/FNV_PRIME) ) ) - (func $~lib/map/Map#find (; 13 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 11 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -780,7 +771,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#has (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -802,7 +793,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#rehash (; 15 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 13 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -999,7 +990,7 @@ ) ) ) - (func $~lib/map/Map#set (; 16 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 14 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1154,7 +1145,7 @@ ) ) ) - (func $~lib/map/Map#get (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (set_local $2 (call $~lib/map/Map#find @@ -1183,12 +1174,12 @@ (unreachable) ) ) - (func $~lib/map/Map#get:size (; 18 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 16 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/map/Map#delete (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1294,7 +1285,7 @@ ) (i32.const 1) ) - (func $std/map/test (; 20 ;) (type $v) + (func $std/map/test (; 18 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $0 @@ -1828,7 +1819,7 @@ ) ) ) - (func $~lib/map/Map#clear (; 21 ;) (type $iv) (param $0 i32) + (func $~lib/map/Map#clear (; 19 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -1865,7 +1856,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#constructor (; 22 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 20 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/map/Map#clear (tee_local $0 @@ -1911,7 +1902,7 @@ ) (get_local $0) ) - (func $~lib/map/Map#find (; 23 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 21 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -1984,7 +1975,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#has (; 24 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -2003,7 +1994,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#rehash (; 25 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 23 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2200,7 +2191,7 @@ ) ) ) - (func $~lib/map/Map#set (; 26 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 24 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2352,7 +2343,7 @@ ) ) ) - (func $~lib/map/Map#get (; 27 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (set_local $2 (call $~lib/map/Map#find @@ -2378,12 +2369,12 @@ (unreachable) ) ) - (func $~lib/map/Map#get:size (; 28 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 26 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/map/Map#delete (; 29 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 27 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2486,7 +2477,7 @@ ) (i32.const 1) ) - (func $std/map/test (; 30 ;) (type $v) + (func $std/map/test (; 28 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $0 @@ -2999,7 +2990,7 @@ ) ) ) - (func $~lib/map/Map#clear (; 31 ;) (type $iv) (param $0 i32) + (func $~lib/map/Map#clear (; 29 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -3036,7 +3027,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#constructor (; 32 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 30 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/map/Map#clear (tee_local $0 @@ -3082,7 +3073,7 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hash16 (; 33 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash16 (; 31 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (set_local $1 (get_global $~lib/internal/hash/FNV_OFFSET) @@ -3113,7 +3104,7 @@ ) (get_local $1) ) - (func $~lib/map/Map#find (; 34 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 32 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -3189,7 +3180,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#has (; 35 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 33 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -3211,7 +3202,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#rehash (; 36 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 34 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3408,7 +3399,7 @@ ) ) ) - (func $~lib/map/Map#set (; 37 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 35 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3563,7 +3554,7 @@ ) ) ) - (func $~lib/map/Map#get (; 38 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 36 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (set_local $2 (call $~lib/map/Map#find @@ -3592,12 +3583,12 @@ (unreachable) ) ) - (func $~lib/map/Map#get:size (; 39 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 37 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/map/Map#delete (; 40 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 38 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3703,7 +3694,7 @@ ) (i32.const 1) ) - (func $std/map/test (; 41 ;) (type $v) + (func $std/map/test (; 39 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $0 @@ -4237,7 +4228,7 @@ ) ) ) - (func $~lib/map/Map#clear (; 42 ;) (type $iv) (param $0 i32) + (func $~lib/map/Map#clear (; 40 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -4274,7 +4265,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#constructor (; 43 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 41 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/map/Map#clear (tee_local $0 @@ -4320,7 +4311,7 @@ ) (get_local $0) ) - (func $~lib/map/Map#find (; 44 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 42 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -4393,7 +4384,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#has (; 45 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 43 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -4412,7 +4403,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#rehash (; 46 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 44 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4609,7 +4600,7 @@ ) ) ) - (func $~lib/map/Map#set (; 47 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 45 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4761,7 +4752,7 @@ ) ) ) - (func $~lib/map/Map#get (; 48 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 46 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (set_local $2 (call $~lib/map/Map#find @@ -4787,12 +4778,12 @@ (unreachable) ) ) - (func $~lib/map/Map#get:size (; 49 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 47 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/map/Map#delete (; 50 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 48 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4895,7 +4886,7 @@ ) (i32.const 1) ) - (func $std/map/test (; 51 ;) (type $v) + (func $std/map/test (; 49 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $0 @@ -5408,7 +5399,7 @@ ) ) ) - (func $~lib/map/Map#clear (; 52 ;) (type $iv) (param $0 i32) + (func $~lib/map/Map#clear (; 50 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -5445,7 +5436,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#constructor (; 53 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 51 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/map/Map#clear (tee_local $0 @@ -5491,7 +5482,7 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hash32 (; 54 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash32 (; 52 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (set_local $1 (get_global $~lib/internal/hash/FNV_OFFSET) @@ -5552,7 +5543,7 @@ ) (get_local $1) ) - (func $~lib/map/Map#find (; 55 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 53 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -5622,7 +5613,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#has (; 56 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 54 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -5638,7 +5629,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#rehash (; 57 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 55 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5835,7 +5826,7 @@ ) ) ) - (func $~lib/map/Map#set (; 58 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 56 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -5984,7 +5975,7 @@ ) ) ) - (func $~lib/map/Map#get (; 59 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 57 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (set_local $2 (call $~lib/map/Map#find @@ -6007,12 +5998,12 @@ (unreachable) ) ) - (func $~lib/map/Map#get:size (; 60 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 58 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/map/Map#delete (; 61 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 59 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6112,7 +6103,7 @@ ) (i32.const 1) ) - (func $std/map/test (; 62 ;) (type $v) + (func $std/map/test (; 60 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $0 @@ -6604,7 +6595,7 @@ ) ) ) - (func $~lib/map/Map#clear (; 63 ;) (type $iv) (param $0 i32) + (func $~lib/map/Map#clear (; 61 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -6641,7 +6632,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#constructor (; 64 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 62 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/map/Map#clear (tee_local $0 @@ -6687,7 +6678,7 @@ ) (get_local $0) ) - (func $~lib/map/Map#find (; 65 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 63 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -6757,7 +6748,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#has (; 66 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 64 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -6773,7 +6764,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#rehash (; 67 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 65 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6970,7 +6961,7 @@ ) ) ) - (func $~lib/map/Map#set (; 68 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 66 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -7119,7 +7110,7 @@ ) ) ) - (func $~lib/map/Map#get (; 69 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 67 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (set_local $2 (call $~lib/map/Map#find @@ -7142,12 +7133,12 @@ (unreachable) ) ) - (func $~lib/map/Map#get:size (; 70 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 68 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/map/Map#delete (; 71 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#delete (; 69 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7247,7 +7238,7 @@ ) (i32.const 1) ) - (func $std/map/test (; 72 ;) (type $v) + (func $std/map/test (; 70 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $0 @@ -7739,7 +7730,7 @@ ) ) ) - (func $~lib/map/Map#clear (; 73 ;) (type $iv) (param $0 i32) + (func $~lib/map/Map#clear (; 71 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -7776,7 +7767,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#constructor (; 74 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 72 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/map/Map#clear (tee_local $0 @@ -7822,7 +7813,7 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hash64 (; 75 ;) (type $Ii) (param $0 i64) (result i32) + (func $~lib/internal/hash/hash64 (; 73 ;) (type $Ii) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -7952,7 +7943,7 @@ ) (get_local $3) ) - (func $~lib/map/Map#find (; 76 ;) (type $iIii) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 74 ;) (type $iIii) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -8022,7 +8013,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#has (; 77 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 75 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -8038,7 +8029,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#rehash (; 78 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 76 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8236,7 +8227,7 @@ ) ) ) - (func $~lib/map/Map#set (; 79 ;) (type $iIiv) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 77 ;) (type $iIiv) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -8385,7 +8376,7 @@ ) ) ) - (func $~lib/map/Map#get (; 80 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 78 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (set_local $2 (call $~lib/map/Map#find @@ -8408,12 +8399,12 @@ (unreachable) ) ) - (func $~lib/map/Map#get:size (; 81 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 79 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/map/Map#delete (; 82 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 80 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8513,7 +8504,7 @@ ) (i32.const 1) ) - (func $std/map/test (; 83 ;) (type $v) + (func $std/map/test (; 81 ;) (type $v) (local $0 i32) (local $1 i64) (set_local $0 @@ -9019,7 +9010,7 @@ ) ) ) - (func $~lib/map/Map#clear (; 84 ;) (type $iv) (param $0 i32) + (func $~lib/map/Map#clear (; 82 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -9056,7 +9047,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#constructor (; 85 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 83 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/map/Map#clear (tee_local $0 @@ -9102,7 +9093,7 @@ ) (get_local $0) ) - (func $~lib/map/Map#find (; 86 ;) (type $iIii) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 84 ;) (type $iIii) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -9172,7 +9163,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#has (; 87 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#has (; 85 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -9188,7 +9179,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#rehash (; 88 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 86 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9386,7 +9377,7 @@ ) ) ) - (func $~lib/map/Map#set (; 89 ;) (type $iIiv) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/map/Map#set (; 87 ;) (type $iIiv) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -9535,7 +9526,7 @@ ) ) ) - (func $~lib/map/Map#get (; 90 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#get (; 88 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (set_local $2 (call $~lib/map/Map#find @@ -9558,12 +9549,12 @@ (unreachable) ) ) - (func $~lib/map/Map#get:size (; 91 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 89 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/map/Map#delete (; 92 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/map/Map#delete (; 90 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9663,7 +9654,7 @@ ) (i32.const 1) ) - (func $std/map/test (; 93 ;) (type $v) + (func $std/map/test (; 91 ;) (type $v) (local $0 i32) (local $1 i64) (set_local $0 @@ -10169,7 +10160,7 @@ ) ) ) - (func $~lib/map/Map#clear (; 94 ;) (type $iv) (param $0 i32) + (func $~lib/map/Map#clear (; 92 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -10206,7 +10197,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#constructor (; 95 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 93 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/map/Map#clear (tee_local $0 @@ -10252,7 +10243,7 @@ ) (get_local $0) ) - (func $~lib/map/Map#find (; 96 ;) (type $ifii) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 94 ;) (type $ifii) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -10322,7 +10313,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#has (; 97 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#has (; 95 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -10340,7 +10331,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#rehash (; 98 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 96 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10540,7 +10531,7 @@ ) ) ) - (func $~lib/map/Map#set (; 99 ;) (type $ifiv) (param $0 i32) (param $1 f32) (param $2 i32) + (func $~lib/map/Map#set (; 97 ;) (type $ifiv) (param $0 i32) (param $1 f32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -10691,7 +10682,7 @@ ) ) ) - (func $~lib/map/Map#get (; 100 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#get (; 98 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) (set_local $2 (call $~lib/map/Map#find @@ -10716,12 +10707,12 @@ (unreachable) ) ) - (func $~lib/map/Map#get:size (; 101 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 99 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/map/Map#delete (; 102 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/map/Map#delete (; 100 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10823,7 +10814,7 @@ ) (i32.const 1) ) - (func $std/map/test (; 103 ;) (type $v) + (func $std/map/test (; 101 ;) (type $v) (local $0 i32) (local $1 f32) (set_local $0 @@ -11329,7 +11320,7 @@ ) ) ) - (func $~lib/map/Map#clear (; 104 ;) (type $iv) (param $0 i32) + (func $~lib/map/Map#clear (; 102 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -11366,7 +11357,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#constructor (; 105 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 103 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/map/Map#clear (tee_local $0 @@ -11412,7 +11403,7 @@ ) (get_local $0) ) - (func $~lib/map/Map#find (; 106 ;) (type $iFii) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 104 ;) (type $iFii) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -11482,7 +11473,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#has (; 107 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#has (; 105 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -11500,7 +11491,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#rehash (; 108 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 106 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11700,7 +11691,7 @@ ) ) ) - (func $~lib/map/Map#set (; 109 ;) (type $iFiv) (param $0 i32) (param $1 f64) (param $2 i32) + (func $~lib/map/Map#set (; 107 ;) (type $iFiv) (param $0 i32) (param $1 f64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -11851,7 +11842,7 @@ ) ) ) - (func $~lib/map/Map#get (; 110 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#get (; 108 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (set_local $2 (call $~lib/map/Map#find @@ -11876,12 +11867,12 @@ (unreachable) ) ) - (func $~lib/map/Map#get:size (; 111 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#get:size (; 109 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/map/Map#delete (; 112 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/map/Map#delete (; 110 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -11983,7 +11974,7 @@ ) (i32.const 1) ) - (func $std/map/test (; 113 ;) (type $v) + (func $std/map/test (; 111 ;) (type $v) (local $0 i32) (local $1 f64) (set_local $0 @@ -12489,7 +12480,7 @@ ) ) ) - (func $start (; 114 ;) (type $v) + (func $start (; 112 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.and (i32.add diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 871b0d1e..8b54e6b6 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -66,7 +66,7 @@ (data (i32.const 36) "\0c\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") (export "memory" (memory $0)) (start $start) - (func $isNaN (; 30 ;) (type $Fi) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 30 ;) (type $Fi) (param $0 f64) (result i32) (f64.ne (get_local $0) (get_local $0) @@ -82,7 +82,7 @@ ) ) ) - (func $isFinite (; 32 ;) (type $Fi) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 32 ;) (type $Fi) (param $0 f64) (result i32) (f64.eq (f64.sub (get_local $0) @@ -239,12 +239,12 @@ (local $3 i32) (if (tee_local $3 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) ) (set_local $3 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) @@ -281,7 +281,7 @@ ) (if (i32.eqz - (call $isFinite + (call $~lib/builtins/isFinite (get_local $0) ) ) @@ -327,11 +327,11 @@ ) ) (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) (return - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) ) @@ -353,7 +353,7 @@ ) (i32.const 1) ) - (func $isNaN (; 37 ;) (type $fi) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 37 ;) (type $fi) (param $0 f32) (result i32) (f32.ne (get_local $0) (get_local $0) @@ -367,7 +367,7 @@ (i32.const 31) ) ) - (func $isFinite (; 39 ;) (type $fi) (param $0 f32) (result i32) + (func $~lib/builtins/isFinite (; 39 ;) (type $fi) (param $0 f32) (result i32) (f32.eq (f32.sub (get_local $0) @@ -520,12 +520,12 @@ (local $3 i32) (if (tee_local $3 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) ) (set_local $3 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) @@ -562,7 +562,7 @@ ) (if (i32.eqz - (call $isFinite + (call $~lib/builtins/isFinite (get_local $0) ) ) @@ -608,11 +608,11 @@ ) ) (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) (return - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) ) @@ -3094,7 +3094,7 @@ ) (block (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) (return @@ -3480,7 +3480,7 @@ ) (block (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) (return @@ -4021,13 +4021,13 @@ (if (i32.eqz (tee_local $2 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) ) (set_local $2 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) ) @@ -4399,13 +4399,13 @@ (if (i32.eqz (tee_local $2 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) ) (set_local $2 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) ) @@ -5154,7 +5154,7 @@ ) (block (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) (return @@ -5593,7 +5593,7 @@ ) (block (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) (return @@ -8598,7 +8598,7 @@ ) ) (set_local $7 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) @@ -8994,7 +8994,7 @@ ) ) (set_local $3 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) @@ -12502,7 +12502,7 @@ ) ) (set_local $5 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) @@ -12971,7 +12971,7 @@ ) ) (set_local $2 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index 4ae21b42..9f264d16 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -83,15 +83,15 @@ (global $~lib/math/random_seeded (mut i32) (i32.const 0)) (global $~lib/math/random_state0 (mut i64) (i64.const 0)) (global $~lib/math/random_state1 (mut i64) (i64.const 0)) - (global $f64.EPSILON f64 (f64.const 2.220446049250313e-16)) - (global $f32.EPSILON f32 (f32.const 1.1920928955078125e-07)) + (global $~lib/builtins/f64.EPSILON f64 (f64.const 2.220446049250313e-16)) + (global $~lib/builtins/f32.EPSILON f32 (f32.const 1.1920928955078125e-07)) (global $HEAP_BASE i32 (i32.const 64)) (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 36) "\0c\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") (export "memory" (memory $0)) (start $start) - (func $isNaN (; 30 ;) (type $Fi) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 30 ;) (type $Fi) (param $0 f64) (result i32) (f64.ne (get_local $0) (get_local $0) @@ -107,7 +107,7 @@ ) ) ) - (func $isFinite (; 32 ;) (type $Fi) (param $0 f64) (result i32) + (func $~lib/builtins/isFinite (; 32 ;) (type $Fi) (param $0 f64) (result i32) (f64.eq (f64.sub (get_local $0) @@ -277,11 +277,11 @@ (if (if (result i32) (tee_local $3 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) ) - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) (get_local $3) @@ -316,7 +316,7 @@ ) (if (i32.eqz - (call $isFinite + (call $~lib/builtins/isFinite (get_local $0) ) ) @@ -363,11 +363,11 @@ ) ) (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) (return - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) ) @@ -392,7 +392,7 @@ ) (i32.const 1) ) - (func $isNaN (; 37 ;) (type $fi) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 37 ;) (type $fi) (param $0 f32) (result i32) (f32.ne (get_local $0) (get_local $0) @@ -406,7 +406,7 @@ (i32.const 31) ) ) - (func $isFinite (; 39 ;) (type $fi) (param $0 f32) (result i32) + (func $~lib/builtins/isFinite (; 39 ;) (type $fi) (param $0 f32) (result i32) (f32.eq (f32.sub (get_local $0) @@ -572,11 +572,11 @@ (if (if (result i32) (tee_local $3 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) ) - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) (get_local $3) @@ -611,7 +611,7 @@ ) (if (i32.eqz - (call $isFinite + (call $~lib/builtins/isFinite (get_local $0) ) ) @@ -658,11 +658,11 @@ ) ) (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) (return - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) ) @@ -3528,7 +3528,7 @@ ) (block (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) (return @@ -3961,7 +3961,7 @@ ) (block (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) (return @@ -4564,12 +4564,12 @@ (if (if (result i32) (tee_local $2 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) (get_local $2) - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) ) @@ -5065,12 +5065,12 @@ (if (if (result i32) (tee_local $2 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) (get_local $2) - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) ) @@ -6022,7 +6022,7 @@ ) (block (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) (return @@ -6491,7 +6491,7 @@ ) (block (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) (return @@ -9950,7 +9950,7 @@ ) ) (get_local $7) - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) @@ -10418,7 +10418,7 @@ ) ) (get_local $7) - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) @@ -14354,7 +14354,7 @@ ) ) (get_local $8) - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) @@ -14910,7 +14910,7 @@ ) ) (get_local $10) - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) diff --git a/tests/compiler/std/mod.optimized.wat b/tests/compiler/std/mod.optimized.wat index 77e4030a..6fa903ca 100644 --- a/tests/compiler/std/mod.optimized.wat +++ b/tests/compiler/std/mod.optimized.wat @@ -15,7 +15,7 @@ (data (i32.const 8) "\n\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s") (export "memory" (memory $0)) (start $start) - (func $isNaN (; 2 ;) (type $Fi) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 2 ;) (type $Fi) (param $0 f64) (result i32) (f64.ne (get_local $0) (get_local $0) @@ -81,7 +81,7 @@ ) ) (set_local $7 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) @@ -397,11 +397,11 @@ ) (func $std/mod/check (; 4 ;) (type $FFi) (param $0 f64) (param $1 f64) (result i32) (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) (return - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) ) @@ -455,7 +455,7 @@ ) (get_local $3) ) - (func $isNaN (; 6 ;) (type $fi) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 6 ;) (type $fi) (param $0 f32) (result i32) (f32.ne (get_local $0) (get_local $0) @@ -513,7 +513,7 @@ ) ) (set_local $3 - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) @@ -804,11 +804,11 @@ ) (func $std/mod/check (; 8 ;) (type $ffi) (param $0 f32) (param $1 f32) (result i32) (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) (return - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) ) diff --git a/tests/compiler/std/mod.untouched.wat b/tests/compiler/std/mod.untouched.wat index 87809bbd..5180e1bd 100644 --- a/tests/compiler/std/mod.untouched.wat +++ b/tests/compiler/std/mod.untouched.wat @@ -19,7 +19,7 @@ (data (i32.const 8) "\n\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s\00") (export "memory" (memory $0)) (start $start) - (func $isNaN (; 2 ;) (type $Fi) (param $0 f64) (result i32) + (func $~lib/builtins/isNaN (; 2 ;) (type $Fi) (param $0 f64) (result i32) (f64.ne (get_local $0) (get_local $0) @@ -87,7 +87,7 @@ ) ) (get_local $7) - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) @@ -467,11 +467,11 @@ ) (func $std/mod/check (; 4 ;) (type $FFi) (param $0 f64) (param $1 f64) (result i32) (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) (return - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) ) @@ -531,7 +531,7 @@ (get_local $3) ) ) - (func $isNaN (; 6 ;) (type $fi) (param $0 f32) (result i32) + (func $~lib/builtins/isNaN (; 6 ;) (type $fi) (param $0 f32) (result i32) (f32.ne (get_local $0) (get_local $0) @@ -593,7 +593,7 @@ ) ) (get_local $7) - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) ) @@ -960,11 +960,11 @@ ) (func $std/mod/check (; 8 ;) (type $ffi) (param $0 f32) (param $1 f32) (result i32) (if - (call $isNaN + (call $~lib/builtins/isNaN (get_local $1) ) (return - (call $isNaN + (call $~lib/builtins/isNaN (get_local $0) ) ) diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 31c74d1a..748c7cce 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -1,7 +1,6 @@ (module (type $ifi (func (param i32 f32) (result i32))) (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $v (func)) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) @@ -9,15 +8,7 @@ (memory $0 0) (export "memory" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 0 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 1 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -49,14 +40,14 @@ ) (i32.shl (tee_local $2 - (call $~lib/memory/memory.size) + (current_memory) ) (i32.const 16) ) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (select (get_local $2) (tee_local $3 @@ -84,7 +75,7 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $3) ) (i32.const 0) @@ -103,12 +94,12 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) - (func $std/new/AClass#constructor (; 4 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) + (func $std/new/AClass#constructor (; 2 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) (if (i32.eqz @@ -146,7 +137,7 @@ ) (get_local $0) ) - (func $start (; 5 ;) (type $v) + (func $start (; 3 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.const 8) ) diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index e1a6b882..5ea02d13 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -1,7 +1,6 @@ (module (type $ifi (func (param i32 f32) (result i32))) (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $v (func)) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) @@ -14,15 +13,7 @@ (memory $0 0) (export "memory" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 0 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 1 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -58,7 +49,7 @@ ) ) (set_local $3 - (call $~lib/memory/memory.size) + (current_memory) ) (if (i32.gt_u @@ -103,14 +94,14 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $5) ) (i32.const 0) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $4) ) (i32.const 0) @@ -130,14 +121,14 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) ) - (func $std/new/AClass#constructor (; 4 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) + (func $std/new/AClass#constructor (; 2 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) (i32.store (get_local $0) @@ -177,7 +168,7 @@ ) (get_local $0) ) - (func $start (; 5 ;) (type $v) + (func $start (; 3 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.and (i32.add diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 77d19125..fef8a1bb 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -1,7 +1,6 @@ (module (type $iiii (func (param i32 i32 i32) (result i32))) (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $iii (func (param i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $FFF (func (param f64 f64) (result f64))) @@ -79,15 +78,7 @@ (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") (export "memory" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 1 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 2 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -119,14 +110,14 @@ ) (i32.shl (tee_local $2 - (call $~lib/memory/memory.size) + (current_memory) ) (i32.const 16) ) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (select (get_local $2) (tee_local $3 @@ -154,7 +145,7 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $3) ) (i32.const 0) @@ -173,12 +164,12 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) - (func $std/operator-overloading/Tester#constructor (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/operator-overloading/Tester#constructor (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (if (i32.eqz (get_local $0) @@ -200,7 +191,7 @@ ) (get_local $0) ) - (func $std/operator-overloading/Tester.add (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.add (; 4 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.add @@ -221,7 +212,7 @@ ) ) ) - (func $std/operator-overloading/Tester.sub (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.sub (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.sub @@ -242,7 +233,7 @@ ) ) ) - (func $std/operator-overloading/Tester.mul (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.mul (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.mul @@ -263,7 +254,7 @@ ) ) ) - (func $std/operator-overloading/Tester.div (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.div (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.div_s @@ -284,7 +275,7 @@ ) ) ) - (func $std/operator-overloading/Tester.mod (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.mod (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.rem_s @@ -305,7 +296,7 @@ ) ) ) - (func $~lib/math/NativeMath.scalbn (; 11 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 9 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64) (local $2 f64) (set_local $2 (get_local $0) @@ -419,7 +410,7 @@ ) ) ) - (func $~lib/math/NativeMath.pow (; 12 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 10 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (local $2 f64) (local $3 f64) (local $4 i32) @@ -1846,7 +1837,7 @@ (f64.const 1.e+300) ) ) - (func $std/operator-overloading/Tester.pow (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.pow (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.trunc_s/f64 @@ -1879,7 +1870,7 @@ ) ) ) - (func $std/operator-overloading/Tester.and (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.and (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.and @@ -1900,7 +1891,7 @@ ) ) ) - (func $std/operator-overloading/Tester.or (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.or (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.or @@ -1921,7 +1912,7 @@ ) ) ) - (func $std/operator-overloading/Tester.xor (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.xor (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.xor @@ -1942,7 +1933,7 @@ ) ) ) - (func $std/operator-overloading/Tester.equals (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.equals (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (tee_local $2 @@ -1968,7 +1959,7 @@ ) (get_local $2) ) - (func $std/operator-overloading/Tester.notEquals (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.notEquals (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (tee_local $2 @@ -1994,7 +1985,7 @@ ) (get_local $2) ) - (func $std/operator-overloading/Tester.greater (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.greater (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (tee_local $2 @@ -2020,7 +2011,7 @@ ) (get_local $2) ) - (func $std/operator-overloading/Tester.greaterEquals (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.greaterEquals (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (tee_local $2 @@ -2046,7 +2037,7 @@ ) (get_local $2) ) - (func $std/operator-overloading/Tester.less (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.less (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (tee_local $2 @@ -2072,7 +2063,7 @@ ) (get_local $2) ) - (func $std/operator-overloading/Tester.lessEquals (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.lessEquals (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (tee_local $2 @@ -2098,7 +2089,7 @@ ) (get_local $2) ) - (func $std/operator-overloading/Tester.shr (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shr (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.shr_s @@ -2115,7 +2106,7 @@ ) ) ) - (func $std/operator-overloading/Tester.shu (; 24 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shu (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.shr_u @@ -2132,7 +2123,7 @@ ) ) ) - (func $std/operator-overloading/Tester.shl (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shl (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.shl @@ -2149,7 +2140,7 @@ ) ) ) - (func $std/operator-overloading/Tester.pos (; 26 ;) (type $ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.pos (; 24 ;) (type $ii) (param $0 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.load @@ -2160,7 +2151,7 @@ ) ) ) - (func $std/operator-overloading/Tester.neg (; 27 ;) (type $ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.neg (; 25 ;) (type $ii) (param $0 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.sub @@ -2177,7 +2168,7 @@ ) ) ) - (func $std/operator-overloading/Tester.not (; 28 ;) (type $ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.not (; 26 ;) (type $ii) (param $0 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.xor @@ -2194,7 +2185,7 @@ ) ) ) - (func $std/operator-overloading/Tester.excl (; 29 ;) (type $ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.excl (; 27 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (tee_local $1 @@ -2214,7 +2205,7 @@ ) (get_local $1) ) - (func $std/operator-overloading/Tester#inc (; 30 ;) (type $ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#inc (; 28 ;) (type $ii) (param $0 i32) (result i32) (i32.store (get_local $0) (i32.add @@ -2235,7 +2226,7 @@ ) (get_local $0) ) - (func $std/operator-overloading/Tester#dec (; 31 ;) (type $ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#dec (; 29 ;) (type $ii) (param $0 i32) (result i32) (i32.store (get_local $0) (i32.sub @@ -2256,7 +2247,7 @@ ) (get_local $0) ) - (func $start (; 32 ;) (type $v) + (func $start (; 30 ;) (type $v) (local $0 i32) (local $1 i32) (set_global $~lib/allocator/arena/startOffset diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 727d2cc5..0a5e2551 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -1,7 +1,6 @@ (module (type $iiii (func (param i32 i32 i32) (result i32))) (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $iii (func (param i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $FFF (func (param f64 f64) (result f64))) @@ -48,7 +47,7 @@ (global $std/operator-overloading/eq3 (mut i32) (i32.const 0)) (global $std/operator-overloading/eq4 (mut i32) (i32.const 0)) (global $std/operator-overloading/eqf (mut i32) (i32.const 0)) - (global $i32.MAX_VALUE i32 (i32.const 2147483647)) + (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) (global $std/operator-overloading/gt1 (mut i32) (i32.const 0)) (global $std/operator-overloading/gt2 (mut i32) (i32.const 0)) (global $std/operator-overloading/gt (mut i32) (i32.const 0)) @@ -86,15 +85,7 @@ (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") (export "memory" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 1 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 2 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -130,7 +121,7 @@ ) ) (set_local $3 - (call $~lib/memory/memory.size) + (current_memory) ) (if (i32.gt_u @@ -175,14 +166,14 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $5) ) (i32.const 0) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $4) ) (i32.const 0) @@ -202,14 +193,14 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) ) - (func $std/operator-overloading/Tester#constructor (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/operator-overloading/Tester#constructor (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (tee_local $0 (if (result i32) @@ -236,7 +227,7 @@ ) ) ) - (func $std/operator-overloading/Tester.add (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.add (; 4 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.add @@ -257,7 +248,7 @@ ) ) ) - (func $std/operator-overloading/Tester.sub (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.sub (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.sub @@ -278,7 +269,7 @@ ) ) ) - (func $std/operator-overloading/Tester.mul (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.mul (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.mul @@ -299,7 +290,7 @@ ) ) ) - (func $std/operator-overloading/Tester.div (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.div (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.div_s @@ -320,7 +311,7 @@ ) ) ) - (func $std/operator-overloading/Tester.mod (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.mod (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.rem_s @@ -341,7 +332,7 @@ ) ) ) - (func $~lib/math/NativeMath.scalbn (; 11 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64) + (func $~lib/math/NativeMath.scalbn (; 9 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64) (local $2 f64) (set_local $2 (get_local $0) @@ -459,7 +450,7 @@ ) ) ) - (func $~lib/math/NativeMath.pow (; 12 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) + (func $~lib/math/NativeMath.pow (; 10 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) (local $3 i32) (local $4 i32) @@ -2017,7 +2008,7 @@ (get_local $13) ) ) - (func $std/operator-overloading/Tester.pow (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.pow (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.trunc_s/f64 @@ -2050,7 +2041,7 @@ ) ) ) - (func $std/operator-overloading/Tester.and (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.and (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.and @@ -2071,7 +2062,7 @@ ) ) ) - (func $std/operator-overloading/Tester.or (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.or (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.or @@ -2092,7 +2083,7 @@ ) ) ) - (func $std/operator-overloading/Tester.xor (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.xor (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.xor @@ -2113,7 +2104,7 @@ ) ) ) - (func $std/operator-overloading/Tester.equals (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.equals (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (result i32) (tee_local $2 @@ -2137,7 +2128,7 @@ (get_local $2) ) ) - (func $std/operator-overloading/Tester.notEquals (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.notEquals (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (result i32) (tee_local $2 @@ -2161,7 +2152,7 @@ (get_local $2) ) ) - (func $std/operator-overloading/Tester.greater (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.greater (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (result i32) (tee_local $2 @@ -2185,7 +2176,7 @@ (get_local $2) ) ) - (func $std/operator-overloading/Tester.greaterEquals (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.greaterEquals (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (result i32) (tee_local $2 @@ -2209,7 +2200,7 @@ (get_local $2) ) ) - (func $std/operator-overloading/Tester.less (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.less (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (result i32) (tee_local $2 @@ -2233,7 +2224,7 @@ (get_local $2) ) ) - (func $std/operator-overloading/Tester.lessEquals (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.lessEquals (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (result i32) (tee_local $2 @@ -2257,7 +2248,7 @@ (get_local $2) ) ) - (func $std/operator-overloading/Tester.shr (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shr (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.shr_s @@ -2274,7 +2265,7 @@ ) ) ) - (func $std/operator-overloading/Tester.shu (; 24 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shu (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.shr_u @@ -2291,7 +2282,7 @@ ) ) ) - (func $std/operator-overloading/Tester.shl (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $std/operator-overloading/Tester.shl (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.shl @@ -2308,7 +2299,7 @@ ) ) ) - (func $std/operator-overloading/Tester.pos (; 26 ;) (type $ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.pos (; 24 ;) (type $ii) (param $0 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.load @@ -2319,7 +2310,7 @@ ) ) ) - (func $std/operator-overloading/Tester.neg (; 27 ;) (type $ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.neg (; 25 ;) (type $ii) (param $0 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.sub @@ -2336,7 +2327,7 @@ ) ) ) - (func $std/operator-overloading/Tester.not (; 28 ;) (type $ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.not (; 26 ;) (type $ii) (param $0 i32) (result i32) (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.xor @@ -2353,7 +2344,7 @@ ) ) ) - (func $std/operator-overloading/Tester.excl (; 29 ;) (type $ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester.excl (; 27 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (result i32) (tee_local $1 @@ -2371,7 +2362,7 @@ (get_local $1) ) ) - (func $std/operator-overloading/Tester#inc (; 30 ;) (type $ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#inc (; 28 ;) (type $ii) (param $0 i32) (result i32) (i32.store (get_local $0) (i32.add @@ -2392,7 +2383,7 @@ ) (get_local $0) ) - (func $std/operator-overloading/Tester#dec (; 31 ;) (type $ii) (param $0 i32) (result i32) + (func $std/operator-overloading/Tester#dec (; 29 ;) (type $ii) (param $0 i32) (result i32) (i32.store (get_local $0) (i32.sub @@ -2413,7 +2404,7 @@ ) (get_local $0) ) - (func $std/operator-overloading/TesterInlineStatic#constructor (; 32 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/operator-overloading/TesterInlineStatic#constructor (; 30 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (tee_local $0 (if (result i32) @@ -2440,7 +2431,7 @@ ) ) ) - (func $std/operator-overloading/TesterInlineInstance#constructor (; 33 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/operator-overloading/TesterInlineInstance#constructor (; 31 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (tee_local $0 (if (result i32) @@ -2467,7 +2458,7 @@ ) ) ) - (func $start (; 34 ;) (type $v) + (func $start (; 32 ;) (type $v) (local $0 i32) (local $1 i32) (set_global $~lib/allocator/arena/startOffset @@ -3059,7 +3050,7 @@ (call $std/operator-overloading/Tester#constructor (i32.const 0) (i32.const 2) - (get_global $i32.MAX_VALUE) + (get_global $~lib/builtins/i32.MAX_VALUE) ) ) (set_global $std/operator-overloading/gt2 diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index eb2ede40..8516d51a 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -1,7 +1,6 @@ (module (type $v (func)) (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $iv (func (param i32))) (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) @@ -29,15 +28,7 @@ (data (i32.const 112) "\n\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s") (export "memory" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 1 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 2 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -69,14 +60,14 @@ ) (i32.shl (tee_local $2 - (call $~lib/memory/memory.size) + (current_memory) ) (i32.const 16) ) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (select (get_local $2) (tee_local $3 @@ -104,7 +95,7 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $3) ) (i32.const 0) @@ -123,12 +114,12 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) - (func $~lib/internal/arraybuffer/computeSize (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $ii) (param $0 i32) (result i32) (i32.shl (i32.const 1) (i32.sub @@ -142,7 +133,7 @@ ) ) ) - (func $~lib/internal/arraybuffer/allocUnsafe (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocUnsafe (; 4 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (i32.gt_u @@ -171,7 +162,7 @@ ) (get_local $1) ) - (func $~lib/memory/memset (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) (if @@ -501,14 +492,14 @@ ) ) ) - (func $~lib/memory/memory.fill (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memset (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 9 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.gt_u @@ -548,7 +539,7 @@ ) (get_local $3) ) - (func $~lib/set/Set#clear (; 10 ;) (type $iv) (param $0 i32) + (func $~lib/set/Set#clear (; 8 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -582,7 +573,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#constructor (; 11 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 9 ;) (type $ii) (param $0 i32) (result i32) (if (i32.eqz (get_local $0) @@ -623,7 +614,7 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hash8 (; 12 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash8 (; 10 ;) (type $ii) (param $0 i32) (result i32) (i32.mul (i32.xor (get_local $0) @@ -632,7 +623,7 @@ (i32.const 16777619) ) ) - (func $~lib/internal/hash/hash (; 13 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash (; 11 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/internal/hash/hash8 (i32.shr_s (i32.shl @@ -643,7 +634,7 @@ ) ) ) - (func $~lib/set/Set#find (; 14 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 12 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (set_local $2 (i32.load offset=8 (i32.add @@ -709,7 +700,7 @@ ) (i32.const 0) ) - (func $~lib/set/Set#has (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/set/Set#find (get_local $0) @@ -721,7 +712,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#rehash (; 16 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 14 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -878,7 +869,7 @@ ) ) ) - (func $~lib/set/Set#add (; 17 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 15 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1007,12 +998,12 @@ ) ) ) - (func $~lib/set/Set#get:size (; 18 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 16 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/set/Set#delete (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.eqz @@ -1113,7 +1104,7 @@ ) (i32.const 1) ) - (func $std/set/test (; 20 ;) (type $v) + (func $std/set/test (; 18 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $1 @@ -1457,7 +1448,7 @@ ) ) ) - (func $~lib/internal/hash/hash (; 21 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash (; 19 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/internal/hash/hash8 (i32.and (get_local $0) @@ -1465,7 +1456,7 @@ ) ) ) - (func $~lib/set/Set#has (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/set/Set#find (get_local $0) @@ -1477,7 +1468,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#rehash (; 23 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 21 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1634,7 +1625,7 @@ ) ) ) - (func $~lib/set/Set#add (; 24 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 22 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1763,7 +1754,7 @@ ) ) ) - (func $~lib/set/Set#delete (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.eqz @@ -1861,7 +1852,7 @@ ) (i32.const 1) ) - (func $std/set/test (; 26 ;) (type $v) + (func $std/set/test (; 24 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $1 @@ -2205,7 +2196,7 @@ ) ) ) - (func $~lib/internal/hash/hash16 (; 27 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash16 (; 25 ;) (type $ii) (param $0 i32) (result i32) (i32.mul (i32.xor (i32.mul @@ -2226,7 +2217,7 @@ (i32.const 16777619) ) ) - (func $~lib/internal/hash/hash (; 28 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash (; 26 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/internal/hash/hash16 (i32.shr_s (i32.shl @@ -2237,7 +2228,7 @@ ) ) ) - (func $~lib/set/Set#find (; 29 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 27 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (set_local $2 (i32.load offset=8 (i32.add @@ -2303,7 +2294,7 @@ ) (i32.const 0) ) - (func $~lib/set/Set#has (; 30 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 28 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/set/Set#find (get_local $0) @@ -2315,7 +2306,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#rehash (; 31 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 29 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2472,7 +2463,7 @@ ) ) ) - (func $~lib/set/Set#add (; 32 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 30 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2601,7 +2592,7 @@ ) ) ) - (func $~lib/set/Set#delete (; 33 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 31 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.eqz @@ -2702,7 +2693,7 @@ ) (i32.const 1) ) - (func $std/set/test (; 34 ;) (type $v) + (func $std/set/test (; 32 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $1 @@ -3046,7 +3037,7 @@ ) ) ) - (func $~lib/internal/hash/hash (; 35 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash (; 33 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/internal/hash/hash16 (i32.and (get_local $0) @@ -3054,7 +3045,7 @@ ) ) ) - (func $~lib/set/Set#has (; 36 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 34 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/set/Set#find (get_local $0) @@ -3066,7 +3057,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#rehash (; 37 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 35 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3223,7 +3214,7 @@ ) ) ) - (func $~lib/set/Set#add (; 38 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 36 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3352,7 +3343,7 @@ ) ) ) - (func $~lib/set/Set#delete (; 39 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 37 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.eqz @@ -3450,7 +3441,7 @@ ) (i32.const 1) ) - (func $std/set/test (; 40 ;) (type $v) + (func $std/set/test (; 38 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $1 @@ -3794,7 +3785,7 @@ ) ) ) - (func $~lib/internal/hash/hash32 (; 41 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash32 (; 39 ;) (type $ii) (param $0 i32) (result i32) (i32.mul (i32.xor (i32.mul @@ -3839,12 +3830,12 @@ (i32.const 16777619) ) ) - (func $~lib/internal/hash/hash (; 42 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash (; 40 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/internal/hash/hash32 (get_local $0) ) ) - (func $~lib/set/Set#find (; 43 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 41 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (set_local $2 (i32.load offset=8 (i32.add @@ -3907,7 +3898,7 @@ ) (i32.const 0) ) - (func $~lib/set/Set#has (; 44 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 42 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/set/Set#find (get_local $0) @@ -3919,7 +3910,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#rehash (; 45 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 43 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4076,7 +4067,7 @@ ) ) ) - (func $~lib/set/Set#add (; 46 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 44 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4205,7 +4196,7 @@ ) ) ) - (func $~lib/set/Set#delete (; 47 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 45 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.eqz @@ -4300,7 +4291,7 @@ ) (i32.const 1) ) - (func $std/set/test (; 48 ;) (type $v) + (func $std/set/test (; 46 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $1 @@ -4644,7 +4635,7 @@ ) ) ) - (func $std/set/test (; 49 ;) (type $v) + (func $std/set/test (; 47 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $1 @@ -4988,7 +4979,7 @@ ) ) ) - (func $~lib/set/Set#clear (; 50 ;) (type $iv) (param $0 i32) + (func $~lib/set/Set#clear (; 48 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -5022,7 +5013,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#constructor (; 51 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 49 ;) (type $ii) (param $0 i32) (result i32) (if (i32.eqz (get_local $0) @@ -5063,7 +5054,7 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hash64 (; 52 ;) (type $Ii) (param $0 i64) (result i32) + (func $~lib/internal/hash/hash64 (; 50 ;) (type $Ii) (param $0 i64) (result i32) (local $1 i32) (i32.mul (i32.xor @@ -5162,12 +5153,12 @@ (i32.const 16777619) ) ) - (func $~lib/internal/hash/hash (; 53 ;) (type $Ii) (param $0 i64) (result i32) + (func $~lib/internal/hash/hash (; 51 ;) (type $Ii) (param $0 i64) (result i32) (call $~lib/internal/hash/hash64 (get_local $0) ) ) - (func $~lib/set/Set#find (; 54 ;) (type $iIii) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 52 ;) (type $iIii) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (set_local $2 (i32.load offset=8 (i32.add @@ -5230,7 +5221,7 @@ ) (i32.const 0) ) - (func $~lib/set/Set#has (; 55 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 53 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) (i32.ne (call $~lib/set/Set#find (get_local $0) @@ -5242,7 +5233,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#rehash (; 56 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 54 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5399,7 +5390,7 @@ ) ) ) - (func $~lib/set/Set#add (; 57 ;) (type $iIv) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 55 ;) (type $iIv) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5528,7 +5519,7 @@ ) ) ) - (func $~lib/set/Set#delete (; 58 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 56 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (local $3 i32) (if @@ -5624,7 +5615,7 @@ ) (i32.const 1) ) - (func $std/set/test (; 59 ;) (type $v) + (func $std/set/test (; 57 ;) (type $v) (local $0 i64) (local $1 i32) (set_local $1 @@ -5968,7 +5959,7 @@ ) ) ) - (func $std/set/test (; 60 ;) (type $v) + (func $std/set/test (; 58 ;) (type $v) (local $0 i64) (local $1 i32) (set_local $1 @@ -6312,14 +6303,14 @@ ) ) ) - (func $~lib/internal/hash/hash (; 61 ;) (type $fi) (param $0 f32) (result i32) + (func $~lib/internal/hash/hash (; 59 ;) (type $fi) (param $0 f32) (result i32) (call $~lib/internal/hash/hash32 (i32.reinterpret/f32 (get_local $0) ) ) ) - (func $~lib/set/Set#find (; 62 ;) (type $ifii) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 60 ;) (type $ifii) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (set_local $2 (i32.load offset=8 (i32.add @@ -6382,7 +6373,7 @@ ) (i32.const 0) ) - (func $~lib/set/Set#has (; 63 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 61 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) (i32.ne (call $~lib/set/Set#find (get_local $0) @@ -6394,7 +6385,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#rehash (; 64 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 62 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6553,7 +6544,7 @@ ) ) ) - (func $~lib/set/Set#add (; 65 ;) (type $ifv) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#add (; 63 ;) (type $ifv) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6682,7 +6673,7 @@ ) ) ) - (func $~lib/set/Set#delete (; 66 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#delete (; 64 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) (if @@ -6780,7 +6771,7 @@ ) (i32.const 1) ) - (func $std/set/test (; 67 ;) (type $v) + (func $std/set/test (; 65 ;) (type $v) (local $0 f32) (local $1 i32) (set_local $1 @@ -7132,14 +7123,14 @@ ) ) ) - (func $~lib/internal/hash/hash (; 68 ;) (type $Fi) (param $0 f64) (result i32) + (func $~lib/internal/hash/hash (; 66 ;) (type $Fi) (param $0 f64) (result i32) (call $~lib/internal/hash/hash64 (i64.reinterpret/f64 (get_local $0) ) ) ) - (func $~lib/set/Set#find (; 69 ;) (type $iFii) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 67 ;) (type $iFii) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (set_local $2 (i32.load offset=8 (i32.add @@ -7202,7 +7193,7 @@ ) (i32.const 0) ) - (func $~lib/set/Set#has (; 70 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 68 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) (i32.ne (call $~lib/set/Set#find (get_local $0) @@ -7214,7 +7205,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#rehash (; 71 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 69 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7373,7 +7364,7 @@ ) ) ) - (func $~lib/set/Set#add (; 72 ;) (type $iFv) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#add (; 70 ;) (type $iFv) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7502,7 +7493,7 @@ ) ) ) - (func $~lib/set/Set#delete (; 73 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#delete (; 71 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) (if @@ -7600,7 +7591,7 @@ ) (i32.const 1) ) - (func $std/set/test (; 74 ;) (type $v) + (func $std/set/test (; 72 ;) (type $v) (local $0 f64) (local $1 i32) (set_local $1 @@ -7952,7 +7943,7 @@ ) ) ) - (func $start (; 75 ;) (type $v) + (func $start (; 73 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.const 136) ) diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index 229d1b0d..c9fa1d85 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -1,7 +1,6 @@ (module (type $v (func)) (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $iv (func (param i32))) (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) @@ -43,15 +42,7 @@ (data (i32.const 112) "\n\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") (export "memory" (memory $0)) (start $start) - (func $~lib/memory/memory.size (; 1 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 2 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -87,7 +78,7 @@ ) ) (set_local $3 - (call $~lib/memory/memory.size) + (current_memory) ) (if (i32.gt_u @@ -132,14 +123,14 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $5) ) (i32.const 0) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $4) ) (i32.const 0) @@ -159,14 +150,14 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) ) - (func $~lib/internal/arraybuffer/computeSize (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $ii) (param $0 i32) (result i32) (i32.shl (i32.const 1) (i32.sub @@ -183,7 +174,7 @@ ) ) ) - (func $~lib/internal/arraybuffer/allocUnsafe (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocUnsafe (; 4 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (i32.eqz @@ -215,7 +206,7 @@ ) (get_local $1) ) - (func $~lib/memory/memset (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) @@ -567,14 +558,14 @@ ) ) ) - (func $~lib/memory/memory.fill (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memset (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 9 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 7 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.gt_u @@ -614,7 +605,7 @@ ) (get_local $3) ) - (func $~lib/set/Set#clear (; 10 ;) (type $iv) (param $0 i32) + (func $~lib/set/Set#clear (; 8 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -651,7 +642,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#constructor (; 11 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 9 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/set/Set#clear (tee_local $0 @@ -697,7 +688,7 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hash8 (; 12 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash8 (; 10 ;) (type $ii) (param $0 i32) (result i32) (i32.mul (i32.xor (get_global $~lib/internal/hash/FNV_OFFSET) @@ -706,7 +697,7 @@ (get_global $~lib/internal/hash/FNV_PRIME) ) ) - (func $~lib/internal/hash/hash (; 13 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash (; 11 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/internal/hash/hash8 (i32.shr_s @@ -719,7 +710,7 @@ ) ) ) - (func $~lib/set/Set#find (; 14 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 12 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -795,7 +786,7 @@ ) (i32.const 0) ) - (func $~lib/set/Set#has (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/set/Set#find (get_local $0) @@ -807,7 +798,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#rehash (; 16 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 14 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -998,7 +989,7 @@ ) ) ) - (func $~lib/set/Set#add (; 17 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 15 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1137,12 +1128,12 @@ ) ) ) - (func $~lib/set/Set#get:size (; 18 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 16 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/set/Set#delete (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1248,7 +1239,7 @@ ) (i32.const 1) ) - (func $std/set/test (; 20 ;) (type $v) + (func $std/set/test (; 18 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $0 @@ -1636,7 +1627,7 @@ ) ) ) - (func $~lib/set/Set#clear (; 21 ;) (type $iv) (param $0 i32) + (func $~lib/set/Set#clear (; 19 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -1673,7 +1664,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#constructor (; 22 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 20 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/set/Set#clear (tee_local $0 @@ -1719,7 +1710,7 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hash (; 23 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash (; 21 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/internal/hash/hash8 (i32.and @@ -1729,7 +1720,7 @@ ) ) ) - (func $~lib/set/Set#find (; 24 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 22 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -1802,7 +1793,7 @@ ) (i32.const 0) ) - (func $~lib/set/Set#has (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/set/Set#find (get_local $0) @@ -1814,7 +1805,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#rehash (; 26 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 24 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2005,7 +1996,7 @@ ) ) ) - (func $~lib/set/Set#add (; 27 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 25 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2144,12 +2135,12 @@ ) ) ) - (func $~lib/set/Set#get:size (; 28 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 26 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/set/Set#delete (; 29 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 27 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2252,7 +2243,7 @@ ) (i32.const 1) ) - (func $std/set/test (; 30 ;) (type $v) + (func $std/set/test (; 28 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $0 @@ -2640,7 +2631,7 @@ ) ) ) - (func $~lib/set/Set#clear (; 31 ;) (type $iv) (param $0 i32) + (func $~lib/set/Set#clear (; 29 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -2677,7 +2668,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#constructor (; 32 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 30 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/set/Set#clear (tee_local $0 @@ -2723,7 +2714,7 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hash16 (; 33 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash16 (; 31 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (set_local $1 (get_global $~lib/internal/hash/FNV_OFFSET) @@ -2754,7 +2745,7 @@ ) (get_local $1) ) - (func $~lib/internal/hash/hash (; 34 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash (; 32 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/internal/hash/hash16 (i32.shr_s @@ -2767,7 +2758,7 @@ ) ) ) - (func $~lib/set/Set#find (; 35 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 33 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -2843,7 +2834,7 @@ ) (i32.const 0) ) - (func $~lib/set/Set#has (; 36 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 34 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/set/Set#find (get_local $0) @@ -2855,7 +2846,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#rehash (; 37 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 35 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3046,7 +3037,7 @@ ) ) ) - (func $~lib/set/Set#add (; 38 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 36 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3185,12 +3176,12 @@ ) ) ) - (func $~lib/set/Set#get:size (; 39 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 37 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/set/Set#delete (; 40 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 38 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3296,7 +3287,7 @@ ) (i32.const 1) ) - (func $std/set/test (; 41 ;) (type $v) + (func $std/set/test (; 39 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $0 @@ -3684,7 +3675,7 @@ ) ) ) - (func $~lib/set/Set#clear (; 42 ;) (type $iv) (param $0 i32) + (func $~lib/set/Set#clear (; 40 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -3721,7 +3712,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#constructor (; 43 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 41 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/set/Set#clear (tee_local $0 @@ -3767,7 +3758,7 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hash (; 44 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash (; 42 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/internal/hash/hash16 (i32.and @@ -3777,7 +3768,7 @@ ) ) ) - (func $~lib/set/Set#find (; 45 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 43 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -3850,7 +3841,7 @@ ) (i32.const 0) ) - (func $~lib/set/Set#has (; 46 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 44 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/set/Set#find (get_local $0) @@ -3862,7 +3853,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#rehash (; 47 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 45 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4053,7 +4044,7 @@ ) ) ) - (func $~lib/set/Set#add (; 48 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 46 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4192,12 +4183,12 @@ ) ) ) - (func $~lib/set/Set#get:size (; 49 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 47 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/set/Set#delete (; 50 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 48 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4300,7 +4291,7 @@ ) (i32.const 1) ) - (func $std/set/test (; 51 ;) (type $v) + (func $std/set/test (; 49 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $0 @@ -4688,7 +4679,7 @@ ) ) ) - (func $~lib/set/Set#clear (; 52 ;) (type $iv) (param $0 i32) + (func $~lib/set/Set#clear (; 50 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -4725,7 +4716,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#constructor (; 53 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 51 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/set/Set#clear (tee_local $0 @@ -4771,7 +4762,7 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hash32 (; 54 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash32 (; 52 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (set_local $1 (get_global $~lib/internal/hash/FNV_OFFSET) @@ -4832,14 +4823,14 @@ ) (get_local $1) ) - (func $~lib/internal/hash/hash (; 55 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash (; 53 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/internal/hash/hash32 (get_local $0) ) ) ) - (func $~lib/set/Set#find (; 56 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 54 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -4909,7 +4900,7 @@ ) (i32.const 0) ) - (func $~lib/set/Set#has (; 57 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 55 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/set/Set#find (get_local $0) @@ -4921,7 +4912,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#rehash (; 58 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 56 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5112,7 +5103,7 @@ ) ) ) - (func $~lib/set/Set#add (; 59 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 57 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5251,12 +5242,12 @@ ) ) ) - (func $~lib/set/Set#get:size (; 60 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 58 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/set/Set#delete (; 61 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 59 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -5356,7 +5347,7 @@ ) (i32.const 1) ) - (func $std/set/test (; 62 ;) (type $v) + (func $std/set/test (; 60 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $0 @@ -5744,7 +5735,7 @@ ) ) ) - (func $~lib/set/Set#clear (; 63 ;) (type $iv) (param $0 i32) + (func $~lib/set/Set#clear (; 61 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -5781,7 +5772,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#constructor (; 64 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 62 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/set/Set#clear (tee_local $0 @@ -5827,14 +5818,14 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hash (; 65 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash (; 63 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/internal/hash/hash32 (get_local $0) ) ) ) - (func $~lib/set/Set#find (; 66 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 64 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -5904,7 +5895,7 @@ ) (i32.const 0) ) - (func $~lib/set/Set#has (; 67 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#has (; 65 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/set/Set#find (get_local $0) @@ -5916,7 +5907,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#rehash (; 68 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 66 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6107,7 +6098,7 @@ ) ) ) - (func $~lib/set/Set#add (; 69 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#add (; 67 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6246,12 +6237,12 @@ ) ) ) - (func $~lib/set/Set#get:size (; 70 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 68 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/set/Set#delete (; 71 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/set/Set#delete (; 69 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -6351,7 +6342,7 @@ ) (i32.const 1) ) - (func $std/set/test (; 72 ;) (type $v) + (func $std/set/test (; 70 ;) (type $v) (local $0 i32) (local $1 i32) (set_local $0 @@ -6739,7 +6730,7 @@ ) ) ) - (func $~lib/set/Set#clear (; 73 ;) (type $iv) (param $0 i32) + (func $~lib/set/Set#clear (; 71 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -6776,7 +6767,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#constructor (; 74 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 72 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/set/Set#clear (tee_local $0 @@ -6822,7 +6813,7 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hash64 (; 75 ;) (type $Ii) (param $0 i64) (result i32) + (func $~lib/internal/hash/hash64 (; 73 ;) (type $Ii) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6952,14 +6943,14 @@ ) (get_local $3) ) - (func $~lib/internal/hash/hash (; 76 ;) (type $Ii) (param $0 i64) (result i32) + (func $~lib/internal/hash/hash (; 74 ;) (type $Ii) (param $0 i64) (result i32) (return (call $~lib/internal/hash/hash64 (get_local $0) ) ) ) - (func $~lib/set/Set#find (; 77 ;) (type $iIii) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 75 ;) (type $iIii) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -7029,7 +7020,7 @@ ) (i32.const 0) ) - (func $~lib/set/Set#has (; 78 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 76 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) (i32.ne (call $~lib/set/Set#find (get_local $0) @@ -7041,7 +7032,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#rehash (; 79 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 77 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7233,7 +7224,7 @@ ) ) ) - (func $~lib/set/Set#add (; 80 ;) (type $iIv) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 78 ;) (type $iIv) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7372,12 +7363,12 @@ ) ) ) - (func $~lib/set/Set#get:size (; 81 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 79 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/set/Set#delete (; 82 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 80 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -7477,7 +7468,7 @@ ) (i32.const 1) ) - (func $std/set/test (; 83 ;) (type $v) + (func $std/set/test (; 81 ;) (type $v) (local $0 i32) (local $1 i64) (set_local $0 @@ -7865,7 +7856,7 @@ ) ) ) - (func $~lib/set/Set#clear (; 84 ;) (type $iv) (param $0 i32) + (func $~lib/set/Set#clear (; 82 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -7902,7 +7893,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#constructor (; 85 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 83 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/set/Set#clear (tee_local $0 @@ -7948,14 +7939,14 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hash (; 86 ;) (type $Ii) (param $0 i64) (result i32) + (func $~lib/internal/hash/hash (; 84 ;) (type $Ii) (param $0 i64) (result i32) (return (call $~lib/internal/hash/hash64 (get_local $0) ) ) ) - (func $~lib/set/Set#find (; 87 ;) (type $iIii) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 85 ;) (type $iIii) (param $0 i32) (param $1 i64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -8025,7 +8016,7 @@ ) (i32.const 0) ) - (func $~lib/set/Set#has (; 88 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#has (; 86 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) (i32.ne (call $~lib/set/Set#find (get_local $0) @@ -8037,7 +8028,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#rehash (; 89 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 87 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8229,7 +8220,7 @@ ) ) ) - (func $~lib/set/Set#add (; 90 ;) (type $iIv) (param $0 i32) (param $1 i64) + (func $~lib/set/Set#add (; 88 ;) (type $iIv) (param $0 i32) (param $1 i64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8368,12 +8359,12 @@ ) ) ) - (func $~lib/set/Set#get:size (; 91 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 89 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/set/Set#delete (; 92 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) + (func $~lib/set/Set#delete (; 90 ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8473,7 +8464,7 @@ ) (i32.const 1) ) - (func $std/set/test (; 93 ;) (type $v) + (func $std/set/test (; 91 ;) (type $v) (local $0 i32) (local $1 i64) (set_local $0 @@ -8861,7 +8852,7 @@ ) ) ) - (func $~lib/set/Set#clear (; 94 ;) (type $iv) (param $0 i32) + (func $~lib/set/Set#clear (; 92 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -8898,7 +8889,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#constructor (; 95 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 93 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/set/Set#clear (tee_local $0 @@ -8944,7 +8935,7 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hash (; 96 ;) (type $fi) (param $0 f32) (result i32) + (func $~lib/internal/hash/hash (; 94 ;) (type $fi) (param $0 f32) (result i32) (return (call $~lib/internal/hash/hash32 (i32.reinterpret/f32 @@ -8953,7 +8944,7 @@ ) ) ) - (func $~lib/set/Set#find (; 97 ;) (type $ifii) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 95 ;) (type $ifii) (param $0 i32) (param $1 f32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -9023,7 +9014,7 @@ ) (i32.const 0) ) - (func $~lib/set/Set#has (; 98 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#has (; 96 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) (i32.ne (call $~lib/set/Set#find (get_local $0) @@ -9035,7 +9026,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#rehash (; 99 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 97 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9229,7 +9220,7 @@ ) ) ) - (func $~lib/set/Set#add (; 100 ;) (type $ifv) (param $0 i32) (param $1 f32) + (func $~lib/set/Set#add (; 98 ;) (type $ifv) (param $0 i32) (param $1 f32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9368,12 +9359,12 @@ ) ) ) - (func $~lib/set/Set#get:size (; 101 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 99 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/set/Set#delete (; 102 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) + (func $~lib/set/Set#delete (; 100 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -9475,7 +9466,7 @@ ) (i32.const 1) ) - (func $std/set/test (; 103 ;) (type $v) + (func $std/set/test (; 101 ;) (type $v) (local $0 i32) (local $1 f32) (set_local $0 @@ -9863,7 +9854,7 @@ ) ) ) - (func $~lib/set/Set#clear (; 104 ;) (type $iv) (param $0 i32) + (func $~lib/set/Set#clear (; 102 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -9900,7 +9891,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#constructor (; 105 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#constructor (; 103 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/set/Set#clear (tee_local $0 @@ -9946,7 +9937,7 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hash (; 106 ;) (type $Fi) (param $0 f64) (result i32) + (func $~lib/internal/hash/hash (; 104 ;) (type $Fi) (param $0 f64) (result i32) (return (call $~lib/internal/hash/hash64 (i64.reinterpret/f64 @@ -9955,7 +9946,7 @@ ) ) ) - (func $~lib/set/Set#find (; 107 ;) (type $iFii) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) + (func $~lib/set/Set#find (; 105 ;) (type $iFii) (param $0 i32) (param $1 f64) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -10025,7 +10016,7 @@ ) (i32.const 0) ) - (func $~lib/set/Set#has (; 108 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#has (; 106 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) (i32.ne (call $~lib/set/Set#find (get_local $0) @@ -10037,7 +10028,7 @@ (i32.const 0) ) ) - (func $~lib/set/Set#rehash (; 109 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/set/Set#rehash (; 107 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10231,7 +10222,7 @@ ) ) ) - (func $~lib/set/Set#add (; 110 ;) (type $iFv) (param $0 i32) (param $1 f64) + (func $~lib/set/Set#add (; 108 ;) (type $iFv) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10370,12 +10361,12 @@ ) ) ) - (func $~lib/set/Set#get:size (; 111 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/set/Set#get:size (; 109 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=20 (get_local $0) ) ) - (func $~lib/set/Set#delete (; 112 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) + (func $~lib/set/Set#delete (; 110 ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -10477,7 +10468,7 @@ ) (i32.const 1) ) - (func $std/set/test (; 113 ;) (type $v) + (func $std/set/test (; 111 ;) (type $v) (local $0 i32) (local $1 f64) (set_local $0 @@ -10865,7 +10856,7 @@ ) ) ) - (func $start (; 114 ;) (type $v) + (func $start (; 112 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.and (i32.add diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index cd5e5d0a..2ed2947e 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -3,7 +3,6 @@ (type $iiiiv (func (param i32 i32 i32 i32))) (type $iii (func (param i32 i32) (result i32))) (type $iiiv (func (param i32 i32 i32))) - (type $i (func (result i32))) (type $iiI (func (param i32 i32) (result i64))) (type $iiIv (func (param i32 i32 i64))) (type $iif (func (param i32 i32) (result f32))) @@ -411,15 +410,7 @@ (get_local $2) ) ) - (func $~lib/memory/memory.size (; 6 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 7 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 8 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 6 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -451,14 +442,14 @@ ) (i32.shl (tee_local $2 - (call $~lib/memory/memory.size) + (current_memory) ) (i32.const 16) ) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (select (get_local $2) (tee_local $3 @@ -486,7 +477,7 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $3) ) (i32.const 0) @@ -505,12 +496,12 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 9 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 7 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) - (func $~lib/internal/arraybuffer/allocUnsafe (; 10 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocUnsafe (; 8 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (i32.gt_u @@ -539,7 +530,7 @@ ) (get_local $1) ) - (func $~lib/memory/memcpy (; 11 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memcpy (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1925,7 +1916,7 @@ ) ) ) - (func $~lib/memory/memmove (; 12 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memmove (; 10 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (if @@ -2217,14 +2208,14 @@ ) ) ) - (func $~lib/memory/memory.copy (; 13 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 11 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memmove (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/internal/arraybuffer/reallocUnsafe (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/arraybuffer/reallocUnsafe (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (if @@ -2348,7 +2339,7 @@ ) (get_local $0) ) - (func $~lib/array/Array#__set (; 15 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 13 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (if @@ -2415,7 +2406,7 @@ (get_local $2) ) ) - (func $~lib/array/Array#__get (; 16 ;) (type $iiI) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__get (; 14 ;) (type $iiI) (param $0 i32) (param $1 i32) (result i64) (if (result i64) (i32.lt_u (get_local $1) @@ -2442,7 +2433,7 @@ (unreachable) ) ) - (func $~lib/array/Array#__set (; 17 ;) (type $iiIv) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (; 15 ;) (type $iiIv) (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) (local $4 i32) (if @@ -2509,7 +2500,7 @@ (get_local $2) ) ) - (func $~lib/array/Array#__get (; 18 ;) (type $iif) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 16 ;) (type $iif) (param $0 i32) (param $1 i32) (result f32) (if (result f32) (i32.lt_u (get_local $1) @@ -2536,7 +2527,7 @@ (unreachable) ) ) - (func $~lib/array/Array#__set (; 19 ;) (type $iifv) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/array/Array#__set (; 17 ;) (type $iifv) (param $0 i32) (param $1 i32) (param $2 f32) (local $3 i32) (local $4 i32) (if @@ -2603,7 +2594,7 @@ (get_local $2) ) ) - (func $~lib/array/Array#__get (; 20 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 18 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64) (if (result f64) (i32.lt_u (get_local $1) @@ -2630,7 +2621,7 @@ (unreachable) ) ) - (func $~lib/array/Array#__set (; 21 ;) (type $iiFv) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/array/Array#__set (; 19 ;) (type $iiFv) (param $0 i32) (param $1 i32) (param $2 f64) (local $3 i32) (local $4 i32) (if @@ -2697,7 +2688,7 @@ (get_local $2) ) ) - (func $start (; 22 ;) (type $v) + (func $start (; 20 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.const 272) ) diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index bf7a272d..70dd5c69 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -3,7 +3,6 @@ (type $iiiiv (func (param i32 i32 i32 i32))) (type $iii (func (param i32 i32) (result i32))) (type $iiiv (func (param i32 i32 i32))) - (type $i (func (result i32))) (type $iiI (func (param i32 i32) (result i64))) (type $iiIv (func (param i32 i32 i64))) (type $iif (func (param i32 i32) (result f32))) @@ -447,15 +446,7 @@ (get_local $2) ) ) - (func $~lib/memory/memory.size (; 6 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 7 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 8 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 6 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -491,7 +482,7 @@ ) ) (set_local $3 - (call $~lib/memory/memory.size) + (current_memory) ) (if (i32.gt_u @@ -536,14 +527,14 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $5) ) (i32.const 0) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $4) ) (i32.const 0) @@ -563,14 +554,14 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 9 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 7 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) ) - (func $~lib/internal/arraybuffer/allocUnsafe (; 10 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocUnsafe (; 8 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (i32.eqz @@ -602,7 +593,7 @@ ) (get_local $1) ) - (func $~lib/memory/memcpy (; 11 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memcpy (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2404,7 +2395,7 @@ ) ) ) - (func $~lib/memory/memmove (; 12 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memmove (; 10 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (if (i32.eq @@ -2722,14 +2713,14 @@ ) ) ) - (func $~lib/memory/memory.copy (; 13 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 11 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memmove (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/internal/arraybuffer/reallocUnsafe (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/arraybuffer/reallocUnsafe (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (set_local $2 @@ -2859,7 +2850,7 @@ ) (get_local $0) ) - (func $~lib/array/Array#__set (; 15 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__set (; 13 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -2934,12 +2925,12 @@ ) ) ) - (func $~lib/array/Array#get:length (; 16 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 14 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=4 (get_local $0) ) ) - (func $~lib/array/Array#__get (; 17 ;) (type $iiI) (param $0 i32) (param $1 i32) (result i64) + (func $~lib/array/Array#__get (; 15 ;) (type $iiI) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) (set_local $2 (i32.load @@ -2970,7 +2961,7 @@ (unreachable) ) ) - (func $~lib/array/Array#__set (; 18 ;) (type $iiIv) (param $0 i32) (param $1 i32) (param $2 i64) + (func $~lib/array/Array#__set (; 16 ;) (type $iiIv) (param $0 i32) (param $1 i32) (param $2 i64) (local $3 i32) (local $4 i32) (set_local $3 @@ -3045,12 +3036,12 @@ ) ) ) - (func $~lib/array/Array#get:length (; 19 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 17 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=4 (get_local $0) ) ) - (func $~lib/array/Array#__get (; 20 ;) (type $iif) (param $0 i32) (param $1 i32) (result f32) + (func $~lib/array/Array#__get (; 18 ;) (type $iif) (param $0 i32) (param $1 i32) (result f32) (local $2 i32) (set_local $2 (i32.load @@ -3081,7 +3072,7 @@ (unreachable) ) ) - (func $~lib/array/Array#__set (; 21 ;) (type $iifv) (param $0 i32) (param $1 i32) (param $2 f32) + (func $~lib/array/Array#__set (; 19 ;) (type $iifv) (param $0 i32) (param $1 i32) (param $2 f32) (local $3 i32) (local $4 i32) (set_local $3 @@ -3156,12 +3147,12 @@ ) ) ) - (func $~lib/array/Array#get:length (; 22 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/array/Array#get:length (; 20 ;) (type $ii) (param $0 i32) (result i32) (i32.load offset=4 (get_local $0) ) ) - (func $~lib/array/Array#__get (; 23 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64) + (func $~lib/array/Array#__get (; 21 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64) (local $2 i32) (set_local $2 (i32.load @@ -3192,7 +3183,7 @@ (unreachable) ) ) - (func $~lib/array/Array#__set (; 24 ;) (type $iiFv) (param $0 i32) (param $1 i32) (param $2 f64) + (func $~lib/array/Array#__set (; 22 ;) (type $iiFv) (param $0 i32) (param $1 i32) (param $2 f64) (local $3 i32) (local $4 i32) (set_local $3 @@ -3267,7 +3258,7 @@ ) ) ) - (func $start (; 25 ;) (type $v) + (func $start (; 23 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.and (i32.add diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index 1ee1da84..0e94dcfc 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -1,7 +1,6 @@ (module (type $ii (func (param i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) - (type $i (func (result i32))) (type $iv (func (param i32))) (type $v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -161,15 +160,7 @@ ) (get_local $1) ) - (func $~lib/memory/memory.size (; 2 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 3 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -201,14 +192,14 @@ ) (i32.shl (tee_local $2 - (call $~lib/memory/memory.size) + (current_memory) ) (i32.const 16) ) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (select (get_local $2) (tee_local $3 @@ -236,7 +227,7 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $3) ) (i32.const 0) @@ -255,12 +246,12 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) - (func $~lib/string/String#toUTF8 (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/string/String#toUTF8 (; 4 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -546,15 +537,15 @@ ) (get_local $5) ) - (func $~lib/allocator/arena/__memory_free (; 7 ;) (type $iv) (param $0 i32) + (func $~lib/allocator/arena/__memory_free (; 5 ;) (type $iv) (param $0 i32) (nop) ) - (func $~lib/memory/memory.free (; 8 ;) (type $iv) (param $0 i32) + (func $~lib/memory/memory.free (; 6 ;) (type $iv) (param $0 i32) (call $~lib/allocator/arena/__memory_free (get_local $0) ) ) - (func $start (; 9 ;) (type $v) + (func $start (; 7 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.const 64) ) diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index 9c9faa99..aff3a817 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -1,7 +1,6 @@ (module (type $ii (func (param i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) - (type $i (func (result i32))) (type $iv (func (param i32))) (type $v (func)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) @@ -178,15 +177,7 @@ ) (get_local $1) ) - (func $~lib/memory/memory.size (; 2 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 3 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -222,7 +213,7 @@ ) ) (set_local $3 - (call $~lib/memory/memory.size) + (current_memory) ) (if (i32.gt_u @@ -267,14 +258,14 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $5) ) (i32.const 0) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $4) ) (i32.const 0) @@ -294,14 +285,14 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) ) - (func $~lib/string/String#toUTF8 (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/string/String#toUTF8 (; 4 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -613,16 +604,16 @@ ) (get_local $1) ) - (func $~lib/allocator/arena/__memory_free (; 7 ;) (type $iv) (param $0 i32) + (func $~lib/allocator/arena/__memory_free (; 5 ;) (type $iv) (param $0 i32) (nop) ) - (func $~lib/memory/memory.free (; 8 ;) (type $iv) (param $0 i32) + (func $~lib/memory/memory.free (; 6 ;) (type $iv) (param $0 i32) (call $~lib/allocator/arena/__memory_free (get_local $0) ) (return) ) - (func $start (; 9 ;) (type $v) + (func $start (; 7 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.and (i32.add diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index d0ac36a2..0b47b006 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1293,15 +1293,7 @@ (get_local $4) ) ) - (func $~lib/memory/memory.size (; 15 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 16 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 17 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 15 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1333,14 +1325,14 @@ ) (i32.shl (tee_local $2 - (call $~lib/memory/memory.size) + (current_memory) ) (i32.const 16) ) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (select (get_local $2) (tee_local $3 @@ -1368,7 +1360,7 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $3) ) (i32.const 0) @@ -1387,12 +1379,12 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 18 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 16 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) - (func $~lib/internal/string/allocate (; 19 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/string/allocate (; 17 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (tee_local $1 @@ -1438,7 +1430,7 @@ ) (get_local $1) ) - (func $~lib/memory/memcpy (; 20 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memcpy (; 18 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2824,7 +2816,7 @@ ) ) ) - (func $~lib/memory/memmove (; 21 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memmove (; 19 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (if @@ -3116,14 +3108,14 @@ ) ) ) - (func $~lib/memory/memory.copy (; 22 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 20 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memmove (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/string/String#concat (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3209,7 +3201,7 @@ ) (get_local $2) ) - (func $~lib/string/String.__concat (; 24 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (if (i32.eqz (get_local $0) @@ -3223,7 +3215,7 @@ (get_local $1) ) ) - (func $~lib/string/String.__eq (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.eq @@ -3286,7 +3278,7 @@ ) ) ) - (func $~lib/string/String.__ne (; 26 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 24 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.eqz (call $~lib/string/String.__eq (get_local $0) @@ -3294,7 +3286,7 @@ ) ) ) - (func $~lib/string/String.__gt (; 27 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (if @@ -3378,7 +3370,7 @@ (i32.const 0) ) ) - (func $~lib/string/String.__gte (; 28 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gte (; 26 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (if @@ -3462,7 +3454,7 @@ (i32.const 0) ) ) - (func $~lib/string/String.__lt (; 29 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 27 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (if @@ -3546,7 +3538,7 @@ (i32.const 0) ) ) - (func $~lib/string/String.__lte (; 30 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lte (; 28 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (if @@ -3630,7 +3622,7 @@ (i32.const 0) ) ) - (func $~lib/string/String#repeat (; 31 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 29 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3768,7 +3760,7 @@ ) (get_local $4) ) - (func $~lib/internal/itoa/decimalCountU32 (; 32 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/itoa/decimalCountU32 (; 30 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (set_local $2 @@ -3808,7 +3800,7 @@ (i32.const 1) ) ) - (func $~lib/internal/itoa/utoa32_lut (; 33 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/itoa/utoa32_lut (; 31 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -3969,7 +3961,7 @@ ) ) ) - (func $~lib/internal/itoa/itoa32 (; 34 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/itoa/itoa32 (; 32 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4020,7 +4012,7 @@ ) (get_local $2) ) - (func $~lib/internal/itoa/utoa32 (; 35 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/itoa/utoa32 (; 33 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (if @@ -4046,7 +4038,7 @@ ) (get_local $2) ) - (func $~lib/internal/itoa/decimalCountU64 (; 36 ;) (type $Ii) (param $0 i64) (result i32) + (func $~lib/internal/itoa/decimalCountU64 (; 34 ;) (type $Ii) (param $0 i64) (result i32) (local $1 i32) (local $2 i64) (set_local $2 @@ -4094,7 +4086,7 @@ (i32.const 1) ) ) - (func $~lib/internal/itoa/utoa64_lut (; 37 ;) (type $iIiv) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/internal/itoa/utoa64_lut (; 35 ;) (type $iIiv) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4240,7 +4232,7 @@ (get_local $2) ) ) - (func $~lib/internal/itoa/utoa64 (; 38 ;) (type $Ii) (param $0 i64) (result i32) + (func $~lib/internal/itoa/utoa64 (; 36 ;) (type $Ii) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4290,7 +4282,7 @@ ) (get_local $2) ) - (func $~lib/internal/itoa/itoa64 (; 39 ;) (type $Ii) (param $0 i64) (result i32) + (func $~lib/internal/itoa/itoa64 (; 37 ;) (type $Ii) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4368,7 +4360,7 @@ ) (get_local $3) ) - (func $start (; 40 ;) (type $v) + (func $start (; 38 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.const 2520) ) diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 6ad6076a..6bb9a3c1 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -25,7 +25,7 @@ (global $std/string/str (mut i32) (i32.const 12)) (global $std/string/nullStr (mut i32) (i32.const 0)) (global $~argc (mut i32) (i32.const 0)) - (global $i32.MAX_VALUE i32 (i32.const 2147483647)) + (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) (global $NaN f64 (f64.const nan:0x8000000000000)) (global $~lib/internal/string/CharCode.PLUS i32 (i32.const 43)) (global $~lib/internal/string/CharCode.MINUS i32 (i32.const 45)) @@ -54,10 +54,10 @@ (global $~lib/internal/string/CharCode.z i32 (i32.const 122)) (global $std/string/c (mut i32) (i32.const 0)) (global $ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $u32.MAX_VALUE i32 (i32.const -1)) - (global $u64.MAX_VALUE i64 (i64.const -1)) - (global $i64.MAX_VALUE i64 (i64.const 9223372036854775807)) - (global $i64.MIN_VALUE i64 (i64.const -9223372036854775808)) + (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) + (global $~lib/builtins/u64.MAX_VALUE i64 (i64.const -1)) + (global $~lib/builtins/i64.MAX_VALUE i64 (i64.const 9223372036854775807)) + (global $~lib/builtins/i64.MIN_VALUE i64 (i64.const -9223372036854775808)) (global $HEAP_BASE i32 (i32.const 2516)) (memory $0 1) (data (i32.const 8) "\00\00\00\00") @@ -814,7 +814,7 @@ (unreachable) ) (set_local $2 - (get_global $i32.MAX_VALUE) + (get_global $~lib/builtins/i32.MAX_VALUE) ) ) (call $~lib/string/String#lastIndexOf @@ -1499,15 +1499,7 @@ (get_local $5) ) ) - (func $~lib/memory/memory.size (; 15 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 16 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 17 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 15 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -1543,7 +1535,7 @@ ) ) (set_local $3 - (call $~lib/memory/memory.size) + (current_memory) ) (if (i32.gt_u @@ -1588,14 +1580,14 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $5) ) (i32.const 0) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $4) ) (i32.const 0) @@ -1615,14 +1607,14 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 18 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 16 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) ) - (func $~lib/internal/string/allocate (; 19 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/string/allocate (; 17 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (if @@ -1668,7 +1660,7 @@ ) (get_local $2) ) - (func $~lib/memory/memcpy (; 20 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memcpy (; 18 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -3470,7 +3462,7 @@ ) ) ) - (func $~lib/memory/memmove (; 21 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memmove (; 19 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (if (i32.eq @@ -3788,14 +3780,14 @@ ) ) ) - (func $~lib/memory/memory.copy (; 22 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.copy (; 20 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memmove (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/string/String#concat (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#concat (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -3892,7 +3884,7 @@ ) (get_local $5) ) - (func $~lib/string/String.__concat (; 24 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__concat (; 22 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (if (i32.eqz (get_local $0) @@ -3906,7 +3898,7 @@ (get_local $1) ) ) - (func $~lib/string/String.__eq (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (if @@ -3969,7 +3961,7 @@ ) ) ) - (func $~lib/string/String.__ne (; 26 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__ne (; 24 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.eqz (call $~lib/string/String.__eq (get_local $0) @@ -3977,7 +3969,7 @@ ) ) ) - (func $~lib/string/String.__gt (; 27 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gt (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4068,7 +4060,7 @@ (i32.const 0) ) ) - (func $~lib/string/String.__gte (; 28 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__gte (; 26 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4161,7 +4153,7 @@ (i32.const 0) ) ) - (func $~lib/string/String.__lt (; 29 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lt (; 27 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4252,7 +4244,7 @@ (i32.const 0) ) ) - (func $~lib/string/String.__lte (; 30 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__lte (; 28 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4345,7 +4337,7 @@ (i32.const 0) ) ) - (func $~lib/string/String#repeat (; 31 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String#repeat (; 29 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4489,7 +4481,7 @@ ) (get_local $4) ) - (func $~lib/internal/itoa/decimalCountU32 (; 32 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/itoa/decimalCountU32 (; 30 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4545,7 +4537,7 @@ (i32.const 1) ) ) - (func $~lib/internal/itoa/utoa32_lut (; 33 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/itoa/utoa32_lut (; 31 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -4764,7 +4756,7 @@ ) ) ) - (func $~lib/internal/itoa/itoa32 (; 34 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/itoa/itoa32 (; 32 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4820,7 +4812,7 @@ ) (get_local $3) ) - (func $~lib/internal/itoa/utoa32 (; 35 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/itoa/utoa32 (; 33 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (if @@ -4850,7 +4842,7 @@ ) (get_local $2) ) - (func $~lib/internal/itoa/decimalCountU64 (; 36 ;) (type $Ii) (param $0 i64) (result i32) + (func $~lib/internal/itoa/decimalCountU64 (; 34 ;) (type $Ii) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -4918,7 +4910,7 @@ (i32.const 1) ) ) - (func $~lib/internal/itoa/utoa64_lut (; 37 ;) (type $iIiv) (param $0 i32) (param $1 i64) (param $2 i32) + (func $~lib/internal/itoa/utoa64_lut (; 35 ;) (type $iIiv) (param $0 i32) (param $1 i64) (param $2 i32) (local $3 i32) (local $4 i64) (local $5 i32) @@ -5112,7 +5104,7 @@ (get_local $2) ) ) - (func $~lib/internal/itoa/utoa64 (; 38 ;) (type $Ii) (param $0 i64) (result i32) + (func $~lib/internal/itoa/utoa64 (; 36 ;) (type $Ii) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5128,7 +5120,7 @@ (i64.le_u (get_local $0) (i64.extend_u/i32 - (get_global $u32.MAX_VALUE) + (get_global $~lib/builtins/u32.MAX_VALUE) ) ) (block @@ -5177,7 +5169,7 @@ ) (get_local $1) ) - (func $~lib/internal/itoa/itoa64 (; 39 ;) (type $Ii) (param $0 i64) (result i32) + (func $~lib/internal/itoa/itoa64 (; 37 ;) (type $Ii) (param $0 i64) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5209,7 +5201,7 @@ (i64.le_u (get_local $0) (i64.extend_u/i32 - (get_global $u32.MAX_VALUE) + (get_global $~lib/builtins/u32.MAX_VALUE) ) ) (block @@ -5271,7 +5263,7 @@ ) (get_local $2) ) - (func $start (; 40 ;) (type $v) + (func $start (; 38 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.and (i32.add @@ -7010,7 +7002,7 @@ (i32.eqz (call $~lib/string/String.__eq (call $~lib/internal/itoa/utoa32 - (get_global $u32.MAX_VALUE) + (get_global $~lib/builtins/u32.MAX_VALUE) ) (i32.const 1372) ) @@ -7219,7 +7211,7 @@ (i32.eqz (call $~lib/string/String.__eq (call $~lib/internal/itoa/utoa64 - (get_global $u64.MAX_VALUE) + (get_global $~lib/builtins/u64.MAX_VALUE) ) (i32.const 2204) ) @@ -7409,7 +7401,7 @@ (i32.eqz (call $~lib/string/String.__eq (call $~lib/internal/itoa/itoa64 - (get_global $i64.MAX_VALUE) + (get_global $~lib/builtins/i64.MAX_VALUE) ) (i32.const 2428) ) @@ -7428,7 +7420,7 @@ (i32.eqz (call $~lib/string/String.__eq (call $~lib/internal/itoa/itoa64 - (get_global $i64.MIN_VALUE) + (get_global $~lib/builtins/i64.MIN_VALUE) ) (i32.const 2472) ) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 1ef7adac..13d23005 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -1,7 +1,6 @@ (module (type $ii (func (param i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) - (type $i (func (result i32))) (type $iv (func (param i32))) (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiiv (func (param i32 i32 i32))) @@ -46,15 +45,7 @@ ) (get_local $0) ) - (func $~lib/memory/memory.size (; 2 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 3 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -86,14 +77,14 @@ ) (i32.shl (tee_local $2 - (call $~lib/memory/memory.size) + (current_memory) ) (i32.const 16) ) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (select (get_local $2) (tee_local $3 @@ -121,7 +112,7 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $3) ) (i32.const 0) @@ -140,12 +131,12 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) - (func $~lib/internal/arraybuffer/computeSize (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/computeSize (; 4 ;) (type $ii) (param $0 i32) (result i32) (i32.shl (i32.const 1) (i32.sub @@ -159,7 +150,7 @@ ) ) ) - (func $~lib/internal/arraybuffer/allocUnsafe (; 7 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocUnsafe (; 5 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (i32.gt_u @@ -188,7 +179,7 @@ ) (get_local $1) ) - (func $~lib/memory/memset (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) (if @@ -518,14 +509,14 @@ ) ) ) - (func $~lib/memory/memory.fill (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memset (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 10 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.gt_u @@ -565,7 +556,7 @@ ) (get_local $3) ) - (func $~lib/map/Map#clear (; 11 ;) (type $iv) (param $0 i32) + (func $~lib/map/Map#clear (; 9 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -599,7 +590,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#constructor (; 12 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 10 ;) (type $ii) (param $0 i32) (result i32) (if (i32.eqz (get_local $0) @@ -640,7 +631,7 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hashStr (; 13 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hashStr (; 11 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -688,7 +679,7 @@ ) (get_local $2) ) - (func $~lib/memory/memcmp (; 14 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memcmp (; 12 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.eq @@ -758,14 +749,14 @@ ) ) ) - (func $~lib/memory/memory.compare (; 15 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.compare (; 13 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (call $~lib/memory/memcmp (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/string/String.__eq (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.eq @@ -828,7 +819,7 @@ ) ) ) - (func $~lib/map/Map#find (; 17 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 15 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (set_local $2 (i32.load offset=8 (i32.add @@ -891,7 +882,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#has (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -903,7 +894,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#get (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (tee_local $0 (if (result i32) (tee_local $0 @@ -922,7 +913,7 @@ ) ) ) - (func $~lib/map/Map#rehash (; 20 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 18 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1085,7 +1076,7 @@ ) ) ) - (func $~lib/map/Map#set (; 21 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 19 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1222,7 +1213,7 @@ ) ) ) - (func $~lib/internal/hash/hash32 (; 22 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash32 (; 20 ;) (type $ii) (param $0 i32) (result i32) (i32.mul (i32.xor (i32.mul @@ -1267,7 +1258,7 @@ (i32.const 16777619) ) ) - (func $~lib/map/Map#find (; 23 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 21 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (set_local $2 (i32.load offset=8 (i32.add @@ -1330,7 +1321,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#rehash (; 24 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 22 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1493,7 +1484,7 @@ ) ) ) - (func $~lib/map/Map#set (; 25 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 23 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1630,7 +1621,7 @@ ) ) ) - (func $~lib/symbol/Symbol.for (; 26 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/symbol/Symbol.for (; 24 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (get_global $~lib/symbol/stringToId) @@ -1685,7 +1676,7 @@ ) (get_local $1) ) - (func $~lib/map/Map#has (; 27 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -1697,7 +1688,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#get (; 28 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 26 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (tee_local $0 (if (result i32) (tee_local $0 @@ -1716,7 +1707,7 @@ ) ) ) - (func $~lib/symbol/Symbol.keyFor (; 29 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/symbol/Symbol.keyFor (; 27 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (tee_local $1 @@ -1743,7 +1734,7 @@ ) ) ) - (func $start (; 30 ;) (type $v) + (func $start (; 28 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.const 160) ) diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index 9c7d2e61..c380155a 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -1,7 +1,6 @@ (module (type $ii (func (param i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) - (type $i (func (result i32))) (type $iv (func (param i32))) (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiiv (func (param i32 i32 i32))) @@ -71,15 +70,7 @@ ) (get_local $2) ) - (func $~lib/memory/memory.size (; 2 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 3 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -115,7 +106,7 @@ ) ) (set_local $3 - (call $~lib/memory/memory.size) + (current_memory) ) (if (i32.gt_u @@ -160,14 +151,14 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $5) ) (i32.const 0) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $4) ) (i32.const 0) @@ -187,14 +178,14 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) ) - (func $~lib/internal/arraybuffer/computeSize (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/computeSize (; 4 ;) (type $ii) (param $0 i32) (result i32) (i32.shl (i32.const 1) (i32.sub @@ -211,7 +202,7 @@ ) ) ) - (func $~lib/internal/arraybuffer/allocUnsafe (; 7 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocUnsafe (; 5 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (i32.eqz @@ -243,7 +234,7 @@ ) (get_local $1) ) - (func $~lib/memory/memset (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) @@ -595,14 +586,14 @@ ) ) ) - (func $~lib/memory/memory.fill (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memset (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/arraybuffer/ArrayBuffer#constructor (; 10 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/arraybuffer/ArrayBuffer#constructor (; 8 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.gt_u @@ -642,7 +633,7 @@ ) (get_local $3) ) - (func $~lib/map/Map#clear (; 11 ;) (type $iv) (param $0 i32) + (func $~lib/map/Map#clear (; 9 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -679,7 +670,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#constructor (; 12 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 10 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/map/Map#clear (tee_local $0 @@ -725,7 +716,7 @@ ) (get_local $0) ) - (func $~lib/map/Map#clear (; 13 ;) (type $iv) (param $0 i32) + (func $~lib/map/Map#clear (; 11 ;) (type $iv) (param $0 i32) (i32.store (get_local $0) (call $~lib/arraybuffer/ArrayBuffer#constructor @@ -762,7 +753,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#constructor (; 14 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/map/Map#constructor (; 12 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (call $~lib/map/Map#clear (tee_local $0 @@ -808,7 +799,7 @@ ) (get_local $0) ) - (func $~lib/internal/hash/hashStr (; 15 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hashStr (; 13 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -863,7 +854,7 @@ ) (get_local $1) ) - (func $~lib/memory/memcmp (; 16 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memcmp (; 14 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (if (i32.eq @@ -933,14 +924,14 @@ (i32.const 0) ) ) - (func $~lib/memory/memory.compare (; 17 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/memory/memory.compare (; 15 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (call $~lib/memory/memcmp (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/string/String.__eq (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (if @@ -1003,7 +994,7 @@ ) ) ) - (func $~lib/map/Map#find (; 19 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 17 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -1073,7 +1064,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#has (; 20 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -1089,7 +1080,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#get (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (set_local $2 (call $~lib/map/Map#find @@ -1112,7 +1103,7 @@ (unreachable) ) ) - (func $~lib/map/Map#rehash (; 22 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 20 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1309,7 +1300,7 @@ ) ) ) - (func $~lib/map/Map#set (; 23 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 21 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1458,7 +1449,7 @@ ) ) ) - (func $~lib/internal/hash/hash32 (; 24 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/hash/hash32 (; 22 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (set_local $1 (get_global $~lib/internal/hash/FNV_OFFSET) @@ -1519,7 +1510,7 @@ ) (get_local $1) ) - (func $~lib/map/Map#find (; 25 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/map/Map#find (; 23 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $3 @@ -1589,7 +1580,7 @@ ) (i32.const 0) ) - (func $~lib/map/Map#rehash (; 26 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $~lib/map/Map#rehash (; 24 ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1786,7 +1777,7 @@ ) ) ) - (func $~lib/map/Map#set (; 27 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/map/Map#set (; 25 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -1935,7 +1926,7 @@ ) ) ) - (func $~lib/symbol/Symbol.for (; 28 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/symbol/Symbol.for (; 26 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (if @@ -1999,7 +1990,7 @@ ) (get_local $2) ) - (func $~lib/map/Map#has (; 29 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#has (; 27 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.ne (call $~lib/map/Map#find (get_local $0) @@ -2015,7 +2006,7 @@ (i32.const 0) ) ) - (func $~lib/map/Map#get (; 30 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/map/Map#get (; 28 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (set_local $2 (call $~lib/map/Map#find @@ -2038,7 +2029,7 @@ (unreachable) ) ) - (func $~lib/symbol/Symbol.keyFor (; 31 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/symbol/Symbol.keyFor (; 29 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (result i32) (if (result i32) @@ -2061,7 +2052,7 @@ (i32.const 0) ) ) - (func $start (; 32 ;) (type $v) + (func $start (; 30 ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.and (i32.add diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 741ad402..7934def5 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -3,7 +3,6 @@ (type $iv (func (param i32))) (type $iii (func (param i32 i32) (result i32))) (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $iiiv (func (param i32 i32 i32))) (type $iiii (func (param i32 i32 i32) (result i32))) (type $v (func)) @@ -32,15 +31,7 @@ ) ) ) - (func $~lib/memory/memory.size (; 2 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 3 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -72,14 +63,14 @@ ) (i32.shl (tee_local $2 - (call $~lib/memory/memory.size) + (current_memory) ) (i32.const 16) ) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (select (get_local $2) (tee_local $3 @@ -107,7 +98,7 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $3) ) (i32.const 0) @@ -126,12 +117,12 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) - (func $~lib/internal/arraybuffer/allocUnsafe (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocUnsafe (; 4 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (i32.gt_u @@ -160,7 +151,7 @@ ) (get_local $1) ) - (func $~lib/memory/memset (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i64) (if @@ -490,14 +481,14 @@ ) ) ) - (func $~lib/memory/memory.fill (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memset (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/typedarray/TypedArray#constructor (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.gt_u @@ -563,7 +554,7 @@ ) (get_local $0) ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/typedarray/TypedArray#constructor (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.gt_u @@ -634,7 +625,7 @@ ) (get_local $0) ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/typedarray/TypedArray#constructor (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.gt_u @@ -705,7 +696,7 @@ ) (get_local $0) ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/typedarray/TypedArray#constructor (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.gt_u @@ -776,7 +767,7 @@ ) (get_local $0) ) - (func $std/typedarray/testInstantiate (; 13 ;) (type $iv) (param $0 i32) + (func $std/typedarray/testInstantiate (; 11 ;) (type $iv) (param $0 i32) (local $1 i32) (if (i32.load offset=4 @@ -1465,7 +1456,7 @@ ) ) ) - (func $~lib/internal/typedarray/TypedArray#__set (; 14 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/typedarray/TypedArray#__set (; 12 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (if (i32.ge_u @@ -1510,7 +1501,7 @@ (get_local $2) ) ) - (func $~lib/internal/typedarray/TypedArray#__get (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/typedarray/TypedArray#__get (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.ge_u @@ -1554,7 +1545,7 @@ ) ) ) - (func $~lib/typedarray/Int32Array#subarray (; 16 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 14 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (set_local $4 @@ -1665,7 +1656,7 @@ ) (get_local $3) ) - (func $~lib/internal/typedarray/TypedArray#__set (; 17 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/typedarray/TypedArray#__set (; 15 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (if (i32.ge_u @@ -1704,7 +1695,7 @@ (get_local $2) ) ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 18 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 16 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (call $~lib/internal/typedarray/TypedArray#__set (get_local $0) @@ -1728,7 +1719,7 @@ ) ) ) - (func $~lib/internal/typedarray/TypedArray#__get (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/typedarray/TypedArray#__get (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (if (i32.ge_u @@ -1766,7 +1757,7 @@ ) ) ) - (func $start (; 20 ;) (type $v) + (func $start (; 18 ;) (type $v) (local $0 i32) (set_global $~lib/allocator/arena/startOffset (i32.const 168) diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 6bc2ad62..34544f1c 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -3,7 +3,6 @@ (type $iv (func (param i32))) (type $iii (func (param i32 i32) (result i32))) (type $ii (func (param i32) (result i32))) - (type $i (func (result i32))) (type $iiiv (func (param i32 i32 i32))) (type $iiii (func (param i32 i32 i32) (result i32))) (type $v (func)) @@ -54,15 +53,7 @@ ) ) ) - (func $~lib/memory/memory.size (; 2 ;) (type $i) (result i32) - (current_memory) - ) - (func $~lib/memory/memory.grow (; 3 ;) (type $ii) (param $0 i32) (result i32) - (grow_memory - (get_local $0) - ) - ) - (func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -98,7 +89,7 @@ ) ) (set_local $3 - (call $~lib/memory/memory.size) + (current_memory) ) (if (i32.gt_u @@ -143,14 +134,14 @@ ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $5) ) (i32.const 0) ) (if (i32.lt_s - (call $~lib/memory/memory.grow + (grow_memory (get_local $4) ) (i32.const 0) @@ -170,14 +161,14 @@ ) (i32.const 0) ) - (func $~lib/memory/memory.allocate (; 5 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/memory/memory.allocate (; 3 ;) (type $ii) (param $0 i32) (result i32) (return (call $~lib/allocator/arena/__memory_allocate (get_local $0) ) ) ) - (func $~lib/internal/arraybuffer/allocUnsafe (; 6 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocUnsafe (; 4 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (if (i32.eqz @@ -209,7 +200,7 @@ ) (get_local $1) ) - (func $~lib/memory/memset (; 7 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memset (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) @@ -561,14 +552,14 @@ ) ) ) - (func $~lib/memory/memory.fill (; 8 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/memory/memory.fill (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (call $~lib/memory/memset (get_local $0) (get_local $1) (get_local $2) ) ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/typedarray/TypedArray#constructor (; 7 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -647,7 +638,7 @@ ) (get_local $0) ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/typedarray/TypedArray#constructor (; 8 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -726,7 +717,7 @@ ) (get_local $0) ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/typedarray/TypedArray#constructor (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -805,7 +796,7 @@ ) (get_local $0) ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/typedarray/TypedArray#constructor (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -884,7 +875,7 @@ ) (get_local $0) ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/typedarray/TypedArray#constructor (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -963,7 +954,7 @@ ) (get_local $0) ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/typedarray/TypedArray#constructor (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1042,7 +1033,7 @@ ) (get_local $0) ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/typedarray/TypedArray#constructor (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1121,7 +1112,7 @@ ) (get_local $0) ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/typedarray/TypedArray#constructor (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1200,7 +1191,7 @@ ) (get_local $0) ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/typedarray/TypedArray#constructor (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1279,7 +1270,7 @@ ) (get_local $0) ) - (func $~lib/internal/typedarray/TypedArray#constructor (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/typedarray/TypedArray#constructor (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1358,7 +1349,7 @@ ) (get_local $0) ) - (func $std/typedarray/testInstantiate (; 19 ;) (type $iv) (param $0 i32) + (func $std/typedarray/testInstantiate (; 17 ;) (type $iv) (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -2207,7 +2198,7 @@ ) ) ) - (func $~lib/internal/typedarray/TypedArray#__set (; 20 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/typedarray/TypedArray#__set (; 18 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2263,7 +2254,7 @@ ) ) ) - (func $~lib/internal/typedarray/TypedArray#__get (; 21 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/typedarray/TypedArray#__get (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2318,7 +2309,7 @@ ) ) ) - (func $~lib/typedarray/Int32Array#subarray (; 22 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Int32Array#subarray (; 20 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2451,7 +2442,7 @@ (get_local $4) ) ) - (func $~lib/internal/typedarray/TypedArray#__set (; 23 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/typedarray/TypedArray#__set (; 21 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) @@ -2507,7 +2498,7 @@ ) ) ) - (func $~lib/typedarray/Uint8ClampedArray#__set (; 24 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/typedarray/Uint8ClampedArray#__set (; 22 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (call $~lib/internal/typedarray/TypedArray#__set @@ -2538,7 +2529,7 @@ ) ) ) - (func $~lib/internal/typedarray/TypedArray#__get (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/internal/typedarray/TypedArray#__get (; 23 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -2593,7 +2584,7 @@ ) ) ) - (func $start (; 26 ;) (type $v) + (func $start (; 24 ;) (type $v) (local $0 i32) (if (i32.eqz