use gc interface directly, document

This commit is contained in:
dcode
2019-03-26 23:35:08 +01:00
parent 7c0dc66849
commit 3146f8f9e0
95 changed files with 17360 additions and 13504 deletions

View File

@ -4,7 +4,6 @@
(type $FUNCSIG$v (func))
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$vi (func (param i32)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1)
(data (i32.const 8) "\01\00\00\00\16\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s")
@ -103,7 +102,7 @@
global.set $~lib/allocator/arena/offset
local.get $1
)
(func $~lib/runtime/doAllocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/runtime/allocate (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
i32.const 1
i32.const 32
@ -124,56 +123,52 @@
i32.const 8
i32.add
)
(func $~lib/runtime/assertUnregistered (; 6 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $~lib/runtime/register (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
local.get $0
i32.const 80
i32.le_u
if
i32.const 0
i32.const 48
i32.const 313
i32.const 2
i32.const 161
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $0
i32.const 8
i32.sub
local.tee $2
i32.load
i32.const -1520547049
i32.ne
if
i32.const 0
i32.const 48
i32.const 314
i32.const 2
i32.const 163
i32.const 4
call $~lib/env/abort
unreachable
end
)
(func $~lib/runtime/doRegister (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $0
call $~lib/runtime/assertUnregistered
local.get $0
i32.const 8
i32.sub
local.get $2
local.get $1
i32.store
local.get $0
)
(func $inlining/test_ctor (; 8 ;) (type $FUNCSIG$v)
(func $inlining/test_ctor (; 7 ;) (type $FUNCSIG$v)
(local $0 i32)
i32.const 16
call $~lib/runtime/doAllocate
call $~lib/runtime/allocate
i32.const 2
call $~lib/runtime/doRegister
call $~lib/runtime/register
local.tee $0
i32.eqz
if
i32.const 8
call $~lib/runtime/doAllocate
call $~lib/runtime/allocate
i32.const 3
call $~lib/runtime/doRegister
call $~lib/runtime/register
local.set $0
end
local.get $0
@ -243,7 +238,7 @@
unreachable
end
)
(func $start (; 9 ;) (type $FUNCSIG$v)
(func $start (; 8 ;) (type $FUNCSIG$v)
call $inlining/test_funcs
i32.const 80
global.set $~lib/allocator/arena/startOffset
@ -251,7 +246,7 @@
global.set $~lib/allocator/arena/offset
call $inlining/test_ctor
)
(func $null (; 10 ;) (type $FUNCSIG$v)
(func $null (; 9 ;) (type $FUNCSIG$v)
nop
)
)