mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-28 14:11:46 +00:00
use gc interface directly, document
This commit is contained in:
@ -2,9 +2,9 @@
|
||||
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
|
||||
(type $FUNCSIG$i (func (result i32)))
|
||||
(type $FUNCSIG$ii (func (param i32) (result i32)))
|
||||
(type $FUNCSIG$vi (func (param i32)))
|
||||
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
|
||||
(type $FUNCSIG$vii (func (param i32 i32)))
|
||||
(type $FUNCSIG$vi (func (param i32)))
|
||||
(type $FUNCSIG$v (func))
|
||||
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
||||
(memory $0 1)
|
||||
@ -124,86 +124,61 @@
|
||||
global.set $~lib/allocator/arena/offset
|
||||
local.get $1
|
||||
)
|
||||
(func $~lib/runtime/assertUnregistered (; 5 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $~lib/runtime/register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(local $1 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 $1
|
||||
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 $exports/Car#constructor (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
local.get $0
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 16
|
||||
call $~lib/memory/memory.allocate
|
||||
local.tee $0
|
||||
i32.const -1520547049
|
||||
i32.store
|
||||
local.get $0
|
||||
i32.const 4
|
||||
i32.store offset=4
|
||||
local.get $0
|
||||
i32.const 8
|
||||
i32.add
|
||||
local.tee $0
|
||||
call $~lib/runtime/assertUnregistered
|
||||
local.get $0
|
||||
i32.const 8
|
||||
i32.sub
|
||||
i32.const 1
|
||||
i32.store
|
||||
end
|
||||
local.get $0
|
||||
local.get $1
|
||||
i32.store
|
||||
local.get $0
|
||||
local.get $1
|
||||
i32.const 1
|
||||
i32.store
|
||||
local.get $0
|
||||
)
|
||||
(func $exports/Car#get:numDoors (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $exports/Car#get:numDoors (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.load
|
||||
)
|
||||
(func $exports/Car#set:numDoors (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $exports/Car#set:numDoors (; 7 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
local.get $0
|
||||
local.get $1
|
||||
i32.store
|
||||
)
|
||||
(func $exports/Car#openDoors (; 9 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $exports/Car#openDoors (; 8 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
nop
|
||||
)
|
||||
(func $start (; 10 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 9 ;) (type $FUNCSIG$v)
|
||||
i32.const 48
|
||||
global.set $~lib/allocator/arena/startOffset
|
||||
global.get $~lib/allocator/arena/startOffset
|
||||
global.set $~lib/allocator/arena/offset
|
||||
)
|
||||
(func $null (; 11 ;) (type $FUNCSIG$v)
|
||||
(func $null (; 10 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
(func $exports/subOpt|trampoline (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $exports/subOpt|trampoline (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
block $1of1
|
||||
block $0of1
|
||||
block $outOfRange
|
||||
@ -221,11 +196,11 @@
|
||||
local.get $1
|
||||
i32.sub
|
||||
)
|
||||
(func $~lib/setargc (; 13 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $~lib/setargc (; 12 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
local.get $0
|
||||
global.set $~lib/argc
|
||||
)
|
||||
(func $exports/Car#constructor|trampoline (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $exports/Car#constructor|trampoline (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
block $1of1
|
||||
block $0of1
|
||||
block $outOfRange
|
||||
@ -237,10 +212,29 @@
|
||||
i32.const 2
|
||||
local.set $1
|
||||
end
|
||||
block (result i32)
|
||||
local.get $0
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 16
|
||||
call $~lib/memory/memory.allocate
|
||||
local.tee $0
|
||||
i32.const -1520547049
|
||||
i32.store
|
||||
local.get $0
|
||||
local.get $1
|
||||
call $exports/Car#constructor
|
||||
i32.const 4
|
||||
i32.store offset=4
|
||||
local.get $0
|
||||
i32.const 8
|
||||
i32.add
|
||||
call $~lib/runtime/register
|
||||
local.set $0
|
||||
end
|
||||
local.get $0
|
||||
local.get $1
|
||||
i32.store
|
||||
local.get $0
|
||||
local.get $1
|
||||
i32.store
|
||||
local.get $0
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user