runtime api

This commit is contained in:
dcode
2019-04-03 21:47:38 +02:00
parent cc1e4cd004
commit 85f3fc54a7
69 changed files with 1016 additions and 982 deletions

View File

@ -29,7 +29,7 @@
(export "memory" (memory $0))
(export "table" (table $0))
(start $start)
(func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/util/runtime/adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -128,7 +128,7 @@
(func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/runtime.adjust
call $~lib/util/runtime/adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -407,7 +407,7 @@
if
i32.const 0
i32.const 64
i32.const 123
i32.const 117
i32.const 6
call $~lib/env/abort
unreachable
@ -424,7 +424,7 @@
if
i32.const 0
i32.const 64
i32.const 125
i32.const 119
i32.const 6
call $~lib/env/abort
unreachable
@ -2618,22 +2618,20 @@
local.set $0
local.get $0
)
(func $~lib/runtime/runtime.makeArray (; 19 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(func $~lib/runtime/runtime.newArray (; 19 ;) (type $FUNCSIG$iiiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
i32.const 16
call $~lib/runtime/runtime.allocate
local.get $1
local.get $2
call $~lib/runtime/runtime.register
local.set $4
local.get $0
local.get $2
local.get $1
i32.shl
local.set $5
local.get $0
local.get $2
i32.shl
local.get $5
call $~lib/runtime/runtime.allocate
i32.const 2
call $~lib/runtime/runtime.register
@ -3020,10 +3018,10 @@
call $~lib/typedarray/Uint8Array#constructor
global.set $std/arraybuffer/arr8
i32.const 2
i32.const 5
i32.const 2
i32.const 5
i32.const 152
call $~lib/runtime/runtime.makeArray
call $~lib/runtime/runtime.newArray
call $~lib/arraybuffer/ArrayBuffer.isView<~lib/array/Array<i32>>
i32.eqz
i32.eqz