mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-27 21:51:47 +00:00
use gc interface directly, document
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
(module
|
||||
(type $FUNCSIG$ii (func (param i32) (result i32)))
|
||||
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
|
||||
(type $FUNCSIG$vi (func (param i32)))
|
||||
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
|
||||
(type $FUNCSIG$v (func))
|
||||
(type $FUNCSIG$i (func (result i32)))
|
||||
@ -79,7 +78,7 @@
|
||||
global.set $~lib/allocator/arena/offset
|
||||
local.get $1
|
||||
)
|
||||
(func $~lib/runtime/doAllocate (; 2 ;) (type $FUNCSIG$i) (result i32)
|
||||
(func $~lib/runtime/allocate (; 2 ;) (type $FUNCSIG$i) (result i32)
|
||||
(local $0 i32)
|
||||
i32.const 8
|
||||
call $~lib/memory/memory.allocate
|
||||
@ -93,58 +92,54 @@
|
||||
i32.const 8
|
||||
i32.add
|
||||
)
|
||||
(func $~lib/runtime/assertUnregistered (; 3 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $~lib/runtime/register (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
local.get $0
|
||||
i32.const 48
|
||||
i32.le_u
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 16
|
||||
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 16
|
||||
i32.const 314
|
||||
i32.const 2
|
||||
i32.const 163
|
||||
i32.const 4
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $~lib/runtime/doRegister (; 4 ;) (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 $start (; 5 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 4 ;) (type $FUNCSIG$v)
|
||||
i32.const 48
|
||||
global.set $~lib/allocator/arena/startOffset
|
||||
global.get $~lib/allocator/arena/startOffset
|
||||
global.set $~lib/allocator/arena/offset
|
||||
call $~lib/runtime/doAllocate
|
||||
call $~lib/runtime/allocate
|
||||
i32.const 1
|
||||
call $~lib/runtime/doRegister
|
||||
call $~lib/runtime/register
|
||||
global.set $optional-typeparameters/tConcrete
|
||||
call $~lib/runtime/doAllocate
|
||||
call $~lib/runtime/allocate
|
||||
i32.const 3
|
||||
call $~lib/runtime/doRegister
|
||||
call $~lib/runtime/register
|
||||
global.set $optional-typeparameters/tDerived
|
||||
)
|
||||
(func $null (; 6 ;) (type $FUNCSIG$v)
|
||||
(func $null (; 5 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user