From d62d84521ee740dbe39a1eb3a265a198cde929bb Mon Sep 17 00:00:00 2001 From: dcodeIO Date: Mon, 12 Nov 2018 14:54:08 +0100 Subject: [PATCH] Reduce inlining verbosity With debug info and source maps in place there is not much value anymore in emitting explicitly named blocks. --- src/compiler.ts | 6 +- .../compiler/inlining-recursive.untouched.wat | 4 +- tests/compiler/inlining.untouched.wat | 6 +- .../std/allocator_arena.untouched.wat | 4 +- .../compiler/std/array-literal.untouched.wat | 88 +- tests/compiler/std/array.optimized.wat | 87 +- tests/compiler/std/array.untouched.wat | 2814 ++++++++--------- tests/compiler/std/arraybuffer.untouched.wat | 30 +- tests/compiler/std/dataview.untouched.wat | 1054 +++--- tests/compiler/std/gc-array.untouched.wat | 110 +- tests/compiler/std/math.untouched.wat | 2 +- tests/compiler/std/pointer.untouched.wat | 2 +- tests/compiler/std/static-array.untouched.wat | 158 +- tests/compiler/std/string-utf8.untouched.wat | 18 +- tests/compiler/std/string.optimized.wat | 6 +- tests/compiler/std/string.untouched.wat | 626 ++-- tests/compiler/std/typedarray.optimized.wat | 16 +- tests/compiler/std/typedarray.untouched.wat | 650 ++-- 18 files changed, 2626 insertions(+), 3055 deletions(-) diff --git a/src/compiler.ts b/src/compiler.ts index 6bff46d5..41e524a0 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -5492,7 +5492,11 @@ export class Compiler extends DiagnosticEmitter { ); return module.createUnreachable(); } - return module.createBlock(returnLabel, body, returnType.toNativeType()); + return flow.is(FlowFlags.RETURNS) + ? module.createBlock(returnLabel, body, returnType.toNativeType()) + : body.length > 1 + ? module.createBlock(null, body, returnType.toNativeType()) + : body[0]; } /** Gets the trampoline for the specified function. */ diff --git a/tests/compiler/inlining-recursive.untouched.wat b/tests/compiler/inlining-recursive.untouched.wat index 074ea84a..04081e73 100644 --- a/tests/compiler/inlining-recursive.untouched.wat +++ b/tests/compiler/inlining-recursive.untouched.wat @@ -16,9 +16,7 @@ call $inlining-recursive/bar ) (func $inlining-recursive/bar (; 2 ;) (type $v) - block $inlining-recursive/bar|inlined.0 - call $inlining-recursive/baz - end + call $inlining-recursive/baz ) (func $null (; 3 ;) (type $v) ) diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 67133fb4..8ae32ff4 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -214,10 +214,8 @@ call $~lib/env/abort unreachable end - block $inlining/func_iv|inlined.0 - i32.const 0 - set_local $2 - end + i32.const 0 + set_local $2 block (result i32) i32.const 1 set_global $~argc diff --git a/tests/compiler/std/allocator_arena.untouched.wat b/tests/compiler/std/allocator_arena.untouched.wat index c883c9aa..8dd74e74 100644 --- a/tests/compiler/std/allocator_arena.untouched.wat +++ b/tests/compiler/std/allocator_arena.untouched.wat @@ -1888,7 +1888,7 @@ call $~lib/env/abort unreachable end - block $~lib/memory/memory.fill|inlined.0 + block get_global $std/allocator_arena/ptr1 set_local $0 i32.const 18 @@ -1933,7 +1933,7 @@ end unreachable end - block $~lib/memory/memory.copy|inlined.0 + block get_global $std/allocator_arena/ptr2 set_local $2 get_global $std/allocator_arena/ptr1 diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index dca71197..38071b41 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -507,18 +507,16 @@ get_local $0 get_local $1 i32.store offset=4 - block $~lib/memory/memory.fill|inlined.0 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 ) (func $~lib/array/Array#__unchecked_set (; 9 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) @@ -581,18 +579,16 @@ get_local $0 get_local $1 i32.store offset=4 - block $~lib/memory/memory.fill|inlined.1 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 ) (func $~lib/array/Array#__unchecked_set (; 11 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) @@ -655,18 +651,16 @@ get_local $0 get_local $1 i32.store offset=4 - block $~lib/memory/memory.fill|inlined.2 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 ) (func $~lib/array/Array#__unchecked_set (; 13 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) @@ -745,18 +739,16 @@ get_local $0 get_local $1 i32.store offset=4 - block $~lib/memory/memory.fill|inlined.3 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 ) (func $~lib/array/Array#__unchecked_set (; 16 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 2acbc30c..91439cc8 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2666,6 +2666,7 @@ (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) get_local $0 i32.load offset=4 tee_local $1 @@ -2696,11 +2697,10 @@ tee_local $1 i32.const 2 i32.shl + tee_local $4 call $~lib/internal/memory/memmove get_local $2 - get_local $1 - i32.const 2 - i32.shl + get_local $4 i32.add i32.const 0 i32.store offset=8 @@ -4097,11 +4097,12 @@ get_local $0 i32.const 4 i32.add - tee_local $1 + tee_local $2 f32.load offset=8 set_local $6 - get_local $1 + get_local $2 get_local $0 + tee_local $1 f32.load offset=8 f32.store offset=8 get_local $0 @@ -4686,11 +4687,12 @@ get_local $0 i32.const 8 i32.add - tee_local $1 + tee_local $2 f64.load offset=8 set_local $6 - get_local $1 + get_local $2 get_local $0 + tee_local $1 f64.load offset=8 f64.store offset=8 get_local $0 @@ -5047,27 +5049,27 @@ get_local $1 i32.const 1 i32.sub - set_local $3 + set_local $4 loop $repeat|0 - get_local $3 + get_local $4 i32.const 0 i32.le_s br_if $break|0 - get_local $3 - set_local $4 + get_local $4 + set_local $3 loop $continue|1 - get_local $4 + get_local $3 i32.const 1 i32.and get_local $7 - get_local $4 + get_local $3 i32.const 6 i32.shr_s i32.const 2 i32.shl i32.add i32.load - get_local $4 + get_local $3 i32.const 1 i32.shr_s i32.const 31 @@ -5077,15 +5079,15 @@ i32.and i32.eq if - get_local $4 + get_local $3 i32.const 1 i32.shr_s - set_local $4 + set_local $3 br $continue|1 end end get_local $0 - get_local $4 + get_local $3 i32.const 1 i32.shr_s tee_local $5 @@ -5093,9 +5095,9 @@ i32.shl i32.add i32.load offset=8 - set_local $4 + set_local $3 get_local $0 - get_local $3 + get_local $4 i32.const 2 i32.shl i32.add @@ -5103,7 +5105,7 @@ set_local $6 i32.const 2 set_global $~argc - get_local $4 + get_local $3 get_local $6 get_local $2 call_indirect (type $iii) @@ -5111,7 +5113,7 @@ i32.lt_s if get_local $7 - get_local $3 + get_local $4 i32.const 5 i32.shr_s i32.const 2 @@ -5121,18 +5123,18 @@ get_local $8 i32.load i32.const 1 - get_local $3 + get_local $4 i32.const 31 i32.and i32.shl i32.xor i32.store get_local $0 - get_local $3 + get_local $4 i32.const 2 i32.shl i32.add - get_local $4 + get_local $3 i32.store offset=8 get_local $0 get_local $5 @@ -5142,10 +5144,10 @@ get_local $6 i32.store offset=8 end - get_local $3 + get_local $4 i32.const 1 i32.sub - set_local $3 + set_local $4 br $repeat|0 unreachable end @@ -5155,9 +5157,9 @@ get_local $1 i32.const 1 i32.sub - set_local $3 + set_local $4 loop $repeat|2 - get_local $3 + get_local $4 i32.const 2 i32.lt_s br_if $break|2 @@ -5166,7 +5168,7 @@ set_local $6 get_local $0 get_local $0 - get_local $3 + get_local $4 i32.const 2 i32.shl i32.add @@ -5197,11 +5199,11 @@ i32.const 1 i32.and i32.add - tee_local $4 - get_local $3 + tee_local $3 + get_local $4 i32.lt_s if - get_local $4 + get_local $3 set_local $5 br $continue|3 end @@ -5220,11 +5222,11 @@ i32.shl i32.add i32.load offset=8 - set_local $4 + set_local $3 i32.const 2 set_global $~argc get_local $6 - get_local $4 + get_local $3 get_local $2 call_indirect (type $iii) i32.const 0 @@ -5255,7 +5257,7 @@ get_local $6 i32.store offset=8 get_local $0 - get_local $4 + get_local $3 i32.store offset=8 end get_local $5 @@ -5265,10 +5267,10 @@ br $continue|4 end end - get_local $3 + get_local $4 i32.const 1 i32.sub - set_local $3 + set_local $4 br $repeat|2 unreachable end @@ -5277,11 +5279,12 @@ get_local $0 i32.const 4 i32.add - tee_local $2 + tee_local $3 i32.load offset=8 set_local $1 - get_local $2 + get_local $3 get_local $0 + tee_local $2 i32.load offset=8 i32.store offset=8 get_local $0 @@ -7575,11 +7578,7 @@ i32.const 1 i32.shl call $~lib/internal/memory/memmove - get_local $0 - get_local $4 - i32.const 1 - i32.shl - i32.add + get_local $3 i32.const 46 i32.store16 offset=4 get_local $1 diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index f8117124..920065a6 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -785,18 +785,16 @@ get_local $0 get_local $1 i32.store offset=4 - block $~lib/memory/memory.fill|inlined.0 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 ) (func $~lib/array/Array.isArray | null> (; 8 ;) (type $ii) (param $0 i32) (result i32) @@ -1098,15 +1096,13 @@ i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/storeUnsafe|inlined.0 - get_local $4 - get_local $2 - i32.const 2 - i32.shl - i32.add - get_local $1 - i32.store offset=8 - end + get_local $4 + get_local $2 + i32.const 2 + i32.shl + i32.add + get_local $1 + i32.store offset=8 get_local $2 i32.const 1 i32.add @@ -2696,60 +2692,54 @@ get_local $0 get_local $1 i32.store - block $~lib/memory/memory.fill|inlined.2 - get_local $0 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - get_local $2 - i32.add - set_local $3 - i32.const 0 - set_local $4 - get_local $1 - get_local $2 - i32.sub - set_local $5 - get_local $3 - get_local $4 - get_local $5 - call $~lib/internal/memory/memset - end + get_local $0 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + get_local $2 + i32.add + set_local $3 + i32.const 0 + set_local $4 + get_local $1 + get_local $2 + i32.sub + set_local $5 + get_local $3 + get_local $4 + get_local $5 + call $~lib/internal/memory/memset else get_local $1 call $~lib/internal/arraybuffer/allocateUnsafe set_local $5 - block $~lib/memory/memory.copy|inlined.0 - get_local $5 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - get_local $0 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $3 - get_local $4 - get_local $3 - get_local $2 - call $~lib/internal/memory/memmove - end - block $~lib/memory/memory.fill|inlined.3 - get_local $5 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - get_local $2 - i32.add - set_local $3 - i32.const 0 - set_local $4 - get_local $1 - get_local $2 - i32.sub - set_local $6 - get_local $3 - get_local $4 - get_local $6 - call $~lib/internal/memory/memset - end + get_local $5 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + get_local $0 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $3 + get_local $4 + get_local $3 + get_local $2 + call $~lib/internal/memory/memmove + get_local $5 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + get_local $2 + i32.add + set_local $3 + i32.const 0 + set_local $4 + get_local $1 + get_local $2 + i32.sub + set_local $6 + get_local $3 + get_local $4 + get_local $6 + call $~lib/internal/memory/memset get_local $5 return end @@ -2825,15 +2815,13 @@ get_local $0 get_local $5 i32.store offset=4 - block $~lib/internal/arraybuffer/storeUnsafe|inlined.0 - get_local $3 - get_local $2 - i32.const 2 - i32.shl - i32.add - get_local $1 - i32.store offset=8 - end + get_local $3 + get_local $2 + i32.const 2 + i32.shl + i32.add + get_local $1 + i32.store offset=8 get_local $5 ) (func $~lib/array/Array#__get (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) @@ -3120,24 +3108,22 @@ get_local $11 if block - block $~lib/internal/arraybuffer/storeUnsafe|inlined.1 - block $~lib/internal/arraybuffer/loadUnsafe|inlined.2 (result i32) - get_local $4 - get_local $9 - i32.const 2 - i32.shl - i32.add - i32.load offset=8 - end - set_local $6 + block $~lib/internal/arraybuffer/loadUnsafe|inlined.2 (result i32) get_local $4 - get_local $8 + get_local $9 i32.const 2 i32.shl i32.add - get_local $6 - i32.store offset=8 + i32.load offset=8 end + set_local $6 + get_local $4 + get_local $8 + i32.const 2 + i32.shl + i32.add + get_local $6 + i32.store offset=8 get_local $9 i32.const 1 i32.sub @@ -3315,39 +3301,35 @@ get_local $2 i32.store end - block $~lib/memory/memory.copy|inlined.4 - get_local $2 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - i32.const 4 - i32.add - set_local $6 - get_local $2 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $7 - get_local $3 - i32.const 1 - i32.sub - i32.const 2 - i32.shl - set_local $8 - get_local $6 - get_local $7 - get_local $8 - call $~lib/internal/memory/memmove - end - block $~lib/internal/arraybuffer/storeUnsafe|inlined.2 - i32.const 0 - set_local $8 - get_local $2 - get_local $8 - i32.const 2 - i32.shl - i32.add - get_local $1 - i32.store offset=8 - end + get_local $2 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + i32.const 4 + i32.add + set_local $6 + get_local $2 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $7 + get_local $3 + i32.const 1 + i32.sub + i32.const 2 + i32.shl + set_local $8 + get_local $6 + get_local $7 + get_local $8 + call $~lib/internal/memory/memmove + i32.const 0 + set_local $8 + get_local $2 + get_local $8 + i32.const 2 + i32.shl + i32.add + get_local $1 + i32.store offset=8 get_local $0 get_local $5 i32.store offset=4 @@ -3393,37 +3375,33 @@ i32.const 1 i32.sub set_local $5 - block $~lib/memory/memory.copy|inlined.5 - get_local $2 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $3 - get_local $2 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - i32.const 4 - i32.add - set_local $6 - get_local $5 - i32.const 2 - i32.shl - set_local $7 - get_local $3 - get_local $6 - get_local $7 - call $~lib/internal/memory/memmove - end - block $~lib/internal/arraybuffer/storeUnsafe|inlined.3 - i32.const 0 - set_local $7 - get_local $2 - get_local $5 - i32.const 2 - i32.shl - i32.add - get_local $7 - i32.store offset=8 - end + get_local $2 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $3 + get_local $2 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + i32.const 4 + i32.add + set_local $6 + get_local $5 + i32.const 2 + i32.shl + set_local $7 + get_local $3 + get_local $6 + get_local $7 + call $~lib/internal/memory/memmove + i32.const 0 + set_local $7 + get_local $2 + get_local $5 + i32.const 2 + i32.shl + i32.add + get_local $7 + i32.store offset=8 get_local $0 get_local $5 i32.store offset=4 @@ -3464,33 +3442,29 @@ i32.load offset=8 end set_local $4 - block $~lib/internal/arraybuffer/storeUnsafe|inlined.4 - block $~lib/internal/arraybuffer/loadUnsafe|inlined.5 (result i32) - get_local $1 - get_local $3 - i32.const 2 - i32.shl - i32.add - i32.load offset=8 - end - set_local $5 - get_local $1 - get_local $2 - i32.const 2 - i32.shl - i32.add - get_local $5 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafe|inlined.5 + block $~lib/internal/arraybuffer/loadUnsafe|inlined.5 (result i32) get_local $1 get_local $3 i32.const 2 i32.shl i32.add - get_local $4 - i32.store offset=8 + i32.load offset=8 end + set_local $5 + get_local $1 + get_local $2 + i32.const 2 + i32.shl + i32.add + get_local $5 + i32.store offset=8 + get_local $1 + get_local $3 + i32.const 2 + i32.shl + i32.add + get_local $4 + i32.store offset=8 end block get_local $2 @@ -3634,34 +3608,32 @@ get_local $0 i32.load set_local $6 - block $~lib/memory/memory.copy|inlined.6 - get_local $6 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - get_local $1 - i32.const 2 - i32.shl - i32.add - set_local $4 - get_local $6 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - get_local $1 - get_local $2 - i32.add - i32.const 2 - i32.shl - i32.add - set_local $5 - get_local $2 - i32.const 2 - i32.shl - set_local $7 - get_local $4 - get_local $5 - get_local $7 - call $~lib/internal/memory/memmove - end + get_local $6 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + get_local $1 + i32.const 2 + i32.shl + i32.add + set_local $4 + get_local $6 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + get_local $1 + get_local $2 + i32.add + i32.const 2 + i32.shl + i32.add + set_local $5 + get_local $2 + i32.const 2 + i32.shl + set_local $7 + get_local $4 + get_local $5 + get_local $7 + call $~lib/internal/memory/memmove get_local $0 get_local $3 get_local $2 @@ -3711,15 +3683,13 @@ i32.add i32.store offset=4 end - block $~lib/internal/arraybuffer/storeUnsafe|inlined.6 - get_local $3 - get_local $1 - i32.const 2 - i32.shl - i32.add - get_local $2 - i32.store offset=8 - end + get_local $3 + get_local $1 + i32.const 2 + i32.shl + i32.add + get_local $2 + i32.store offset=8 ) (func $start~anonymous|1 (; 37 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) get_local $0 @@ -4154,18 +4124,16 @@ get_local $0 get_local $1 i32.store offset=4 - block $~lib/memory/memory.fill|inlined.4 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 ) (func $~lib/array/Array#map (; 63 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) @@ -4207,7 +4175,7 @@ end i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/storeUnsafe|inlined.0 + block block (result f32) i32.const 3 set_global $~argc @@ -4315,7 +4283,7 @@ end i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/storeUnsafe|inlined.7 + block block (result i32) i32.const 3 set_global $~argc @@ -5000,21 +4968,19 @@ end end end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.1 - get_local $6 - i32.const 1 - i32.add - set_local $8 - get_local $0 - get_local $1 - i32.add - get_local $8 - i32.const 2 - i32.shl - i32.add - get_local $5 - f32.store offset=8 - end + get_local $6 + i32.const 1 + i32.add + set_local $8 + get_local $0 + get_local $1 + i32.add + get_local $8 + i32.const 2 + i32.shl + i32.add + get_local $5 + f32.store offset=8 end get_local $4 i32.const 1 @@ -5053,14 +5019,12 @@ br $~lib/memory/memory.allocate|inlined.1 end set_local $5 - block $~lib/memory/memory.fill|inlined.5 - i32.const 0 - set_local $6 - get_local $5 - get_local $6 - get_local $4 - call $~lib/internal/memory/memset - end + i32.const 0 + set_local $6 + get_local $5 + get_local $6 + get_local $4 + call $~lib/internal/memory/memset block $break|0 get_local $2 i32.const 1 @@ -5165,28 +5129,24 @@ i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.2 - get_local $0 - get_local $1 - i32.add - get_local $6 - i32.const 2 - i32.shl - i32.add - get_local $9 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.3 - get_local $0 - get_local $1 - i32.add - get_local $8 - i32.const 2 - i32.shl - i32.add - get_local $10 - f32.store offset=8 - end + get_local $0 + get_local $1 + i32.add + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $9 + f32.store offset=8 + get_local $0 + get_local $1 + i32.add + get_local $8 + i32.const 2 + i32.shl + i32.add + get_local $10 + f32.store offset=8 end end get_local $6 @@ -5223,31 +5183,9 @@ f32.load offset=8 end set_local $10 - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.4 - i32.const 0 - set_local $8 - block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.5 (result f32) - get_local $0 - get_local $1 - i32.add - get_local $6 - i32.const 2 - i32.shl - i32.add - f32.load offset=8 - end - set_local $9 - get_local $0 - get_local $1 - i32.add - get_local $8 - i32.const 2 - i32.shl - i32.add - get_local $9 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.5 + i32.const 0 + set_local $8 + block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.5 (result f32) get_local $0 get_local $1 i32.add @@ -5255,9 +5193,27 @@ i32.const 2 i32.shl i32.add - get_local $10 - f32.store offset=8 + f32.load offset=8 end + set_local $9 + get_local $0 + get_local $1 + i32.add + get_local $8 + i32.const 2 + i32.shl + i32.add + get_local $9 + f32.store offset=8 + get_local $0 + get_local $1 + i32.add + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $10 + f32.store offset=8 i32.const 1 set_local $8 block $break|3 @@ -5354,30 +5310,26 @@ i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.6 - get_local $0 - get_local $1 - i32.add - get_local $8 - i32.const 2 - i32.shl - i32.add - get_local $10 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.7 - i32.const 0 - set_local $11 - get_local $0 - get_local $1 - i32.add - get_local $11 - i32.const 2 - i32.shl - i32.add - get_local $9 - f32.store offset=8 - end + get_local $0 + get_local $1 + i32.add + get_local $8 + i32.const 2 + i32.shl + i32.add + get_local $10 + f32.store offset=8 + i32.const 0 + set_local $11 + get_local $0 + get_local $1 + i32.add + get_local $11 + i32.const 2 + i32.shl + i32.add + get_local $9 + f32.store offset=8 end get_local $8 i32.const 1 @@ -5420,45 +5372,41 @@ f32.load offset=8 end set_local $12 - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.8 - i32.const 1 - set_local $6 - block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.9 (result f32) - i32.const 0 - set_local $7 - get_local $0 - get_local $1 - i32.add - get_local $7 - i32.const 2 - i32.shl - i32.add - f32.load offset=8 - end - set_local $10 - get_local $0 - get_local $1 - i32.add - get_local $6 - i32.const 2 - i32.shl - i32.add - get_local $10 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.9 + i32.const 1 + set_local $6 + block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.9 (result f32) i32.const 0 - set_local $6 + set_local $7 get_local $0 get_local $1 i32.add - get_local $6 + get_local $7 i32.const 2 i32.shl i32.add - get_local $12 - f32.store offset=8 + f32.load offset=8 end + set_local $10 + get_local $0 + get_local $1 + i32.add + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $10 + f32.store offset=8 + i32.const 0 + set_local $6 + get_local $0 + get_local $1 + i32.add + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $12 + f32.store offset=8 ) (func $~lib/array/Array#sort (; 98 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -5526,28 +5474,24 @@ i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/storeUnsafe|inlined.1 - i32.const 1 - set_local $4 - get_local $3 - get_local $4 - i32.const 2 - i32.shl - i32.add - get_local $6 - f32.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafe|inlined.2 - i32.const 0 - set_local $4 - get_local $3 - get_local $4 - i32.const 2 - i32.shl - i32.add - get_local $5 - f32.store offset=8 - end + i32.const 1 + set_local $4 + get_local $3 + get_local $4 + i32.const 2 + i32.shl + i32.add + get_local $6 + f32.store offset=8 + i32.const 0 + set_local $4 + get_local $3 + get_local $4 + i32.const 2 + i32.shl + i32.add + get_local $5 + f32.store offset=8 end get_local $0 return @@ -5791,21 +5735,19 @@ end end end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.1 - get_local $6 - i32.const 1 - i32.add - set_local $8 - get_local $0 - get_local $1 - i32.add - get_local $8 - i32.const 3 - i32.shl - i32.add - get_local $5 - f64.store offset=8 - end + get_local $6 + i32.const 1 + i32.add + set_local $8 + get_local $0 + get_local $1 + i32.add + get_local $8 + i32.const 3 + i32.shl + i32.add + get_local $5 + f64.store offset=8 end get_local $4 i32.const 1 @@ -5841,14 +5783,12 @@ br $~lib/memory/memory.allocate|inlined.2 end set_local $5 - block $~lib/memory/memory.fill|inlined.6 - i32.const 0 - set_local $6 - get_local $5 - get_local $6 - get_local $4 - call $~lib/internal/memory/memset - end + i32.const 0 + set_local $6 + get_local $5 + get_local $6 + get_local $4 + call $~lib/internal/memory/memset block $break|0 get_local $2 i32.const 1 @@ -5953,28 +5893,24 @@ i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.2 - get_local $0 - get_local $1 - i32.add - get_local $6 - i32.const 3 - i32.shl - i32.add - get_local $9 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.3 - get_local $0 - get_local $1 - i32.add - get_local $8 - i32.const 3 - i32.shl - i32.add - get_local $10 - f64.store offset=8 - end + get_local $0 + get_local $1 + i32.add + get_local $6 + i32.const 3 + i32.shl + i32.add + get_local $9 + f64.store offset=8 + get_local $0 + get_local $1 + i32.add + get_local $8 + i32.const 3 + i32.shl + i32.add + get_local $10 + f64.store offset=8 end end get_local $6 @@ -6011,31 +5947,9 @@ f64.load offset=8 end set_local $10 - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.4 - i32.const 0 - set_local $8 - block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.5 (result f64) - get_local $0 - get_local $1 - i32.add - get_local $6 - i32.const 3 - i32.shl - i32.add - f64.load offset=8 - end - set_local $9 - get_local $0 - get_local $1 - i32.add - get_local $8 - i32.const 3 - i32.shl - i32.add - get_local $9 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.5 + i32.const 0 + set_local $8 + block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.5 (result f64) get_local $0 get_local $1 i32.add @@ -6043,9 +5957,27 @@ i32.const 3 i32.shl i32.add - get_local $10 - f64.store offset=8 + f64.load offset=8 end + set_local $9 + get_local $0 + get_local $1 + i32.add + get_local $8 + i32.const 3 + i32.shl + i32.add + get_local $9 + f64.store offset=8 + get_local $0 + get_local $1 + i32.add + get_local $6 + i32.const 3 + i32.shl + i32.add + get_local $10 + f64.store offset=8 i32.const 1 set_local $8 block $break|3 @@ -6142,30 +6074,26 @@ i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.6 - get_local $0 - get_local $1 - i32.add - get_local $8 - i32.const 3 - i32.shl - i32.add - get_local $10 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.7 - i32.const 0 - set_local $11 - get_local $0 - get_local $1 - i32.add - get_local $11 - i32.const 3 - i32.shl - i32.add - get_local $9 - f64.store offset=8 - end + get_local $0 + get_local $1 + i32.add + get_local $8 + i32.const 3 + i32.shl + i32.add + get_local $10 + f64.store offset=8 + i32.const 0 + set_local $11 + get_local $0 + get_local $1 + i32.add + get_local $11 + i32.const 3 + i32.shl + i32.add + get_local $9 + f64.store offset=8 end get_local $8 i32.const 1 @@ -6208,45 +6136,41 @@ f64.load offset=8 end set_local $12 - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.8 - i32.const 1 - set_local $6 - block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.9 (result f64) - i32.const 0 - set_local $7 - get_local $0 - get_local $1 - i32.add - get_local $7 - i32.const 3 - i32.shl - i32.add - f64.load offset=8 - end - set_local $10 - get_local $0 - get_local $1 - i32.add - get_local $6 - i32.const 3 - i32.shl - i32.add - get_local $10 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.9 + i32.const 1 + set_local $6 + block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.9 (result f64) i32.const 0 - set_local $6 + set_local $7 get_local $0 get_local $1 i32.add - get_local $6 + get_local $7 i32.const 3 i32.shl i32.add - get_local $12 - f64.store offset=8 + f64.load offset=8 end + set_local $10 + get_local $0 + get_local $1 + i32.add + get_local $6 + i32.const 3 + i32.shl + i32.add + get_local $10 + f64.store offset=8 + i32.const 0 + set_local $6 + get_local $0 + get_local $1 + i32.add + get_local $6 + i32.const 3 + i32.shl + i32.add + get_local $12 + f64.store offset=8 ) (func $~lib/array/Array#sort (; 105 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -6314,28 +6238,24 @@ i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/storeUnsafe|inlined.0 - i32.const 1 - set_local $4 - get_local $3 - get_local $4 - i32.const 3 - i32.shl - i32.add - get_local $6 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafe|inlined.1 - i32.const 0 - set_local $4 - get_local $3 - get_local $4 - i32.const 3 - i32.shl - i32.add - get_local $5 - f64.store offset=8 - end + i32.const 1 + set_local $4 + get_local $3 + get_local $4 + i32.const 3 + i32.shl + i32.add + get_local $6 + f64.store offset=8 + i32.const 0 + set_local $4 + get_local $3 + get_local $4 + i32.const 3 + i32.shl + i32.add + get_local $5 + f64.store offset=8 end get_local $0 return @@ -6601,21 +6521,19 @@ end end end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.1 - get_local $6 - i32.const 1 - i32.add - set_local $7 - get_local $0 - get_local $1 - i32.add - get_local $7 - i32.const 2 - i32.shl - i32.add - get_local $5 - i32.store offset=8 - end + get_local $6 + i32.const 1 + i32.add + set_local $7 + get_local $0 + get_local $1 + i32.add + get_local $7 + i32.const 2 + i32.shl + i32.add + get_local $5 + i32.store offset=8 end get_local $4 i32.const 1 @@ -6651,14 +6569,12 @@ br $~lib/memory/memory.allocate|inlined.3 end set_local $5 - block $~lib/memory/memory.fill|inlined.7 - i32.const 0 - set_local $6 - get_local $5 - get_local $6 - get_local $4 - call $~lib/internal/memory/memset - end + i32.const 0 + set_local $6 + get_local $5 + get_local $6 + get_local $4 + call $~lib/internal/memory/memset block $break|0 get_local $2 i32.const 1 @@ -6763,28 +6679,24 @@ i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.2 - get_local $0 - get_local $1 - i32.add - get_local $6 - i32.const 2 - i32.shl - i32.add - get_local $9 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.3 - get_local $0 - get_local $1 - i32.add - get_local $8 - i32.const 2 - i32.shl - i32.add - get_local $10 - i32.store offset=8 - end + get_local $0 + get_local $1 + i32.add + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $9 + i32.store offset=8 + get_local $0 + get_local $1 + i32.add + get_local $8 + i32.const 2 + i32.shl + i32.add + get_local $10 + i32.store offset=8 end end get_local $6 @@ -6821,31 +6733,9 @@ i32.load offset=8 end set_local $10 - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.4 - i32.const 0 - set_local $9 - block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.5 (result i32) - get_local $0 - get_local $1 - i32.add - get_local $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=8 - end - set_local $8 - get_local $0 - get_local $1 - i32.add - get_local $9 - i32.const 2 - i32.shl - i32.add - get_local $8 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.5 + i32.const 0 + set_local $9 + block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.5 (result i32) get_local $0 get_local $1 i32.add @@ -6853,9 +6743,27 @@ i32.const 2 i32.shl i32.add - get_local $10 - i32.store offset=8 + i32.load offset=8 end + set_local $8 + get_local $0 + get_local $1 + i32.add + get_local $9 + i32.const 2 + i32.shl + i32.add + get_local $8 + i32.store offset=8 + get_local $0 + get_local $1 + i32.add + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $10 + i32.store offset=8 i32.const 1 set_local $8 block $break|3 @@ -6952,30 +6860,26 @@ i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.6 - get_local $0 - get_local $1 - i32.add - get_local $8 - i32.const 2 - i32.shl - i32.add - get_local $10 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.7 - i32.const 0 - set_local $11 - get_local $0 - get_local $1 - i32.add - get_local $11 - i32.const 2 - i32.shl - i32.add - get_local $7 - i32.store offset=8 - end + get_local $0 + get_local $1 + i32.add + get_local $8 + i32.const 2 + i32.shl + i32.add + get_local $10 + i32.store offset=8 + i32.const 0 + set_local $11 + get_local $0 + get_local $1 + i32.add + get_local $11 + i32.const 2 + i32.shl + i32.add + get_local $7 + i32.store offset=8 end get_local $8 i32.const 1 @@ -7018,33 +6922,9 @@ i32.load offset=8 end set_local $12 - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.8 - i32.const 1 - set_local $6 - block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.9 (result i32) - i32.const 0 - set_local $9 - get_local $0 - get_local $1 - i32.add - get_local $9 - i32.const 2 - i32.shl - i32.add - i32.load offset=8 - end - set_local $9 - get_local $0 - get_local $1 - i32.add - get_local $6 - i32.const 2 - i32.shl - i32.add - get_local $9 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.9 + i32.const 1 + set_local $6 + block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.9 (result i32) i32.const 0 set_local $9 get_local $0 @@ -7054,9 +6934,29 @@ i32.const 2 i32.shl i32.add - get_local $12 - i32.store offset=8 + i32.load offset=8 end + set_local $9 + get_local $0 + get_local $1 + i32.add + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $9 + i32.store offset=8 + i32.const 0 + set_local $9 + get_local $0 + get_local $1 + i32.add + get_local $9 + i32.const 2 + i32.shl + i32.add + get_local $12 + i32.store offset=8 ) (func $~lib/array/Array#sort (; 113 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -7124,28 +7024,24 @@ i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/storeUnsafe|inlined.8 - i32.const 1 - set_local $6 - get_local $3 - get_local $6 - i32.const 2 - i32.shl - i32.add - get_local $5 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafe|inlined.9 - i32.const 0 - set_local $6 - get_local $3 - get_local $6 - i32.const 2 - i32.shl - i32.add - get_local $4 - i32.store offset=8 - end + i32.const 1 + set_local $6 + get_local $3 + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $5 + i32.store offset=8 + i32.const 0 + set_local $6 + get_local $3 + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $4 + i32.store offset=8 end get_local $0 return @@ -7281,21 +7177,19 @@ end end end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.1 - get_local $6 - i32.const 1 - i32.add - set_local $7 - get_local $0 - get_local $1 - i32.add - get_local $7 - i32.const 2 - i32.shl - i32.add - get_local $5 - i32.store offset=8 - end + get_local $6 + i32.const 1 + i32.add + set_local $7 + get_local $0 + get_local $1 + i32.add + get_local $7 + i32.const 2 + i32.shl + i32.add + get_local $5 + i32.store offset=8 end get_local $4 i32.const 1 @@ -7331,14 +7225,12 @@ br $~lib/memory/memory.allocate|inlined.4 end set_local $5 - block $~lib/memory/memory.fill|inlined.8 - i32.const 0 - set_local $6 - get_local $5 - get_local $6 - get_local $4 - call $~lib/internal/memory/memset - end + i32.const 0 + set_local $6 + get_local $5 + get_local $6 + get_local $4 + call $~lib/internal/memory/memset block $break|0 get_local $2 i32.const 1 @@ -7443,28 +7335,24 @@ i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.2 - get_local $0 - get_local $1 - i32.add - get_local $6 - i32.const 2 - i32.shl - i32.add - get_local $9 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.3 - get_local $0 - get_local $1 - i32.add - get_local $8 - i32.const 2 - i32.shl - i32.add - get_local $10 - i32.store offset=8 - end + get_local $0 + get_local $1 + i32.add + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $9 + i32.store offset=8 + get_local $0 + get_local $1 + i32.add + get_local $8 + i32.const 2 + i32.shl + i32.add + get_local $10 + i32.store offset=8 end end get_local $6 @@ -7501,31 +7389,9 @@ i32.load offset=8 end set_local $10 - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.4 - i32.const 0 - set_local $9 - block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.5 (result i32) - get_local $0 - get_local $1 - i32.add - get_local $6 - i32.const 2 - i32.shl - i32.add - i32.load offset=8 - end - set_local $8 - get_local $0 - get_local $1 - i32.add - get_local $9 - i32.const 2 - i32.shl - i32.add - get_local $8 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.5 + i32.const 0 + set_local $9 + block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.5 (result i32) get_local $0 get_local $1 i32.add @@ -7533,9 +7399,27 @@ i32.const 2 i32.shl i32.add - get_local $10 - i32.store offset=8 + i32.load offset=8 end + set_local $8 + get_local $0 + get_local $1 + i32.add + get_local $9 + i32.const 2 + i32.shl + i32.add + get_local $8 + i32.store offset=8 + get_local $0 + get_local $1 + i32.add + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $10 + i32.store offset=8 i32.const 1 set_local $8 block $break|3 @@ -7632,30 +7516,26 @@ i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.6 - get_local $0 - get_local $1 - i32.add - get_local $8 - i32.const 2 - i32.shl - i32.add - get_local $10 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.7 - i32.const 0 - set_local $11 - get_local $0 - get_local $1 - i32.add - get_local $11 - i32.const 2 - i32.shl - i32.add - get_local $7 - i32.store offset=8 - end + get_local $0 + get_local $1 + i32.add + get_local $8 + i32.const 2 + i32.shl + i32.add + get_local $10 + i32.store offset=8 + i32.const 0 + set_local $11 + get_local $0 + get_local $1 + i32.add + get_local $11 + i32.const 2 + i32.shl + i32.add + get_local $7 + i32.store offset=8 end get_local $8 i32.const 1 @@ -7698,33 +7578,9 @@ i32.load offset=8 end set_local $12 - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.8 - i32.const 1 - set_local $6 - block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.9 (result i32) - i32.const 0 - set_local $9 - get_local $0 - get_local $1 - i32.add - get_local $9 - i32.const 2 - i32.shl - i32.add - i32.load offset=8 - end - set_local $9 - get_local $0 - get_local $1 - i32.add - get_local $6 - i32.const 2 - i32.shl - i32.add - get_local $9 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.9 + i32.const 1 + set_local $6 + block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.9 (result i32) i32.const 0 set_local $9 get_local $0 @@ -7734,9 +7590,29 @@ i32.const 2 i32.shl i32.add - get_local $12 - i32.store offset=8 + i32.load offset=8 end + set_local $9 + get_local $0 + get_local $1 + i32.add + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $9 + i32.store offset=8 + i32.const 0 + set_local $9 + get_local $0 + get_local $1 + i32.add + get_local $9 + i32.const 2 + i32.shl + i32.add + get_local $12 + i32.store offset=8 ) (func $~lib/array/Array#sort (; 118 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -7804,28 +7680,24 @@ i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/storeUnsafe|inlined.1 - i32.const 1 - set_local $6 - get_local $3 - get_local $6 - i32.const 2 - i32.shl - i32.add - get_local $5 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafe|inlined.2 - i32.const 0 - set_local $6 - get_local $3 - get_local $6 - i32.const 2 - i32.shl - i32.add - get_local $4 - i32.store offset=8 - end + i32.const 1 + set_local $6 + get_local $3 + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $5 + i32.store offset=8 + i32.const 0 + set_local $6 + get_local $3 + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $4 + i32.store offset=8 end get_local $0 return @@ -8162,18 +8034,16 @@ get_local $0 get_local $1 i32.store offset=4 - block $~lib/memory/memory.fill|inlined.9 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 ) (func $~lib/array/Array>#__set (; 133 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) @@ -8219,15 +8089,13 @@ i32.add i32.store offset=4 end - block $~lib/internal/arraybuffer/storeUnsafe,Array>|inlined.0 - get_local $3 - get_local $1 - i32.const 2 - i32.shl - i32.add - get_local $2 - i32.store offset=8 - end + get_local $3 + get_local $1 + i32.const 2 + i32.shl + i32.add + get_local $2 + i32.store offset=8 ) (func $~lib/array/Array>#__get (; 134 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -8399,21 +8267,19 @@ end end end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset,Array>|inlined.1 - get_local $6 - i32.const 1 - i32.add - set_local $7 - get_local $0 - get_local $1 - i32.add - get_local $7 - i32.const 2 - i32.shl - i32.add - get_local $5 - i32.store offset=8 - end + get_local $6 + i32.const 1 + i32.add + set_local $7 + get_local $0 + get_local $1 + i32.add + get_local $7 + i32.const 2 + i32.shl + i32.add + get_local $5 + i32.store offset=8 end get_local $4 i32.const 1 @@ -8491,28 +8357,24 @@ i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/storeUnsafe,Array>|inlined.1 - i32.const 1 - set_local $6 - get_local $3 - get_local $6 - i32.const 2 - i32.shl - i32.add - get_local $5 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafe,Array>|inlined.2 - i32.const 0 - set_local $6 - get_local $3 - get_local $6 - i32.const 2 - i32.shl - i32.add - get_local $4 - i32.store offset=8 - end + i32.const 1 + set_local $6 + get_local $3 + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $5 + i32.store offset=8 + i32.const 0 + set_local $6 + get_local $3 + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $4 + i32.store offset=8 end get_local $0 return @@ -8638,18 +8500,16 @@ get_local $0 get_local $1 i32.store offset=4 - block $~lib/memory/memory.fill|inlined.10 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 ) (func $std/array/Proxy#constructor (; 142 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) @@ -8714,15 +8574,13 @@ i32.add i32.store offset=4 end - block $~lib/internal/arraybuffer/storeUnsafe,Proxy>|inlined.0 - get_local $3 - get_local $1 - i32.const 2 - i32.shl - i32.add - get_local $2 - i32.store offset=8 - end + get_local $3 + get_local $1 + i32.const 2 + i32.shl + i32.add + get_local $2 + i32.store offset=8 ) (func $std/array/createReverseOrderedElementsArray (; 144 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) @@ -8862,21 +8720,19 @@ end end end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset,Proxy>|inlined.1 - get_local $6 - i32.const 1 - i32.add - set_local $7 - get_local $0 - get_local $1 - i32.add - get_local $7 - i32.const 2 - i32.shl - i32.add - get_local $5 - i32.store offset=8 - end + get_local $6 + i32.const 1 + i32.add + set_local $7 + get_local $0 + get_local $1 + i32.add + get_local $7 + i32.const 2 + i32.shl + i32.add + get_local $5 + i32.store offset=8 end get_local $4 i32.const 1 @@ -8954,28 +8810,24 @@ i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/storeUnsafe,Proxy>|inlined.1 - i32.const 1 - set_local $6 - get_local $3 - get_local $6 - i32.const 2 - i32.shl - i32.add - get_local $5 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafe,Proxy>|inlined.2 - i32.const 0 - set_local $6 - get_local $3 - get_local $6 - i32.const 2 - i32.shl - i32.add - get_local $4 - i32.store offset=8 - end + i32.const 1 + set_local $6 + get_local $3 + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $5 + i32.store offset=8 + i32.const 0 + set_local $6 + get_local $3 + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $4 + i32.store offset=8 end get_local $0 return @@ -9356,21 +9208,19 @@ end end end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.1 - get_local $6 - i32.const 1 - i32.add - set_local $7 - get_local $0 - get_local $1 - i32.add - get_local $7 - i32.const 2 - i32.shl - i32.add - get_local $5 - i32.store offset=8 - end + get_local $6 + i32.const 1 + i32.add + set_local $7 + get_local $0 + get_local $1 + i32.add + get_local $7 + i32.const 2 + i32.shl + i32.add + get_local $5 + i32.store offset=8 end get_local $4 i32.const 1 @@ -9448,28 +9298,24 @@ i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/storeUnsafe|inlined.0 - i32.const 1 - set_local $6 - get_local $3 - get_local $6 - i32.const 2 - i32.shl - i32.add - get_local $5 - i32.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafe|inlined.1 - i32.const 0 - set_local $6 - get_local $3 - get_local $6 - i32.const 2 - i32.shl - i32.add - get_local $4 - i32.store offset=8 - end + i32.const 1 + set_local $6 + get_local $3 + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $5 + i32.store offset=8 + i32.const 0 + set_local $6 + get_local $3 + get_local $6 + i32.const 2 + i32.shl + i32.add + get_local $4 + i32.store offset=8 end get_local $0 return @@ -9726,18 +9572,16 @@ get_local $0 get_local $1 i32.store offset=4 - block $~lib/memory/memory.fill|inlined.11 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 ) (func $~lib/internal/string/allocateUnsafe (; 164 ;) (type $ii) (param $0 i32) (result i32) @@ -9998,15 +9842,13 @@ i32.add i32.store offset=4 end - block $~lib/internal/arraybuffer/storeUnsafe|inlined.2 - get_local $3 - get_local $1 - i32.const 2 - i32.shl - i32.add - get_local $2 - i32.store offset=8 - end + get_local $3 + get_local $1 + i32.const 2 + i32.shl + i32.add + get_local $2 + i32.store offset=8 ) (func $std/array/createRandomStringArray (; 171 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) @@ -10342,28 +10184,24 @@ get_local $11 call $~lib/string/String#substring set_local $12 - block $~lib/internal/string/freeUnsafe|inlined.0 + get_local $10 + i32.eqz + if + i32.const 0 + i32.const 2704 + i32.const 28 + i32.const 4 + call $~lib/env/abort + unreachable + end + block $~lib/memory/memory.free|inlined.4 block get_local $10 - i32.eqz - if - i32.const 0 - i32.const 2704 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.4 - block - get_local $10 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.4 - unreachable - end - unreachable - end + call $~lib/allocator/arena/__memory_free + br $~lib/memory/memory.free|inlined.4 + unreachable end + unreachable end end get_local $12 @@ -10620,12 +10458,10 @@ get_local $2 call $~lib/internal/string/allocateUnsafe set_local $3 - block $~lib/internal/number/utoa32_core|inlined.0 - get_local $3 - get_local $0 - get_local $2 - call $~lib/internal/number/utoa32_lut - end + get_local $3 + get_local $0 + get_local $2 + call $~lib/internal/number/utoa32_lut get_local $1 if get_local $3 @@ -10675,12 +10511,10 @@ get_local $4 i32.add set_local $3 - block $~lib/internal/number/utoa32_core|inlined.1 - get_local $0 - get_local $2 - get_local $3 - call $~lib/internal/number/utoa32_lut - end + get_local $0 + get_local $2 + get_local $3 + call $~lib/internal/number/utoa32_lut get_local $4 if get_local $0 @@ -10829,28 +10663,24 @@ get_local $10 call $~lib/string/String#substring set_local $11 - block $~lib/internal/string/freeUnsafe|inlined.1 + get_local $9 + i32.eqz + if + i32.const 0 + i32.const 2704 + i32.const 28 + i32.const 4 + call $~lib/env/abort + unreachable + end + block $~lib/memory/memory.free|inlined.5 block get_local $9 - i32.eqz - if - i32.const 0 - i32.const 2704 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.5 - block - get_local $9 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.5 - unreachable - end - unreachable - end + call $~lib/allocator/arena/__memory_free + br $~lib/memory/memory.free|inlined.5 + unreachable end + unreachable end end get_local $11 @@ -10871,12 +10701,10 @@ get_local $1 call $~lib/internal/string/allocateUnsafe set_local $2 - block $~lib/internal/number/utoa32_core|inlined.2 - get_local $2 - get_local $0 - get_local $1 - call $~lib/internal/number/utoa32_lut - end + get_local $2 + get_local $0 + get_local $1 + call $~lib/internal/number/utoa32_lut get_local $2 ) (func $~lib/internal/number/itoa (; 182 ;) (type $ii) (param $0 i32) (result i32) @@ -10906,12 +10734,10 @@ get_local $2 call $~lib/internal/number/decimalCount32 set_local $3 - block $~lib/internal/number/utoa32_core|inlined.3 - get_local $0 - get_local $2 - get_local $3 - call $~lib/internal/number/utoa32_lut - end + get_local $0 + get_local $2 + get_local $3 + call $~lib/internal/number/utoa32_lut get_local $3 ) (func $~lib/array/Array#join (; 184 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) @@ -11054,28 +10880,24 @@ get_local $10 call $~lib/string/String#substring set_local $11 - block $~lib/internal/string/freeUnsafe|inlined.2 + get_local $9 + i32.eqz + if + i32.const 0 + i32.const 2704 + i32.const 28 + i32.const 4 + call $~lib/env/abort + unreachable + end + block $~lib/memory/memory.free|inlined.6 block get_local $9 - i32.eqz - if - i32.const 0 - i32.const 2704 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.6 - block - get_local $9 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.6 - unreachable - end - unreachable - end + call $~lib/allocator/arena/__memory_free + br $~lib/memory/memory.free|inlined.6 + unreachable end + unreachable end end get_local $11 @@ -11394,88 +11216,86 @@ get_local $14 i32.add set_global $~lib/internal/number/_K - block $~lib/internal/number/grisuRound|inlined.0 - block $~lib/internal/arraybuffer/loadUnsafe|inlined.2 (result i64) - get_local $16 - get_local $14 - i32.const 2 - i32.shl - i32.add - i64.load32_u offset=8 - end - get_local $7 - i64.extend_s/i32 - i64.shl - set_local $20 - get_local $0 - get_local $15 - i32.const 1 - i32.sub - i32.const 1 + block $~lib/internal/arraybuffer/loadUnsafe|inlined.2 (result i64) + get_local $16 + get_local $14 + i32.const 2 i32.shl i32.add - set_local $18 - get_local $18 - i32.load16_u offset=4 - set_local $21 - block $break|2 - loop $continue|2 + i64.load32_u offset=8 + end + get_local $7 + i64.extend_s/i32 + i64.shl + set_local $20 + get_local $0 + get_local $15 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + set_local $18 + get_local $18 + i32.load16_u offset=4 + set_local $21 + block $break|2 + loop $continue|2 + get_local $19 + get_local $10 + i64.lt_u + tee_local $22 + if (result i32) + get_local $5 get_local $19 + i64.sub + get_local $20 + i64.ge_u + else + get_local $22 + end + tee_local $22 + if (result i32) + get_local $19 + get_local $20 + i64.add get_local $10 i64.lt_u tee_local $22 if (result i32) - get_local $5 + get_local $22 + else + get_local $10 get_local $19 i64.sub - get_local $20 - i64.ge_u - else - get_local $22 - end - tee_local $22 - if (result i32) get_local $19 get_local $20 i64.add get_local $10 - i64.lt_u - tee_local $22 - if (result i32) - get_local $22 - else - get_local $10 - get_local $19 - i64.sub - get_local $19 - get_local $20 - i64.add - get_local $10 - i64.sub - i64.gt_u - end - else - get_local $22 + i64.sub + i64.gt_u end - if - block - get_local $21 - i32.const 1 - i32.sub - set_local $21 - get_local $19 - get_local $20 - i64.add - set_local $19 - end - br $continue|2 + else + get_local $22 + end + if + block + get_local $21 + i32.const 1 + i32.sub + set_local $21 + get_local $19 + get_local $20 + i64.add + set_local $19 end + br $continue|2 end end - get_local $18 - get_local $21 - i32.store16 offset=4 end + get_local $18 + get_local $21 + i32.store16 offset=4 get_local $15 return end @@ -11560,76 +11380,74 @@ end i64.mul set_local $10 - block $~lib/internal/number/grisuRound|inlined.1 - get_local $0 - get_local $15 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - set_local $17 - get_local $17 - i32.load16_u offset=4 - set_local $21 - block $break|4 - loop $continue|4 + get_local $0 + get_local $15 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + set_local $17 + get_local $17 + i32.load16_u offset=4 + set_local $21 + block $break|4 + loop $continue|4 + get_local $13 + get_local $10 + i64.lt_u + tee_local $18 + if (result i32) + get_local $5 get_local $13 + i64.sub + get_local $8 + i64.ge_u + else + get_local $18 + end + tee_local $18 + if (result i32) + get_local $13 + get_local $8 + i64.add get_local $10 i64.lt_u tee_local $18 if (result i32) - get_local $5 + get_local $18 + else + get_local $10 get_local $13 i64.sub - get_local $8 - i64.ge_u - else - get_local $18 - end - tee_local $18 - if (result i32) get_local $13 get_local $8 i64.add get_local $10 - i64.lt_u - tee_local $18 - if (result i32) - get_local $18 - else - get_local $10 - get_local $13 - i64.sub - get_local $13 - get_local $8 - i64.add - get_local $10 - i64.sub - i64.gt_u - end - else - get_local $18 + i64.sub + i64.gt_u end - if - block - get_local $21 - i32.const 1 - i32.sub - set_local $21 - get_local $13 - get_local $8 - i64.add - set_local $13 - end - br $continue|4 + else + get_local $18 + end + if + block + get_local $21 + i32.const 1 + i32.sub + set_local $21 + get_local $13 + get_local $8 + i64.add + set_local $13 end + br $continue|4 end end - get_local $17 - get_local $21 - i32.store16 offset=4 end + get_local $17 + get_local $21 + i32.store16 offset=4 get_local $15 return end @@ -11741,28 +11559,26 @@ i32.shl i32.add set_local $4 - block $~lib/memory/memory.copy|inlined.8 - get_local $4 - get_global $~lib/internal/string/HEADER_SIZE - i32.add - i32.const 2 - i32.add - set_local $5 - get_local $4 - get_global $~lib/internal/string/HEADER_SIZE - i32.add - set_local $6 - i32.const 0 - get_local $2 - i32.sub - i32.const 1 - i32.shl - set_local $7 - get_local $5 - get_local $6 - get_local $7 - call $~lib/internal/memory/memmove - end + get_local $4 + get_global $~lib/internal/string/HEADER_SIZE + i32.add + i32.const 2 + i32.add + set_local $5 + get_local $4 + get_global $~lib/internal/string/HEADER_SIZE + i32.add + set_local $6 + i32.const 0 + get_local $2 + i32.sub + i32.const 1 + i32.shl + set_local $7 + get_local $5 + get_local $6 + get_local $7 + call $~lib/internal/memory/memmove get_local $0 get_local $3 i32.const 1 @@ -11791,28 +11607,26 @@ get_local $3 i32.sub set_local $4 - block $~lib/memory/memory.copy|inlined.9 - get_local $0 - get_global $~lib/internal/string/HEADER_SIZE - i32.add - get_local $4 - i32.const 1 - i32.shl - i32.add - set_local $7 - get_local $0 - get_global $~lib/internal/string/HEADER_SIZE - i32.add - set_local $6 - get_local $1 - i32.const 1 - i32.shl - set_local $5 - get_local $7 - get_local $6 - get_local $5 - call $~lib/internal/memory/memmove - end + get_local $0 + get_global $~lib/internal/string/HEADER_SIZE + i32.add + get_local $4 + i32.const 1 + i32.shl + i32.add + set_local $7 + get_local $0 + get_global $~lib/internal/string/HEADER_SIZE + i32.add + set_local $6 + get_local $1 + i32.const 1 + i32.shl + set_local $5 + get_local $7 + get_local $6 + get_local $5 + call $~lib/internal/memory/memmove get_local $0 get_global $~lib/internal/string/CharCode._0 get_global $~lib/internal/string/CharCode.DOT @@ -11882,12 +11696,10 @@ i32.const 1 i32.add set_local $7 - block $~lib/internal/number/utoa32_core|inlined.4 - get_local $4 - get_local $5 - get_local $7 - call $~lib/internal/number/utoa32_lut - end + get_local $4 + get_local $5 + get_local $7 + call $~lib/internal/number/utoa32_lut get_local $4 get_global $~lib/internal/string/CharCode.MINUS get_global $~lib/internal/string/CharCode.PLUS @@ -11906,28 +11718,26 @@ i32.const 1 i32.shl set_local $7 - block $~lib/memory/memory.copy|inlined.10 - get_local $0 - get_global $~lib/internal/string/HEADER_SIZE - i32.add - i32.const 4 - i32.add - set_local $6 - get_local $0 - get_global $~lib/internal/string/HEADER_SIZE - i32.add - i32.const 2 - i32.add - set_local $5 - get_local $7 - i32.const 2 - i32.sub - set_local $4 - get_local $6 - get_local $5 - get_local $4 - call $~lib/internal/memory/memmove - end + get_local $0 + get_global $~lib/internal/string/HEADER_SIZE + i32.add + i32.const 4 + i32.add + set_local $6 + get_local $0 + get_global $~lib/internal/string/HEADER_SIZE + i32.add + i32.const 2 + i32.add + set_local $5 + get_local $7 + i32.const 2 + i32.sub + set_local $4 + get_local $6 + get_local $5 + get_local $4 + call $~lib/internal/memory/memmove get_local $0 get_global $~lib/internal/string/CharCode.DOT i32.store16 offset=6 @@ -11964,12 +11774,10 @@ i32.const 1 i32.add set_local $8 - block $~lib/internal/number/utoa32_core|inlined.5 - get_local $4 - get_local $5 - get_local $8 - call $~lib/internal/number/utoa32_lut - end + get_local $4 + get_local $5 + get_local $8 + call $~lib/internal/number/utoa32_lut get_local $4 get_global $~lib/internal/string/CharCode.MINUS get_global $~lib/internal/string/CharCode.PLUS @@ -12066,7 +11874,7 @@ i32.add i32.sub set_local $4 - block $~lib/internal/number/normalizedBoundaries|inlined.0 + block get_local $6 i64.const 1 i64.shl @@ -12115,7 +11923,7 @@ get_local $8 set_global $~lib/internal/number/_exp end - block $~lib/internal/number/getCachedPower|inlined.0 + block get_global $~lib/internal/number/_exp set_local $10 i32.const -61 @@ -12465,28 +12273,24 @@ get_local $2 call $~lib/string/String#substring set_local $3 - block $~lib/internal/string/freeUnsafe|inlined.3 + get_local $1 + i32.eqz + if + i32.const 0 + i32.const 2704 + i32.const 28 + i32.const 4 + call $~lib/env/abort + unreachable + end + block $~lib/memory/memory.free|inlined.7 block get_local $1 - i32.eqz - if - i32.const 0 - i32.const 2704 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.7 - block - get_local $1 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.7 - unreachable - end - unreachable - end + call $~lib/allocator/arena/__memory_free + br $~lib/memory/memory.free|inlined.7 + unreachable end + unreachable end get_local $3 ) @@ -12550,20 +12354,18 @@ get_local $3 select set_local $5 - block $~lib/memory/memory.copy|inlined.11 - get_local $0 - get_global $~lib/internal/string/HEADER_SIZE - i32.add - set_local $6 - get_local $4 - i32.const 1 - i32.shl - set_local $7 - get_local $6 - get_local $5 - get_local $7 - call $~lib/internal/memory/memmove - end + get_local $0 + get_global $~lib/internal/string/HEADER_SIZE + i32.add + set_local $6 + get_local $4 + i32.const 1 + i32.shl + set_local $7 + get_local $6 + get_local $5 + get_local $7 + call $~lib/internal/memory/memmove get_local $4 return end @@ -12714,28 +12516,24 @@ get_local $10 call $~lib/string/String#substring set_local $11 - block $~lib/internal/string/freeUnsafe|inlined.4 + get_local $9 + i32.eqz + if + i32.const 0 + i32.const 2704 + i32.const 28 + i32.const 4 + call $~lib/env/abort + unreachable + end + block $~lib/memory/memory.free|inlined.8 block get_local $9 - i32.eqz - if - i32.const 0 - i32.const 2704 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.8 - block - get_local $9 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.8 - unreachable - end - unreachable - end + call $~lib/allocator/arena/__memory_free + br $~lib/memory/memory.free|inlined.8 + unreachable end + unreachable end end get_local $11 @@ -12984,18 +12782,16 @@ get_local $0 get_local $1 i32.store offset=4 - block $~lib/memory/memory.fill|inlined.12 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 ) (func $~lib/array/Array#__unchecked_set (; 195 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) @@ -13151,28 +12947,24 @@ get_local $10 call $~lib/string/String#substring set_local $11 - block $~lib/internal/string/freeUnsafe|inlined.5 + get_local $9 + i32.eqz + if + i32.const 0 + i32.const 2704 + i32.const 28 + i32.const 4 + call $~lib/env/abort + unreachable + end + block $~lib/memory/memory.free|inlined.9 block get_local $9 - i32.eqz - if - i32.const 0 - i32.const 2704 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.9 - block - get_local $9 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.9 - unreachable - end - unreachable - end + call $~lib/allocator/arena/__memory_free + br $~lib/memory/memory.free|inlined.9 + unreachable end + unreachable end end get_local $11 @@ -13236,18 +13028,16 @@ get_local $4 i32.add set_local $3 - block $~lib/internal/number/utoa32_core|inlined.6 - get_local $2 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - set_local $5 - get_local $0 - get_local $5 - get_local $3 - call $~lib/internal/number/utoa32_lut - end + get_local $2 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + set_local $5 + get_local $0 + get_local $5 + get_local $3 + call $~lib/internal/number/utoa32_lut get_local $4 if get_local $0 @@ -13396,28 +13186,24 @@ get_local $10 call $~lib/string/String#substring set_local $11 - block $~lib/internal/string/freeUnsafe|inlined.6 + get_local $9 + i32.eqz + if + i32.const 0 + i32.const 2704 + i32.const 28 + i32.const 4 + call $~lib/env/abort + unreachable + end + block $~lib/memory/memory.free|inlined.10 block get_local $9 - i32.eqz - if - i32.const 0 - i32.const 2704 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.10 - block - get_local $9 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.10 - unreachable - end - unreachable - end + call $~lib/allocator/arena/__memory_free + br $~lib/memory/memory.free|inlined.10 + unreachable end + unreachable end end get_local $11 @@ -13457,16 +13243,14 @@ i32.and call $~lib/internal/number/decimalCount32 set_local $3 - block $~lib/internal/number/utoa32_core|inlined.7 - get_local $2 - i32.const 65535 - i32.and - set_local $4 - get_local $0 - get_local $4 - get_local $3 - call $~lib/internal/number/utoa32_lut - end + get_local $2 + i32.const 65535 + i32.and + set_local $4 + get_local $0 + get_local $4 + get_local $3 + call $~lib/internal/number/utoa32_lut get_local $3 ) (func $~lib/array/Array#join (; 202 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) @@ -13609,28 +13393,24 @@ get_local $10 call $~lib/string/String#substring set_local $11 - block $~lib/internal/string/freeUnsafe|inlined.7 + get_local $9 + i32.eqz + if + i32.const 0 + i32.const 2704 + i32.const 28 + i32.const 4 + call $~lib/env/abort + unreachable + end + block $~lib/memory/memory.free|inlined.11 block get_local $9 - i32.eqz - if - i32.const 0 - i32.const 2704 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.11 - block - get_local $9 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.11 - unreachable - end - unreachable - end + call $~lib/allocator/arena/__memory_free + br $~lib/memory/memory.free|inlined.11 + unreachable end + unreachable end end get_local $11 @@ -13867,12 +13647,10 @@ get_local $3 call $~lib/internal/string/allocateUnsafe set_local $1 - block $~lib/internal/number/utoa32_core|inlined.8 - get_local $1 - get_local $2 - get_local $3 - call $~lib/internal/number/utoa32_lut - end + get_local $1 + get_local $2 + get_local $3 + call $~lib/internal/number/utoa32_lut else get_local $0 call $~lib/internal/number/decimalCount64 @@ -13880,12 +13658,10 @@ get_local $3 call $~lib/internal/string/allocateUnsafe set_local $1 - block $~lib/internal/number/utoa64_core|inlined.0 - get_local $1 - get_local $0 - get_local $3 - call $~lib/internal/number/utoa64_lut - end + get_local $1 + get_local $0 + get_local $3 + call $~lib/internal/number/utoa64_lut end get_local $1 ) @@ -13925,22 +13701,18 @@ get_local $4 call $~lib/internal/number/decimalCount32 set_local $3 - block $~lib/internal/number/utoa32_core|inlined.9 - get_local $0 - get_local $4 - get_local $3 - call $~lib/internal/number/utoa32_lut - end + get_local $0 + get_local $4 + get_local $3 + call $~lib/internal/number/utoa32_lut else get_local $2 call $~lib/internal/number/decimalCount64 set_local $3 - block $~lib/internal/number/utoa64_core|inlined.1 - get_local $0 - get_local $2 - get_local $3 - call $~lib/internal/number/utoa64_lut - end + get_local $0 + get_local $2 + get_local $3 + call $~lib/internal/number/utoa64_lut end get_local $3 ) @@ -14084,28 +13856,24 @@ get_local $10 call $~lib/string/String#substring set_local $11 - block $~lib/internal/string/freeUnsafe|inlined.8 + get_local $9 + i32.eqz + if + i32.const 0 + i32.const 2704 + i32.const 28 + i32.const 4 + call $~lib/env/abort + unreachable + end + block $~lib/memory/memory.free|inlined.12 block get_local $9 - i32.eqz - if - i32.const 0 - i32.const 2704 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.12 - block - get_local $9 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.12 - unreachable - end - unreachable - end + call $~lib/allocator/arena/__memory_free + br $~lib/memory/memory.free|inlined.12 + unreachable end + unreachable end end get_local $11 @@ -14149,12 +13917,10 @@ get_local $4 call $~lib/internal/string/allocateUnsafe set_local $2 - block $~lib/internal/number/utoa32_core|inlined.10 - get_local $2 - get_local $3 - get_local $4 - call $~lib/internal/number/utoa32_lut - end + get_local $2 + get_local $3 + get_local $4 + call $~lib/internal/number/utoa32_lut else get_local $0 call $~lib/internal/number/decimalCount64 @@ -14164,12 +13930,10 @@ get_local $4 call $~lib/internal/string/allocateUnsafe set_local $2 - block $~lib/internal/number/utoa64_core|inlined.2 - get_local $2 - get_local $0 - get_local $4 - call $~lib/internal/number/utoa64_lut - end + get_local $2 + get_local $0 + get_local $4 + call $~lib/internal/number/utoa64_lut end get_local $1 if @@ -14229,24 +13993,20 @@ get_local $4 i32.add set_local $3 - block $~lib/internal/number/utoa32_core|inlined.11 - get_local $0 - get_local $5 - get_local $3 - call $~lib/internal/number/utoa32_lut - end + get_local $0 + get_local $5 + get_local $3 + call $~lib/internal/number/utoa32_lut else get_local $2 call $~lib/internal/number/decimalCount64 get_local $4 i32.add set_local $3 - block $~lib/internal/number/utoa64_core|inlined.3 - get_local $0 - get_local $2 - get_local $3 - call $~lib/internal/number/utoa64_lut - end + get_local $0 + get_local $2 + get_local $3 + call $~lib/internal/number/utoa64_lut end get_local $4 if @@ -14396,28 +14156,24 @@ get_local $10 call $~lib/string/String#substring set_local $11 - block $~lib/internal/string/freeUnsafe|inlined.9 + get_local $9 + i32.eqz + if + i32.const 0 + i32.const 2704 + i32.const 28 + i32.const 4 + call $~lib/env/abort + unreachable + end + block $~lib/memory/memory.free|inlined.13 block get_local $9 - i32.eqz - if - i32.const 0 - i32.const 2704 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.13 - block - get_local $9 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.13 - unreachable - end - unreachable - end + call $~lib/allocator/arena/__memory_free + br $~lib/memory/memory.free|inlined.13 + unreachable end + unreachable end end get_local $11 @@ -14579,16 +14335,14 @@ i32.and call $~lib/internal/number/decimalCount32 set_local $3 - block $~lib/internal/number/utoa32_core|inlined.12 - get_local $2 - i32.const 255 - i32.and - set_local $4 - get_local $0 - get_local $4 - get_local $3 - call $~lib/internal/number/utoa32_lut - end + get_local $2 + i32.const 255 + i32.and + set_local $4 + get_local $0 + get_local $4 + get_local $3 + call $~lib/internal/number/utoa32_lut get_local $3 ) (func $~lib/array/Array#join (; 216 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) @@ -14731,28 +14485,24 @@ get_local $10 call $~lib/string/String#substring set_local $11 - block $~lib/internal/string/freeUnsafe|inlined.10 + get_local $9 + i32.eqz + if + i32.const 0 + i32.const 2704 + i32.const 28 + i32.const 4 + call $~lib/env/abort + unreachable + end + block $~lib/memory/memory.free|inlined.14 block get_local $9 - i32.eqz - if - i32.const 0 - i32.const 2704 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.14 - block - get_local $9 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.14 - unreachable - end - unreachable - end + call $~lib/allocator/arena/__memory_free + br $~lib/memory/memory.free|inlined.14 + unreachable end + unreachable end end get_local $11 diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index b9ce28f2..c225962f 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -1939,22 +1939,20 @@ get_local $6 call $~lib/internal/arraybuffer/allocateUnsafe set_local $7 - block $~lib/memory/memory.copy|inlined.0 - get_local $7 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - get_local $0 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - get_local $1 - i32.add - set_local $5 - get_local $4 - get_local $5 - get_local $6 - call $~lib/internal/memory/memmove - end + get_local $7 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + get_local $0 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + get_local $1 + i32.add + set_local $5 + get_local $4 + get_local $5 + get_local $6 + call $~lib/internal/memory/memmove get_local $7 ) (func $~lib/arraybuffer/ArrayBuffer#slice|trampoline (; 9 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) diff --git a/tests/compiler/std/dataview.untouched.wat b/tests/compiler/std/dataview.untouched.wat index 190b5b85..8c464c5a 100644 --- a/tests/compiler/std/dataview.untouched.wat +++ b/tests/compiler/std/dataview.untouched.wat @@ -438,18 +438,16 @@ get_local $2 call $~lib/internal/arraybuffer/allocateUnsafe set_local $3 - block $~lib/memory/memory.fill|inlined.0 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 if (result i32) get_local $0 @@ -499,23 +497,21 @@ call $~lib/env/abort unreachable end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.0 - get_local $0 - i32.load - set_local $3 - get_local $0 - i32.load offset=4 - set_local $4 - get_local $3 - get_local $4 - i32.add - get_local $1 - i32.const 0 - i32.shl - i32.add - get_local $2 - i32.store8 offset=8 - end + get_local $0 + i32.load + set_local $3 + get_local $0 + i32.load offset=4 + set_local $4 + get_local $3 + get_local $4 + i32.add + get_local $1 + i32.const 0 + i32.shl + i32.add + get_local $2 + i32.store8 offset=8 ) (func $~lib/dataview/DataView#constructor (; 8 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) @@ -606,33 +602,31 @@ (local $3 i32) (local $4 i32) (local $5 i32) - block $~lib/dataview/checkOffset|inlined.0 - i32.const 4 - set_local $3 - get_local $0 - i32.load offset=8 - set_local $4 + i32.const 4 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $5 - if (result i32) - get_local $5 - else - get_local $1 - get_local $3 - i32.add - get_local $4 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $2 i32.const 1 @@ -702,33 +696,31 @@ (local $3 i32) (local $4 i32) (local $5 i32) - block $~lib/dataview/checkOffset|inlined.1 - i32.const 8 - set_local $3 - get_local $0 - i32.load offset=8 - set_local $4 + i32.const 8 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $5 - if (result i32) - get_local $5 - else - get_local $1 - get_local $3 - i32.add - get_local $4 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $2 i32.const 1 @@ -759,33 +751,31 @@ (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/dataview/checkOffset|inlined.2 - i32.const 1 - set_local $2 - get_local $0 - i32.load offset=8 - set_local $3 + i32.const 1 + set_local $2 + get_local $0 + i32.load offset=8 + set_local $3 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $4 + if (result i32) + get_local $4 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $4 - if (result i32) - get_local $4 - else - get_local $1 - get_local $2 - i32.add - get_local $3 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $2 + i32.add + get_local $3 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $0 i32.load @@ -817,33 +807,31 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/dataview/checkOffset|inlined.3 - i32.const 2 - set_local $3 - get_local $0 - i32.load offset=8 - set_local $4 + i32.const 2 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $5 - if (result i32) - get_local $5 - else - get_local $1 - get_local $3 - i32.add - get_local $4 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $0 i32.load @@ -883,33 +871,31 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/dataview/checkOffset|inlined.4 - i32.const 4 - set_local $3 - get_local $0 - i32.load offset=8 - set_local $4 + i32.const 4 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $5 - if (result i32) - get_local $5 - else - get_local $1 - get_local $3 - i32.add - get_local $4 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $0 i32.load @@ -974,33 +960,31 @@ (local $4 i32) (local $5 i32) (local $6 i64) - block $~lib/dataview/checkOffset|inlined.5 - i32.const 8 - set_local $3 - get_local $0 - i32.load offset=8 - set_local $4 + i32.const 8 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $5 - if (result i32) - get_local $5 - else - get_local $1 - get_local $3 - i32.add - get_local $4 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $0 i32.load @@ -1025,33 +1009,31 @@ (local $2 i32) (local $3 i32) (local $4 i32) - block $~lib/dataview/checkOffset|inlined.6 - i32.const 1 - set_local $2 - get_local $0 - i32.load offset=8 - set_local $3 + i32.const 1 + set_local $2 + get_local $0 + i32.load offset=8 + set_local $3 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $4 + if (result i32) + get_local $4 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $4 - if (result i32) - get_local $4 - else - get_local $1 - get_local $2 - i32.add - get_local $3 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $2 + i32.add + get_local $3 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $0 i32.load @@ -1081,33 +1063,31 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/dataview/checkOffset|inlined.7 - i32.const 2 - set_local $3 - get_local $0 - i32.load offset=8 - set_local $4 + i32.const 2 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $5 - if (result i32) - get_local $5 - else - get_local $1 - get_local $3 - i32.add - get_local $4 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $0 i32.load @@ -1133,33 +1113,31 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/dataview/checkOffset|inlined.8 - i32.const 4 - set_local $3 - get_local $0 - i32.load offset=8 - set_local $4 + i32.const 4 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $5 - if (result i32) - get_local $5 - else - get_local $1 - get_local $3 - i32.add - get_local $4 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $0 i32.load @@ -1185,33 +1163,31 @@ (local $4 i32) (local $5 i32) (local $6 i64) - block $~lib/dataview/checkOffset|inlined.9 - i32.const 8 - set_local $3 - get_local $0 - i32.load offset=8 - set_local $4 + i32.const 8 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $5 - if (result i32) - get_local $5 - else - get_local $1 - get_local $3 - i32.add - get_local $4 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $0 i32.load @@ -1236,33 +1212,31 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/dataview/checkOffset|inlined.10 - i32.const 4 - set_local $4 - get_local $0 - i32.load offset=8 - set_local $5 + i32.const 4 + set_local $4 + get_local $0 + i32.load offset=8 + set_local $5 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $6 + if (result i32) + get_local $6 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $6 - if (result i32) - get_local $6 - else - get_local $1 - get_local $4 - i32.add - get_local $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $4 + i32.add + get_local $5 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $3 i32.const 1 @@ -1295,33 +1269,31 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/dataview/checkOffset|inlined.11 - i32.const 8 - set_local $4 - get_local $0 - i32.load offset=8 - set_local $5 + i32.const 8 + set_local $4 + get_local $0 + i32.load offset=8 + set_local $5 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $6 + if (result i32) + get_local $6 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $6 - if (result i32) - get_local $6 - else - get_local $1 - get_local $4 - i32.add - get_local $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $4 + i32.add + get_local $5 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $3 i32.const 1 @@ -1354,33 +1326,31 @@ (local $3 i32) (local $4 i32) (local $5 i32) - block $~lib/dataview/checkOffset|inlined.12 - i32.const 1 - set_local $3 - get_local $0 - i32.load offset=8 - set_local $4 + i32.const 1 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $5 - if (result i32) - get_local $5 - else - get_local $1 - get_local $3 - i32.add - get_local $4 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $0 i32.load @@ -1396,33 +1366,31 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/dataview/checkOffset|inlined.13 - i32.const 2 - set_local $4 - get_local $0 - i32.load offset=8 - set_local $5 + i32.const 2 + set_local $4 + get_local $0 + i32.load offset=8 + set_local $5 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $6 + if (result i32) + get_local $6 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $6 - if (result i32) - get_local $6 - else - get_local $1 - get_local $4 - i32.add - get_local $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $4 + i32.add + get_local $5 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $0 i32.load @@ -1446,33 +1414,31 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/dataview/checkOffset|inlined.14 - i32.const 4 - set_local $4 - get_local $0 - i32.load offset=8 - set_local $5 + i32.const 4 + set_local $4 + get_local $0 + i32.load offset=8 + set_local $5 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $6 + if (result i32) + get_local $6 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $6 - if (result i32) - get_local $6 - else - get_local $1 - get_local $4 - i32.add - get_local $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $4 + i32.add + get_local $5 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $0 i32.load @@ -1496,33 +1462,31 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/dataview/checkOffset|inlined.15 - i32.const 8 - set_local $4 - get_local $0 - i32.load offset=8 - set_local $5 + i32.const 8 + set_local $4 + get_local $0 + i32.load offset=8 + set_local $5 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $6 + if (result i32) + get_local $6 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $6 - if (result i32) - get_local $6 - else - get_local $1 - get_local $4 - i32.add - get_local $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $4 + i32.add + get_local $5 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $0 i32.load @@ -1546,33 +1510,31 @@ (local $3 i32) (local $4 i32) (local $5 i32) - block $~lib/dataview/checkOffset|inlined.16 - i32.const 1 - set_local $3 - get_local $0 - i32.load offset=8 - set_local $4 + i32.const 1 + set_local $3 + get_local $0 + i32.load offset=8 + set_local $4 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $5 + if (result i32) + get_local $5 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $5 - if (result i32) - get_local $5 - else - get_local $1 - get_local $3 - i32.add - get_local $4 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $3 + i32.add + get_local $4 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $0 i32.load @@ -1588,33 +1550,31 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/dataview/checkOffset|inlined.17 - i32.const 2 - set_local $4 - get_local $0 - i32.load offset=8 - set_local $5 + i32.const 2 + set_local $4 + get_local $0 + i32.load offset=8 + set_local $5 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $6 + if (result i32) + get_local $6 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $6 - if (result i32) - get_local $6 - else - get_local $1 - get_local $4 - i32.add - get_local $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $4 + i32.add + get_local $5 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $0 i32.load @@ -1638,33 +1598,31 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/dataview/checkOffset|inlined.18 - i32.const 4 - set_local $4 - get_local $0 - i32.load offset=8 - set_local $5 + i32.const 4 + set_local $4 + get_local $0 + i32.load offset=8 + set_local $5 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $6 + if (result i32) + get_local $6 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $6 - if (result i32) - get_local $6 - else - get_local $1 - get_local $4 - i32.add - get_local $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $4 + i32.add + get_local $5 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $0 i32.load @@ -1688,33 +1646,31 @@ (local $4 i32) (local $5 i32) (local $6 i32) - block $~lib/dataview/checkOffset|inlined.19 - i32.const 8 - set_local $4 - get_local $0 - i32.load offset=8 - set_local $5 + i32.const 8 + set_local $4 + get_local $0 + i32.load offset=8 + set_local $5 + get_local $1 + get_global $~lib/internal/arraybuffer/MAX_BLENGTH + i32.gt_u + tee_local $6 + if (result i32) + get_local $6 + else get_local $1 - get_global $~lib/internal/arraybuffer/MAX_BLENGTH - i32.gt_u - tee_local $6 - if (result i32) - get_local $6 - else - get_local $1 - get_local $4 - i32.add - get_local $5 - i32.gt_s - end - if - i32.const 0 - i32.const 136 - i32.const 184 - i32.const 73 - call $~lib/env/abort - unreachable - end + get_local $4 + i32.add + get_local $5 + i32.gt_s + end + if + i32.const 0 + i32.const 136 + i32.const 184 + i32.const 73 + call $~lib/env/abort + unreachable end get_local $0 i32.load diff --git a/tests/compiler/std/gc-array.untouched.wat b/tests/compiler/std/gc-array.untouched.wat index 918087bd..b4d953e0 100644 --- a/tests/compiler/std/gc-array.untouched.wat +++ b/tests/compiler/std/gc-array.untouched.wat @@ -2302,60 +2302,54 @@ get_local $0 get_local $1 i32.store - block $~lib/memory/memory.fill|inlined.0 - get_local $0 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - get_local $2 - i32.add - set_local $3 - i32.const 0 - set_local $4 - get_local $1 - get_local $2 - i32.sub - set_local $5 - get_local $3 - get_local $4 - get_local $5 - call $~lib/internal/memory/memset - end + get_local $0 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + get_local $2 + i32.add + set_local $3 + i32.const 0 + set_local $4 + get_local $1 + get_local $2 + i32.sub + set_local $5 + get_local $3 + get_local $4 + get_local $5 + call $~lib/internal/memory/memset else get_local $1 call $~lib/internal/arraybuffer/allocateUnsafe set_local $5 - block $~lib/memory/memory.copy|inlined.0 - get_local $5 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - get_local $0 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $3 - get_local $4 - get_local $3 - get_local $2 - call $~lib/internal/memory/memmove - end - block $~lib/memory/memory.fill|inlined.1 - get_local $5 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - get_local $2 - i32.add - set_local $3 - i32.const 0 - set_local $4 - get_local $1 - get_local $2 - i32.sub - set_local $6 - get_local $3 - get_local $4 - get_local $6 - call $~lib/internal/memory/memset - end + get_local $5 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + get_local $0 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $3 + get_local $4 + get_local $3 + get_local $2 + call $~lib/internal/memory/memmove + get_local $5 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + get_local $2 + i32.add + set_local $3 + i32.const 0 + set_local $4 + get_local $1 + get_local $2 + i32.sub + set_local $6 + get_local $3 + get_local $4 + get_local $6 + call $~lib/internal/memory/memset get_local $5 return end @@ -2458,15 +2452,13 @@ i32.add i32.store offset=4 end - block $~lib/internal/arraybuffer/storeUnsafe|inlined.0 - get_local $3 - get_local $1 - i32.const 2 - i32.shl - i32.add - get_local $2 - i32.store offset=8 - end + get_local $3 + get_local $1 + i32.const 2 + i32.shl + i32.add + get_local $2 + i32.store offset=8 get_local $0 get_local $2 call $~lib/collector/itcm/__gc_link diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index 67110dca..abe4ce1a 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -34704,7 +34704,7 @@ end unreachable end - block $~lib/math/NativeMathf.seedRandom|inlined.0 + block call $~lib/bindings/Math/random i64.reinterpret/f64 set_local $3 diff --git a/tests/compiler/std/pointer.untouched.wat b/tests/compiler/std/pointer.untouched.wat index ba6bdd45..3224d902 100644 --- a/tests/compiler/std/pointer.untouched.wat +++ b/tests/compiler/std/pointer.untouched.wat @@ -2220,7 +2220,7 @@ call $~lib/env/abort unreachable end - block $std/pointer/Pointer#set|inlined.0 + block get_global $std/pointer/buf set_local $0 i32.const 2 diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index a912950b..bc73ca8b 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -1900,60 +1900,54 @@ get_local $0 get_local $1 i32.store - block $~lib/memory/memory.fill|inlined.0 - get_local $0 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - get_local $2 - i32.add - set_local $3 - i32.const 0 - set_local $4 - get_local $1 - get_local $2 - i32.sub - set_local $5 - get_local $3 - get_local $4 - get_local $5 - call $~lib/internal/memory/memset - end + get_local $0 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + get_local $2 + i32.add + set_local $3 + i32.const 0 + set_local $4 + get_local $1 + get_local $2 + i32.sub + set_local $5 + get_local $3 + get_local $4 + get_local $5 + call $~lib/internal/memory/memset else get_local $1 call $~lib/internal/arraybuffer/allocateUnsafe set_local $5 - block $~lib/memory/memory.copy|inlined.0 - get_local $5 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - get_local $0 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $3 - get_local $4 - get_local $3 - get_local $2 - call $~lib/internal/memory/memmove - end - block $~lib/memory/memory.fill|inlined.1 - get_local $5 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - get_local $2 - i32.add - set_local $3 - i32.const 0 - set_local $4 - get_local $1 - get_local $2 - i32.sub - set_local $6 - get_local $3 - get_local $4 - get_local $6 - call $~lib/internal/memory/memset - end + get_local $5 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + get_local $0 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $3 + get_local $4 + get_local $3 + get_local $2 + call $~lib/internal/memory/memmove + get_local $5 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + get_local $2 + i32.add + set_local $3 + i32.const 0 + set_local $4 + get_local $1 + get_local $2 + i32.sub + set_local $6 + get_local $3 + get_local $4 + get_local $6 + call $~lib/internal/memory/memset get_local $5 return end @@ -2024,15 +2018,13 @@ i32.add i32.store offset=4 end - block $~lib/internal/arraybuffer/storeUnsafe|inlined.0 - get_local $3 - get_local $1 - i32.const 2 - i32.shl - i32.add - get_local $2 - i32.store offset=8 - end + get_local $3 + get_local $1 + i32.const 2 + i32.shl + i32.add + get_local $2 + i32.store offset=8 ) (func $~lib/array/Array#__get (; 10 ;) (type $iiI) (param $0 i32) (param $1 i32) (result i64) (local $2 i32) @@ -2099,15 +2091,13 @@ i32.add i32.store offset=4 end - block $~lib/internal/arraybuffer/storeUnsafe|inlined.0 - get_local $3 - get_local $1 - i32.const 3 - i32.shl - i32.add - get_local $2 - i64.store offset=8 - end + get_local $3 + get_local $1 + i32.const 3 + i32.shl + i32.add + get_local $2 + i64.store offset=8 ) (func $~lib/array/Array#__get (; 12 ;) (type $iif) (param $0 i32) (param $1 i32) (result f32) (local $2 i32) @@ -2174,15 +2164,13 @@ i32.add i32.store offset=4 end - block $~lib/internal/arraybuffer/storeUnsafe|inlined.0 - get_local $3 - get_local $1 - i32.const 2 - i32.shl - i32.add - get_local $2 - f32.store offset=8 - end + get_local $3 + get_local $1 + i32.const 2 + i32.shl + i32.add + get_local $2 + f32.store offset=8 ) (func $~lib/array/Array#__get (; 14 ;) (type $iiF) (param $0 i32) (param $1 i32) (result f64) (local $2 i32) @@ -2249,15 +2237,13 @@ i32.add i32.store offset=4 end - block $~lib/internal/arraybuffer/storeUnsafe|inlined.0 - get_local $3 - get_local $1 - i32.const 3 - i32.shl - i32.add - get_local $2 - f64.store offset=8 - end + get_local $3 + get_local $1 + i32.const 3 + i32.shl + i32.add + get_local $2 + f64.store offset=8 ) (func $start (; 16 ;) (type $v) (local $0 i32) diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index ed63c7fe..d1e08e43 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -2223,16 +2223,14 @@ i32.shr_u call $~lib/internal/string/allocateUnsafe set_local $7 - block $~lib/memory/memory.copy|inlined.0 - get_local $7 - get_global $~lib/internal/string/HEADER_SIZE - i32.add - set_local $3 - get_local $3 - get_local $4 - get_local $5 - call $~lib/internal/memory/memmove - end + get_local $7 + get_global $~lib/internal/string/HEADER_SIZE + i32.add + set_local $3 + get_local $3 + get_local $4 + get_local $5 + call $~lib/internal/memory/memmove block $~lib/memory/memory.free|inlined.0 block get_local $4 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index dea1390e..a30befd1 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -4699,11 +4699,7 @@ i32.const 1 i32.shl call $~lib/internal/memory/memmove - get_local $0 - get_local $4 - i32.const 1 - i32.shl - i32.add + get_local $3 i32.const 46 i32.store16 offset=4 get_local $1 diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index 18bdc708..1747f750 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -2473,7 +2473,7 @@ i32.lt_s i32.eqz br_if $break|5 - block $~lib/memory/memory.copy|inlined.0 + block get_local $6 get_local $8 i32.add @@ -4137,18 +4137,16 @@ get_local $0 get_local $1 i32.store offset=4 - block $~lib/memory/memory.fill|inlined.0 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 ) (func $~lib/array/Array#__unchecked_set (; 39 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) @@ -4199,60 +4197,54 @@ get_local $0 get_local $1 i32.store - block $~lib/memory/memory.fill|inlined.1 - get_local $0 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - get_local $2 - i32.add - set_local $3 - i32.const 0 - set_local $4 - get_local $1 - get_local $2 - i32.sub - set_local $5 - get_local $3 - get_local $4 - get_local $5 - call $~lib/internal/memory/memset - end + get_local $0 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + get_local $2 + i32.add + set_local $3 + i32.const 0 + set_local $4 + get_local $1 + get_local $2 + i32.sub + set_local $5 + get_local $3 + get_local $4 + get_local $5 + call $~lib/internal/memory/memset else get_local $1 call $~lib/internal/arraybuffer/allocateUnsafe set_local $5 - block $~lib/memory/memory.copy|inlined.2 - get_local $5 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - get_local $0 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $3 - get_local $4 - get_local $3 - get_local $2 - call $~lib/internal/memory/memmove - end - block $~lib/memory/memory.fill|inlined.2 - get_local $5 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - get_local $2 - i32.add - set_local $3 - i32.const 0 - set_local $4 - get_local $1 - get_local $2 - i32.sub - set_local $6 - get_local $3 - get_local $4 - get_local $6 - call $~lib/internal/memory/memset - end + get_local $5 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + get_local $0 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $3 + get_local $4 + get_local $3 + get_local $2 + call $~lib/internal/memory/memmove + get_local $5 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + get_local $2 + i32.add + set_local $3 + i32.const 0 + set_local $4 + get_local $1 + get_local $2 + i32.sub + set_local $6 + get_local $3 + get_local $4 + get_local $6 + call $~lib/internal/memory/memset get_local $5 return end @@ -4328,15 +4320,13 @@ get_local $0 get_local $5 i32.store offset=4 - block $~lib/internal/arraybuffer/storeUnsafe|inlined.2 - get_local $3 - get_local $2 - i32.const 2 - i32.shl - i32.add - get_local $1 - i32.store offset=8 - end + get_local $3 + get_local $2 + i32.const 2 + i32.shl + i32.add + get_local $1 + i32.store offset=8 get_local $5 ) (func $~lib/string/String#split (; 42 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) @@ -4450,15 +4440,13 @@ i32.add i32.load16_u offset=4 i32.store16 offset=4 - block $~lib/internal/arraybuffer/storeUnsafe|inlined.1 - get_local $6 - get_local $7 - i32.const 2 - i32.shl - i32.add - get_local $8 - i32.store offset=8 - end + get_local $6 + get_local $7 + i32.const 2 + i32.shl + i32.add + get_local $8 + i32.store offset=8 end get_local $7 i32.const 1 @@ -4885,12 +4873,10 @@ get_local $2 call $~lib/internal/string/allocateUnsafe set_local $3 - block $~lib/internal/number/utoa32_core|inlined.0 - get_local $3 - get_local $0 - get_local $2 - call $~lib/internal/number/utoa32_lut - end + get_local $3 + get_local $0 + get_local $2 + call $~lib/internal/number/utoa32_lut get_local $1 if get_local $3 @@ -4914,12 +4900,10 @@ get_local $1 call $~lib/internal/string/allocateUnsafe set_local $2 - block $~lib/internal/number/utoa32_core|inlined.1 - get_local $2 - get_local $0 - get_local $1 - call $~lib/internal/number/utoa32_lut - end + get_local $2 + get_local $0 + get_local $1 + call $~lib/internal/number/utoa32_lut get_local $2 ) (func $~lib/internal/number/decimalCount64 (; 49 ;) (type $Ii) (param $0 i64) (result i32) @@ -5153,12 +5137,10 @@ get_local $3 call $~lib/internal/string/allocateUnsafe set_local $1 - block $~lib/internal/number/utoa32_core|inlined.2 - get_local $1 - get_local $2 - get_local $3 - call $~lib/internal/number/utoa32_lut - end + get_local $1 + get_local $2 + get_local $3 + call $~lib/internal/number/utoa32_lut else get_local $0 call $~lib/internal/number/decimalCount64 @@ -5166,12 +5148,10 @@ get_local $3 call $~lib/internal/string/allocateUnsafe set_local $1 - block $~lib/internal/number/utoa64_core|inlined.0 - get_local $1 - get_local $0 - get_local $3 - call $~lib/internal/number/utoa64_lut - end + get_local $1 + get_local $0 + get_local $3 + call $~lib/internal/number/utoa64_lut end get_local $1 ) @@ -5213,12 +5193,10 @@ get_local $4 call $~lib/internal/string/allocateUnsafe set_local $2 - block $~lib/internal/number/utoa32_core|inlined.3 - get_local $2 - get_local $3 - get_local $4 - call $~lib/internal/number/utoa32_lut - end + get_local $2 + get_local $3 + get_local $4 + call $~lib/internal/number/utoa32_lut else get_local $0 call $~lib/internal/number/decimalCount64 @@ -5228,12 +5206,10 @@ get_local $4 call $~lib/internal/string/allocateUnsafe set_local $2 - block $~lib/internal/number/utoa64_core|inlined.1 - get_local $2 - get_local $0 - get_local $4 - call $~lib/internal/number/utoa64_lut - end + get_local $2 + get_local $0 + get_local $4 + call $~lib/internal/number/utoa64_lut end get_local $1 if @@ -5561,88 +5537,86 @@ get_local $14 i32.add set_global $~lib/internal/number/_K - block $~lib/internal/number/grisuRound|inlined.0 - block $~lib/internal/arraybuffer/loadUnsafe|inlined.6 (result i64) - get_local $16 - get_local $14 - i32.const 2 - i32.shl - i32.add - i64.load32_u offset=8 - end - get_local $7 - i64.extend_s/i32 - i64.shl - set_local $20 - get_local $0 - get_local $15 - i32.const 1 - i32.sub - i32.const 1 + block $~lib/internal/arraybuffer/loadUnsafe|inlined.6 (result i64) + get_local $16 + get_local $14 + i32.const 2 i32.shl i32.add - set_local $18 - get_local $18 - i32.load16_u offset=4 - set_local $21 - block $break|2 - loop $continue|2 + i64.load32_u offset=8 + end + get_local $7 + i64.extend_s/i32 + i64.shl + set_local $20 + get_local $0 + get_local $15 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + set_local $18 + get_local $18 + i32.load16_u offset=4 + set_local $21 + block $break|2 + loop $continue|2 + get_local $19 + get_local $10 + i64.lt_u + tee_local $22 + if (result i32) + get_local $5 get_local $19 + i64.sub + get_local $20 + i64.ge_u + else + get_local $22 + end + tee_local $22 + if (result i32) + get_local $19 + get_local $20 + i64.add get_local $10 i64.lt_u tee_local $22 if (result i32) - get_local $5 + get_local $22 + else + get_local $10 get_local $19 i64.sub - get_local $20 - i64.ge_u - else - get_local $22 - end - tee_local $22 - if (result i32) get_local $19 get_local $20 i64.add get_local $10 - i64.lt_u - tee_local $22 - if (result i32) - get_local $22 - else - get_local $10 - get_local $19 - i64.sub - get_local $19 - get_local $20 - i64.add - get_local $10 - i64.sub - i64.gt_u - end - else - get_local $22 + i64.sub + i64.gt_u end - if - block - get_local $21 - i32.const 1 - i32.sub - set_local $21 - get_local $19 - get_local $20 - i64.add - set_local $19 - end - br $continue|2 + else + get_local $22 + end + if + block + get_local $21 + i32.const 1 + i32.sub + set_local $21 + get_local $19 + get_local $20 + i64.add + set_local $19 end + br $continue|2 end end - get_local $18 - get_local $21 - i32.store16 offset=4 end + get_local $18 + get_local $21 + i32.store16 offset=4 get_local $15 return end @@ -5727,76 +5701,74 @@ end i64.mul set_local $10 - block $~lib/internal/number/grisuRound|inlined.1 - get_local $0 - get_local $15 - i32.const 1 - i32.sub - i32.const 1 - i32.shl - i32.add - set_local $17 - get_local $17 - i32.load16_u offset=4 - set_local $21 - block $break|4 - loop $continue|4 + get_local $0 + get_local $15 + i32.const 1 + i32.sub + i32.const 1 + i32.shl + i32.add + set_local $17 + get_local $17 + i32.load16_u offset=4 + set_local $21 + block $break|4 + loop $continue|4 + get_local $13 + get_local $10 + i64.lt_u + tee_local $18 + if (result i32) + get_local $5 get_local $13 + i64.sub + get_local $8 + i64.ge_u + else + get_local $18 + end + tee_local $18 + if (result i32) + get_local $13 + get_local $8 + i64.add get_local $10 i64.lt_u tee_local $18 if (result i32) - get_local $5 + get_local $18 + else + get_local $10 get_local $13 i64.sub - get_local $8 - i64.ge_u - else - get_local $18 - end - tee_local $18 - if (result i32) get_local $13 get_local $8 i64.add get_local $10 - i64.lt_u - tee_local $18 - if (result i32) - get_local $18 - else - get_local $10 - get_local $13 - i64.sub - get_local $13 - get_local $8 - i64.add - get_local $10 - i64.sub - i64.gt_u - end - else - get_local $18 + i64.sub + i64.gt_u end - if - block - get_local $21 - i32.const 1 - i32.sub - set_local $21 - get_local $13 - get_local $8 - i64.add - set_local $13 - end - br $continue|4 + else + get_local $18 + end + if + block + get_local $21 + i32.const 1 + i32.sub + set_local $21 + get_local $13 + get_local $8 + i64.add + set_local $13 end + br $continue|4 end end - get_local $17 - get_local $21 - i32.store16 offset=4 end + get_local $17 + get_local $21 + i32.store16 offset=4 get_local $15 return end @@ -5908,28 +5880,26 @@ i32.shl i32.add set_local $4 - block $~lib/memory/memory.copy|inlined.3 - get_local $4 - get_global $~lib/internal/string/HEADER_SIZE - i32.add - i32.const 2 - i32.add - set_local $5 - get_local $4 - get_global $~lib/internal/string/HEADER_SIZE - i32.add - set_local $6 - i32.const 0 - get_local $2 - i32.sub - i32.const 1 - i32.shl - set_local $7 - get_local $5 - get_local $6 - get_local $7 - call $~lib/internal/memory/memmove - end + get_local $4 + get_global $~lib/internal/string/HEADER_SIZE + i32.add + i32.const 2 + i32.add + set_local $5 + get_local $4 + get_global $~lib/internal/string/HEADER_SIZE + i32.add + set_local $6 + i32.const 0 + get_local $2 + i32.sub + i32.const 1 + i32.shl + set_local $7 + get_local $5 + get_local $6 + get_local $7 + call $~lib/internal/memory/memmove get_local $0 get_local $3 i32.const 1 @@ -5958,28 +5928,26 @@ get_local $3 i32.sub set_local $4 - block $~lib/memory/memory.copy|inlined.4 - get_local $0 - get_global $~lib/internal/string/HEADER_SIZE - i32.add - get_local $4 - i32.const 1 - i32.shl - i32.add - set_local $7 - get_local $0 - get_global $~lib/internal/string/HEADER_SIZE - i32.add - set_local $6 - get_local $1 - i32.const 1 - i32.shl - set_local $5 - get_local $7 - get_local $6 - get_local $5 - call $~lib/internal/memory/memmove - end + get_local $0 + get_global $~lib/internal/string/HEADER_SIZE + i32.add + get_local $4 + i32.const 1 + i32.shl + i32.add + set_local $7 + get_local $0 + get_global $~lib/internal/string/HEADER_SIZE + i32.add + set_local $6 + get_local $1 + i32.const 1 + i32.shl + set_local $5 + get_local $7 + get_local $6 + get_local $5 + call $~lib/internal/memory/memmove get_local $0 get_global $~lib/internal/string/CharCode._0 get_global $~lib/internal/string/CharCode.DOT @@ -6049,12 +6017,10 @@ i32.const 1 i32.add set_local $7 - block $~lib/internal/number/utoa32_core|inlined.4 - get_local $4 - get_local $5 - get_local $7 - call $~lib/internal/number/utoa32_lut - end + get_local $4 + get_local $5 + get_local $7 + call $~lib/internal/number/utoa32_lut get_local $4 get_global $~lib/internal/string/CharCode.MINUS get_global $~lib/internal/string/CharCode.PLUS @@ -6073,28 +6039,26 @@ i32.const 1 i32.shl set_local $7 - block $~lib/memory/memory.copy|inlined.5 - get_local $0 - get_global $~lib/internal/string/HEADER_SIZE - i32.add - i32.const 4 - i32.add - set_local $6 - get_local $0 - get_global $~lib/internal/string/HEADER_SIZE - i32.add - i32.const 2 - i32.add - set_local $5 - get_local $7 - i32.const 2 - i32.sub - set_local $4 - get_local $6 - get_local $5 - get_local $4 - call $~lib/internal/memory/memmove - end + get_local $0 + get_global $~lib/internal/string/HEADER_SIZE + i32.add + i32.const 4 + i32.add + set_local $6 + get_local $0 + get_global $~lib/internal/string/HEADER_SIZE + i32.add + i32.const 2 + i32.add + set_local $5 + get_local $7 + i32.const 2 + i32.sub + set_local $4 + get_local $6 + get_local $5 + get_local $4 + call $~lib/internal/memory/memmove get_local $0 get_global $~lib/internal/string/CharCode.DOT i32.store16 offset=6 @@ -6131,12 +6095,10 @@ i32.const 1 i32.add set_local $8 - block $~lib/internal/number/utoa32_core|inlined.5 - get_local $4 - get_local $5 - get_local $8 - call $~lib/internal/number/utoa32_lut - end + get_local $4 + get_local $5 + get_local $8 + call $~lib/internal/number/utoa32_lut get_local $4 get_global $~lib/internal/string/CharCode.MINUS get_global $~lib/internal/string/CharCode.PLUS @@ -6233,7 +6195,7 @@ i32.add i32.sub set_local $4 - block $~lib/internal/number/normalizedBoundaries|inlined.0 + block get_local $6 i64.const 1 i64.shl @@ -6282,7 +6244,7 @@ get_local $8 set_global $~lib/internal/number/_exp end - block $~lib/internal/number/getCachedPower|inlined.0 + block get_global $~lib/internal/number/_exp set_local $10 i32.const -61 @@ -6745,28 +6707,24 @@ get_local $2 call $~lib/string/String#substring set_local $3 - block $~lib/internal/string/freeUnsafe|inlined.0 + get_local $1 + i32.eqz + if + i32.const 0 + i32.const 112 + i32.const 28 + i32.const 4 + call $~lib/env/abort + unreachable + end + block $~lib/memory/memory.free|inlined.0 block get_local $1 - i32.eqz - if - i32.const 0 - i32.const 112 - i32.const 28 - i32.const 4 - call $~lib/env/abort - unreachable - end - block $~lib/memory/memory.free|inlined.0 - block - get_local $1 - call $~lib/allocator/arena/__memory_free - br $~lib/memory/memory.free|inlined.0 - unreachable - end - unreachable - end + call $~lib/allocator/arena/__memory_free + br $~lib/memory/memory.free|inlined.0 + unreachable end + unreachable end get_local $3 ) diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index e4ff89a2..01147bfb 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1561,17 +1561,18 @@ get_local $0 get_local $1 i32.add - tee_local $0 + tee_local $2 i32.const 8 i32.add - tee_local $1 f64.load offset=8 set_local $7 - get_local $1 - get_local $0 + get_local $2 + i32.const 8 + i32.add + get_local $2 f64.load offset=8 f64.store offset=8 - get_local $0 + get_local $2 get_local $7 f64.store offset=8 ) @@ -1626,13 +1627,12 @@ get_local $3 get_local $2 i32.add + tee_local $1 i32.const 8 i32.add get_local $6 f64.store offset=8 - get_local $3 - get_local $2 - i32.add + get_local $1 get_local $5 f64.store offset=8 end diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index c68919af..93c186f7 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -484,18 +484,16 @@ get_local $2 call $~lib/internal/arraybuffer/allocateUnsafe set_local $3 - block $~lib/memory/memory.fill|inlined.0 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 if (result i32) get_local $0 @@ -551,18 +549,16 @@ get_local $2 call $~lib/internal/arraybuffer/allocateUnsafe set_local $3 - block $~lib/memory/memory.fill|inlined.1 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 if (result i32) get_local $0 @@ -618,18 +614,16 @@ get_local $2 call $~lib/internal/arraybuffer/allocateUnsafe set_local $3 - block $~lib/memory/memory.fill|inlined.2 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 if (result i32) get_local $0 @@ -685,18 +679,16 @@ get_local $2 call $~lib/internal/arraybuffer/allocateUnsafe set_local $3 - block $~lib/memory/memory.fill|inlined.3 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 if (result i32) get_local $0 @@ -752,18 +744,16 @@ get_local $2 call $~lib/internal/arraybuffer/allocateUnsafe set_local $3 - block $~lib/memory/memory.fill|inlined.4 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 if (result i32) get_local $0 @@ -819,18 +809,16 @@ get_local $2 call $~lib/internal/arraybuffer/allocateUnsafe set_local $3 - block $~lib/memory/memory.fill|inlined.5 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 if (result i32) get_local $0 @@ -886,18 +874,16 @@ get_local $2 call $~lib/internal/arraybuffer/allocateUnsafe set_local $3 - block $~lib/memory/memory.fill|inlined.6 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 if (result i32) get_local $0 @@ -953,18 +939,16 @@ get_local $2 call $~lib/internal/arraybuffer/allocateUnsafe set_local $3 - block $~lib/memory/memory.fill|inlined.7 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 if (result i32) get_local $0 @@ -1020,18 +1004,16 @@ get_local $2 call $~lib/internal/arraybuffer/allocateUnsafe set_local $3 - block $~lib/memory/memory.fill|inlined.8 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 if (result i32) get_local $0 @@ -1087,18 +1069,16 @@ get_local $2 call $~lib/internal/arraybuffer/allocateUnsafe set_local $3 - block $~lib/memory/memory.fill|inlined.9 - get_local $3 - get_global $~lib/internal/arraybuffer/HEADER_SIZE - i32.add - set_local $4 - i32.const 0 - set_local $5 - get_local $4 - get_local $5 - get_local $2 - call $~lib/internal/memory/memset - end + get_local $3 + get_global $~lib/internal/arraybuffer/HEADER_SIZE + i32.add + set_local $4 + i32.const 0 + set_local $5 + get_local $4 + get_local $5 + get_local $2 + call $~lib/internal/memory/memset get_local $0 if (result i32) get_local $0 @@ -1700,23 +1680,21 @@ call $~lib/env/abort unreachable end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.0 - get_local $0 - i32.load - set_local $3 - get_local $0 - i32.load offset=4 - set_local $4 - get_local $3 - get_local $4 - i32.add - get_local $1 - i32.const 2 - i32.shl - i32.add - get_local $2 - i32.store offset=8 - end + get_local $0 + i32.load + set_local $3 + get_local $0 + i32.load offset=4 + set_local $4 + get_local $3 + get_local $4 + i32.add + get_local $1 + i32.const 2 + i32.shl + i32.add + get_local $2 + i32.store offset=8 ) (func $~lib/internal/typedarray/TypedArray#__get (; 18 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -1868,23 +1846,21 @@ call $~lib/env/abort unreachable end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.0 - get_local $0 - i32.load - set_local $3 - get_local $0 - i32.load offset=4 - set_local $4 - get_local $3 - get_local $4 - i32.add - get_local $1 - i32.const 3 - i32.shl - i32.add - get_local $2 - f64.store offset=8 - end + get_local $0 + i32.load + set_local $3 + get_local $0 + i32.load offset=4 + set_local $4 + get_local $3 + get_local $4 + i32.add + get_local $1 + i32.const 3 + i32.shl + i32.add + get_local $2 + f64.store offset=8 ) (func $~lib/typedarray/Float64Array#subarray (; 21 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) @@ -2073,21 +2049,19 @@ end end end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.4 - get_local $6 - i32.const 1 - i32.add - set_local $8 - get_local $0 - get_local $1 - i32.add - get_local $8 - i32.const 3 - i32.shl - i32.add - get_local $5 - f64.store offset=8 - end + get_local $6 + i32.const 1 + i32.add + set_local $8 + get_local $0 + get_local $1 + i32.add + get_local $8 + i32.const 3 + i32.shl + i32.add + get_local $5 + f64.store offset=8 end get_local $4 i32.const 1 @@ -2126,14 +2100,12 @@ br $~lib/memory/memory.allocate|inlined.3 end set_local $5 - block $~lib/memory/memory.fill|inlined.10 - i32.const 0 - set_local $6 - get_local $5 - get_local $6 - get_local $4 - call $~lib/internal/memory/memset - end + i32.const 0 + set_local $6 + get_local $5 + get_local $6 + get_local $4 + call $~lib/internal/memory/memset block $break|0 get_local $2 i32.const 1 @@ -2238,28 +2210,24 @@ i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.5 - get_local $0 - get_local $1 - i32.add - get_local $6 - i32.const 3 - i32.shl - i32.add - get_local $9 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.6 - get_local $0 - get_local $1 - i32.add - get_local $8 - i32.const 3 - i32.shl - i32.add - get_local $10 - f64.store offset=8 - end + get_local $0 + get_local $1 + i32.add + get_local $6 + i32.const 3 + i32.shl + i32.add + get_local $9 + f64.store offset=8 + get_local $0 + get_local $1 + i32.add + get_local $8 + i32.const 3 + i32.shl + i32.add + get_local $10 + f64.store offset=8 end end get_local $6 @@ -2296,31 +2264,9 @@ f64.load offset=8 end set_local $10 - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.7 - i32.const 0 - set_local $8 - block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.7 (result f64) - get_local $0 - get_local $1 - i32.add - get_local $6 - i32.const 3 - i32.shl - i32.add - f64.load offset=8 - end - set_local $9 - get_local $0 - get_local $1 - i32.add - get_local $8 - i32.const 3 - i32.shl - i32.add - get_local $9 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.8 + i32.const 0 + set_local $8 + block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.7 (result f64) get_local $0 get_local $1 i32.add @@ -2328,9 +2274,27 @@ i32.const 3 i32.shl i32.add - get_local $10 - f64.store offset=8 + f64.load offset=8 end + set_local $9 + get_local $0 + get_local $1 + i32.add + get_local $8 + i32.const 3 + i32.shl + i32.add + get_local $9 + f64.store offset=8 + get_local $0 + get_local $1 + i32.add + get_local $6 + i32.const 3 + i32.shl + i32.add + get_local $10 + f64.store offset=8 i32.const 1 set_local $8 block $break|3 @@ -2427,30 +2391,26 @@ i32.shl i32.xor i32.store - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.9 - get_local $0 - get_local $1 - i32.add - get_local $8 - i32.const 3 - i32.shl - i32.add - get_local $10 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.10 - i32.const 0 - set_local $11 - get_local $0 - get_local $1 - i32.add - get_local $11 - i32.const 3 - i32.shl - i32.add - get_local $9 - f64.store offset=8 - end + get_local $0 + get_local $1 + i32.add + get_local $8 + i32.const 3 + i32.shl + i32.add + get_local $10 + f64.store offset=8 + i32.const 0 + set_local $11 + get_local $0 + get_local $1 + i32.add + get_local $11 + i32.const 3 + i32.shl + i32.add + get_local $9 + f64.store offset=8 end get_local $8 i32.const 1 @@ -2493,45 +2453,41 @@ f64.load offset=8 end set_local $12 - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.11 - i32.const 1 - set_local $6 - block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.11 (result f64) - i32.const 0 - set_local $7 - get_local $0 - get_local $1 - i32.add - get_local $7 - i32.const 3 - i32.shl - i32.add - f64.load offset=8 - end - set_local $10 - get_local $0 - get_local $1 - i32.add - get_local $6 - i32.const 3 - i32.shl - i32.add - get_local $10 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.12 + i32.const 1 + set_local $6 + block $~lib/internal/arraybuffer/loadUnsafeWithOffset|inlined.11 (result f64) i32.const 0 - set_local $6 + set_local $7 get_local $0 get_local $1 i32.add - get_local $6 + get_local $7 i32.const 3 i32.shl i32.add - get_local $12 - f64.store offset=8 + f64.load offset=8 end + set_local $10 + get_local $0 + get_local $1 + i32.add + get_local $6 + i32.const 3 + i32.shl + i32.add + get_local $10 + f64.store offset=8 + i32.const 0 + set_local $6 + get_local $0 + get_local $1 + i32.add + get_local $6 + i32.const 3 + i32.shl + i32.add + get_local $12 + f64.store offset=8 ) (func $~lib/internal/typedarray/TypedArray#sort (; 25 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -2601,32 +2557,28 @@ i32.const 0 i32.lt_s if - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.1 - i32.const 1 - set_local $5 - get_local $4 - get_local $2 - i32.add - get_local $5 - i32.const 3 - i32.shl - i32.add - get_local $7 - f64.store offset=8 - end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.2 - i32.const 0 - set_local $5 - get_local $4 - get_local $2 - i32.add - get_local $5 - i32.const 3 - i32.shl - i32.add - get_local $6 - f64.store offset=8 - end + i32.const 1 + set_local $5 + get_local $4 + get_local $2 + i32.add + get_local $5 + i32.const 3 + i32.shl + i32.add + get_local $7 + f64.store offset=8 + i32.const 0 + set_local $5 + get_local $4 + get_local $2 + i32.add + get_local $5 + i32.const 3 + i32.shl + i32.add + get_local $6 + f64.store offset=8 end get_local $0 return @@ -2753,23 +2705,21 @@ call $~lib/env/abort unreachable end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.0 - get_local $0 - i32.load - set_local $3 - get_local $0 - i32.load offset=4 - set_local $4 - get_local $3 - get_local $4 - i32.add - get_local $1 - i32.const 0 - i32.shl - i32.add - get_local $2 - i32.store8 offset=8 - end + get_local $0 + i32.load + set_local $3 + get_local $0 + i32.load offset=4 + set_local $4 + get_local $3 + get_local $4 + i32.add + get_local $1 + i32.const 0 + i32.shl + i32.add + get_local $2 + i32.store8 offset=8 ) (func $~lib/typedarray/Uint8ClampedArray#__set (; 30 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -2844,23 +2794,21 @@ call $~lib/env/abort unreachable end - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.0 - get_local $0 - i32.load - set_local $3 - get_local $0 - i32.load offset=4 - set_local $4 - get_local $3 - get_local $4 - i32.add - get_local $1 - i32.const 0 - i32.shl - i32.add - get_local $2 - i32.store8 offset=8 - end + get_local $0 + i32.load + set_local $3 + get_local $0 + i32.load offset=4 + set_local $4 + get_local $3 + get_local $4 + i32.add + get_local $1 + i32.const 0 + i32.shl + i32.add + get_local $2 + i32.store8 offset=8 ) (func $~lib/internal/typedarray/TypedArray#fill (; 33 ;) (type $iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) (local $4 i32) @@ -3275,17 +3223,15 @@ i32.lt_s i32.eqz br_if $break|0 - block $~lib/internal/arraybuffer/storeUnsafeWithOffset|inlined.1 - get_local $4 - get_local $5 - i32.add - get_local $2 - i32.const 2 - i32.shl - i32.add - get_local $1 - i32.store offset=8 - end + get_local $4 + get_local $5 + i32.add + get_local $2 + i32.const 2 + i32.shl + i32.add + get_local $1 + i32.store offset=8 get_local $2 i32.const 1 i32.add