assemblyscript/tests/compiler/std/runtime.untouched.wat

2521 lines
47 KiB
Plaintext
Raw Normal View History

2019-03-09 02:04:08 +01:00
(module
2019-03-31 21:58:42 +02:00
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
2019-03-09 02:04:08 +01:00
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64)))
2019-04-02 10:12:57 +02:00
(type $FUNCSIG$vii (func (param i32 i32)))
2019-03-09 02:04:08 +01:00
(type $FUNCSIG$viii (func (param i32 i32 i32)))
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
2019-04-02 16:18:44 +02:00
(type $FUNCSIG$vi (func (param i32)))
2019-03-31 21:58:42 +02:00
(type $FUNCSIG$v (func))
2019-04-06 20:17:48 +02:00
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
(import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64)))
2019-03-09 02:04:08 +01:00
(memory $0 1)
2019-04-06 20:17:48 +02:00
(data (i32.const 8) "\10\00\00\00\1c\00\00\00\00\00\00\00\00\00\00\00s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00")
(data (i32.const 56) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\001\00")
(data (i32.const 88) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\002\00")
(data (i32.const 120) "\10\00\00\00\10\00\00\00\00\00\00\00\00\00\00\00b\00a\00r\00r\00i\00e\00r\003\00")
(data (i32.const 152) "\10\00\00\00,\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00")
(data (i32.const 216) "\10\00\00\00(\00\00\00\00\00\00\00\00\00\00\00~\00l\00i\00b\00/\00u\00t\00i\00l\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s\00")
2019-04-02 16:18:44 +02:00
(table $0 1 funcref)
(elem (i32.const 0) $null)
2019-03-31 21:58:42 +02:00
(global $std/runtime/register_ref (mut i32) (i32.const 0))
(global $std/runtime/link_ref (mut i32) (i32.const 0))
(global $std/runtime/link_parentRef (mut i32) (i32.const 0))
2019-04-02 10:12:57 +02:00
(global $~lib/util/runtime/HEADER_SIZE i32 (i32.const 16))
2019-03-31 21:58:42 +02:00
(global $std/runtime/barrier1 (mut i32) (i32.const 0))
(global $std/runtime/barrier2 (mut i32) (i32.const 0))
(global $std/runtime/barrier3 (mut i32) (i32.const 0))
(global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0))
(global $~lib/allocator/tlsf/Root.SL_START i32 (i32.const 4))
2019-03-09 02:04:08 +01:00
(global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5))
(global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8))
(global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22))
(global $~lib/allocator/tlsf/Root.SL_END i32 (i32.const 92))
(global $~lib/allocator/tlsf/Root.HL_START i32 (i32.const 96))
2019-03-31 21:58:42 +02:00
(global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32))
2019-03-09 02:04:08 +01:00
(global $~lib/allocator/tlsf/Root.HL_END i32 (i32.const 2912))
(global $~lib/allocator/tlsf/Root.SIZE i32 (i32.const 2916))
2019-03-31 21:58:42 +02:00
(global $~lib/allocator/tlsf/Block.INFO i32 (i32.const 8))
(global $~lib/allocator/tlsf/Block.MIN_SIZE i32 (i32.const 16))
(global $~lib/allocator/tlsf/FREE i32 (i32.const 1))
(global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2))
(global $~lib/allocator/tlsf/TAGS i32 (i32.const 3))
(global $~lib/allocator/tlsf/Block.MAX_SIZE i32 (i32.const 1073741824))
(global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256))
2019-04-02 10:12:57 +02:00
(global $~lib/util/runtime/HEADER_MAGIC i32 (i32.const -1520547049))
2019-03-09 02:04:08 +01:00
(global $std/runtime/ref1 (mut i32) (i32.const 0))
(global $std/runtime/header1 (mut i32) (i32.const 0))
(global $std/runtime/ref2 (mut i32) (i32.const 0))
(global $std/runtime/header2 (mut i32) (i32.const 0))
2019-03-17 00:11:16 +01:00
(global $~lib/ASC_NO_ASSERT i32 (i32.const 0))
2019-03-09 02:04:08 +01:00
(global $std/runtime/ref3 (mut i32) (i32.const 0))
(global $std/runtime/ref4 (mut i32) (i32.const 0))
2019-03-09 02:37:05 +01:00
(global $std/runtime/header4 (mut i32) (i32.const 0))
2019-03-09 02:44:46 +01:00
(global $std/runtime/ref5 (mut i32) (i32.const 0))
2019-03-27 14:43:35 +01:00
(global $~lib/started (mut i32) (i32.const 0))
2019-04-05 01:59:01 +02:00
(global $~lib/memory/HEAP_BASE i32 (i32.const 272))
(global $~lib/capabilities i32 (i32.const 2))
2019-03-09 02:04:08 +01:00
(export "memory" (memory $0))
2019-03-27 14:43:35 +01:00
(export "main" (func $std/runtime/main))
2019-04-05 01:59:01 +02:00
(export "$.capabilities" (global $~lib/capabilities))
2019-04-03 21:47:38 +02:00
(func $~lib/util/runtime/adjust (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
2019-03-09 02:04:08 +01:00
i32.const 1
i32.const 32
local.get $0
2019-04-02 10:12:57 +02:00
global.get $~lib/util/runtime/HEADER_SIZE
2019-03-09 02:04:08 +01:00
i32.add
i32.const 1
i32.sub
i32.clz
i32.sub
i32.shl
)
2019-04-02 16:18:44 +02:00
(func $std/runtime/isPowerOf2 (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
2019-03-09 02:04:08 +01:00
(local $1 i32)
local.get $0
i32.const 0
i32.ne
local.tee $1
if (result i32)
local.get $0
local.get $0
i32.const 1
i32.sub
i32.and
i32.const 0
i32.eq
else
local.get $1
end
)
2019-04-02 16:18:44 +02:00
(func $~lib/allocator/tlsf/Root#set:tailRef (; 4 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
2019-03-09 02:04:08 +01:00
i32.const 0
local.get $1
i32.store offset=2912
)
2019-04-02 16:18:44 +02:00
(func $~lib/allocator/tlsf/Root#setSLMap (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
2019-03-09 02:04:08 +01:00
local.get $1
global.get $~lib/allocator/tlsf/FL_BITS
i32.lt_u
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 159
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $0
local.get $1
i32.const 4
i32.mul
i32.add
local.get $2
i32.store offset=4
)
2019-04-02 16:18:44 +02:00
(func $~lib/allocator/tlsf/Root#setHead (; 6 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
2019-03-09 02:04:08 +01:00
local.get $1
global.get $~lib/allocator/tlsf/FL_BITS
i32.lt_u
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 184
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $2
global.get $~lib/allocator/tlsf/SL_SIZE
i32.lt_u
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 185
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $0
local.get $1
global.get $~lib/allocator/tlsf/SL_SIZE
i32.mul
local.get $2
i32.add
i32.const 4
i32.mul
i32.add
local.get $3
i32.store offset=96
)
2019-04-02 16:18:44 +02:00
(func $~lib/allocator/tlsf/Root#get:tailRef (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
2019-03-09 02:04:08 +01:00
i32.const 0
i32.load offset=2912
)
2019-04-02 16:18:44 +02:00
(func $~lib/allocator/tlsf/Block#get:right (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
2019-03-09 02:04:08 +01:00
(local $1 i32)
local.get $0
i32.load
global.get $~lib/allocator/tlsf/TAGS
i32.const -1
i32.xor
i32.and
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 104
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $0
global.get $~lib/allocator/tlsf/Block.INFO
i32.add
local.get $0
i32.load
global.get $~lib/allocator/tlsf/TAGS
i32.const -1
i32.xor
i32.and
i32.add
local.tee $1
i32.eqz
if (result i32)
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 105
2019-03-09 02:04:08 +01:00
i32.const 11
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
else
local.get $1
end
)
2019-04-02 16:18:44 +02:00
(func $~lib/allocator/tlsf/fls<usize> (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
2019-03-09 02:04:08 +01:00
local.get $0
i32.const 0
i32.ne
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 447
2019-03-09 02:04:08 +01:00
i32.const 2
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
i32.const 31
local.get $0
i32.clz
i32.sub
)
2019-04-02 16:18:44 +02:00
(func $~lib/allocator/tlsf/Root#getHead (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
2019-03-09 02:04:08 +01:00
local.get $1
global.get $~lib/allocator/tlsf/FL_BITS
i32.lt_u
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 175
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $2
global.get $~lib/allocator/tlsf/SL_SIZE
i32.lt_u
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 176
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $0
local.get $1
global.get $~lib/allocator/tlsf/SL_SIZE
i32.mul
local.get $2
i32.add
i32.const 4
i32.mul
i32.add
i32.load offset=96
)
2019-04-02 16:18:44 +02:00
(func $~lib/allocator/tlsf/Root#getSLMap (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
2019-03-09 02:04:08 +01:00
local.get $1
global.get $~lib/allocator/tlsf/FL_BITS
i32.lt_u
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 153
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $0
local.get $1
i32.const 4
i32.mul
i32.add
i32.load offset=4
)
2019-04-02 16:18:44 +02:00
(func $~lib/allocator/tlsf/Root#remove (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
2019-03-09 02:04:08 +01:00
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
local.get $1
i32.load
local.set $2
local.get $2
global.get $~lib/allocator/tlsf/FREE
i32.and
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 277
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $2
global.get $~lib/allocator/tlsf/TAGS
i32.const -1
i32.xor
i32.and
local.set $3
local.get $3
global.get $~lib/allocator/tlsf/Block.MIN_SIZE
i32.ge_u
local.tee $4
if (result i32)
local.get $3
global.get $~lib/allocator/tlsf/Block.MAX_SIZE
i32.lt_u
else
local.get $4
end
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 279
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $3
global.get $~lib/allocator/tlsf/SB_SIZE
i32.lt_u
if
i32.const 0
local.set $5
local.get $3
i32.const 8
i32.div_u
local.set $6
else
local.get $3
call $~lib/allocator/tlsf/fls<usize>
local.set $5
local.get $3
local.get $5
global.get $~lib/allocator/tlsf/SL_BITS
i32.sub
i32.shr_u
i32.const 1
global.get $~lib/allocator/tlsf/SL_BITS
i32.shl
i32.xor
local.set $6
local.get $5
global.get $~lib/allocator/tlsf/SB_BITS
i32.const 1
i32.sub
i32.sub
local.set $5
end
local.get $1
i32.load offset=4
local.set $7
local.get $1
i32.load offset=8
local.set $8
local.get $7
if
local.get $7
local.get $8
i32.store offset=8
end
local.get $8
if
local.get $8
local.get $7
i32.store offset=4
end
local.get $1
local.get $0
local.get $5
local.get $6
call $~lib/allocator/tlsf/Root#getHead
i32.eq
if
local.get $0
local.get $5
local.get $6
local.get $8
call $~lib/allocator/tlsf/Root#setHead
local.get $8
i32.eqz
if
local.get $0
local.get $5
call $~lib/allocator/tlsf/Root#getSLMap
local.set $4
local.get $0
local.get $5
local.get $4
i32.const 1
local.get $6
i32.shl
i32.const -1
i32.xor
i32.and
local.tee $4
call $~lib/allocator/tlsf/Root#setSLMap
local.get $4
i32.eqz
if
local.get $0
local.get $0
i32.load
i32.const 1
local.get $5
i32.shl
i32.const -1
i32.xor
i32.and
i32.store
end
end
end
)
2019-04-02 16:18:44 +02:00
(func $~lib/allocator/tlsf/Block#get:left (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
2019-03-09 02:04:08 +01:00
(local $1 i32)
local.get $0
i32.load
global.get $~lib/allocator/tlsf/LEFT_FREE
i32.and
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 96
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $0
i32.const 4
i32.sub
i32.load
local.tee $1
i32.eqz
if (result i32)
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 97
2019-03-09 02:04:08 +01:00
i32.const 11
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
else
local.get $1
end
)
2019-04-02 16:18:44 +02:00
(func $~lib/allocator/tlsf/Root#setJump (; 14 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
2019-03-09 02:04:08 +01:00
local.get $1
i32.load
global.get $~lib/allocator/tlsf/FREE
i32.and
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 353
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $1
call $~lib/allocator/tlsf/Block#get:right
local.get $2
i32.eq
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 354
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $2
i32.load
global.get $~lib/allocator/tlsf/LEFT_FREE
i32.and
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 355
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $2
i32.const 4
i32.sub
local.get $1
i32.store
)
2019-04-02 16:18:44 +02:00
(func $~lib/allocator/tlsf/Root#insert (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
2019-03-09 02:04:08 +01:00
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(local $10 i32)
local.get $1
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 208
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $1
i32.load
local.set $2
local.get $2
global.get $~lib/allocator/tlsf/FREE
i32.and
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 210
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $1
i32.load
global.get $~lib/allocator/tlsf/TAGS
i32.const -1
i32.xor
i32.and
local.tee $3
global.get $~lib/allocator/tlsf/Block.MIN_SIZE
i32.ge_u
local.tee $4
if (result i32)
local.get $3
global.get $~lib/allocator/tlsf/Block.MAX_SIZE
i32.lt_u
else
local.get $4
end
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 212
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $1
call $~lib/allocator/tlsf/Block#get:right
local.tee $4
i32.eqz
if (result i32)
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 216
2019-03-09 02:04:08 +01:00
i32.const 23
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
else
local.get $4
end
local.set $5
local.get $5
i32.load
local.set $6
local.get $6
global.get $~lib/allocator/tlsf/FREE
i32.and
if
local.get $0
local.get $5
call $~lib/allocator/tlsf/Root#remove
local.get $1
local.get $2
global.get $~lib/allocator/tlsf/Block.INFO
local.get $6
global.get $~lib/allocator/tlsf/TAGS
i32.const -1
i32.xor
i32.and
i32.add
i32.add
local.tee $2
i32.store
local.get $1
call $~lib/allocator/tlsf/Block#get:right
local.set $5
local.get $5
i32.load
local.set $6
end
local.get $2
global.get $~lib/allocator/tlsf/LEFT_FREE
i32.and
if
local.get $1
call $~lib/allocator/tlsf/Block#get:left
local.tee $4
i32.eqz
if (result i32)
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 230
2019-03-09 02:04:08 +01:00
i32.const 24
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
else
local.get $4
end
local.set $4
local.get $4
i32.load
local.set $7
local.get $7
global.get $~lib/allocator/tlsf/FREE
i32.and
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 232
2019-03-09 02:04:08 +01:00
i32.const 6
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $0
local.get $4
call $~lib/allocator/tlsf/Root#remove
local.get $4
local.get $7
global.get $~lib/allocator/tlsf/Block.INFO
local.get $2
global.get $~lib/allocator/tlsf/TAGS
i32.const -1
i32.xor
i32.and
i32.add
i32.add
local.tee $7
i32.store
local.get $4
local.set $1
local.get $7
local.set $2
end
local.get $5
local.get $6
global.get $~lib/allocator/tlsf/LEFT_FREE
i32.or
i32.store
local.get $0
local.get $1
local.get $5
call $~lib/allocator/tlsf/Root#setJump
local.get $2
global.get $~lib/allocator/tlsf/TAGS
i32.const -1
i32.xor
i32.and
local.set $3
local.get $3
global.get $~lib/allocator/tlsf/Block.MIN_SIZE
i32.ge_u
local.tee $7
if (result i32)
local.get $3
global.get $~lib/allocator/tlsf/Block.MAX_SIZE
i32.lt_u
else
local.get $7
end
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 245
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $3
global.get $~lib/allocator/tlsf/SB_SIZE
i32.lt_u
if
i32.const 0
local.set $8
local.get $3
i32.const 8
i32.div_u
local.set $9
else
local.get $3
call $~lib/allocator/tlsf/fls<usize>
local.set $8
local.get $3
local.get $8
global.get $~lib/allocator/tlsf/SL_BITS
i32.sub
i32.shr_u
i32.const 1
global.get $~lib/allocator/tlsf/SL_BITS
i32.shl
i32.xor
local.set $9
local.get $8
global.get $~lib/allocator/tlsf/SB_BITS
i32.const 1
i32.sub
i32.sub
local.set $8
end
local.get $0
local.get $8
local.get $9
call $~lib/allocator/tlsf/Root#getHead
local.set $10
local.get $1
i32.const 0
i32.store offset=4
local.get $1
local.get $10
i32.store offset=8
local.get $10
if
local.get $10
local.get $1
i32.store offset=4
end
local.get $0
local.get $8
local.get $9
local.get $1
call $~lib/allocator/tlsf/Root#setHead
local.get $0
local.get $0
i32.load
i32.const 1
local.get $8
i32.shl
i32.or
i32.store
local.get $0
local.get $8
local.get $0
local.get $8
call $~lib/allocator/tlsf/Root#getSLMap
i32.const 1
local.get $9
i32.shl
i32.or
call $~lib/allocator/tlsf/Root#setSLMap
)
2019-04-02 16:18:44 +02:00
(func $~lib/allocator/tlsf/Root#addMemory (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
2019-03-09 02:04:08 +01:00
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
(local $8 i32)
local.get $1
local.get $2
i32.le_u
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 396
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $1
i32.const 7
i32.and
i32.eqz
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 397
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $2
i32.const 7
i32.and
i32.eqz
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 398
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $0
call $~lib/allocator/tlsf/Root#get:tailRef
local.set $3
i32.const 0
local.set $4
local.get $3
if
local.get $1
local.get $3
i32.const 4
i32.add
i32.ge_u
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 403
2019-03-09 02:04:08 +01:00
i32.const 6
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $1
global.get $~lib/allocator/tlsf/Block.INFO
i32.sub
local.get $3
i32.eq
if
local.get $1
global.get $~lib/allocator/tlsf/Block.INFO
i32.sub
local.set $1
local.get $3
i32.load
local.set $4
end
else
local.get $1
local.get $0
global.get $~lib/allocator/tlsf/Root.SIZE
i32.add
i32.ge_u
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 412
2019-03-09 02:04:08 +01:00
i32.const 6
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
end
local.get $2
local.get $1
i32.sub
local.set $5
local.get $5
global.get $~lib/allocator/tlsf/Block.INFO
global.get $~lib/allocator/tlsf/Block.MIN_SIZE
i32.add
global.get $~lib/allocator/tlsf/Block.INFO
i32.add
i32.lt_u
if
i32.const 0
return
end
local.get $5
i32.const 2
global.get $~lib/allocator/tlsf/Block.INFO
i32.mul
i32.sub
local.set $6
local.get $1
local.set $7
local.get $7
local.get $6
global.get $~lib/allocator/tlsf/FREE
i32.or
local.get $4
global.get $~lib/allocator/tlsf/LEFT_FREE
i32.and
i32.or
i32.store
local.get $7
i32.const 0
i32.store offset=4
local.get $7
i32.const 0
i32.store offset=8
local.get $1
local.get $5
i32.add
global.get $~lib/allocator/tlsf/Block.INFO
i32.sub
local.set $8
local.get $8
i32.const 0
global.get $~lib/allocator/tlsf/LEFT_FREE
i32.or
i32.store
local.get $0
local.get $8
call $~lib/allocator/tlsf/Root#set:tailRef
local.get $0
local.get $7
call $~lib/allocator/tlsf/Root#insert
i32.const 1
)
2019-04-02 16:18:44 +02:00
(func $~lib/allocator/tlsf/ffs<usize> (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
2019-03-09 02:04:08 +01:00
local.get $0
i32.const 0
i32.ne
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 441
2019-03-09 02:04:08 +01:00
i32.const 2
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $0
i32.ctz
)
2019-04-02 16:18:44 +02:00
(func $~lib/allocator/tlsf/ffs<u32> (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
2019-03-09 02:04:08 +01:00
local.get $0
i32.const 0
i32.ne
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 441
2019-03-09 02:04:08 +01:00
i32.const 2
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $0
i32.ctz
)
2019-04-02 16:18:44 +02:00
(func $~lib/allocator/tlsf/Root#search (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
2019-03-09 02:04:08 +01:00
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
local.get $1
global.get $~lib/allocator/tlsf/Block.MIN_SIZE
i32.ge_u
local.tee $2
if (result i32)
local.get $1
global.get $~lib/allocator/tlsf/Block.MAX_SIZE
i32.lt_u
else
local.get $2
end
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 315
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $1
global.get $~lib/allocator/tlsf/SB_SIZE
i32.lt_u
if
i32.const 0
local.set $3
local.get $1
i32.const 8
i32.div_u
local.set $4
else
local.get $1
call $~lib/allocator/tlsf/fls<usize>
local.set $3
local.get $1
local.get $3
global.get $~lib/allocator/tlsf/SL_BITS
i32.sub
i32.shr_u
i32.const 1
global.get $~lib/allocator/tlsf/SL_BITS
i32.shl
i32.xor
local.set $4
local.get $3
global.get $~lib/allocator/tlsf/SB_BITS
i32.const 1
i32.sub
i32.sub
local.set $3
local.get $4
global.get $~lib/allocator/tlsf/SL_SIZE
i32.const 1
i32.sub
i32.lt_u
if
local.get $4
i32.const 1
i32.add
local.set $4
else
local.get $3
i32.const 1
i32.add
local.set $3
i32.const 0
local.set $4
end
end
local.get $0
local.get $3
call $~lib/allocator/tlsf/Root#getSLMap
i32.const 0
i32.const -1
i32.xor
local.get $4
i32.shl
i32.and
local.set $5
local.get $5
i32.eqz
if
local.get $0
i32.load
i32.const 0
i32.const -1
i32.xor
local.get $3
i32.const 1
i32.add
i32.shl
i32.and
local.set $2
local.get $2
i32.eqz
if
i32.const 0
local.set $6
else
local.get $2
call $~lib/allocator/tlsf/ffs<usize>
local.set $3
local.get $0
local.get $3
call $~lib/allocator/tlsf/Root#getSLMap
local.tee $7
if (result i32)
local.get $7
else
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 342
2019-03-09 02:04:08 +01:00
i32.const 16
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.set $5
local.get $0
local.get $3
local.get $5
call $~lib/allocator/tlsf/ffs<u32>
call $~lib/allocator/tlsf/Root#getHead
local.set $6
end
else
local.get $0
local.get $3
local.get $5
call $~lib/allocator/tlsf/ffs<u32>
call $~lib/allocator/tlsf/Root#getHead
local.set $6
end
local.get $6
)
2019-04-02 16:18:44 +02:00
(func $~lib/allocator/tlsf/Root#use (; 20 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
2019-03-09 02:04:08 +01:00
(local $3 i32)
(local $4 i32)
(local $5 i32)
local.get $1
i32.load
local.set $3
local.get $3
global.get $~lib/allocator/tlsf/FREE
i32.and
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 367
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $2
global.get $~lib/allocator/tlsf/Block.MIN_SIZE
i32.ge_u
local.tee $4
if (result i32)
local.get $2
global.get $~lib/allocator/tlsf/Block.MAX_SIZE
i32.lt_u
else
local.get $4
end
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 368
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $2
i32.const 7
i32.and
i32.eqz
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 369
2019-03-09 02:04:08 +01:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $0
local.get $1
call $~lib/allocator/tlsf/Root#remove
local.get $3
global.get $~lib/allocator/tlsf/TAGS
i32.const -1
i32.xor
i32.and
local.get $2
i32.sub
local.set $5
local.get $5
global.get $~lib/allocator/tlsf/Block.INFO
global.get $~lib/allocator/tlsf/Block.MIN_SIZE
i32.add
i32.ge_u
if
local.get $1
local.get $2
local.get $3
global.get $~lib/allocator/tlsf/LEFT_FREE
i32.and
i32.or
i32.store
local.get $1
global.get $~lib/allocator/tlsf/Block.INFO
i32.add
local.get $2
i32.add
local.set $4
local.get $4
local.get $5
global.get $~lib/allocator/tlsf/Block.INFO
i32.sub
global.get $~lib/allocator/tlsf/FREE
i32.or
i32.store
local.get $0
local.get $4
call $~lib/allocator/tlsf/Root#insert
else
local.get $1
local.get $3
global.get $~lib/allocator/tlsf/FREE
i32.const -1
i32.xor
i32.and
i32.store
local.get $1
call $~lib/allocator/tlsf/Block#get:right
local.tee $4
i32.eqz
if (result i32)
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 387
2019-03-09 02:04:08 +01:00
i32.const 25
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
else
local.get $4
end
local.set $4
local.get $4
local.get $4
i32.load
global.get $~lib/allocator/tlsf/LEFT_FREE
i32.const -1
i32.xor
i32.and
i32.store
end
local.get $1
global.get $~lib/allocator/tlsf/Block.INFO
i32.add
)
2019-04-02 16:18:44 +02:00
(func $~lib/allocator/tlsf/__mem_allocate (; 21 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
2019-03-09 02:04:08 +01:00
(local $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
(local $7 i32)
2019-03-27 17:21:52 +01:00
global.get $~lib/allocator/tlsf/ROOT
local.set $1
local.get $1
i32.eqz
if
global.get $~lib/memory/HEAP_BASE
i32.const 7
i32.add
i32.const 7
i32.const -1
i32.xor
i32.and
2019-03-09 02:04:08 +01:00
local.set $2
2019-03-27 17:21:52 +01:00
current_memory
local.set $3
2019-03-09 02:04:08 +01:00
local.get $2
2019-03-27 17:21:52 +01:00
global.get $~lib/allocator/tlsf/Root.SIZE
i32.add
i32.const 65535
i32.add
i32.const 65535
i32.const -1
i32.xor
i32.and
i32.const 16
i32.shr_u
local.set $4
local.get $4
local.get $3
i32.gt_s
local.tee $5
if (result i32)
2019-03-09 02:04:08 +01:00
local.get $4
local.get $3
2019-03-27 17:21:52 +01:00
i32.sub
grow_memory
2019-03-09 02:04:08 +01:00
i32.const 0
2019-03-27 17:21:52 +01:00
i32.lt_s
else
local.get $5
end
if
unreachable
end
local.get $2
local.tee $1
global.set $~lib/allocator/tlsf/ROOT
local.get $1
i32.const 0
call $~lib/allocator/tlsf/Root#set:tailRef
local.get $1
i32.const 0
i32.store
block $break|0
2019-03-09 02:04:08 +01:00
i32.const 0
2019-03-27 17:21:52 +01:00
local.set $5
loop $repeat|0
local.get $5
global.get $~lib/allocator/tlsf/FL_BITS
i32.lt_u
i32.eqz
br_if $break|0
block
local.get $1
local.get $5
i32.const 0
call $~lib/allocator/tlsf/Root#setSLMap
block $break|1
2019-03-09 02:04:08 +01:00
i32.const 0
2019-03-27 17:21:52 +01:00
local.set $6
loop $repeat|1
local.get $6
global.get $~lib/allocator/tlsf/SL_SIZE
i32.lt_u
i32.eqz
br_if $break|1
local.get $1
local.get $5
local.get $6
2019-03-09 02:04:08 +01:00
i32.const 0
2019-03-27 17:21:52 +01:00
call $~lib/allocator/tlsf/Root#setHead
local.get $6
i32.const 1
i32.add
local.set $6
br $repeat|1
2019-03-09 02:04:08 +01:00
unreachable
end
2019-03-27 17:21:52 +01:00
unreachable
2019-03-09 02:04:08 +01:00
end
end
2019-03-27 17:21:52 +01:00
local.get $5
i32.const 1
i32.add
local.set $5
br $repeat|0
2019-03-09 02:04:08 +01:00
unreachable
end
unreachable
end
local.get $1
2019-03-27 17:21:52 +01:00
local.get $2
global.get $~lib/allocator/tlsf/Root.SIZE
i32.add
2019-03-09 02:04:08 +01:00
i32.const 7
i32.add
i32.const 7
i32.const -1
i32.xor
i32.and
2019-03-27 17:21:52 +01:00
current_memory
i32.const 16
i32.shl
call $~lib/allocator/tlsf/Root#addMemory
drop
end
local.get $0
global.get $~lib/allocator/tlsf/Block.MAX_SIZE
i32.gt_u
if
unreachable
end
local.get $0
i32.const 7
i32.add
i32.const 7
i32.const -1
i32.xor
i32.and
local.tee $4
global.get $~lib/allocator/tlsf/Block.MIN_SIZE
local.tee $3
local.get $4
local.get $3
i32.gt_u
select
local.set $0
local.get $1
local.get $0
call $~lib/allocator/tlsf/Root#search
local.set $7
local.get $7
i32.eqz
if
current_memory
local.set $4
local.get $0
i32.const 65535
i32.add
i32.const 65535
i32.const -1
i32.xor
i32.and
i32.const 16
i32.shr_u
local.set $3
local.get $4
local.tee $2
local.get $3
2019-03-09 02:04:08 +01:00
local.tee $5
2019-03-27 17:21:52 +01:00
local.get $2
2019-03-09 02:04:08 +01:00
local.get $5
2019-03-27 17:21:52 +01:00
i32.gt_s
2019-03-09 02:04:08 +01:00
select
2019-03-27 17:21:52 +01:00
local.set $2
2019-03-09 02:04:08 +01:00
local.get $2
2019-03-27 17:21:52 +01:00
grow_memory
i32.const 0
i32.lt_s
2019-03-09 02:04:08 +01:00
if
local.get $3
grow_memory
i32.const 0
i32.lt_s
if
unreachable
end
end
2019-03-27 17:21:52 +01:00
current_memory
local.set $5
local.get $1
local.get $4
i32.const 16
i32.shl
2019-03-09 02:04:08 +01:00
local.get $5
2019-03-27 17:21:52 +01:00
i32.const 16
i32.shl
call $~lib/allocator/tlsf/Root#addMemory
drop
2019-03-09 02:04:08 +01:00
local.get $1
2019-03-27 17:21:52 +01:00
local.get $0
call $~lib/allocator/tlsf/Root#search
local.tee $6
2019-03-09 02:04:08 +01:00
i32.eqz
2019-03-27 17:21:52 +01:00
if (result i32)
2019-03-09 02:04:08 +01:00
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 502
2019-03-27 17:21:52 +01:00
i32.const 12
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
2019-03-27 17:21:52 +01:00
else
local.get $6
2019-03-09 02:04:08 +01:00
end
2019-03-27 17:21:52 +01:00
local.set $7
end
local.get $7
i32.load
global.get $~lib/allocator/tlsf/TAGS
i32.const -1
i32.xor
i32.and
local.get $0
i32.ge_u
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 505
2019-03-27 17:21:52 +01:00
i32.const 2
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-27 17:21:52 +01:00
unreachable
2019-03-09 02:04:08 +01:00
end
2019-03-27 17:21:52 +01:00
local.get $1
local.get $7
local.get $0
call $~lib/allocator/tlsf/Root#use
)
2019-04-02 16:18:44 +02:00
(func $~lib/memory/memory.allocate (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
2019-03-27 17:21:52 +01:00
local.get $0
call $~lib/allocator/tlsf/__mem_allocate
2019-03-14 04:33:58 +01:00
return
)
2019-04-05 01:59:01 +02:00
(func $~lib/util/runtime/allocate (; 23 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
2019-03-11 07:45:47 +01:00
(local $1 i32)
local.get $0
2019-04-03 21:47:38 +02:00
call $~lib/util/runtime/adjust
2019-03-14 04:33:58 +01:00
call $~lib/memory/memory.allocate
2019-03-11 07:45:47 +01:00
local.set $1
local.get $1
2019-04-02 10:12:57 +02:00
global.get $~lib/util/runtime/HEADER_MAGIC
2019-03-11 07:45:47 +01:00
i32.store
local.get $1
local.get $0
i32.store offset=4
local.get $1
i32.const 0
i32.store offset=8
local.get $1
i32.const 0
i32.store offset=12
local.get $1
2019-04-02 10:12:57 +02:00
global.get $~lib/util/runtime/HEADER_SIZE
2019-03-11 07:45:47 +01:00
i32.add
)
2019-04-04 02:25:22 +02:00
(func $~lib/memory/memory.copy (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
2019-03-14 12:46:36 +01:00
(local $3 i32)
2019-03-20 14:16:18 +01:00
(local $4 i32)
(local $5 i32)
2019-03-14 12:52:46 +01:00
block $~lib/util/memory/memmove|inlined.0
2019-03-14 12:46:36 +01:00
local.get $0
local.get $1
i32.eq
if
2019-03-14 12:52:46 +01:00
br $~lib/util/memory/memmove|inlined.0
end
2019-03-17 00:11:16 +01:00
local.get $0
local.get $1
2019-03-14 12:52:46 +01:00
i32.lt_u
if
2019-03-17 00:11:16 +01:00
local.get $1
2019-03-14 12:52:46 +01:00
i32.const 7
i32.and
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
i32.const 7
i32.and
i32.eq
if
block $break|0
loop $continue|0
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
i32.const 7
i32.and
if
block
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:52:46 +01:00
i32.eqz
if
br $~lib/util/memory/memmove|inlined.0
end
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:46:36 +01:00
i32.const 1
2019-03-14 12:52:46 +01:00
i32.sub
2019-03-17 00:11:16 +01:00
local.set $2
2019-03-14 12:52:46 +01:00
block (result i32)
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-20 14:16:18 +01:00
local.tee $5
2019-03-14 12:52:46 +01:00
i32.const 1
i32.add
2019-03-17 00:11:16 +01:00
local.set $0
2019-03-20 14:16:18 +01:00
local.get $5
2019-03-14 12:52:46 +01:00
end
block (result i32)
2019-03-17 00:11:16 +01:00
local.get $1
2019-03-20 14:16:18 +01:00
local.tee $5
2019-03-14 12:52:46 +01:00
i32.const 1
i32.add
2019-03-17 00:11:16 +01:00
local.set $1
2019-03-20 14:16:18 +01:00
local.get $5
2019-03-14 12:52:46 +01:00
end
i32.load8_u
i32.store8
2019-03-14 12:46:36 +01:00
end
2019-03-14 12:52:46 +01:00
br $continue|0
2019-03-14 12:46:36 +01:00
end
end
end
2019-03-14 12:52:46 +01:00
block $break|1
loop $continue|1
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:52:46 +01:00
i32.const 8
i32.ge_u
if
block
2019-03-17 00:11:16 +01:00
local.get $0
local.get $1
2019-03-14 12:52:46 +01:00
i64.load
i64.store
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:52:46 +01:00
i32.const 8
i32.sub
2019-03-17 00:11:16 +01:00
local.set $2
local.get $0
2019-03-14 12:52:46 +01:00
i32.const 8
i32.add
2019-03-17 00:11:16 +01:00
local.set $0
local.get $1
2019-03-14 12:52:46 +01:00
i32.const 8
i32.add
2019-03-17 00:11:16 +01:00
local.set $1
2019-03-14 12:52:46 +01:00
end
br $continue|1
2019-03-14 12:46:36 +01:00
end
end
end
end
2019-03-14 12:52:46 +01:00
block $break|2
loop $continue|2
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:46:36 +01:00
if
block
2019-03-14 12:52:46 +01:00
block (result i32)
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-20 14:16:18 +01:00
local.tee $5
2019-03-14 12:52:46 +01:00
i32.const 1
i32.add
2019-03-17 00:11:16 +01:00
local.set $0
2019-03-20 14:16:18 +01:00
local.get $5
2019-03-14 12:52:46 +01:00
end
block (result i32)
2019-03-17 00:11:16 +01:00
local.get $1
2019-03-20 14:16:18 +01:00
local.tee $5
2019-03-14 12:52:46 +01:00
i32.const 1
i32.add
2019-03-17 00:11:16 +01:00
local.set $1
2019-03-20 14:16:18 +01:00
local.get $5
2019-03-14 12:46:36 +01:00
end
i32.load8_u
i32.store8
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:52:46 +01:00
i32.const 1
i32.sub
2019-03-17 00:11:16 +01:00
local.set $2
2019-03-14 12:46:36 +01:00
end
2019-03-14 12:52:46 +01:00
br $continue|2
2019-03-14 12:46:36 +01:00
end
end
end
2019-03-14 12:52:46 +01:00
else
2019-03-17 00:11:16 +01:00
local.get $1
2019-03-14 12:52:46 +01:00
i32.const 7
i32.and
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
i32.const 7
i32.and
i32.eq
if
block $break|3
loop $continue|3
2019-03-17 00:11:16 +01:00
local.get $0
local.get $2
2019-03-14 12:52:46 +01:00
i32.add
i32.const 7
i32.and
if
block
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:52:46 +01:00
i32.eqz
if
br $~lib/util/memory/memmove|inlined.0
end
2019-03-17 00:11:16 +01:00
local.get $0
local.get $2
2019-03-14 12:52:46 +01:00
i32.const 1
i32.sub
2019-03-17 00:11:16 +01:00
local.tee $2
2019-03-14 12:52:46 +01:00
i32.add
2019-03-17 00:11:16 +01:00
local.get $1
local.get $2
2019-03-14 12:52:46 +01:00
i32.add
i32.load8_u
i32.store8
end
br $continue|3
2019-03-14 12:46:36 +01:00
end
end
end
2019-03-14 12:52:46 +01:00
block $break|4
loop $continue|4
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:52:46 +01:00
i32.const 8
i32.ge_u
if
block
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:52:46 +01:00
i32.const 8
i32.sub
2019-03-17 00:11:16 +01:00
local.set $2
local.get $0
local.get $2
2019-03-14 12:52:46 +01:00
i32.add
2019-03-17 00:11:16 +01:00
local.get $1
local.get $2
2019-03-14 12:52:46 +01:00
i32.add
i64.load
i64.store
end
br $continue|4
end
end
end
end
block $break|5
loop $continue|5
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:52:46 +01:00
if
2019-03-17 00:11:16 +01:00
local.get $0
local.get $2
2019-03-14 12:52:46 +01:00
i32.const 1
i32.sub
2019-03-17 00:11:16 +01:00
local.tee $2
2019-03-14 12:52:46 +01:00
i32.add
2019-03-17 00:11:16 +01:00
local.get $1
local.get $2
2019-03-14 12:52:46 +01:00
i32.add
i32.load8_u
i32.store8
br $continue|5
end
2019-03-09 02:04:08 +01:00
end
end
end
end
)
2019-04-04 02:25:22 +02:00
(func $~lib/memory/memory.fill (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
2019-03-14 12:52:46 +01:00
(local $3 i32)
(local $4 i32)
2019-03-20 14:16:18 +01:00
(local $5 i32)
(local $6 i64)
2019-03-14 12:52:46 +01:00
block $~lib/util/memory/memset|inlined.0
local.get $2
i32.eqz
if
br $~lib/util/memory/memset|inlined.0
end
2019-03-17 00:11:16 +01:00
local.get $0
local.get $1
2019-03-14 12:52:46 +01:00
i32.store8
2019-03-17 00:11:16 +01:00
local.get $0
local.get $2
2019-03-14 12:52:46 +01:00
i32.add
i32.const 1
i32.sub
2019-03-17 00:11:16 +01:00
local.get $1
2019-03-14 12:52:46 +01:00
i32.store8
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:52:46 +01:00
i32.const 2
i32.le_u
if
br $~lib/util/memory/memset|inlined.0
end
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
i32.const 1
i32.add
2019-03-17 00:11:16 +01:00
local.get $1
2019-03-14 12:52:46 +01:00
i32.store8
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
i32.const 2
i32.add
2019-03-17 00:11:16 +01:00
local.get $1
2019-03-14 12:52:46 +01:00
i32.store8
2019-03-17 00:11:16 +01:00
local.get $0
local.get $2
2019-03-14 12:52:46 +01:00
i32.add
i32.const 2
i32.sub
2019-03-17 00:11:16 +01:00
local.get $1
2019-03-14 12:52:46 +01:00
i32.store8
2019-03-17 00:11:16 +01:00
local.get $0
local.get $2
2019-03-14 12:52:46 +01:00
i32.add
i32.const 3
i32.sub
2019-03-17 00:11:16 +01:00
local.get $1
2019-03-14 12:52:46 +01:00
i32.store8
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:52:46 +01:00
i32.const 6
i32.le_u
if
br $~lib/util/memory/memset|inlined.0
end
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
i32.const 3
i32.add
2019-03-17 00:11:16 +01:00
local.get $1
2019-03-14 12:52:46 +01:00
i32.store8
2019-03-17 00:11:16 +01:00
local.get $0
local.get $2
2019-03-14 12:52:46 +01:00
i32.add
i32.const 4
i32.sub
2019-03-17 00:11:16 +01:00
local.get $1
2019-03-14 12:52:46 +01:00
i32.store8
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:52:46 +01:00
i32.const 8
i32.le_u
if
br $~lib/util/memory/memset|inlined.0
end
i32.const 0
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
i32.sub
i32.const 3
i32.and
2019-03-20 14:16:18 +01:00
local.set $5
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-20 14:16:18 +01:00
local.get $5
2019-03-14 12:52:46 +01:00
i32.add
2019-03-17 00:11:16 +01:00
local.set $0
local.get $2
2019-03-20 14:16:18 +01:00
local.get $5
2019-03-14 12:52:46 +01:00
i32.sub
2019-03-17 00:11:16 +01:00
local.set $2
local.get $2
2019-03-14 12:52:46 +01:00
i32.const -4
i32.and
2019-03-17 00:11:16 +01:00
local.set $2
2019-03-14 12:52:46 +01:00
i32.const -1
i32.const 255
i32.div_u
2019-03-17 00:11:16 +01:00
local.get $1
2019-03-14 12:52:46 +01:00
i32.const 255
i32.and
i32.mul
2019-03-17 00:11:16 +01:00
local.set $4
local.get $0
local.get $4
2019-03-14 12:52:46 +01:00
i32.store
2019-03-17 00:11:16 +01:00
local.get $0
local.get $2
2019-03-14 12:52:46 +01:00
i32.add
i32.const 4
i32.sub
2019-03-17 00:11:16 +01:00
local.get $4
2019-03-14 12:52:46 +01:00
i32.store
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:52:46 +01:00
i32.const 8
i32.le_u
if
br $~lib/util/memory/memset|inlined.0
end
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
i32.const 4
i32.add
2019-03-17 00:11:16 +01:00
local.get $4
2019-03-14 12:52:46 +01:00
i32.store
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
i32.const 8
i32.add
2019-03-17 00:11:16 +01:00
local.get $4
2019-03-14 12:52:46 +01:00
i32.store
2019-03-17 00:11:16 +01:00
local.get $0
local.get $2
2019-03-14 12:52:46 +01:00
i32.add
i32.const 12
i32.sub
2019-03-17 00:11:16 +01:00
local.get $4
2019-03-14 12:52:46 +01:00
i32.store
2019-03-17 00:11:16 +01:00
local.get $0
local.get $2
2019-03-14 12:52:46 +01:00
i32.add
i32.const 8
i32.sub
2019-03-17 00:11:16 +01:00
local.get $4
2019-03-14 12:52:46 +01:00
i32.store
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:52:46 +01:00
i32.const 24
i32.le_u
if
br $~lib/util/memory/memset|inlined.0
end
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
i32.const 12
i32.add
2019-03-17 00:11:16 +01:00
local.get $4
2019-03-14 12:52:46 +01:00
i32.store
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
i32.const 16
i32.add
2019-03-17 00:11:16 +01:00
local.get $4
2019-03-14 12:52:46 +01:00
i32.store
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
i32.const 20
i32.add
2019-03-17 00:11:16 +01:00
local.get $4
2019-03-14 12:52:46 +01:00
i32.store
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
i32.const 24
i32.add
2019-03-17 00:11:16 +01:00
local.get $4
2019-03-14 12:52:46 +01:00
i32.store
2019-03-17 00:11:16 +01:00
local.get $0
local.get $2
2019-03-14 12:52:46 +01:00
i32.add
i32.const 28
i32.sub
2019-03-17 00:11:16 +01:00
local.get $4
2019-03-14 12:52:46 +01:00
i32.store
2019-03-17 00:11:16 +01:00
local.get $0
local.get $2
2019-03-14 12:52:46 +01:00
i32.add
i32.const 24
i32.sub
2019-03-17 00:11:16 +01:00
local.get $4
2019-03-14 12:52:46 +01:00
i32.store
2019-03-17 00:11:16 +01:00
local.get $0
local.get $2
2019-03-14 12:52:46 +01:00
i32.add
i32.const 20
i32.sub
2019-03-17 00:11:16 +01:00
local.get $4
2019-03-14 12:52:46 +01:00
i32.store
2019-03-17 00:11:16 +01:00
local.get $0
local.get $2
2019-03-14 12:52:46 +01:00
i32.add
i32.const 16
i32.sub
2019-03-17 00:11:16 +01:00
local.get $4
2019-03-14 12:52:46 +01:00
i32.store
i32.const 24
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
i32.const 4
i32.and
i32.add
2019-03-20 14:16:18 +01:00
local.set $5
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-20 14:16:18 +01:00
local.get $5
2019-03-14 12:52:46 +01:00
i32.add
2019-03-17 00:11:16 +01:00
local.set $0
local.get $2
2019-03-20 14:16:18 +01:00
local.get $5
2019-03-14 12:52:46 +01:00
i32.sub
2019-03-17 00:11:16 +01:00
local.set $2
local.get $4
2019-03-14 12:52:46 +01:00
i64.extend_i32_u
2019-03-17 00:11:16 +01:00
local.get $4
2019-03-14 12:52:46 +01:00
i64.extend_i32_u
i64.const 32
i64.shl
i64.or
2019-03-20 14:16:18 +01:00
local.set $6
2019-03-14 12:52:46 +01:00
block $break|0
loop $continue|0
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:52:46 +01:00
i32.const 32
i32.ge_u
if
block
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-20 14:16:18 +01:00
local.get $6
2019-03-14 12:52:46 +01:00
i64.store
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
i32.const 8
i32.add
2019-03-20 14:16:18 +01:00
local.get $6
2019-03-14 12:52:46 +01:00
i64.store
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
i32.const 16
i32.add
2019-03-20 14:16:18 +01:00
local.get $6
2019-03-14 12:52:46 +01:00
i64.store
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
i32.const 24
i32.add
2019-03-20 14:16:18 +01:00
local.get $6
2019-03-17 00:11:16 +01:00
i64.store
local.get $2
2019-03-14 12:52:46 +01:00
i32.const 32
i32.sub
2019-03-17 00:11:16 +01:00
local.set $2
local.get $0
2019-03-14 12:52:46 +01:00
i32.const 32
i32.add
2019-03-17 00:11:16 +01:00
local.set $0
2019-03-14 12:52:46 +01:00
end
br $continue|0
end
end
end
end
2019-03-14 04:33:58 +01:00
)
2019-04-04 02:25:22 +02:00
(func $~lib/allocator/tlsf/__mem_free (; 26 ;) (type $FUNCSIG$vi) (param $0 i32)
2019-03-09 02:04:08 +01:00
(local $1 i32)
(local $2 i32)
(local $3 i32)
local.get $0
if
global.get $~lib/allocator/tlsf/ROOT
2019-03-27 17:21:52 +01:00
local.set $1
local.get $1
2019-03-09 02:04:08 +01:00
if
2019-03-27 17:21:52 +01:00
local.get $0
2019-03-09 02:04:08 +01:00
global.get $~lib/allocator/tlsf/Block.INFO
i32.sub
2019-03-27 17:21:52 +01:00
local.set $2
local.get $2
i32.load
2019-03-09 02:04:08 +01:00
local.set $3
local.get $3
global.get $~lib/allocator/tlsf/FREE
i32.and
i32.eqz
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 168
i32.const 518
2019-03-14 04:33:58 +01:00
i32.const 6
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
2019-03-27 17:21:52 +01:00
local.get $2
2019-03-09 02:04:08 +01:00
local.get $3
global.get $~lib/allocator/tlsf/FREE
i32.or
i32.store
local.get $1
2019-03-27 17:21:52 +01:00
local.get $0
2019-03-09 02:04:08 +01:00
global.get $~lib/allocator/tlsf/Block.INFO
i32.sub
call $~lib/allocator/tlsf/Root#insert
end
end
)
2019-04-04 02:25:22 +02:00
(func $~lib/memory/memory.free (; 27 ;) (type $FUNCSIG$vi) (param $0 i32)
2019-03-27 17:21:52 +01:00
local.get $0
call $~lib/allocator/tlsf/__mem_free
)
2019-04-04 02:25:22 +02:00
(func $std/runtime/__ref_register (; 28 ;) (type $FUNCSIG$vi) (param $0 i32)
2019-03-13 09:05:02 +01:00
local.get $0
global.set $std/runtime/register_ref
)
2019-04-04 02:25:22 +02:00
(func $~lib/util/runtime/reallocate (; 29 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
2019-03-09 02:04:08 +01:00
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
local.get $0
2019-04-02 10:12:57 +02:00
global.get $~lib/util/runtime/HEADER_SIZE
2019-03-09 02:04:08 +01:00
i32.sub
local.set $2
local.get $2
i32.load offset=4
local.set $3
local.get $3
local.get $1
i32.lt_u
if
local.get $1
2019-04-03 21:47:38 +02:00
call $~lib/util/runtime/adjust
2019-03-09 02:04:08 +01:00
local.set $4
local.get $3
2019-04-03 21:47:38 +02:00
call $~lib/util/runtime/adjust
2019-03-10 21:38:15 +01:00
i32.const 0
local.get $0
2019-03-14 04:33:58 +01:00
global.get $~lib/memory/HEAP_BASE
2019-03-10 21:38:15 +01:00
i32.gt_u
select
2019-03-09 02:04:08 +01:00
local.get $4
i32.lt_u
if
2019-03-10 21:38:15 +01:00
local.get $4
2019-03-14 04:33:58 +01:00
call $~lib/memory/memory.allocate
2019-03-09 02:04:08 +01:00
local.set $5
local.get $5
2019-03-14 12:46:36 +01:00
local.get $2
i32.load
2019-03-09 02:04:08 +01:00
i32.store
local.get $5
i32.const 0
i32.store offset=8
local.get $5
i32.const 0
i32.store offset=12
local.get $5
2019-04-02 10:12:57 +02:00
global.get $~lib/util/runtime/HEADER_SIZE
2019-03-09 02:04:08 +01:00
i32.add
local.set $6
2019-03-14 04:33:58 +01:00
local.get $6
local.get $0
local.get $3
call $~lib/memory/memory.copy
local.get $6
local.get $3
i32.add
i32.const 0
local.get $1
local.get $3
i32.sub
call $~lib/memory/memory.fill
2019-03-09 02:37:05 +01:00
local.get $2
i32.load
2019-04-02 10:12:57 +02:00
global.get $~lib/util/runtime/HEADER_MAGIC
2019-03-09 02:37:05 +01:00
i32.eq
if
2019-03-10 21:38:15 +01:00
local.get $0
2019-03-14 04:33:58 +01:00
global.get $~lib/memory/HEAP_BASE
2019-03-10 21:38:15 +01:00
i32.gt_u
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 232
2019-04-06 20:17:48 +02:00
i32.const 91
2019-04-04 02:25:22 +02:00
i32.const 8
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-10 21:38:15 +01:00
unreachable
2019-03-09 02:37:05 +01:00
end
2019-03-10 21:38:15 +01:00
local.get $2
2019-03-14 04:33:58 +01:00
call $~lib/memory/memory.free
2019-03-13 09:05:02 +01:00
else
local.get $0
2019-03-26 23:35:08 +01:00
call $std/runtime/__ref_register
2019-03-09 02:04:08 +01:00
end
local.get $5
local.set $2
local.get $6
local.set $0
else
local.get $0
local.get $3
i32.add
i32.const 0
local.get $1
local.get $3
i32.sub
2019-03-14 04:33:58 +01:00
call $~lib/memory/memory.fill
2019-03-09 02:04:08 +01:00
end
else
nop
end
local.get $2
local.get $1
i32.store offset=4
local.get $0
)
2019-04-05 01:59:01 +02:00
(func $~lib/util/runtime/discard (; 30 ;) (type $FUNCSIG$vi) (param $0 i32)
2019-03-26 23:35:08 +01:00
(local $1 i32)
2019-03-09 02:04:08 +01:00
local.get $0
2019-03-14 04:33:58 +01:00
global.get $~lib/memory/HEAP_BASE
2019-03-15 09:26:31 +01:00
i32.gt_u
2019-03-09 02:04:08 +01:00
i32.eqz
if
i32.const 0
2019-04-05 01:59:01 +02:00
i32.const 232
2019-04-06 20:17:48 +02:00
i32.const 117
2019-04-05 01:59:01 +02:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $0
2019-04-02 10:12:57 +02:00
global.get $~lib/util/runtime/HEADER_SIZE
2019-03-09 02:04:08 +01:00
i32.sub
2019-03-26 23:35:08 +01:00
local.set $1
local.get $1
2019-03-09 02:04:08 +01:00
i32.load
2019-04-02 10:12:57 +02:00
global.get $~lib/util/runtime/HEADER_MAGIC
2019-03-09 02:04:08 +01:00
i32.eq
i32.eqz
if
i32.const 0
2019-04-05 01:59:01 +02:00
i32.const 232
2019-04-06 20:17:48 +02:00
i32.const 119
2019-04-05 01:59:01 +02:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
2019-03-26 23:35:08 +01:00
local.get $1
2019-03-14 04:33:58 +01:00
call $~lib/memory/memory.free
2019-03-09 02:04:08 +01:00
)
2019-04-05 01:59:01 +02:00
(func $~lib/util/runtime/register (; 31 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
2019-03-26 23:35:08 +01:00
(local $2 i32)
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-26 23:35:08 +01:00
global.get $~lib/memory/HEAP_BASE
i32.gt_u
i32.eqz
if
i32.const 0
2019-04-05 01:59:01 +02:00
i32.const 232
2019-04-06 20:17:48 +02:00
i32.const 131
2019-04-05 01:59:01 +02:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-26 23:35:08 +01:00
unreachable
end
2019-03-17 00:11:16 +01:00
local.get $0
2019-04-02 10:12:57 +02:00
global.get $~lib/util/runtime/HEADER_SIZE
2019-03-17 00:11:16 +01:00
i32.sub
2019-03-26 23:35:08 +01:00
local.set $2
local.get $2
i32.load
2019-04-02 10:12:57 +02:00
global.get $~lib/util/runtime/HEADER_MAGIC
2019-03-26 23:35:08 +01:00
i32.eq
i32.eqz
if
i32.const 0
2019-04-05 01:59:01 +02:00
i32.const 232
2019-04-06 20:17:48 +02:00
i32.const 133
2019-04-05 01:59:01 +02:00
i32.const 4
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-26 23:35:08 +01:00
unreachable
end
local.get $2
2019-03-17 00:11:16 +01:00
local.get $1
i32.store
local.get $0
2019-03-26 23:35:08 +01:00
call $std/runtime/__ref_register
2019-03-17 00:11:16 +01:00
local.get $0
)
2019-04-04 02:25:22 +02:00
(func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 32 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
2019-03-09 02:44:46 +01:00
local.get $0
2019-04-02 10:12:57 +02:00
global.get $~lib/util/runtime/HEADER_SIZE
2019-03-09 02:44:46 +01:00
i32.sub
i32.load offset=4
)
2019-04-04 02:25:22 +02:00
(func $~lib/string/String#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
2019-03-09 02:44:46 +01:00
local.get $0
2019-04-02 10:12:57 +02:00
global.get $~lib/util/runtime/HEADER_SIZE
2019-03-09 02:44:46 +01:00
i32.sub
i32.load offset=4
i32.const 1
i32.shr_u
)
2019-04-04 02:25:22 +02:00
(func $start:std/runtime (; 34 ;) (type $FUNCSIG$v)
2019-03-09 02:04:08 +01:00
(local $0 i32)
2019-04-06 20:17:48 +02:00
i32.const 17
i32.const 18
2019-03-09 02:04:08 +01:00
i32.ne
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 24
2019-04-05 01:59:01 +02:00
i32.const 44
2019-03-09 02:04:08 +01:00
i32.const 0
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
i32.const 0
2019-04-03 21:47:38 +02:00
call $~lib/util/runtime/adjust
2019-03-09 02:04:08 +01:00
i32.const 0
i32.gt_u
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 24
2019-04-05 01:59:01 +02:00
i32.const 50
2019-03-09 02:04:08 +01:00
i32.const 0
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
block $break|0
i32.const 0
local.set $0
loop $repeat|0
local.get $0
i32.const 9000
i32.lt_s
i32.eqz
br_if $break|0
local.get $0
2019-04-03 21:47:38 +02:00
call $~lib/util/runtime/adjust
2019-03-09 02:04:08 +01:00
call $std/runtime/isPowerOf2
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 24
2019-04-05 01:59:01 +02:00
i32.const 52
2019-03-09 02:04:08 +01:00
i32.const 2
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
local.get $0
i32.const 1
i32.add
local.set $0
br $repeat|0
unreachable
end
unreachable
end
i32.const 0
2019-04-03 21:47:38 +02:00
call $~lib/util/runtime/adjust
2019-03-09 02:04:08 +01:00
global.set $std/runtime/barrier1
global.get $std/runtime/barrier1
i32.const 1
i32.add
global.set $std/runtime/barrier2
block $break|1
loop $continue|1
global.get $std/runtime/barrier2
i32.const 1
i32.add
2019-04-03 21:47:38 +02:00
call $~lib/util/runtime/adjust
2019-03-09 02:04:08 +01:00
global.get $std/runtime/barrier2
2019-04-03 21:47:38 +02:00
call $~lib/util/runtime/adjust
2019-03-09 02:04:08 +01:00
i32.eq
if
global.get $std/runtime/barrier2
i32.const 1
i32.add
global.set $std/runtime/barrier2
br $continue|1
end
end
end
global.get $std/runtime/barrier2
i32.const 1
i32.add
global.set $std/runtime/barrier3
block $break|2
loop $continue|2
global.get $std/runtime/barrier3
i32.const 1
i32.add
2019-04-03 21:47:38 +02:00
call $~lib/util/runtime/adjust
2019-03-09 02:04:08 +01:00
global.get $std/runtime/barrier3
2019-04-03 21:47:38 +02:00
call $~lib/util/runtime/adjust
2019-03-09 02:04:08 +01:00
i32.eq
if
global.get $std/runtime/barrier3
i32.const 1
i32.add
global.set $std/runtime/barrier3
br $continue|2
end
end
end
2019-03-31 21:58:42 +02:00
i32.const 72
2019-03-09 02:04:08 +01:00
i32.const 1
global.get $std/runtime/barrier1
f64.convert_i32_u
f64.const 0
f64.const 0
f64.const 0
f64.const 0
2019-04-06 20:17:48 +02:00
call $~lib/builtins/trace
2019-03-31 21:58:42 +02:00
i32.const 104
2019-03-09 02:04:08 +01:00
i32.const 1
global.get $std/runtime/barrier2
f64.convert_i32_u
f64.const 0
f64.const 0
f64.const 0
f64.const 0
2019-04-06 20:17:48 +02:00
call $~lib/builtins/trace
2019-03-31 21:58:42 +02:00
i32.const 136
2019-03-09 02:04:08 +01:00
i32.const 1
global.get $std/runtime/barrier3
f64.convert_i32_u
f64.const 0
f64.const 0
f64.const 0
f64.const 0
2019-04-06 20:17:48 +02:00
call $~lib/builtins/trace
2019-04-01 22:23:11 +02:00
i32.const 1
2019-04-05 01:59:01 +02:00
call $~lib/util/runtime/allocate
2019-03-09 02:04:08 +01:00
global.set $std/runtime/ref1
global.get $std/runtime/ref1
2019-04-02 10:12:57 +02:00
global.get $~lib/util/runtime/HEADER_SIZE
2019-03-09 02:04:08 +01:00
i32.sub
global.set $std/runtime/header1
global.get $std/runtime/header1
i32.load
2019-04-02 10:12:57 +02:00
global.get $~lib/util/runtime/HEADER_MAGIC
2019-03-09 02:04:08 +01:00
i32.eq
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 24
2019-04-05 01:59:01 +02:00
i32.const 67
2019-03-09 02:04:08 +01:00
i32.const 0
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
global.get $std/runtime/header1
i32.load offset=4
i32.const 1
i32.eq
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 24
2019-04-05 01:59:01 +02:00
i32.const 68
2019-03-09 02:04:08 +01:00
i32.const 0
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
global.get $std/runtime/ref1
2019-04-01 22:23:11 +02:00
global.get $std/runtime/ref1
global.get $std/runtime/barrier1
2019-04-04 02:25:22 +02:00
call $~lib/util/runtime/reallocate
2019-03-09 02:04:08 +01:00
i32.eq
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 24
2019-04-05 01:59:01 +02:00
i32.const 69
2019-03-09 02:04:08 +01:00
i32.const 0
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
global.get $std/runtime/header1
i32.load offset=4
global.get $std/runtime/barrier1
i32.eq
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 24
2019-04-05 01:59:01 +02:00
i32.const 70
2019-03-09 02:04:08 +01:00
i32.const 0
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
2019-04-01 22:23:11 +02:00
global.get $std/runtime/ref1
global.get $std/runtime/barrier2
2019-04-04 02:25:22 +02:00
call $~lib/util/runtime/reallocate
2019-03-09 02:04:08 +01:00
global.set $std/runtime/ref2
global.get $std/runtime/ref1
global.get $std/runtime/ref2
i32.ne
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 24
2019-04-05 01:59:01 +02:00
i32.const 72
2019-03-09 02:04:08 +01:00
i32.const 0
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
global.get $std/runtime/ref2
2019-04-02 10:12:57 +02:00
global.get $~lib/util/runtime/HEADER_SIZE
2019-03-09 02:04:08 +01:00
i32.sub
global.set $std/runtime/header2
global.get $std/runtime/header2
i32.load offset=4
global.get $std/runtime/barrier2
i32.eq
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 24
2019-04-05 01:59:01 +02:00
i32.const 74
2019-03-09 02:04:08 +01:00
i32.const 0
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
2019-04-01 22:23:11 +02:00
global.get $std/runtime/ref2
2019-04-05 01:59:01 +02:00
call $~lib/util/runtime/discard
2019-04-01 22:23:11 +02:00
global.get $std/runtime/barrier2
2019-04-05 01:59:01 +02:00
call $~lib/util/runtime/allocate
2019-03-09 02:04:08 +01:00
global.set $std/runtime/ref3
global.get $std/runtime/ref1
global.get $std/runtime/ref3
i32.eq
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 24
2019-04-05 01:59:01 +02:00
i32.const 77
2019-03-09 02:04:08 +01:00
i32.const 0
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
2019-04-01 22:23:11 +02:00
global.get $std/runtime/barrier1
2019-04-05 01:59:01 +02:00
call $~lib/util/runtime/allocate
2019-03-09 02:04:08 +01:00
global.set $std/runtime/ref4
2019-04-01 22:23:11 +02:00
global.get $std/runtime/ref4
2019-04-06 20:17:48 +02:00
i32.const 17
2019-04-05 01:59:01 +02:00
call $~lib/util/runtime/register
2019-03-10 21:38:15 +01:00
drop
2019-03-09 02:37:05 +01:00
global.get $std/runtime/register_ref
2019-03-09 02:04:08 +01:00
global.get $std/runtime/ref4
2019-03-09 02:37:05 +01:00
i32.eq
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 24
2019-04-05 01:59:01 +02:00
i32.const 81
2019-03-09 02:37:05 +01:00
i32.const 0
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:37:05 +01:00
unreachable
end
global.get $std/runtime/register_ref
2019-04-02 10:12:57 +02:00
global.get $~lib/util/runtime/HEADER_SIZE
2019-03-09 02:37:05 +01:00
i32.sub
global.set $std/runtime/header4
global.get $std/runtime/header4
i32.load
2019-04-06 20:17:48 +02:00
i32.const 17
2019-03-09 02:37:05 +01:00
i32.eq
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 24
2019-04-05 01:59:01 +02:00
i32.const 83
2019-03-09 02:37:05 +01:00
i32.const 0
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:37:05 +01:00
unreachable
end
global.get $std/runtime/header4
i32.load offset=4
global.get $std/runtime/barrier1
i32.eq
2019-03-09 02:04:08 +01:00
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 24
2019-04-05 01:59:01 +02:00
i32.const 84
2019-03-09 02:44:46 +01:00
i32.const 0
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:44:46 +01:00
unreachable
end
2019-04-01 22:23:11 +02:00
i32.const 10
2019-04-05 01:59:01 +02:00
call $~lib/util/runtime/allocate
2019-03-09 02:44:46 +01:00
global.set $std/runtime/ref5
global.get $std/runtime/ref5
2019-03-14 04:33:58 +01:00
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
2019-03-09 02:44:46 +01:00
i32.const 10
i32.eq
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 24
2019-04-05 01:59:01 +02:00
i32.const 87
2019-03-09 02:44:46 +01:00
i32.const 0
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:44:46 +01:00
unreachable
end
global.get $std/runtime/ref5
2019-03-14 04:33:58 +01:00
call $~lib/string/String#get:length
2019-03-09 02:44:46 +01:00
i32.const 5
i32.eq
i32.eqz
if
i32.const 0
2019-03-31 21:58:42 +02:00
i32.const 24
2019-04-05 01:59:01 +02:00
i32.const 88
2019-03-09 02:04:08 +01:00
i32.const 0
2019-04-06 20:17:48 +02:00
call $~lib/builtins/abort
2019-03-09 02:04:08 +01:00
unreachable
end
)
2019-04-04 02:25:22 +02:00
(func $std/runtime/main (; 35 ;) (type $FUNCSIG$v)
2019-03-27 14:43:35 +01:00
global.get $~lib/started
i32.eqz
if
call $start
i32.const 1
global.set $~lib/started
end
)
2019-04-04 02:25:22 +02:00
(func $start (; 36 ;) (type $FUNCSIG$v)
2019-03-09 02:04:08 +01:00
call $start:std/runtime
)
2019-04-04 02:25:22 +02:00
(func $null (; 37 ;) (type $FUNCSIG$v)
2019-03-09 02:04:08 +01:00
)
)