2018-07-18 23:49:32 +02:00
|
|
|
(module
|
2019-02-07 15:26:26 +01:00
|
|
|
(type $_ (func))
|
2019-02-21 00:11:22 +01:00
|
|
|
(type $iii (func (param i32 i32) (result i32)))
|
2018-07-18 23:49:32 +02:00
|
|
|
(type $ii (func (param i32) (result i32)))
|
2019-02-07 15:26:26 +01:00
|
|
|
(type $i_ (func (param i32)))
|
|
|
|
(type $ii_ (func (param i32 i32)))
|
2018-09-13 23:10:49 +02:00
|
|
|
(type $FUNCSIG$i (func (result i32)))
|
2018-10-11 08:49:08 +02:00
|
|
|
(memory $0 0)
|
2019-02-05 17:12:10 +01:00
|
|
|
(table $0 4 funcref)
|
2019-02-02 16:03:21 +01:00
|
|
|
(elem (i32.const 0) $null $~lib/collector/itcm/__gc_mark $std/gc-object/Base~gc $std/gc-object/Custom~gc)
|
2018-07-18 23:49:32 +02:00
|
|
|
(global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0))
|
|
|
|
(global $~lib/allocator/arena/offset (mut i32) (i32.const 0))
|
|
|
|
(global $~lib/collector/itcm/state (mut i32) (i32.const 0))
|
2018-07-20 16:49:27 +02:00
|
|
|
(global $~lib/collector/itcm/white (mut i32) (i32.const 0))
|
2018-08-02 18:23:02 +02:00
|
|
|
(global $~lib/collector/itcm/fromSpace (mut i32) (i32.const 0))
|
|
|
|
(global $~lib/collector/itcm/toSpace (mut i32) (i32.const 0))
|
2018-07-20 16:49:27 +02:00
|
|
|
(global $~lib/collector/itcm/iter (mut i32) (i32.const 0))
|
2019-02-21 00:11:22 +01:00
|
|
|
(global $~lib/argc (mut i32) (i32.const 0))
|
2018-08-02 18:23:02 +02:00
|
|
|
(global $std/gc-object/obj (mut i32) (i32.const 0))
|
2019-02-21 00:11:22 +01:00
|
|
|
(global $~lib/started (mut i32) (i32.const 0))
|
2018-07-18 23:49:32 +02:00
|
|
|
(export "memory" (memory $0))
|
|
|
|
(export "table" (table $0))
|
2018-08-02 18:23:02 +02:00
|
|
|
(export "main" (func $std/gc-object/main))
|
2018-11-08 08:04:24 +01:00
|
|
|
(func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $ii) (param $0 i32) (result i32)
|
2018-07-18 23:49:32 +02:00
|
|
|
(local $1 i32)
|
|
|
|
(local $2 i32)
|
|
|
|
(local $3 i32)
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1073741824
|
|
|
|
i32.gt_u
|
|
|
|
if
|
|
|
|
unreachable
|
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $~lib/allocator/arena/offset
|
|
|
|
local.tee $1
|
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
|
|
|
i32.gt_u
|
|
|
|
select
|
|
|
|
i32.add
|
|
|
|
i32.const 7
|
|
|
|
i32.add
|
|
|
|
i32.const -8
|
|
|
|
i32.and
|
2019-02-05 17:12:10 +01:00
|
|
|
local.tee $2
|
2018-11-08 08:04:24 +01:00
|
|
|
current_memory
|
2019-02-05 17:12:10 +01:00
|
|
|
local.tee $3
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 16
|
|
|
|
i32.shl
|
|
|
|
i32.gt_u
|
|
|
|
if
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $3
|
|
|
|
local.get $2
|
|
|
|
local.get $1
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.sub
|
|
|
|
i32.const 65535
|
|
|
|
i32.add
|
|
|
|
i32.const -65536
|
|
|
|
i32.and
|
|
|
|
i32.const 16
|
|
|
|
i32.shr_u
|
2019-02-05 17:12:10 +01:00
|
|
|
local.tee $0
|
|
|
|
local.get $3
|
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.gt_s
|
|
|
|
select
|
|
|
|
grow_memory
|
|
|
|
i32.const 0
|
|
|
|
i32.lt_s
|
|
|
|
if
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
grow_memory
|
|
|
|
i32.const 0
|
|
|
|
i32.lt_s
|
|
|
|
if
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $2
|
|
|
|
global.set $~lib/allocator/arena/offset
|
|
|
|
local.get $1
|
2018-07-18 23:49:32 +02:00
|
|
|
)
|
2019-02-07 15:26:26 +01:00
|
|
|
(func $~lib/collector/itcm/ManagedObjectList#push (; 1 ;) (type $ii_) (param $0 i32) (param $1 i32)
|
2018-11-09 12:28:10 +01:00
|
|
|
(local $2 i32)
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.load offset=4
|
2019-02-05 17:12:10 +01:00
|
|
|
local.set $2
|
|
|
|
local.get $1
|
|
|
|
local.get $1
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.load
|
|
|
|
i32.const 3
|
|
|
|
i32.and
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.or
|
|
|
|
i32.store
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $1
|
|
|
|
local.get $2
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.store offset=4
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $2
|
|
|
|
local.get $2
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.load
|
|
|
|
i32.const 3
|
|
|
|
i32.and
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $1
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.or
|
|
|
|
i32.store
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
|
|
|
local.get $1
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.store offset=4
|
2018-07-18 23:49:32 +02:00
|
|
|
)
|
2019-02-07 15:26:26 +01:00
|
|
|
(func $~lib/collector/itcm/ManagedObject#makeGray (; 2 ;) (type $i_) (param $0 i32)
|
2018-11-09 12:28:10 +01:00
|
|
|
(local $1 i32)
|
|
|
|
(local $2 i32)
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $~lib/collector/itcm/iter
|
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.eq
|
|
|
|
if
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.load offset=4
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $~lib/collector/itcm/iter
|
2018-11-08 08:04:24 +01:00
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.load
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
2019-02-05 17:12:10 +01:00
|
|
|
local.tee $2
|
|
|
|
local.get $0
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.load offset=4
|
2019-02-05 17:12:10 +01:00
|
|
|
local.tee $1
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.store offset=4
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $1
|
|
|
|
local.get $1
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.load
|
|
|
|
i32.const 3
|
|
|
|
i32.and
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $2
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.or
|
|
|
|
i32.store
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $~lib/collector/itcm/toSpace
|
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
call $~lib/collector/itcm/ManagedObjectList#push
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.load
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
i32.const 2
|
|
|
|
i32.or
|
|
|
|
i32.store
|
2018-07-20 16:49:27 +02:00
|
|
|
)
|
2019-02-07 15:26:26 +01:00
|
|
|
(func $~lib/collector/itcm/__gc_mark (; 3 ;) (type $i_) (param $0 i32)
|
2018-07-20 16:49:27 +02:00
|
|
|
(local $1 i32)
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
if
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $~lib/collector/itcm/white
|
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 16
|
|
|
|
i32.sub
|
2019-02-05 17:12:10 +01:00
|
|
|
local.tee $1
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.load
|
|
|
|
i32.const 3
|
|
|
|
i32.and
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.eq
|
|
|
|
if
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $1
|
2018-11-08 08:04:24 +01:00
|
|
|
call $~lib/collector/itcm/ManagedObject#makeGray
|
|
|
|
end
|
|
|
|
end
|
2018-07-20 16:49:27 +02:00
|
|
|
)
|
2019-02-07 15:26:26 +01:00
|
|
|
(func $~lib/collector/itcm/step (; 4 ;) (type $_)
|
2018-07-20 16:49:27 +02:00
|
|
|
(local $0 i32)
|
2018-11-08 08:04:24 +01:00
|
|
|
block $break|0
|
|
|
|
block $case3|0
|
|
|
|
block $case2|0
|
|
|
|
block $case1|0
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $~lib/collector/itcm/state
|
|
|
|
local.tee $0
|
2018-11-08 08:04:24 +01:00
|
|
|
if
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-23 15:20:52 +01:00
|
|
|
i32.const 1
|
|
|
|
i32.sub
|
|
|
|
br_table $case1|0 $case2|0 $case3|0 $break|0
|
2018-11-08 08:04:24 +01:00
|
|
|
end
|
|
|
|
i32.const 16
|
|
|
|
call $~lib/allocator/arena/__memory_allocate
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $~lib/collector/itcm/fromSpace
|
|
|
|
global.get $~lib/collector/itcm/fromSpace
|
|
|
|
local.tee $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const -1
|
|
|
|
i32.store offset=8
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
|
|
|
local.get $0
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.store
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
|
|
|
local.get $0
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.store offset=4
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 16
|
|
|
|
call $~lib/allocator/arena/__memory_allocate
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $~lib/collector/itcm/toSpace
|
|
|
|
global.get $~lib/collector/itcm/toSpace
|
|
|
|
local.tee $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const -1
|
|
|
|
i32.store offset=8
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
|
|
|
local.get $0
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.store
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
|
|
|
local.get $0
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.store offset=4
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $~lib/collector/itcm/toSpace
|
|
|
|
global.set $~lib/collector/itcm/iter
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $~lib/collector/itcm/state
|
2018-11-08 08:04:24 +01:00
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $std/gc-object/obj
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.const 1
|
2019-02-07 15:26:26 +01:00
|
|
|
call_indirect (type $i_)
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 2
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $~lib/collector/itcm/state
|
2018-11-08 08:04:24 +01:00
|
|
|
br $break|0
|
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $~lib/collector/itcm/iter
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.load
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
2019-02-05 17:12:10 +01:00
|
|
|
local.tee $0
|
|
|
|
global.get $~lib/collector/itcm/toSpace
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.ne
|
|
|
|
if
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
|
|
|
global.set $~lib/collector/itcm/iter
|
|
|
|
local.get $0
|
|
|
|
global.get $~lib/collector/itcm/white
|
2018-12-01 03:09:43 +01:00
|
|
|
i32.eqz
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.load
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
i32.or
|
|
|
|
i32.store
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
2019-02-21 00:11:22 +01:00
|
|
|
global.set $~lib/argc
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 16
|
|
|
|
i32.add
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.load offset=8
|
2019-02-07 15:26:26 +01:00
|
|
|
call_indirect (type $i_)
|
2018-11-08 08:04:24 +01:00
|
|
|
else
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $std/gc-object/obj
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.const 1
|
2019-02-07 15:26:26 +01:00
|
|
|
call_indirect (type $i_)
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $~lib/collector/itcm/toSpace
|
|
|
|
global.get $~lib/collector/itcm/iter
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.load
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.eq
|
|
|
|
if
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $~lib/collector/itcm/fromSpace
|
|
|
|
local.set $0
|
|
|
|
global.get $~lib/collector/itcm/toSpace
|
|
|
|
global.set $~lib/collector/itcm/fromSpace
|
|
|
|
local.get $0
|
|
|
|
global.set $~lib/collector/itcm/toSpace
|
|
|
|
global.get $~lib/collector/itcm/white
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.eqz
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $~lib/collector/itcm/white
|
|
|
|
local.get $0
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.load
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $~lib/collector/itcm/iter
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 3
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $~lib/collector/itcm/state
|
2018-11-08 08:04:24 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
br $break|0
|
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $~lib/collector/itcm/iter
|
|
|
|
local.tee $0
|
|
|
|
global.get $~lib/collector/itcm/toSpace
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.ne
|
|
|
|
if
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.load
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $~lib/collector/itcm/iter
|
2018-11-08 08:04:24 +01:00
|
|
|
else
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $~lib/collector/itcm/toSpace
|
|
|
|
local.tee $0
|
|
|
|
local.get $0
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.store
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
|
|
|
local.get $0
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.store offset=4
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $~lib/collector/itcm/state
|
2018-11-08 08:04:24 +01:00
|
|
|
end
|
|
|
|
end
|
2018-07-20 20:32:25 +02:00
|
|
|
)
|
2019-02-02 16:03:21 +01:00
|
|
|
(func $~lib/collector/itcm/__gc_allocate (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
|
|
|
(local $2 i32)
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2019-02-02 16:03:21 +01:00
|
|
|
i32.const 1073741808
|
|
|
|
i32.gt_u
|
|
|
|
if
|
|
|
|
unreachable
|
|
|
|
end
|
2018-11-08 08:04:24 +01:00
|
|
|
call $~lib/collector/itcm/step
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2019-02-02 16:03:21 +01:00
|
|
|
i32.const 16
|
|
|
|
i32.add
|
2018-11-08 08:04:24 +01:00
|
|
|
call $~lib/allocator/arena/__memory_allocate
|
2019-02-05 17:12:10 +01:00
|
|
|
local.tee $2
|
|
|
|
local.get $1
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.store offset=8
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $2
|
|
|
|
global.get $~lib/collector/itcm/white
|
|
|
|
local.get $2
|
2018-11-09 12:28:10 +01:00
|
|
|
i32.load
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
i32.or
|
|
|
|
i32.store
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $~lib/collector/itcm/fromSpace
|
|
|
|
local.get $2
|
2018-11-08 08:04:24 +01:00
|
|
|
call $~lib/collector/itcm/ManagedObjectList#push
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $2
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 16
|
|
|
|
i32.add
|
2018-07-18 23:49:32 +02:00
|
|
|
)
|
2019-02-07 15:26:26 +01:00
|
|
|
(func $std/gc-object/Base~gc (; 6 ;) (type $i_) (param $0 i32)
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
return
|
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
call $~lib/collector/itcm/__gc_mark
|
2018-07-19 16:15:56 +02:00
|
|
|
)
|
2019-02-07 15:26:26 +01:00
|
|
|
(func $std/gc-object/Custom~gc (; 7 ;) (type $i_) (param $0 i32)
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
return
|
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2019-02-02 16:03:21 +01:00
|
|
|
i32.const 2
|
2019-02-07 15:26:26 +01:00
|
|
|
call_indirect (type $i_)
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.load
|
|
|
|
call $~lib/collector/itcm/__gc_mark
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.load offset=4
|
|
|
|
call $~lib/collector/itcm/__gc_mark
|
2018-08-02 18:23:02 +02:00
|
|
|
)
|
2019-02-02 16:03:21 +01:00
|
|
|
(func $std/gc-object/Custom#constructor (; 8 ;) (type $FUNCSIG$i) (result i32)
|
|
|
|
(local $0 i32)
|
|
|
|
i32.const 8
|
|
|
|
i32.const 3
|
|
|
|
call $~lib/collector/itcm/__gc_allocate
|
2019-02-05 17:12:10 +01:00
|
|
|
local.tee $0
|
2019-02-02 16:03:21 +01:00
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
|
|
|
i32.const 2
|
|
|
|
call $~lib/collector/itcm/__gc_allocate
|
2019-02-05 17:12:10 +01:00
|
|
|
local.set $0
|
2019-02-02 16:03:21 +01:00
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2019-02-02 16:03:21 +01:00
|
|
|
i32.const 0
|
|
|
|
i32.store
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2019-02-02 16:03:21 +01:00
|
|
|
i32.const 0
|
|
|
|
i32.store offset=4
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2019-02-02 16:03:21 +01:00
|
|
|
)
|
2019-02-07 15:26:26 +01:00
|
|
|
(func $~lib/collector/itcm/__gc_collect (; 9 ;) (type $_)
|
2018-07-20 16:49:27 +02:00
|
|
|
(local $0 i32)
|
2018-11-08 08:04:24 +01:00
|
|
|
block $break|0
|
|
|
|
block $case1|0
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $~lib/collector/itcm/state
|
|
|
|
local.tee $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.eqz
|
|
|
|
br_if $case1|0
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
|
|
|
i32.eq
|
|
|
|
br_if $case1|0
|
|
|
|
br $break|0
|
|
|
|
end
|
|
|
|
call $~lib/collector/itcm/step
|
|
|
|
end
|
|
|
|
loop $continue|1
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $~lib/collector/itcm/state
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 1
|
|
|
|
i32.ne
|
|
|
|
if
|
|
|
|
call $~lib/collector/itcm/step
|
|
|
|
br $continue|1
|
|
|
|
end
|
|
|
|
end
|
2018-07-20 16:49:27 +02:00
|
|
|
)
|
2019-02-21 00:11:22 +01:00
|
|
|
(func $start:std/gc-object (; 10 ;) (type $_)
|
2018-07-20 16:49:27 +02:00
|
|
|
(local $0 i32)
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 8
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $~lib/allocator/arena/startOffset
|
|
|
|
global.get $~lib/allocator/arena/startOffset
|
|
|
|
global.set $~lib/allocator/arena/offset
|
2019-02-02 16:03:21 +01:00
|
|
|
call $std/gc-object/Custom#constructor
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $std/gc-object/obj
|
2018-11-09 12:28:10 +01:00
|
|
|
call $~lib/collector/itcm/__gc_collect
|
2019-02-05 17:12:10 +01:00
|
|
|
global.get $std/gc-object/obj
|
|
|
|
local.tee $0
|
|
|
|
local.get $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.store
|
2018-11-09 12:28:10 +01:00
|
|
|
call $~lib/collector/itcm/__gc_collect
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 0
|
2019-02-05 17:12:10 +01:00
|
|
|
global.set $std/gc-object/obj
|
2018-11-09 12:28:10 +01:00
|
|
|
call $~lib/collector/itcm/__gc_collect
|
2018-07-18 23:49:32 +02:00
|
|
|
)
|
2019-02-21 00:11:22 +01:00
|
|
|
(func $std/gc-object/main (; 11 ;) (type $_)
|
|
|
|
global.get $~lib/started
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
call $start:std/gc-object
|
|
|
|
i32.const 1
|
|
|
|
global.set $~lib/started
|
|
|
|
end
|
|
|
|
)
|
2019-02-07 15:26:26 +01:00
|
|
|
(func $null (; 12 ;) (type $_)
|
2018-11-08 08:04:24 +01:00
|
|
|
nop
|
2018-09-17 01:48:35 +02:00
|
|
|
)
|
2018-07-18 23:49:32 +02:00
|
|
|
)
|