static array stuff

This commit is contained in:
dcode
2019-03-15 13:13:48 +01:00
parent 968b0321a0
commit 058dc8d4fa
77 changed files with 5634 additions and 4657 deletions

View File

@ -1,6 +1,7 @@
(module
(type $FUNCSIG$v (func))
(type $FUNCSIG$i (func (result i32)))
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$v (func))
(memory $0 0)
(table $0 2 funcref)
(elem (i32.const 0) $null $getter-call/C#get:x~anonymous|0)
@ -11,18 +12,30 @@
(export "table" (table $0))
(export "test" (func $getter-call/test))
(start $start)
(func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $FUNCSIG$i) (result i32)
(local $0 i32)
(func $~lib/memory/memory.allocate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
local.get $0
i32.const 1073741824
i32.gt_u
if
unreachable
end
global.get $~lib/allocator/arena/offset
local.tee $0
i32.const 8
local.tee $1
local.get $0
i32.const 1
local.get $0
i32.const 1
i32.gt_u
select
i32.add
i32.const 7
i32.add
i32.const -8
i32.and
local.tee $1
local.tee $0
current_memory
local.tee $2
i32.const 16
@ -30,8 +43,8 @@
i32.gt_u
if
local.get $2
local.get $1
local.get $0
local.get $1
i32.sub
i32.const 65535
i32.add
@ -57,16 +70,23 @@
end
end
end
local.get $1
global.set $~lib/allocator/arena/offset
local.get $0
global.set $~lib/allocator/arena/offset
local.get $1
)
(func $getter-call/C#get:x~anonymous|0 (; 1 ;) (type $FUNCSIG$i) (result i32)
i32.const 42
)
(func $getter-call/test (; 2 ;) (type $FUNCSIG$i) (result i32)
call $~lib/allocator/arena/__memory_allocate
drop
(local $0 i32)
i32.const 8
call $~lib/memory/memory.allocate
local.tee $0
i32.const -1520547049
i32.store
local.get $0
i32.const 0
i32.store offset=4
i32.const 0
global.set $~lib/argc
i32.const 1