directize more (eliminate table use)

This commit is contained in:
dcode
2019-04-02 16:18:44 +02:00
parent 6bf8276746
commit e1bd0050e2
45 changed files with 4202 additions and 5869 deletions

View File

@ -1,7 +1,7 @@
(module
(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$vi (func (param i32)))
(type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64)))
(type $FUNCSIG$v (func))
(type $FUNCSIG$i (func (result i32)))
@ -14,8 +14,8 @@
(data (i32.const 72) "g\00c\00.\00r\00e\00g\00i\00s\00t\00e\00r")
(data (i32.const 96) "\02\00\00\00\"")
(data (i32.const 112) "g\00c\00/\00g\00l\00o\00b\00a\00l\00-\00i\00n\00i\00t\00.\00t\00s")
(table $0 3 funcref)
(elem (i32.const 0) $null $gc/global-init/Ref~traverse $gc/global-init/Ref~traverse)
(table $0 1 funcref)
(elem (i32.const 0) $null)
(global $gc/_dummy/register_count (mut i32) (i32.const 0))
(global $gc/_dummy/register_ref (mut i32) (i32.const 0))
(global $gc/_dummy/link_count (mut i32) (i32.const 0))
@ -111,10 +111,7 @@
i32.const 16
i32.add
)
(func $gc/global-init/Ref~traverse (; 4 ;) (type $FUNCSIG$vi) (param $0 i32)
nop
)
(func $gc/_dummy/__ref_register (; 5 ;) (type $FUNCSIG$vi) (param $0 i32)
(func $gc/_dummy/__ref_register (; 4 ;) (type $FUNCSIG$vi) (param $0 i32)
i32.const 72
i32.const 1
local.get $0
@ -131,7 +128,7 @@
local.get $0
global.set $gc/_dummy/register_ref
)
(func $~lib/runtime/runtime.register (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/runtime/runtime.register (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
i32.const 148
@ -166,7 +163,7 @@
call $gc/_dummy/__ref_register
local.get $0
)
(func $start:gc/global-init (; 7 ;) (type $FUNCSIG$v)
(func $start:gc/global-init (; 6 ;) (type $FUNCSIG$v)
i32.const 152
global.set $~lib/allocator/arena/startOffset
global.get $~lib/allocator/arena/startOffset
@ -236,7 +233,7 @@
unreachable
end
)
(func $gc/global-init/main (; 8 ;) (type $FUNCSIG$v)
(func $gc/global-init/main (; 7 ;) (type $FUNCSIG$v)
global.get $~lib/started
i32.eqz
if
@ -245,7 +242,7 @@
global.set $~lib/started
end
)
(func $null (; 9 ;) (type $FUNCSIG$v)
(func $null (; 8 ;) (type $FUNCSIG$v)
nop
)
)