update tests

This commit is contained in:
dcode
2019-05-24 20:42:23 +02:00
parent a6896d7bc2
commit a684bb1f65
12 changed files with 1618 additions and 4406 deletions

View File

@@ -1,7 +1,6 @@
(module
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$v (func))
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
(type $FUNCSIG$vii (func (param i32 i32)))
(type $FUNCSIG$ii (func (param i32) (result i32)))
@@ -19,15 +18,13 @@
(global $~lib/rt/pure/CUR (mut i32) (i32.const 0))
(global $~lib/rt/pure/END (mut i32) (i32.const 0))
(global $~lib/rt/pure/ROOTS (mut i32) (i32.const 0))
(global $~lib/rt/RTTI_BASE i32 (i32.const 256))
(export "memory" (memory $0))
(export "__alloc" (func $~lib/rt/tlsf/__alloc))
(export "__realloc" (func $~lib/rt/tlsf/__realloc))
(export "__free" (func $~lib/rt/tlsf/__free))
(export "__retain" (func $~lib/rt/pure/__retain))
(export "__release" (func $~lib/rt/pure/__release))
(export "__collect" (func $~lib/rt/pure/__collect))
(export "__instanceof" (func $~lib/rt/__instanceof))
(export "__typeinfo" (func $~lib/rt/__typeinfo))
(export "__rtti" (global $~lib/rt/RTTI_BASE))
(start $start)
(func $~lib/rt/tlsf/removeBlock (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32)
@@ -1021,7 +1018,102 @@
i32.const 16
i32.add
)
(func $~lib/memory/memory.copy (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(func $~lib/rt/pure/increment (; 11 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32)
local.get $0
i32.load offset=4
local.tee $1
i32.const -268435456
i32.and
local.get $1
i32.const 1
i32.add
i32.const -268435456
i32.and
i32.ne
if
i32.const 0
i32.const 128
i32.const 104
i32.const 2
call $~lib/builtins/abort
unreachable
end
local.get $0
local.get $1
i32.const 1
i32.add
i32.store offset=4
local.get $0
i32.load
i32.const 1
i32.and
if
i32.const 0
i32.const 128
i32.const 107
i32.const 13
call $~lib/builtins/abort
unreachable
end
)
(func $~lib/rt/pure/__retain (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.const 292
i32.gt_u
if
local.get $0
i32.const 16
i32.sub
call $~lib/rt/pure/increment
end
local.get $0
)
(func $~lib/rt/tlsf/freeBlock (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32)
local.get $1
i32.load
local.tee $2
i32.const 1
i32.and
if
i32.const 0
i32.const 24
i32.const 531
i32.const 2
call $~lib/builtins/abort
unreachable
end
local.get $1
local.get $2
i32.const 1
i32.or
i32.store
local.get $0
local.get $1
call $~lib/rt/tlsf/insertBlock
)
(func $~lib/rt/__typeinfo (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.const 256
i32.load
i32.gt_u
if
i32.const 176
i32.const 232
i32.const 22
i32.const 27
call $~lib/builtins/abort
unreachable
end
local.get $0
i32.const 3
i32.shl
i32.const 260
i32.add
i32.load
)
(func $~lib/memory/memory.copy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
(local $4 i32)
block $~lib/util/memory/memmove|inlined.0
@@ -1194,285 +1286,7 @@
end
end
)
(func $~lib/rt/tlsf/reallocateBlock (; 12 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
local.get $2
call $~lib/rt/tlsf/prepareSize
local.set $3
local.get $1
i32.load
local.tee $4
i32.const 1
i32.and
if
i32.const 0
i32.const 24
i32.const 493
i32.const 13
call $~lib/builtins/abort
unreachable
end
local.get $3
local.get $4
i32.const -4
i32.and
i32.le_u
if
local.get $0
local.get $1
local.get $3
call $~lib/rt/tlsf/prepareBlock
local.get $1
local.get $2
i32.store offset=12
local.get $1
return
end
local.get $1
i32.const 16
i32.add
local.get $1
i32.load
i32.const -4
i32.and
i32.add
local.tee $6
i32.load
local.tee $5
i32.const 1
i32.and
if
local.get $4
i32.const -4
i32.and
i32.const 16
i32.add
local.get $5
i32.const -4
i32.and
i32.add
local.tee $5
local.get $3
i32.ge_u
if
local.get $0
local.get $6
call $~lib/rt/tlsf/removeBlock
local.get $1
local.get $4
i32.const 3
i32.and
local.get $5
i32.or
i32.store
local.get $1
local.get $2
i32.store offset=12
local.get $0
local.get $1
local.get $3
call $~lib/rt/tlsf/prepareBlock
local.get $1
return
end
end
local.get $0
local.get $2
call $~lib/rt/tlsf/allocateBlock
local.tee $3
local.get $1
i32.load offset=4
i32.store offset=4
local.get $3
local.get $1
i32.load offset=8
i32.store offset=8
local.get $3
i32.const 16
i32.add
local.get $1
i32.const 16
i32.add
local.get $2
call $~lib/memory/memory.copy
local.get $1
local.get $4
i32.const 1
i32.or
i32.store
local.get $0
local.get $1
call $~lib/rt/tlsf/insertBlock
local.get $3
)
(func $~lib/rt/tlsf/__realloc (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
global.get $~lib/rt/tlsf/ROOT
i32.eqz
if
i32.const 0
i32.const 24
i32.const 553
i32.const 13
call $~lib/builtins/abort
unreachable
end
local.get $0
i32.const 15
i32.and
i32.eqz
i32.const 0
local.get $0
select
i32.eqz
if
i32.const 0
i32.const 24
i32.const 554
i32.const 2
call $~lib/builtins/abort
unreachable
end
global.get $~lib/rt/tlsf/ROOT
local.get $0
i32.const 16
i32.sub
local.get $1
call $~lib/rt/tlsf/reallocateBlock
i32.const 16
i32.add
)
(func $~lib/rt/tlsf/freeBlock (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32)
local.get $1
i32.load
local.tee $2
i32.const 1
i32.and
if
i32.const 0
i32.const 24
i32.const 531
i32.const 2
call $~lib/builtins/abort
unreachable
end
local.get $1
local.get $2
i32.const 1
i32.or
i32.store
local.get $0
local.get $1
call $~lib/rt/tlsf/insertBlock
)
(func $~lib/rt/tlsf/__free (; 15 ;) (type $FUNCSIG$vi) (param $0 i32)
global.get $~lib/rt/tlsf/ROOT
i32.eqz
if
i32.const 0
i32.const 24
i32.const 561
i32.const 13
call $~lib/builtins/abort
unreachable
end
local.get $0
i32.const 15
i32.and
i32.eqz
i32.const 0
local.get $0
select
i32.eqz
if
i32.const 0
i32.const 24
i32.const 562
i32.const 2
call $~lib/builtins/abort
unreachable
end
global.get $~lib/rt/tlsf/ROOT
local.get $0
i32.const 16
i32.sub
call $~lib/rt/tlsf/freeBlock
)
(func $~lib/rt/pure/increment (; 16 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32)
local.get $0
i32.load offset=4
local.tee $1
i32.const -268435456
i32.and
local.get $1
i32.const 1
i32.add
i32.const -268435456
i32.and
i32.ne
if
i32.const 0
i32.const 128
i32.const 104
i32.const 2
call $~lib/builtins/abort
unreachable
end
local.get $0
local.get $1
i32.const 1
i32.add
i32.store offset=4
local.get $0
i32.load
i32.const 1
i32.and
if
i32.const 0
i32.const 128
i32.const 107
i32.const 13
call $~lib/builtins/abort
unreachable
end
)
(func $~lib/rt/pure/__retain (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.const 292
i32.gt_u
if
local.get $0
i32.const 16
i32.sub
call $~lib/rt/pure/increment
end
local.get $0
)
(func $~lib/rt/__typeinfo (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.const 256
i32.load
i32.gt_u
if
i32.const 176
i32.const 232
i32.const 22
i32.const 27
call $~lib/builtins/abort
unreachable
end
local.get $0
i32.const 3
i32.shl
i32.const 260
i32.add
i32.load
)
(func $~lib/rt/pure/growRoots (; 19 ;) (type $FUNCSIG$v)
(func $~lib/rt/pure/growRoots (; 16 ;) (type $FUNCSIG$v)
(local $0 i32)
(local $1 i32)
(local $2 i32)
@@ -1508,7 +1322,7 @@
i32.add
global.set $~lib/rt/pure/END
)
(func $~lib/rt/pure/appendRoot (; 20 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/rt/pure/appendRoot (; 17 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32)
global.get $~lib/rt/pure/CUR
local.tee $1
@@ -1527,7 +1341,7 @@
i32.add
global.set $~lib/rt/pure/CUR
)
(func $~lib/rt/pure/decrement (; 21 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/rt/pure/decrement (; 18 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32)
(local $2 i32)
local.get $0
@@ -1615,7 +1429,7 @@
end
end
)
(func $~lib/rt/pure/__release (; 22 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/rt/pure/__release (; 19 ;) (type $FUNCSIG$vi) (param $0 i32)
local.get $0
i32.const 292
i32.gt_u
@@ -1626,7 +1440,7 @@
call $~lib/rt/pure/decrement
end
)
(func $~lib/rt/pure/markGray (; 23 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/rt/pure/markGray (; 20 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32)
local.get $0
i32.load offset=4
@@ -1650,7 +1464,7 @@
call $~lib/rt/__visit_members
end
)
(func $~lib/rt/pure/scanBlack (; 24 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/rt/pure/scanBlack (; 21 ;) (type $FUNCSIG$vi) (param $0 i32)
local.get $0
local.get $0
i32.load offset=4
@@ -1663,7 +1477,7 @@
i32.const 4
call $~lib/rt/__visit_members
)
(func $~lib/rt/pure/scan (; 25 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/rt/pure/scan (; 22 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32)
local.get $0
i32.load offset=4
@@ -1697,7 +1511,7 @@
end
end
)
(func $~lib/rt/pure/collectWhite (; 26 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/rt/pure/collectWhite (; 23 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32)
local.get $0
i32.load offset=4
@@ -1725,7 +1539,7 @@
local.get $0
call $~lib/rt/tlsf/freeBlock
)
(func $~lib/rt/pure/__collect (; 27 ;) (type $FUNCSIG$v)
(func $~lib/rt/pure/__collect (; 24 ;) (type $FUNCSIG$v)
(local $0 i32)
(local $1 i32)
(local $2 i32)
@@ -1849,44 +1663,14 @@
local.get $5
global.set $~lib/rt/pure/CUR
)
(func $~lib/rt/__instanceof (; 28 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $0
i32.const 16
i32.sub
i32.load offset=8
local.tee $0
i32.const 256
i32.load
i32.le_u
if
loop $continue|0
local.get $0
local.get $1
i32.eq
if
i32.const 1
return
end
local.get $0
i32.const 3
i32.shl
i32.const 260
i32.add
i32.load offset=4
local.tee $0
br_if $continue|0
end
end
i32.const 0
)
(func $start (; 29 ;) (type $FUNCSIG$v)
(func $start (; 25 ;) (type $FUNCSIG$v)
i32.const 0
i32.const 3
call $~lib/rt/tlsf/__alloc
call $~lib/rt/pure/__retain
call $~lib/rt/pure/__release
)
(func $~lib/rt/pure/__visit (; 30 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(func $~lib/rt/pure/__visit (; 26 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
local.get $0
i32.const 292
i32.lt_u
@@ -1996,7 +1780,7 @@
unreachable
end
)
(func $~lib/rt/__visit_members (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(func $~lib/rt/__visit_members (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
block $switch$1$default
block $switch$1$case$4
block $switch$1$case$2
@@ -2020,7 +1804,7 @@
end
unreachable
)
(func $null (; 32 ;) (type $FUNCSIG$v)
(func $null (; 28 ;) (type $FUNCSIG$v)
nop
)
)

View File

@@ -19,21 +19,18 @@
(table $0 1 funcref)
(elem (i32.const 0) $null)
(global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0))
(global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0))
(global $~lib/rt/pure/CUR (mut i32) (i32.const 0))
(global $~lib/rt/pure/END (mut i32) (i32.const 0))
(global $~lib/rt/pure/ROOTS (mut i32) (i32.const 0))
(global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0))
(global $~lib/rt/RTTI_BASE i32 (i32.const 256))
(global $~lib/heap/HEAP_BASE i32 (i32.const 292))
(export "memory" (memory $0))
(export "__alloc" (func $~lib/rt/tlsf/__alloc))
(export "__realloc" (func $~lib/rt/tlsf/__realloc))
(export "__free" (func $~lib/rt/tlsf/__free))
(export "__retain" (func $~lib/rt/pure/__retain))
(export "__release" (func $~lib/rt/pure/__release))
(export "__collect" (func $~lib/rt/pure/__collect))
(export "__instanceof" (func $~lib/rt/__instanceof))
(export "__typeinfo" (func $~lib/rt/__typeinfo))
(export "__rtti" (global $~lib/rt/RTTI_BASE))
(start $start)
(func $~lib/rt/tlsf/removeBlock (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32)
@@ -1380,7 +1377,118 @@
i32.const 16
i32.add
)
(func $~lib/util/memory/memcpy (; 11 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(func $~lib/rt/pure/increment (; 11 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32)
local.get $0
i32.load offset=4
local.set $1
local.get $1
i32.const 268435455
i32.const -1
i32.xor
i32.and
local.get $1
i32.const 1
i32.add
i32.const 268435455
i32.const -1
i32.xor
i32.and
i32.eq
i32.eqz
if
i32.const 0
i32.const 128
i32.const 104
i32.const 2
call $~lib/builtins/abort
unreachable
end
local.get $0
local.get $1
i32.const 1
i32.add
i32.store offset=4
local.get $0
i32.load
i32.const 1
i32.and
i32.eqz
i32.eqz
if
i32.const 0
i32.const 128
i32.const 107
i32.const 13
call $~lib/builtins/abort
unreachable
end
)
(func $~lib/rt/pure/__retain (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
global.get $~lib/heap/HEAP_BASE
i32.gt_u
if
local.get $0
i32.const 16
i32.sub
call $~lib/rt/pure/increment
end
local.get $0
)
(func $~lib/rt/tlsf/freeBlock (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32)
local.get $1
i32.load
local.set $2
local.get $2
i32.const 1
i32.and
i32.eqz
i32.eqz
if
i32.const 0
i32.const 24
i32.const 531
i32.const 2
call $~lib/builtins/abort
unreachable
end
local.get $1
local.get $2
i32.const 1
i32.or
i32.store
local.get $0
local.get $1
call $~lib/rt/tlsf/insertBlock
)
(func $~lib/rt/__typeinfo (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
global.get $~lib/rt/RTTI_BASE
local.set $1
local.get $0
local.get $1
i32.load
i32.gt_u
if
i32.const 176
i32.const 232
i32.const 22
i32.const 27
call $~lib/builtins/abort
unreachable
end
local.get $1
i32.const 4
i32.add
local.get $0
i32.const 8
i32.mul
i32.add
i32.load
)
(func $~lib/util/memory/memcpy (; 15 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
@@ -2571,7 +2679,7 @@
i32.store8
end
)
(func $~lib/memory/memory.copy (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(func $~lib/memory/memory.copy (; 16 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
@@ -2798,328 +2906,7 @@
end
end
)
(func $~lib/rt/tlsf/reallocateBlock (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
local.get $2
call $~lib/rt/tlsf/prepareSize
local.set $3
local.get $1
i32.load
local.set $4
local.get $4
i32.const 1
i32.and
i32.eqz
i32.eqz
if
i32.const 0
i32.const 24
i32.const 493
i32.const 13
call $~lib/builtins/abort
unreachable
end
local.get $3
local.get $4
i32.const -4
i32.and
i32.le_u
if
local.get $0
local.get $1
local.get $3
call $~lib/rt/tlsf/prepareBlock
local.get $1
local.get $2
i32.store offset=12
local.get $1
return
end
block $~lib/rt/tlsf/GETRIGHT|inlined.4 (result i32)
local.get $1
local.set $5
local.get $5
i32.const 16
i32.add
local.get $5
i32.load
i32.const 3
i32.const -1
i32.xor
i32.and
i32.add
end
local.set $6
local.get $6
i32.load
local.set $7
local.get $7
i32.const 1
i32.and
if
local.get $4
i32.const 3
i32.const -1
i32.xor
i32.and
i32.const 16
i32.add
local.get $7
i32.const 3
i32.const -1
i32.xor
i32.and
i32.add
local.set $5
local.get $5
local.get $3
i32.ge_u
if
local.get $0
local.get $6
call $~lib/rt/tlsf/removeBlock
local.get $1
local.get $4
i32.const 3
i32.and
local.get $5
i32.or
i32.store
local.get $1
local.get $2
i32.store offset=12
local.get $0
local.get $1
local.get $3
call $~lib/rt/tlsf/prepareBlock
local.get $1
return
end
end
local.get $0
local.get $2
call $~lib/rt/tlsf/allocateBlock
local.set $8
local.get $8
local.get $1
i32.load offset=4
i32.store offset=4
local.get $8
local.get $1
i32.load offset=8
i32.store offset=8
local.get $8
i32.const 16
i32.add
local.get $1
i32.const 16
i32.add
local.get $2
call $~lib/memory/memory.copy
local.get $1
local.get $4
i32.const 1
i32.or
i32.store
local.get $0
local.get $1
call $~lib/rt/tlsf/insertBlock
local.get $8
)
(func $~lib/rt/tlsf/__realloc (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
global.get $~lib/rt/tlsf/ROOT
i32.eqz
if
i32.const 0
i32.const 24
i32.const 553
i32.const 13
call $~lib/builtins/abort
unreachable
end
local.get $0
i32.const 0
i32.ne
if (result i32)
local.get $0
i32.const 15
i32.and
i32.eqz
else
i32.const 0
end
i32.eqz
if
i32.const 0
i32.const 24
i32.const 554
i32.const 2
call $~lib/builtins/abort
unreachable
end
global.get $~lib/rt/tlsf/ROOT
local.get $0
i32.const 16
i32.sub
local.get $1
call $~lib/rt/tlsf/reallocateBlock
i32.const 16
i32.add
)
(func $~lib/rt/tlsf/freeBlock (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32)
local.get $1
i32.load
local.set $2
local.get $2
i32.const 1
i32.and
i32.eqz
i32.eqz
if
i32.const 0
i32.const 24
i32.const 531
i32.const 2
call $~lib/builtins/abort
unreachable
end
local.get $1
local.get $2
i32.const 1
i32.or
i32.store
local.get $0
local.get $1
call $~lib/rt/tlsf/insertBlock
)
(func $~lib/rt/tlsf/__free (; 16 ;) (type $FUNCSIG$vi) (param $0 i32)
global.get $~lib/rt/tlsf/ROOT
i32.eqz
if
i32.const 0
i32.const 24
i32.const 561
i32.const 13
call $~lib/builtins/abort
unreachable
end
local.get $0
i32.const 0
i32.ne
if (result i32)
local.get $0
i32.const 15
i32.and
i32.eqz
else
i32.const 0
end
i32.eqz
if
i32.const 0
i32.const 24
i32.const 562
i32.const 2
call $~lib/builtins/abort
unreachable
end
global.get $~lib/rt/tlsf/ROOT
local.get $0
i32.const 16
i32.sub
call $~lib/rt/tlsf/freeBlock
)
(func $~lib/rt/pure/increment (; 17 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32)
local.get $0
i32.load offset=4
local.set $1
local.get $1
i32.const 268435455
i32.const -1
i32.xor
i32.and
local.get $1
i32.const 1
i32.add
i32.const 268435455
i32.const -1
i32.xor
i32.and
i32.eq
i32.eqz
if
i32.const 0
i32.const 128
i32.const 104
i32.const 2
call $~lib/builtins/abort
unreachable
end
local.get $0
local.get $1
i32.const 1
i32.add
i32.store offset=4
local.get $0
i32.load
i32.const 1
i32.and
i32.eqz
i32.eqz
if
i32.const 0
i32.const 128
i32.const 107
i32.const 13
call $~lib/builtins/abort
unreachable
end
)
(func $~lib/rt/pure/__retain (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
global.get $~lib/heap/HEAP_BASE
i32.gt_u
if
local.get $0
i32.const 16
i32.sub
call $~lib/rt/pure/increment
end
local.get $0
)
(func $~lib/rt/__typeinfo (; 19 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
global.get $~lib/rt/RTTI_BASE
local.set $1
local.get $0
local.get $1
i32.load
i32.gt_u
if
i32.const 176
i32.const 232
i32.const 22
i32.const 27
call $~lib/builtins/abort
unreachable
end
local.get $1
i32.const 4
i32.add
local.get $0
i32.const 8
i32.mul
i32.add
i32.load
)
(func $~lib/rt/pure/growRoots (; 20 ;) (type $FUNCSIG$v)
(func $~lib/rt/pure/growRoots (; 17 ;) (type $FUNCSIG$v)
(local $0 i32)
(local $1 i32)
(local $2 i32)
@@ -3164,7 +2951,7 @@
i32.add
global.set $~lib/rt/pure/END
)
(func $~lib/rt/pure/appendRoot (; 21 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/rt/pure/appendRoot (; 18 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32)
global.get $~lib/rt/pure/CUR
local.set $1
@@ -3184,7 +2971,7 @@
i32.add
global.set $~lib/rt/pure/CUR
)
(func $~lib/rt/pure/decrement (; 22 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/rt/pure/decrement (; 19 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32)
(local $2 i32)
local.get $0
@@ -3286,7 +3073,7 @@
end
end
)
(func $~lib/rt/pure/__release (; 23 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/rt/pure/__release (; 20 ;) (type $FUNCSIG$vi) (param $0 i32)
local.get $0
global.get $~lib/heap/HEAP_BASE
i32.gt_u
@@ -3297,7 +3084,7 @@
call $~lib/rt/pure/decrement
end
)
(func $~lib/rt/pure/markGray (; 24 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/rt/pure/markGray (; 21 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32)
local.get $0
i32.load offset=4
@@ -3324,7 +3111,7 @@
call $~lib/rt/__visit_members
end
)
(func $~lib/rt/pure/scanBlack (; 25 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/rt/pure/scanBlack (; 22 ;) (type $FUNCSIG$vi) (param $0 i32)
local.get $0
local.get $0
i32.load offset=4
@@ -3341,7 +3128,7 @@
i32.const 4
call $~lib/rt/__visit_members
)
(func $~lib/rt/pure/scan (; 26 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/rt/pure/scan (; 23 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32)
local.get $0
i32.load offset=4
@@ -3378,7 +3165,7 @@
end
end
)
(func $~lib/rt/pure/collectWhite (; 27 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/rt/pure/collectWhite (; 24 ;) (type $FUNCSIG$vi) (param $0 i32)
(local $1 i32)
local.get $0
i32.load offset=4
@@ -3407,7 +3194,7 @@
local.get $0
call $~lib/rt/tlsf/freeBlock
)
(func $~lib/rt/pure/__collect (; 28 ;) (type $FUNCSIG$v)
(func $~lib/rt/pure/__collect (; 25 ;) (type $FUNCSIG$v)
(local $0 i32)
(local $1 i32)
(local $2 i32)
@@ -3555,44 +3342,7 @@
local.get $0
global.set $~lib/rt/pure/CUR
)
(func $~lib/rt/__instanceof (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
local.get $0
i32.const 16
i32.sub
i32.load offset=8
local.set $2
global.get $~lib/rt/RTTI_BASE
local.set $3
local.get $2
local.get $3
i32.load
i32.le_u
if
loop $continue|0
local.get $2
local.get $1
i32.eq
if
i32.const 1
return
end
local.get $3
i32.const 4
i32.add
local.get $2
i32.const 8
i32.mul
i32.add
i32.load offset=4
local.tee $2
br_if $continue|0
end
end
i32.const 0
)
(func $rc/rereturn/Ref#constructor (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $rc/rereturn/Ref#constructor (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.eqz
if
@@ -3604,21 +3354,21 @@
end
local.get $0
)
(func $rc/rereturn/getRef (; 31 ;) (type $FUNCSIG$i) (result i32)
(func $rc/rereturn/getRef (; 27 ;) (type $FUNCSIG$i) (result i32)
i32.const 0
call $rc/rereturn/Ref#constructor
)
(func $rc/rereturn/rereturnRef (; 32 ;) (type $FUNCSIG$i) (result i32)
(func $rc/rereturn/rereturnRef (; 28 ;) (type $FUNCSIG$i) (result i32)
call $rc/rereturn/getRef
)
(func $start:rc/rereturn (; 33 ;) (type $FUNCSIG$v)
(func $start:rc/rereturn (; 29 ;) (type $FUNCSIG$v)
call $rc/rereturn/rereturnRef
call $~lib/rt/pure/__release
)
(func $start (; 34 ;) (type $FUNCSIG$v)
(func $start (; 30 ;) (type $FUNCSIG$v)
call $start:rc/rereturn
)
(func $~lib/rt/pure/__visit (; 35 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(func $~lib/rt/pure/__visit (; 31 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32)
(local $3 i32)
local.get $0
@@ -3772,7 +3522,7 @@
end
end
)
(func $~lib/rt/__visit_members (; 36 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(func $~lib/rt/__visit_members (; 32 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32)
block
end
@@ -3829,6 +3579,6 @@
unreachable
end
)
(func $null (; 37 ;) (type $FUNCSIG$v)
(func $null (; 33 ;) (type $FUNCSIG$v)
)
)