mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-19 18:01:31 +00:00
use gc interface directly, document
This commit is contained in:
@ -2,7 +2,6 @@
|
||||
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
|
||||
(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$ddd (func (param f64 f64) (result f64)))
|
||||
(type $FUNCSIG$ddi (func (param f64 i32) (result f64)))
|
||||
@ -13,7 +12,6 @@
|
||||
(data (i32.const 48) "\02\00\00\006\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s\00")
|
||||
(table $0 1 funcref)
|
||||
(elem (i32.const 0) $null)
|
||||
(global $~lib/runtime/GC_IMPLEMENTED i32 (i32.const 0))
|
||||
(global $~lib/runtime/HEADER_SIZE i32 (i32.const 8))
|
||||
(global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049))
|
||||
(global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0))
|
||||
@ -187,7 +185,7 @@
|
||||
end
|
||||
return
|
||||
)
|
||||
(func $~lib/runtime/doAllocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $~lib/runtime/allocate (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
local.get $0
|
||||
call $~lib/runtime/ADJUSTOBLOCK
|
||||
@ -203,7 +201,8 @@
|
||||
global.get $~lib/runtime/HEADER_SIZE
|
||||
i32.add
|
||||
)
|
||||
(func $~lib/runtime/assertUnregistered (; 4 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $~lib/runtime/register (; 4 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
local.get $0
|
||||
global.get $~lib/memory/HEAP_BASE
|
||||
i32.gt_u
|
||||
@ -211,14 +210,16 @@
|
||||
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
|
||||
global.get $~lib/runtime/HEADER_SIZE
|
||||
i32.sub
|
||||
local.set $2
|
||||
local.get $2
|
||||
i32.load
|
||||
global.get $~lib/runtime/HEADER_MAGIC
|
||||
i32.eq
|
||||
@ -226,23 +227,17 @@
|
||||
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 (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
local.get $0
|
||||
call $~lib/runtime/assertUnregistered
|
||||
local.get $0
|
||||
global.get $~lib/runtime/HEADER_SIZE
|
||||
i32.sub
|
||||
local.get $2
|
||||
local.get $1
|
||||
i32.store
|
||||
local.get $0
|
||||
)
|
||||
(func $std/operator-overloading/Tester#constructor (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester#constructor (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
local.get $0
|
||||
i32.eqz
|
||||
@ -252,12 +247,12 @@
|
||||
i32.const 8
|
||||
local.set $3
|
||||
local.get $3
|
||||
call $~lib/runtime/doAllocate
|
||||
call $~lib/runtime/allocate
|
||||
end
|
||||
local.set $3
|
||||
local.get $3
|
||||
i32.const 1
|
||||
call $~lib/runtime/doRegister
|
||||
call $~lib/runtime/register
|
||||
end
|
||||
local.set $0
|
||||
end
|
||||
@ -269,7 +264,7 @@
|
||||
i32.store offset=4
|
||||
local.get $0
|
||||
)
|
||||
(func $std/operator-overloading/Tester.add (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.add (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -283,7 +278,7 @@
|
||||
i32.add
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
)
|
||||
(func $std/operator-overloading/Tester.sub (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.sub (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -297,7 +292,7 @@
|
||||
i32.sub
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
)
|
||||
(func $std/operator-overloading/Tester.mul (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.mul (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -311,7 +306,7 @@
|
||||
i32.mul
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
)
|
||||
(func $std/operator-overloading/Tester.div (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.div (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -325,7 +320,7 @@
|
||||
i32.div_s
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
)
|
||||
(func $std/operator-overloading/Tester.mod (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.mod (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -339,7 +334,7 @@
|
||||
i32.rem_s
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
)
|
||||
(func $~lib/math/NativeMath.scalbn (; 12 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64)
|
||||
(func $~lib/math/NativeMath.scalbn (; 11 ;) (type $FUNCSIG$ddi) (param $0 f64) (param $1 i32) (result f64)
|
||||
(local $2 f64)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
@ -430,7 +425,7 @@
|
||||
f64.reinterpret_i64
|
||||
f64.mul
|
||||
)
|
||||
(func $~lib/math/NativeMath.pow (; 13 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64)
|
||||
(func $~lib/math/NativeMath.pow (; 12 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64)
|
||||
(local $2 i64)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
@ -1518,7 +1513,7 @@
|
||||
local.get $16
|
||||
f64.mul
|
||||
)
|
||||
(func $std/operator-overloading/Tester.pow (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.pow (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1538,7 +1533,7 @@
|
||||
i32.trunc_f64_s
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
)
|
||||
(func $std/operator-overloading/Tester.and (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.and (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1552,7 +1547,7 @@
|
||||
i32.and
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
)
|
||||
(func $std/operator-overloading/Tester.or (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.or (; 15 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1566,7 +1561,7 @@
|
||||
i32.or
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
)
|
||||
(func $std/operator-overloading/Tester.xor (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.xor (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1580,7 +1575,7 @@
|
||||
i32.xor
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
)
|
||||
(func $std/operator-overloading/Tester.equals (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.equals (; 17 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1598,7 +1593,7 @@
|
||||
local.get $2
|
||||
end
|
||||
)
|
||||
(func $std/operator-overloading/Tester.notEquals (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.notEquals (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1616,7 +1611,7 @@
|
||||
local.get $2
|
||||
end
|
||||
)
|
||||
(func $std/operator-overloading/Tester.greater (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.greater (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1634,7 +1629,7 @@
|
||||
local.get $2
|
||||
end
|
||||
)
|
||||
(func $std/operator-overloading/Tester.greaterEquals (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.greaterEquals (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1652,7 +1647,7 @@
|
||||
local.get $2
|
||||
end
|
||||
)
|
||||
(func $std/operator-overloading/Tester.less (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.less (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1670,7 +1665,7 @@
|
||||
local.get $2
|
||||
end
|
||||
)
|
||||
(func $std/operator-overloading/Tester.lessEquals (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.lessEquals (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1688,7 +1683,7 @@
|
||||
local.get $2
|
||||
end
|
||||
)
|
||||
(func $std/operator-overloading/Tester.shr (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.shr (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1700,7 +1695,7 @@
|
||||
i32.shr_s
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
)
|
||||
(func $std/operator-overloading/Tester.shu (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.shu (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1712,7 +1707,7 @@
|
||||
i32.shr_u
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
)
|
||||
(func $std/operator-overloading/Tester.shl (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.shl (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1724,7 +1719,7 @@
|
||||
i32.shl
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
)
|
||||
(func $std/operator-overloading/Tester.pos (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.pos (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1732,7 +1727,7 @@
|
||||
i32.load offset=4
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
)
|
||||
(func $std/operator-overloading/Tester.neg (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.neg (; 27 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
i32.const 0
|
||||
i32.const 0
|
||||
local.get $0
|
||||
@ -1744,7 +1739,7 @@
|
||||
i32.sub
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
)
|
||||
(func $std/operator-overloading/Tester.not (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.not (; 28 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1756,7 +1751,7 @@
|
||||
i32.xor
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
)
|
||||
(func $std/operator-overloading/Tester.excl (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.excl (; 29 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1770,7 +1765,7 @@
|
||||
local.get $1
|
||||
end
|
||||
)
|
||||
(func $std/operator-overloading/Tester#inc (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester#inc (; 30 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1785,7 +1780,7 @@
|
||||
i32.store offset=4
|
||||
local.get $0
|
||||
)
|
||||
(func $std/operator-overloading/Tester#dec (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester#dec (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1800,7 +1795,7 @@
|
||||
i32.store offset=4
|
||||
local.get $0
|
||||
)
|
||||
(func $std/operator-overloading/Tester#postInc (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester#postInc (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1812,7 +1807,7 @@
|
||||
i32.add
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
)
|
||||
(func $std/operator-overloading/Tester#postDec (; 34 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester#postDec (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load
|
||||
@ -1824,7 +1819,7 @@
|
||||
i32.sub
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
)
|
||||
(func $std/operator-overloading/TesterInlineStatic#constructor (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $std/operator-overloading/TesterInlineStatic#constructor (; 34 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
local.get $0
|
||||
i32.eqz
|
||||
@ -1834,12 +1829,12 @@
|
||||
i32.const 8
|
||||
local.set $3
|
||||
local.get $3
|
||||
call $~lib/runtime/doAllocate
|
||||
call $~lib/runtime/allocate
|
||||
end
|
||||
local.set $3
|
||||
local.get $3
|
||||
i32.const 3
|
||||
call $~lib/runtime/doRegister
|
||||
call $~lib/runtime/register
|
||||
end
|
||||
local.set $0
|
||||
end
|
||||
@ -1851,7 +1846,7 @@
|
||||
i32.store offset=4
|
||||
local.get $0
|
||||
)
|
||||
(func $std/operator-overloading/TesterInlineInstance#constructor (; 36 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $std/operator-overloading/TesterInlineInstance#constructor (; 35 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
local.get $0
|
||||
i32.eqz
|
||||
@ -1861,12 +1856,12 @@
|
||||
i32.const 8
|
||||
local.set $3
|
||||
local.get $3
|
||||
call $~lib/runtime/doAllocate
|
||||
call $~lib/runtime/allocate
|
||||
end
|
||||
local.set $3
|
||||
local.get $3
|
||||
i32.const 4
|
||||
call $~lib/runtime/doRegister
|
||||
call $~lib/runtime/register
|
||||
end
|
||||
local.set $0
|
||||
end
|
||||
@ -1878,7 +1873,7 @@
|
||||
i32.store offset=4
|
||||
local.get $0
|
||||
)
|
||||
(func $start:std/operator-overloading (; 37 ;) (type $FUNCSIG$v)
|
||||
(func $start:std/operator-overloading (; 36 ;) (type $FUNCSIG$v)
|
||||
(local $0 i32)
|
||||
(local $1 i32)
|
||||
global.get $~lib/memory/HEAP_BASE
|
||||
@ -2939,9 +2934,9 @@
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $start (; 38 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 37 ;) (type $FUNCSIG$v)
|
||||
call $start:std/operator-overloading
|
||||
)
|
||||
(func $null (; 39 ;) (type $FUNCSIG$v)
|
||||
(func $null (; 38 ;) (type $FUNCSIG$v)
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user