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

@ -5,7 +5,7 @@
(type $FUNCSIG$ii (func (param i32) (result i32)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(memory $0 1)
(data (i32.const 8) "\0b\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s")
(data (i32.const 8) "\01\00\00\00\16\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s")
(table $0 2 funcref)
(elem (i32.const 0) $null $inlining/func_fe~anonymous|0)
(global $~lib/argc (mut i32) (i32.const 0))
@ -31,14 +31,14 @@
i32.ne
if
i32.const 0
i32.const 8
i32.const 16
i32.const 68
i32.const 2
call $~lib/env/abort
unreachable
end
)
(func $~lib/allocator/arena/__memory_allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/memory/memory.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
(local $2 i32)
(local $3 i32)
@ -61,15 +61,15 @@
i32.add
i32.const -8
i32.and
local.tee $2
local.tee $0
current_memory
local.tee $3
local.tee $2
i32.const 16
i32.shl
i32.gt_u
if
local.get $3
local.get $2
local.get $0
local.get $1
i32.sub
i32.const 65535
@ -78,16 +78,16 @@
i32.and
i32.const 16
i32.shr_u
local.tee $0
local.tee $3
local.get $2
local.get $3
local.get $0
i32.gt_s
select
grow_memory
i32.const 0
i32.lt_s
if
local.get $0
local.get $3
grow_memory
i32.const 0
i32.lt_s
@ -96,19 +96,40 @@
end
end
end
local.get $2
local.get $0
global.set $~lib/allocator/arena/offset
local.get $1
)
(func $inlining/test_ctor (; 5 ;) (type $FUNCSIG$v)
(func $~lib/runtime/ALLOCATE (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
i32.const 1
i32.const 32
local.get $0
i32.const 7
i32.add
i32.clz
i32.sub
i32.shl
call $~lib/memory/memory.allocate
local.tee $1
i32.const -1520547049
i32.store
local.get $1
local.get $0
i32.store offset=4
local.get $1
i32.const 8
i32.add
)
(func $inlining/test_ctor (; 6 ;) (type $FUNCSIG$v)
(local $0 i32)
i32.const 16
call $~lib/allocator/arena/__memory_allocate
call $~lib/runtime/ALLOCATE
local.tee $0
i32.eqz
if
i32.const 8
call $~lib/allocator/arena/__memory_allocate
call $~lib/runtime/ALLOCATE
local.set $0
end
local.get $0
@ -135,7 +156,7 @@
i32.ne
if
i32.const 0
i32.const 8
i32.const 16
i32.const 97
i32.const 2
call $~lib/env/abort
@ -147,7 +168,7 @@
i32.ne
if
i32.const 0
i32.const 8
i32.const 16
i32.const 98
i32.const 2
call $~lib/env/abort
@ -159,7 +180,7 @@
i32.ne
if
i32.const 0
i32.const 8
i32.const 16
i32.const 99
i32.const 2
call $~lib/env/abort
@ -171,14 +192,14 @@
i32.ne
if
i32.const 0
i32.const 8
i32.const 16
i32.const 100
i32.const 2
call $~lib/env/abort
unreachable
end
)
(func $start (; 6 ;) (type $FUNCSIG$v)
(func $start (; 7 ;) (type $FUNCSIG$v)
call $inlining/test_funcs
i32.const 40
global.set $~lib/allocator/arena/startOffset
@ -186,7 +207,7 @@
global.set $~lib/allocator/arena/offset
call $inlining/test_ctor
)
(func $null (; 7 ;) (type $FUNCSIG$v)
(func $null (; 8 ;) (type $FUNCSIG$v)
nop
)
)