mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-07-31 06:02:11 +00:00
unify, stub impl
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
(module
|
||||
(type $FUNCSIG$v (func))
|
||||
(type $FUNCSIG$ii (func (param i32) (result i32)))
|
||||
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
|
||||
(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$iii (func (param i32 i32) (result i32)))
|
||||
(type $FUNCSIG$ii (func (param i32) (result i32)))
|
||||
(type $FUNCSIG$viii (func (param i32 i32 i32)))
|
||||
(type $FUNCSIG$vi (func (param i32)))
|
||||
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
|
||||
@@ -13,6 +13,7 @@
|
||||
(data (i32.const 56) "\10\00\00\00 \00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00i\00n\00d\00e\00x\00.\00t\00s\00")
|
||||
(data (i32.const 104) "\10\00\00\00\1e\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s\00")
|
||||
(data (i32.const 152) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00m\00e\00m\00o\00r\00y\00.\00t\00s\00")
|
||||
(data (i32.const 200) "\10\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00\08\00\00\00\00\00\00\00")
|
||||
(table $0 1 funcref)
|
||||
(elem (i32.const 0) $null)
|
||||
(global $~lib/rt/pure/ACYCLIC_FLAG i32 (i32.const 0))
|
||||
@@ -21,15 +22,17 @@
|
||||
(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/memory/HEAP_BASE i32 (i32.const 196))
|
||||
(global $~lib/runtime/RTTI_BASE i32 (i32.const 200))
|
||||
(global $~lib/memory/HEAP_BASE i32 (i32.const 336))
|
||||
(export "memory" (memory $0))
|
||||
(export "main" (func $assembly/index/main))
|
||||
(export "__mm_allocate" (func $~lib/rt/index/__mm_allocate))
|
||||
(export "__mm_reallocate" (func $~lib/rt/index/__mm_reallocate))
|
||||
(export "__mm_free" (func $~lib/rt/index/__mm_free))
|
||||
(export "__gc_retain" (func $~lib/rt/index/__gc_retain))
|
||||
(export "__gc_release" (func $~lib/rt/index/__gc_release))
|
||||
(export "__gc_collect" (func $~lib/rt/index/__gc_collect))
|
||||
(export "__rt_allocate" (func $~lib/rt/index/__rt_allocate))
|
||||
(export "__rt_reallocate" (func $~lib/rt/index/__rt_reallocate))
|
||||
(export "__rt_free" (func $~lib/rt/index/__rt_free))
|
||||
(export "__rt_retain" (func $~lib/rt/index/__rt_retain))
|
||||
(export "__rt_release" (func $~lib/rt/index/__rt_release))
|
||||
(export "__rt_collect" (func $~lib/rt/index/__rt_collect))
|
||||
(export "__rt_typeinfo" (func $~lib/rt/common/__rt_typeinfo))
|
||||
(func $assembly/index/main (; 1 ;) (type $FUNCSIG$v)
|
||||
global.get $~lib/started
|
||||
i32.eqz
|
||||
@@ -60,7 +63,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 265
|
||||
i32.const 256
|
||||
i32.const 13
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -85,7 +88,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 267
|
||||
i32.const 258
|
||||
i32.const 13
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -137,7 +140,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 280
|
||||
i32.const 271
|
||||
i32.const 13
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -275,7 +278,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 193
|
||||
i32.const 184
|
||||
i32.const 13
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -290,7 +293,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 195
|
||||
i32.const 186
|
||||
i32.const 13
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -389,7 +392,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 216
|
||||
i32.const 207
|
||||
i32.const 15
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -452,7 +455,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 231
|
||||
i32.const 222
|
||||
i32.const 13
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -468,7 +471,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 232
|
||||
i32.const 223
|
||||
i32.const 13
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -525,7 +528,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 248
|
||||
i32.const 239
|
||||
i32.const 13
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -648,7 +651,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 374
|
||||
i32.const 365
|
||||
i32.const 4
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -673,7 +676,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 384
|
||||
i32.const 375
|
||||
i32.const 15
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -704,7 +707,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 396
|
||||
i32.const 387
|
||||
i32.const 4
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -937,7 +940,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 436
|
||||
i32.const 427
|
||||
i32.const 29
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -1031,7 +1034,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 326
|
||||
i32.const 317
|
||||
i32.const 13
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -1096,7 +1099,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 339
|
||||
i32.const 330
|
||||
i32.const 17
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -1214,7 +1217,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 353
|
||||
i32.const 344
|
||||
i32.const 13
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -1325,7 +1328,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 466
|
||||
i32.const 457
|
||||
i32.const 15
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -1343,7 +1346,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 468
|
||||
i32.const 459
|
||||
i32.const 13
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -1366,20 +1369,26 @@
|
||||
call $~lib/rt/tlsf/prepareBlock
|
||||
local.get $3
|
||||
)
|
||||
(func $~lib/rt/index/__mm_allocate (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(func $~lib/rt/index/__rt_allocate (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
global.get $~lib/rt/tlsf/ROOT
|
||||
local.set $1
|
||||
local.get $1
|
||||
local.set $2
|
||||
local.get $2
|
||||
i32.eqz
|
||||
if
|
||||
call $~lib/rt/tlsf/initializeRoot
|
||||
global.get $~lib/rt/tlsf/ROOT
|
||||
local.set $1
|
||||
local.set $2
|
||||
end
|
||||
local.get $1
|
||||
local.get $2
|
||||
local.get $0
|
||||
call $~lib/rt/tlsf/allocateBlock
|
||||
local.set $3
|
||||
local.get $3
|
||||
local.get $1
|
||||
i32.store offset=8
|
||||
local.get $3
|
||||
i32.const 16
|
||||
i32.add
|
||||
)
|
||||
@@ -1613,7 +1622,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 481
|
||||
i32.const 472
|
||||
i32.const 13
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -1727,13 +1736,13 @@
|
||||
call $~lib/rt/tlsf/insertBlock
|
||||
local.get $8
|
||||
)
|
||||
(func $~lib/rt/index/__mm_reallocate (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $~lib/rt/index/__rt_reallocate (; 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 72
|
||||
i32.const 21
|
||||
i32.const 23
|
||||
i32.const 13
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -1753,7 +1762,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 72
|
||||
i32.const 22
|
||||
i32.const 24
|
||||
i32.const 2
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -1780,7 +1789,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 519
|
||||
i32.const 510
|
||||
i32.const 2
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -1794,13 +1803,13 @@
|
||||
local.get $1
|
||||
call $~lib/rt/tlsf/insertBlock
|
||||
)
|
||||
(func $~lib/rt/index/__mm_free (; 16 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $~lib/rt/index/__rt_free (; 16 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
global.get $~lib/rt/tlsf/ROOT
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 72
|
||||
i32.const 29
|
||||
i32.const 31
|
||||
i32.const 13
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -1820,7 +1829,7 @@
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 72
|
||||
i32.const 30
|
||||
i32.const 32
|
||||
i32.const 2
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
@@ -1864,7 +1873,7 @@
|
||||
i32.add
|
||||
i32.store offset=4
|
||||
)
|
||||
(func $~lib/rt/index/__gc_retain (; 18 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $~lib/rt/index/__rt_retain (; 18 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
local.get $0
|
||||
if
|
||||
local.get $0
|
||||
@@ -2037,7 +2046,7 @@
|
||||
end
|
||||
end
|
||||
)
|
||||
(func $~lib/rt/index/__gc_release (; 25 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $~lib/rt/index/__rt_release (; 25 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
local.get $0
|
||||
if
|
||||
local.get $0
|
||||
@@ -2300,11 +2309,36 @@
|
||||
local.get $0
|
||||
global.set $~lib/rt/pure/CUR
|
||||
)
|
||||
(func $~lib/rt/index/__gc_collect (; 31 ;) (type $FUNCSIG$v)
|
||||
(func $~lib/rt/index/__rt_collect (; 31 ;) (type $FUNCSIG$v)
|
||||
call $~lib/rt/pure/collectCycles
|
||||
)
|
||||
(func $start (; 32 ;) (type $FUNCSIG$v)
|
||||
(func $~lib/rt/common/__rt_typeinfo (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
global.get $~lib/runtime/RTTI_BASE
|
||||
local.set $1
|
||||
local.get $0
|
||||
i32.eqz
|
||||
if (result i32)
|
||||
i32.const 1
|
||||
else
|
||||
local.get $0
|
||||
local.get $1
|
||||
i32.load
|
||||
i32.gt_u
|
||||
end
|
||||
if (result i32)
|
||||
unreachable
|
||||
else
|
||||
local.get $1
|
||||
local.get $0
|
||||
i32.const 8
|
||||
i32.mul
|
||||
i32.add
|
||||
i32.load
|
||||
end
|
||||
)
|
||||
(func $null (; 33 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 33 ;) (type $FUNCSIG$v)
|
||||
)
|
||||
(func $null (; 34 ;) (type $FUNCSIG$v)
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user