some cleanup

This commit is contained in:
dcode
2019-04-01 22:23:11 +02:00
parent 7b99e44343
commit 1ada854830
74 changed files with 6072 additions and 3909 deletions

View File

@ -30,14 +30,14 @@
(global $~lib/runtime/HEADER_MAGIC i32 (i32.const -1520547049))
(global $~lib/argc (mut i32) (i32.const 0))
(global $~lib/ASC_NO_ASSERT i32 (i32.const 0))
(global $~lib/runtime/MAX_BYTELENGTH i32 (i32.const 1073741808))
(global $~lib/runtime/runtime.MAX_BYTELENGTH i32 (i32.const 1073741808))
(global $~lib/memory/HEAP_BASE i32 (i32.const 148))
(global $~lib/capabilities i32 (i32.const 2))
(export "memory" (memory $0))
(export "table" (table $0))
(export ".capabilities" (global $~lib/capabilities))
(start $start)
(func $~lib/runtime/ADJUSTOBLOCK (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/runtime/runtime.adjust (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
i32.const 1
i32.const 32
local.get $0
@ -133,10 +133,10 @@
call $~lib/allocator/arena/__mem_allocate
return
)
(func $~lib/runtime/allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(func $~lib/runtime/runtime.allocate (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
(local $1 i32)
local.get $0
call $~lib/runtime/ADJUSTOBLOCK
call $~lib/runtime/runtime.adjust
call $~lib/memory/memory.allocate
local.set $1
local.get $1
@ -178,7 +178,7 @@
(func $~lib/collector/dummy/__ref_register (; 7 ;) (type $FUNCSIG$vi) (param $0 i32)
nop
)
(func $~lib/runtime/register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(func $~lib/runtime/runtime.register (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
local.get $0
global.get $~lib/memory/HEAP_BASE
@ -187,8 +187,8 @@
if
i32.const 0
i32.const 24
i32.const 153
i32.const 4
i32.const 145
i32.const 6
call $~lib/env/abort
unreachable
end
@ -204,8 +204,8 @@
if
i32.const 0
i32.const 24
i32.const 155
i32.const 4
i32.const 147
i32.const 6
call $~lib/env/abort
unreachable
end
@ -478,36 +478,27 @@
)
(func $~lib/arraybuffer/ArrayBuffer#constructor (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
(local $3 i32)
local.get $1
global.get $~lib/runtime/MAX_BYTELENGTH
global.get $~lib/runtime/runtime.MAX_BYTELENGTH
i32.gt_u
if
i32.const 0
i32.const 72
i32.const 25
i32.const 43
i32.const 53
i32.const 51
call $~lib/env/abort
unreachable
end
block $~lib/runtime/ALLOCATE|inlined.0 (result i32)
local.get $1
local.set $2
local.get $2
call $~lib/runtime/allocate
end
local.set $3
local.get $3
local.get $1
call $~lib/runtime/runtime.allocate
local.set $2
local.get $2
i32.const 0
local.get $1
call $~lib/memory/memory.fill
block $~lib/runtime/REGISTER<~lib/arraybuffer/ArrayBuffer>|inlined.0 (result i32)
local.get $3
local.set $2
local.get $2
i32.const 4
call $~lib/runtime/register
end
local.get $2
i32.const 4
call $~lib/runtime/runtime.register
)
(func $~lib/collector/dummy/__ref_link (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
nop
@ -590,9 +581,9 @@
i32.eqz
if
i32.const 24
call $~lib/runtime/allocate
call $~lib/runtime/runtime.allocate
i32.const 1
call $~lib/runtime/register
call $~lib/runtime/runtime.register
local.set $0
end
local.get $0
@ -1427,9 +1418,9 @@
i32.eqz
if
i32.const 24
call $~lib/runtime/allocate
call $~lib/runtime/runtime.allocate
i32.const 5
call $~lib/runtime/register
call $~lib/runtime/runtime.register
local.set $0
end
local.get $0
@ -2249,9 +2240,9 @@
i32.eqz
if
i32.const 24
call $~lib/runtime/allocate
call $~lib/runtime/runtime.allocate
i32.const 7
call $~lib/runtime/register
call $~lib/runtime/runtime.register
local.set $0
end
local.get $0
@ -3101,9 +3092,9 @@
i32.eqz
if
i32.const 24
call $~lib/runtime/allocate
call $~lib/runtime/runtime.allocate
i32.const 9
call $~lib/runtime/register
call $~lib/runtime/runtime.register
local.set $0
end
local.get $0
@ -3923,9 +3914,9 @@
i32.eqz
if
i32.const 24
call $~lib/runtime/allocate
call $~lib/runtime/runtime.allocate
i32.const 11
call $~lib/runtime/register
call $~lib/runtime/runtime.register
local.set $0
end
local.get $0
@ -4779,9 +4770,9 @@
i32.eqz
if
i32.const 24
call $~lib/runtime/allocate
call $~lib/runtime/runtime.allocate
i32.const 13
call $~lib/runtime/register
call $~lib/runtime/runtime.register
local.set $0
end
local.get $0
@ -5593,9 +5584,9 @@
i32.eqz
if
i32.const 24
call $~lib/runtime/allocate
call $~lib/runtime/runtime.allocate
i32.const 15
call $~lib/runtime/register
call $~lib/runtime/runtime.register
local.set $0
end
local.get $0
@ -6498,9 +6489,9 @@
i32.eqz
if
i32.const 24
call $~lib/runtime/allocate
call $~lib/runtime/runtime.allocate
i32.const 17
call $~lib/runtime/register
call $~lib/runtime/runtime.register
local.set $0
end
local.get $0
@ -7315,9 +7306,9 @@
i32.eqz
if
i32.const 24
call $~lib/runtime/allocate
call $~lib/runtime/runtime.allocate
i32.const 19
call $~lib/runtime/register
call $~lib/runtime/runtime.register
local.set $0
end
local.get $0
@ -8136,9 +8127,9 @@
i32.eqz
if
i32.const 24
call $~lib/runtime/allocate
call $~lib/runtime/runtime.allocate
i32.const 21
call $~lib/runtime/register
call $~lib/runtime/runtime.register
local.set $0
end
local.get $0