mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-15 16:01:30 +00:00
Utilize Binaryen's -O4
When specifying -O3 or -Oz, asc now automatically increases the optimize level to 4, then including costly non-LLVM optimizations for blocky code, in turn achieving similar results as an LLVM-based generator.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -14,31 +14,32 @@
|
||||
(export "stringArrayArrayMethodCall" (func $std/array-access/stringArrayArrayMethodCall))
|
||||
(export "memory" (memory $0))
|
||||
(func $~lib/array/Array<Array<i32>>#__get (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(if (result i32)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(tee_local $2
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
(tee_local $0
|
||||
(if (result i32)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(tee_local $0
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(func $std/array-access/i32ArrayArrayElementAccess (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
@ -105,23 +106,24 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (result i32)
|
||||
(get_local $2)
|
||||
(i32.sub
|
||||
(i32.load8_u
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load8_u
|
||||
(get_local $1)
|
||||
(tee_local $0
|
||||
(if (result i32)
|
||||
(get_local $2)
|
||||
(i32.sub
|
||||
(i32.load8_u
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.load8_u
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(func $~lib/string/String#startsWith (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(local $5 i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
@ -152,33 +154,31 @@
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(tee_local $2
|
||||
(tee_local $3
|
||||
(select
|
||||
(tee_local $2
|
||||
(tee_local $3
|
||||
(select
|
||||
(get_local $2)
|
||||
(i32.const 0)
|
||||
(i32.gt_s
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(tee_local $3
|
||||
(tee_local $5
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(tee_local $2
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $5)
|
||||
(get_local $2)
|
||||
)
|
||||
(return
|
||||
(i32.const 0)
|
||||
@ -192,7 +192,7 @@
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
|
@ -25,31 +25,32 @@
|
||||
)
|
||||
)
|
||||
(func $~lib/array/Array<i32>#__get (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(if (result i32)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(tee_local $2
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
(tee_local $0
|
||||
(if (result i32)
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
(i32.shr_u
|
||||
(i32.load
|
||||
(tee_local $0
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(func $~lib/internal/arraybuffer/computeSize (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
||||
@ -70,7 +71,6 @@
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(if
|
||||
(get_local $0)
|
||||
(block
|
||||
@ -109,26 +109,24 @@
|
||||
(grow_memory
|
||||
(select
|
||||
(get_local $2)
|
||||
(tee_local $4
|
||||
(tee_local $3
|
||||
(i32.shr_u
|
||||
(i32.and
|
||||
(i32.add
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const 65535)
|
||||
(tee_local $3
|
||||
(i32.shr_u
|
||||
(i32.and
|
||||
(i32.add
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const -65536)
|
||||
(i32.const 65535)
|
||||
)
|
||||
(i32.const 16)
|
||||
(i32.const -65536)
|
||||
)
|
||||
(i32.const 16)
|
||||
)
|
||||
)
|
||||
(i32.gt_s
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -185,8 +183,8 @@
|
||||
(get_local $1)
|
||||
)
|
||||
(func $~lib/memory/set_memory (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(local $3 i64)
|
||||
(local $4 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i64)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $2)
|
||||
@ -230,9 +228,11 @@
|
||||
)
|
||||
(i32.store8
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
(tee_local $3
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -240,10 +240,7 @@
|
||||
)
|
||||
(i32.store8
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $3)
|
||||
(i32.const 3)
|
||||
)
|
||||
(get_local $1)
|
||||
@ -279,19 +276,25 @@
|
||||
)
|
||||
(return)
|
||||
)
|
||||
(set_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(tee_local $3
|
||||
(i32.and
|
||||
(i32.sub
|
||||
(i32.const 0)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(tee_local $4
|
||||
(i32.and
|
||||
(i32.sub
|
||||
(i32.const 0)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(tee_local $1
|
||||
@ -310,10 +313,7 @@
|
||||
(get_local $0)
|
||||
(tee_local $2
|
||||
(i32.and
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
)
|
||||
(get_local $2)
|
||||
(i32.const -4)
|
||||
)
|
||||
)
|
||||
@ -345,9 +345,11 @@
|
||||
)
|
||||
(i32.store
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
(tee_local $3
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(i32.const 12)
|
||||
)
|
||||
@ -355,10 +357,7 @@
|
||||
)
|
||||
(i32.store
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $3)
|
||||
(i32.const 8)
|
||||
)
|
||||
(get_local $1)
|
||||
@ -400,9 +399,11 @@
|
||||
)
|
||||
(i32.store
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
(tee_local $3
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(i32.const 28)
|
||||
)
|
||||
@ -410,30 +411,21 @@
|
||||
)
|
||||
(i32.store
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $3)
|
||||
(i32.const 24)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.store
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $3)
|
||||
(i32.const 20)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.store
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $3)
|
||||
(i32.const 16)
|
||||
)
|
||||
(get_local $1)
|
||||
@ -441,7 +433,7 @@
|
||||
(set_local $0
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(tee_local $4
|
||||
(tee_local $3
|
||||
(i32.add
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
@ -455,18 +447,18 @@
|
||||
(set_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(set_local $3
|
||||
(set_local $4
|
||||
(i64.or
|
||||
(i64.extend_u/i32
|
||||
(get_local $1)
|
||||
)
|
||||
(i64.shl
|
||||
(tee_local $4
|
||||
(i64.extend_u/i32
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i64.shl
|
||||
(get_local $4)
|
||||
(i64.const 32)
|
||||
)
|
||||
)
|
||||
@ -480,28 +472,28 @@
|
||||
(block
|
||||
(i64.store
|
||||
(get_local $0)
|
||||
(get_local $3)
|
||||
(get_local $4)
|
||||
)
|
||||
(i64.store
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(get_local $3)
|
||||
(get_local $4)
|
||||
)
|
||||
(i64.store
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 16)
|
||||
)
|
||||
(get_local $3)
|
||||
(get_local $4)
|
||||
)
|
||||
(i64.store
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 24)
|
||||
)
|
||||
(get_local $3)
|
||||
(get_local $4)
|
||||
)
|
||||
(set_local $2
|
||||
(i32.sub
|
||||
@ -548,26 +540,27 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.store
|
||||
(if (result i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
(block (result i32)
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.store
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.store offset=4
|
||||
@ -700,46 +693,40 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(set_global $std/array-literal/dynamicArray
|
||||
(block (result i32)
|
||||
(call $~lib/array/Array<i32>#__unchecked_set
|
||||
(tee_local $0
|
||||
(call $~lib/array/Array<i32>#constructor
|
||||
(i32.const 0)
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
(call $~lib/array/Array<i32>#__unchecked_set
|
||||
(tee_local $0
|
||||
(call $~lib/array/Array<i32>#constructor
|
||||
(i32.const 0)
|
||||
(get_global $std/array-literal/i)
|
||||
(i32.const 3)
|
||||
)
|
||||
(call $~lib/array/Array<i32>#__unchecked_set
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
(block (result i32)
|
||||
(set_global $std/array-literal/i
|
||||
(i32.add
|
||||
(get_global $std/array-literal/i)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(get_global $std/array-literal/i)
|
||||
)
|
||||
)
|
||||
(call $~lib/array/Array<i32>#__unchecked_set
|
||||
(get_local $0)
|
||||
(i32.const 2)
|
||||
(block (result i32)
|
||||
(set_global $std/array-literal/i
|
||||
(i32.add
|
||||
(get_global $std/array-literal/i)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(get_global $std/array-literal/i)
|
||||
)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 0)
|
||||
(get_global $std/array-literal/i)
|
||||
)
|
||||
(set_global $std/array-literal/i
|
||||
(i32.add
|
||||
(get_global $std/array-literal/i)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(call $~lib/array/Array<i32>#__unchecked_set
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
(get_global $std/array-literal/i)
|
||||
)
|
||||
(set_global $std/array-literal/i
|
||||
(i32.add
|
||||
(get_global $std/array-literal/i)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(call $~lib/array/Array<i32>#__unchecked_set
|
||||
(get_local $0)
|
||||
(i32.const 2)
|
||||
(get_global $std/array-literal/i)
|
||||
)
|
||||
(set_global $std/array-literal/dynamicArray
|
||||
(get_local $0)
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -22,7 +22,6 @@
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(if
|
||||
(get_local $0)
|
||||
(block
|
||||
@ -61,26 +60,24 @@
|
||||
(grow_memory
|
||||
(select
|
||||
(get_local $2)
|
||||
(tee_local $4
|
||||
(tee_local $3
|
||||
(i32.shr_u
|
||||
(i32.and
|
||||
(i32.add
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const 65535)
|
||||
(tee_local $3
|
||||
(i32.shr_u
|
||||
(i32.and
|
||||
(i32.add
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const -65536)
|
||||
(i32.const 65535)
|
||||
)
|
||||
(i32.const 16)
|
||||
(i32.const -65536)
|
||||
)
|
||||
(i32.const 16)
|
||||
)
|
||||
)
|
||||
(i32.gt_s
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -117,40 +114,36 @@
|
||||
)
|
||||
)
|
||||
(func $std/constructor/EmptyCtorWithFieldInit#constructor (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(if (result i32)
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
(block (result i32)
|
||||
(i32.store
|
||||
(tee_local $1
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 4)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
(get_local $1)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $std/constructor/EmptyCtorWithFieldNoInit#constructor (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(if (result i32)
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
(block (result i32)
|
||||
(i32.store
|
||||
(tee_local $1
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 4)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 4)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(get_local $1)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $std/constructor/CtorReturns#constructor (; 4 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
@ -188,13 +181,17 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(if (result i32)
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 0)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
)
|
||||
(set_local $0
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $start (; 7 ;) (type $v)
|
||||
(local $0 i32)
|
||||
@ -230,31 +227,27 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(set_global $std/constructor/justFieldInit
|
||||
(block (result i32)
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 4)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
(set_global $std/constructor/justFieldInit
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(set_global $std/constructor/justFieldNoInit
|
||||
(block (result i32)
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(set_global $std/constructor/ctorReturns
|
||||
(call $std/constructor/CtorReturns#constructor
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -28,6 +28,7 @@
|
||||
(local $5 i64)
|
||||
(local $6 i32)
|
||||
(local $7 i32)
|
||||
(local $8 i32)
|
||||
(block $folding-inner0
|
||||
(set_local $3
|
||||
(i32.wrap/i64
|
||||
@ -59,41 +60,54 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $8
|
||||
(i32.wrap/i64
|
||||
(i64.shr_u
|
||||
(get_local $2)
|
||||
(i64.const 63)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(if (result i32)
|
||||
(if (result i32)
|
||||
(tee_local $7
|
||||
(i64.eq
|
||||
(i64.shl
|
||||
(get_local $5)
|
||||
(i64.const 1)
|
||||
)
|
||||
(i64.const 0)
|
||||
)
|
||||
)
|
||||
(get_local $7)
|
||||
(tee_local $7
|
||||
(call $isNaN<f64>
|
||||
(get_local $1)
|
||||
(i32.eqz
|
||||
(tee_local $7
|
||||
(i64.eq
|
||||
(i64.shl
|
||||
(get_local $5)
|
||||
(i64.const 1)
|
||||
)
|
||||
(i64.const 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $7
|
||||
(call $isNaN<f64>
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $7)
|
||||
)
|
||||
(set_local $7
|
||||
(i32.eq
|
||||
(get_local $3)
|
||||
(i32.const 2047)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(get_local $7)
|
||||
(return
|
||||
(f64.div
|
||||
(f64.mul
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(f64.mul
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(tee_local $0
|
||||
(f64.mul
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -126,14 +140,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $7
|
||||
(i32.wrap/i64
|
||||
(i64.shr_u
|
||||
(get_local $2)
|
||||
(i64.const 63)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(if (result i64)
|
||||
(get_local $3)
|
||||
@ -346,7 +352,11 @@
|
||||
(f64.reinterpret/i64
|
||||
(i64.or
|
||||
(tee_local $2
|
||||
(select
|
||||
(if (result i64)
|
||||
(i32.gt_s
|
||||
(get_local $3)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i64.or
|
||||
(i64.sub
|
||||
(get_local $2)
|
||||
@ -368,15 +378,11 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.gt_s
|
||||
(get_local $3)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i64.shl
|
||||
(i64.extend_u/i32
|
||||
(get_local $7)
|
||||
(get_local $8)
|
||||
)
|
||||
(i64.const 63)
|
||||
)
|
||||
@ -425,7 +431,7 @@
|
||||
)
|
||||
(func $std/mod/test_fmod (; 5 ;) (type $FFFi) (param $0 f64) (param $1 f64) (param $2 f64) (result i32)
|
||||
(local $3 i32)
|
||||
(if (result i32)
|
||||
(if
|
||||
(tee_local $3
|
||||
(call $std/mod/check<f64>
|
||||
(call $~lib/math/NativeMath.mod
|
||||
@ -435,21 +441,19 @@
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(if (result i32)
|
||||
(tee_local $3
|
||||
(i32.const 0)
|
||||
)
|
||||
(get_local $3)
|
||||
(set_local $3
|
||||
(call $std/mod/check<f64>
|
||||
(call $std/mod/JSOp.mod
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(tee_local $0
|
||||
(call $std/mod/JSOp.mod
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(get_local $3)
|
||||
)
|
||||
(get_local $3)
|
||||
)
|
||||
(func $isNaN<f32> (; 6 ;) (type $fi) (param $0 f32) (result i32)
|
||||
(f32.ne
|
||||
@ -491,40 +495,51 @@
|
||||
(i32.const 255)
|
||||
)
|
||||
)
|
||||
(set_local $7
|
||||
(i32.and
|
||||
(get_local $2)
|
||||
(i32.const -2147483648)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(if (result i32)
|
||||
(if (result i32)
|
||||
(tee_local $3
|
||||
(i32.eqz
|
||||
(i32.shl
|
||||
(get_local $5)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $3)
|
||||
(tee_local $3
|
||||
(call $isNaN<f32>
|
||||
(get_local $1)
|
||||
(i32.eqz
|
||||
(tee_local $3
|
||||
(i32.eqz
|
||||
(i32.shl
|
||||
(get_local $5)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $3
|
||||
(call $isNaN<f32>
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $3)
|
||||
)
|
||||
(set_local $3
|
||||
(i32.eq
|
||||
(get_local $4)
|
||||
(i32.const 255)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(get_local $3)
|
||||
(return
|
||||
(f32.div
|
||||
(f32.mul
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(f32.mul
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(tee_local $0
|
||||
(f32.mul
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -557,12 +572,6 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $7
|
||||
(i32.and
|
||||
(get_local $2)
|
||||
(i32.const -2147483648)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(if (result i32)
|
||||
(get_local $4)
|
||||
@ -759,7 +768,11 @@
|
||||
(f32.reinterpret/i32
|
||||
(i32.or
|
||||
(tee_local $2
|
||||
(select
|
||||
(if (result i32)
|
||||
(i32.gt_s
|
||||
(get_local $4)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.or
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
@ -777,10 +790,6 @@
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
(i32.gt_s
|
||||
(get_local $4)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $7)
|
||||
|
@ -13,7 +13,6 @@
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(if
|
||||
(get_local $0)
|
||||
(block
|
||||
@ -52,26 +51,24 @@
|
||||
(grow_memory
|
||||
(select
|
||||
(get_local $2)
|
||||
(tee_local $4
|
||||
(tee_local $3
|
||||
(i32.shr_u
|
||||
(i32.and
|
||||
(i32.add
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const 65535)
|
||||
(tee_local $3
|
||||
(i32.shr_u
|
||||
(i32.and
|
||||
(i32.add
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const -65536)
|
||||
(i32.const 65535)
|
||||
)
|
||||
(i32.const 16)
|
||||
(i32.const -65536)
|
||||
)
|
||||
(i32.const 16)
|
||||
)
|
||||
)
|
||||
(i32.gt_s
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -100,31 +97,32 @@
|
||||
)
|
||||
(func $std/new/AClass#constructor (; 1 ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32)
|
||||
(local $2 i32)
|
||||
(i32.store
|
||||
(get_local $0)
|
||||
(i32.add
|
||||
(i32.load
|
||||
(if (result i32)
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
(block (result i32)
|
||||
(i32.store
|
||||
(tee_local $2
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
(f32.store offset=4
|
||||
(get_local $2)
|
||||
(f32.const 2)
|
||||
)
|
||||
(tee_local $0
|
||||
(get_local $2)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(tee_local $2
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
(f32.store offset=4
|
||||
(get_local $0)
|
||||
(f32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.store
|
||||
(get_local $2)
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -13,14 +13,18 @@
|
||||
(local $1 i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(if (result i32)
|
||||
(tee_local $1
|
||||
(i32.const 1)
|
||||
)
|
||||
(get_local $1)
|
||||
(i32.const 0)
|
||||
(tee_local $1
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $1
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $1)
|
||||
)
|
||||
(block
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
@ -32,12 +36,8 @@
|
||||
)
|
||||
)
|
||||
(if
|
||||
(if (result i32)
|
||||
(tee_local $1
|
||||
(i32.const 1)
|
||||
)
|
||||
(get_local $1)
|
||||
(i32.const 0)
|
||||
(tee_local $1
|
||||
(i32.const 1)
|
||||
)
|
||||
(return
|
||||
(i32.or
|
||||
@ -70,20 +70,26 @@
|
||||
(local $1 i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(if (result i32)
|
||||
(if (result i32)
|
||||
(tee_local $1
|
||||
(i32.const 1)
|
||||
)
|
||||
(get_local $1)
|
||||
(tee_local $1
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
(i32.const 0)
|
||||
(tee_local $1
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $1
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $1)
|
||||
)
|
||||
(set_local $1
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $1)
|
||||
)
|
||||
(block
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
@ -102,14 +108,18 @@
|
||||
(local $1 i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(if (result i32)
|
||||
(tee_local $1
|
||||
(i32.const 1)
|
||||
)
|
||||
(get_local $1)
|
||||
(i32.const 0)
|
||||
(tee_local $1
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $1
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $1)
|
||||
)
|
||||
(block
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
@ -121,12 +131,8 @@
|
||||
)
|
||||
)
|
||||
(if
|
||||
(if (result i32)
|
||||
(tee_local $1
|
||||
(i32.const 1)
|
||||
)
|
||||
(get_local $1)
|
||||
(i32.const 0)
|
||||
(tee_local $1
|
||||
(i32.const 1)
|
||||
)
|
||||
(return
|
||||
(i32.or
|
||||
@ -162,20 +168,26 @@
|
||||
(local $1 i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(if (result i32)
|
||||
(if (result i32)
|
||||
(tee_local $1
|
||||
(i32.const 1)
|
||||
)
|
||||
(get_local $1)
|
||||
(tee_local $1
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
(i32.const 0)
|
||||
(tee_local $1
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $1
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $1)
|
||||
)
|
||||
(set_local $1
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $1)
|
||||
)
|
||||
(block
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
@ -194,14 +206,18 @@
|
||||
(local $1 i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(if (result i32)
|
||||
(tee_local $1
|
||||
(i32.const 1)
|
||||
)
|
||||
(get_local $1)
|
||||
(i32.const 0)
|
||||
(tee_local $1
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $1
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $1)
|
||||
)
|
||||
(block
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
@ -230,21 +246,6 @@
|
||||
)
|
||||
)
|
||||
(func $~lib/polyfills/bswap<u64> (; 6 ;) (type $II) (param $0 i64) (result i64)
|
||||
(local $1 i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.const 1)
|
||||
)
|
||||
(block
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 2)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(i64.rotr
|
||||
(i64.or
|
||||
(i64.and
|
||||
@ -283,85 +284,51 @@
|
||||
)
|
||||
)
|
||||
(func $~lib/polyfills/bswap16<u32> (; 7 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.const 1)
|
||||
)
|
||||
(block
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 27)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.or
|
||||
(i32.or
|
||||
(i32.or
|
||||
(i32.and
|
||||
(i32.shl
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.const 65280)
|
||||
)
|
||||
(i32.and
|
||||
(i32.shr_u
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.const 255)
|
||||
(i32.and
|
||||
(i32.shl
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.const 65280)
|
||||
)
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const -65536)
|
||||
(i32.shr_u
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.const 255)
|
||||
)
|
||||
)
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const -65536)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $~lib/polyfills/bswap16<i32> (; 8 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.const 1)
|
||||
)
|
||||
(block
|
||||
(call $~lib/env/abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 27)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(i32.or
|
||||
(i32.or
|
||||
(i32.or
|
||||
(i32.and
|
||||
(i32.shl
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.const 65280)
|
||||
)
|
||||
(i32.and
|
||||
(i32.shr_s
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.const 255)
|
||||
(i32.and
|
||||
(i32.shl
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.const 65280)
|
||||
)
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const -65536)
|
||||
(i32.shr_s
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(i32.const 255)
|
||||
)
|
||||
)
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
(i32.const -65536)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $start (; 9 ;) (type $v)
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -80,71 +80,75 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(if (result i32)
|
||||
(if (result i32)
|
||||
(if (result i32)
|
||||
(tee_local $3
|
||||
(i32.eq
|
||||
(i32.and
|
||||
(get_local $3)
|
||||
(i32.const 64512)
|
||||
)
|
||||
(i32.const 55296)
|
||||
(block (result i32)
|
||||
(if
|
||||
(tee_local $3
|
||||
(i32.eq
|
||||
(i32.and
|
||||
(get_local $3)
|
||||
(i32.const 64512)
|
||||
)
|
||||
(i32.const 55296)
|
||||
)
|
||||
(tee_local $3
|
||||
(i32.lt_u
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
(get_local $3)
|
||||
)
|
||||
(i32.eq
|
||||
(i32.and
|
||||
(i32.load16_u offset=4
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.shl
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(set_local $3
|
||||
(i32.lt_u
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(get_local $3)
|
||||
(set_local $3
|
||||
(i32.eq
|
||||
(i32.and
|
||||
(i32.load16_u offset=4
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.shl
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(i32.const 64512)
|
||||
)
|
||||
(i32.const 64512)
|
||||
(i32.const 56320)
|
||||
)
|
||||
(i32.const 56320)
|
||||
)
|
||||
)
|
||||
(if (result i32)
|
||||
(get_local $3)
|
||||
)
|
||||
(block (result i32)
|
||||
(set_local $1
|
||||
(block (result i32)
|
||||
(set_local $1
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(block (result i32)
|
||||
(set_local $1
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 3)
|
||||
(block (result i32)
|
||||
(set_local $1
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(i32.add
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -161,7 +165,6 @@
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(if
|
||||
(get_local $0)
|
||||
(block
|
||||
@ -200,26 +203,24 @@
|
||||
(grow_memory
|
||||
(select
|
||||
(get_local $2)
|
||||
(tee_local $4
|
||||
(tee_local $3
|
||||
(i32.shr_u
|
||||
(i32.and
|
||||
(i32.add
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const 65535)
|
||||
(tee_local $3
|
||||
(i32.shr_u
|
||||
(i32.and
|
||||
(i32.add
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const -65536)
|
||||
(i32.const 65535)
|
||||
)
|
||||
(i32.const 16)
|
||||
(i32.const -65536)
|
||||
)
|
||||
(i32.const 16)
|
||||
)
|
||||
)
|
||||
(i32.gt_s
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -349,16 +350,16 @@
|
||||
)
|
||||
)
|
||||
(if
|
||||
(if (result i32)
|
||||
(tee_local $6
|
||||
(i32.eq
|
||||
(i32.and
|
||||
(get_local $1)
|
||||
(i32.const 64512)
|
||||
)
|
||||
(i32.const 55296)
|
||||
(tee_local $6
|
||||
(i32.eq
|
||||
(i32.and
|
||||
(get_local $1)
|
||||
(i32.const 64512)
|
||||
)
|
||||
(i32.const 55296)
|
||||
)
|
||||
)
|
||||
(set_local $6
|
||||
(i32.lt_u
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
@ -366,8 +367,10 @@
|
||||
)
|
||||
(get_local $7)
|
||||
)
|
||||
(get_local $6)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(get_local $6)
|
||||
(if
|
||||
(i32.eq
|
||||
(i32.and
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -36,7 +36,6 @@
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(if
|
||||
(get_local $0)
|
||||
(block
|
||||
@ -75,26 +74,24 @@
|
||||
(grow_memory
|
||||
(select
|
||||
(get_local $2)
|
||||
(tee_local $4
|
||||
(tee_local $3
|
||||
(i32.shr_u
|
||||
(i32.and
|
||||
(i32.add
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const 65535)
|
||||
(tee_local $3
|
||||
(i32.shr_u
|
||||
(i32.and
|
||||
(i32.add
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const -65536)
|
||||
(i32.const 65535)
|
||||
)
|
||||
(i32.const 16)
|
||||
(i32.const -65536)
|
||||
)
|
||||
(i32.const 16)
|
||||
)
|
||||
)
|
||||
(i32.gt_s
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -151,8 +148,8 @@
|
||||
(get_local $1)
|
||||
)
|
||||
(func $~lib/memory/set_memory (; 4 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(local $3 i64)
|
||||
(local $4 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i64)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $2)
|
||||
@ -196,9 +193,11 @@
|
||||
)
|
||||
(i32.store8
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
(tee_local $3
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(i32.const 2)
|
||||
)
|
||||
@ -206,10 +205,7 @@
|
||||
)
|
||||
(i32.store8
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $3)
|
||||
(i32.const 3)
|
||||
)
|
||||
(get_local $1)
|
||||
@ -245,19 +241,25 @@
|
||||
)
|
||||
(return)
|
||||
)
|
||||
(set_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(tee_local $3
|
||||
(i32.and
|
||||
(i32.sub
|
||||
(i32.const 0)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(tee_local $4
|
||||
(i32.and
|
||||
(i32.sub
|
||||
(i32.const 0)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(tee_local $1
|
||||
@ -276,10 +278,7 @@
|
||||
(get_local $0)
|
||||
(tee_local $2
|
||||
(i32.and
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
)
|
||||
(get_local $2)
|
||||
(i32.const -4)
|
||||
)
|
||||
)
|
||||
@ -311,9 +310,11 @@
|
||||
)
|
||||
(i32.store
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
(tee_local $3
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(i32.const 12)
|
||||
)
|
||||
@ -321,10 +322,7 @@
|
||||
)
|
||||
(i32.store
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $3)
|
||||
(i32.const 8)
|
||||
)
|
||||
(get_local $1)
|
||||
@ -366,9 +364,11 @@
|
||||
)
|
||||
(i32.store
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
(tee_local $3
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(i32.const 28)
|
||||
)
|
||||
@ -376,30 +376,21 @@
|
||||
)
|
||||
(i32.store
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $3)
|
||||
(i32.const 24)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.store
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $3)
|
||||
(i32.const 20)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.store
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $3)
|
||||
(i32.const 16)
|
||||
)
|
||||
(get_local $1)
|
||||
@ -407,7 +398,7 @@
|
||||
(set_local $0
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(tee_local $4
|
||||
(tee_local $3
|
||||
(i32.add
|
||||
(i32.and
|
||||
(get_local $0)
|
||||
@ -421,18 +412,18 @@
|
||||
(set_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(set_local $3
|
||||
(set_local $4
|
||||
(i64.or
|
||||
(i64.extend_u/i32
|
||||
(get_local $1)
|
||||
)
|
||||
(i64.shl
|
||||
(tee_local $4
|
||||
(i64.extend_u/i32
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i64.shl
|
||||
(get_local $4)
|
||||
(i64.const 32)
|
||||
)
|
||||
)
|
||||
@ -446,28 +437,28 @@
|
||||
(block
|
||||
(i64.store
|
||||
(get_local $0)
|
||||
(get_local $3)
|
||||
(get_local $4)
|
||||
)
|
||||
(i64.store
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(get_local $3)
|
||||
(get_local $4)
|
||||
)
|
||||
(i64.store
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 16)
|
||||
)
|
||||
(get_local $3)
|
||||
(get_local $4)
|
||||
)
|
||||
(i64.store
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 24)
|
||||
)
|
||||
(get_local $3)
|
||||
(get_local $4)
|
||||
)
|
||||
(set_local $2
|
||||
(i32.sub
|
||||
@ -488,7 +479,6 @@
|
||||
)
|
||||
(func $~lib/internal/typedarray/TypedArray<i8,i32>#constructor (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(if
|
||||
(i32.gt_u
|
||||
(get_local $1)
|
||||
@ -506,11 +496,9 @@
|
||||
)
|
||||
(call $~lib/memory/set_memory
|
||||
(i32.add
|
||||
(tee_local $3
|
||||
(tee_local $2
|
||||
(call $~lib/internal/arraybuffer/allocUnsafe
|
||||
(tee_local $2
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.const 8)
|
||||
@ -518,31 +506,32 @@
|
||||
(i32.const 0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.store
|
||||
(if (result i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
(block (result i32)
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 12)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 12)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(get_local $3)
|
||||
)
|
||||
(i32.store
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(get_local $0)
|
||||
@ -550,7 +539,7 @@
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
@ -598,30 +587,31 @@
|
||||
(i32.const 0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.store
|
||||
(if (result i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
(block (result i32)
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 12)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 12)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.store
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.store offset=4
|
||||
@ -681,30 +671,31 @@
|
||||
(i32.const 0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.store
|
||||
(if (result i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
(block (result i32)
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 12)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 12)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.store
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.store offset=4
|
||||
@ -764,30 +755,31 @@
|
||||
(i32.const 0)
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.store
|
||||
(if (result i32)
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
(block (result i32)
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 12)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 12)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.store
|
||||
(get_local $0)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.store offset=4
|
||||
@ -1497,17 +1489,19 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(tee_local $0
|
||||
(i32.load offset=8
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1515,108 +1509,104 @@
|
||||
(func $~lib/typedarray/Int32Array#subarray (; 16 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(set_local $4
|
||||
(call $~lib/internal/typedarray/TypedArray<i32,i32>#get:length
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(set_local $1
|
||||
(if (result i32)
|
||||
(i32.lt_s
|
||||
(get_local $1)
|
||||
(i32.const 0)
|
||||
(block $~lib/internal/typedarray/TypedArray<i32,i32>#subarray|inlined.0
|
||||
(set_local $4
|
||||
(call $~lib/internal/typedarray/TypedArray<i32,i32>#get:length
|
||||
(get_local $0)
|
||||
)
|
||||
(select
|
||||
(tee_local $3
|
||||
(i32.add
|
||||
)
|
||||
(set_local $1
|
||||
(if (result i32)
|
||||
(i32.lt_s
|
||||
(get_local $1)
|
||||
(i32.const 0)
|
||||
)
|
||||
(select
|
||||
(tee_local $3
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.const 0)
|
||||
(i32.gt_s
|
||||
(get_local $3)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(select
|
||||
(tee_local $3
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $4)
|
||||
(i32.lt_s
|
||||
(get_local $1)
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(if (result i32)
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
(i32.const 0)
|
||||
)
|
||||
(select
|
||||
(tee_local $3
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
(i32.gt_s
|
||||
(get_local $3)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(tee_local $1
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.gt_s
|
||||
(get_local $3)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(select
|
||||
(tee_local $3
|
||||
(get_local $1)
|
||||
)
|
||||
(tee_local $1
|
||||
(get_local $4)
|
||||
)
|
||||
(i32.lt_s
|
||||
(get_local $3)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(if (result i32)
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
(i32.const 0)
|
||||
)
|
||||
(select
|
||||
(tee_local $3
|
||||
(i32.add
|
||||
(get_local $4)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
(i32.gt_s
|
||||
(get_local $3)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(select
|
||||
(tee_local $3
|
||||
(select
|
||||
(tee_local $3
|
||||
(select
|
||||
(tee_local $3
|
||||
(select
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $4)
|
||||
(i32.lt_s
|
||||
(get_local $3)
|
||||
(get_local $4)
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
(i32.gt_s
|
||||
(get_local $3)
|
||||
(get_local $1)
|
||||
(i32.gt_s
|
||||
(get_local $3)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.store
|
||||
(tee_local $3
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 12)
|
||||
(i32.store
|
||||
(tee_local $3
|
||||
(call $~lib/allocator/arena/allocate_memory
|
||||
(i32.const 12)
|
||||
)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
(i32.store offset=4
|
||||
(get_local $3)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.store offset=4
|
||||
(get_local $3)
|
||||
(i32.shl
|
||||
(get_local $1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(i32.store offset=8
|
||||
(get_local $3)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
(i32.store offset=8
|
||||
(get_local $3)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $3)
|
||||
@ -1661,28 +1651,25 @@
|
||||
)
|
||||
)
|
||||
(func $~lib/typedarray/Uint8ClampedArray#__set (; 18 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(local $3 i32)
|
||||
(call $~lib/internal/typedarray/TypedArray<u8,u32>#__set
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
(select
|
||||
(tee_local $2
|
||||
(tee_local $3
|
||||
(select
|
||||
(get_local $2)
|
||||
(tee_local $0
|
||||
(i32.const 255)
|
||||
)
|
||||
(i32.const 255)
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
(get_local $0)
|
||||
(i32.const 255)
|
||||
)
|
||||
)
|
||||
)
|
||||
(tee_local $0
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const 0)
|
||||
(i32.gt_s
|
||||
(get_local $2)
|
||||
(get_local $0)
|
||||
(get_local $3)
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -1713,15 +1700,17 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(i32.load8_u offset=8
|
||||
(i32.add
|
||||
(tee_local $0
|
||||
(i32.load8_u offset=8
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(get_local $2)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user