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

3019 lines
49 KiB
Plaintext
Raw Normal View History

2019-03-09 02:04:08 +01:00
(module
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
(type $FUNCSIG$v (func))
(type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$viiddddd (func (param i32 i32 f64 f64 f64 f64 f64)))
(type $FUNCSIG$vii (func (param i32 i32)))
(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)))
(type $FUNCSIG$vi (func (param i32)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64)))
(memory $0 1)
2019-03-17 00:11:16 +01:00
(data (i32.const 8) "\01\00\00\00,")
(data (i32.const 24) "~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s")
(data (i32.const 72) "\01\00\00\00\1c")
(data (i32.const 88) "s\00t\00d\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s")
(data (i32.const 120) "\01\00\00\00\10")
(data (i32.const 136) "b\00a\00r\00r\00i\00e\00r\001")
(data (i32.const 152) "\01\00\00\00\10")
(data (i32.const 168) "b\00a\00r\00r\00i\00e\00r\002")
(data (i32.const 184) "\01\00\00\00\10")
(data (i32.const 200) "b\00a\00r\00r\00i\00e\00r\003")
(data (i32.const 216) "\01\00\00\00\1e")
(data (i32.const 232) "~\00l\00i\00b\00/\00r\00u\00n\00t\00i\00m\00e\00.\00t\00s")
2019-03-09 02:04:08 +01:00
(table $0 1 funcref)
2019-03-14 04:33:58 +01:00
(elem (i32.const 0) $null)
2019-03-09 02:04:08 +01:00
(global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0))
2019-03-09 02:37:05 +01:00
(global $std/runtime/register_ref (mut i32) (i32.const 0))
2019-03-09 02:04:08 +01: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 $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))
(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))
(global $~lib/capabilities i32 (i32.const 2))
2019-03-09 02:04:08 +01:00
(export "memory" (memory $0))
(export "table" (table $0))
(export ".capabilities" (global $~lib/capabilities))
2019-03-09 02:04:08 +01:00
(start $start)
(func $~lib/allocator/tlsf/Root#setSLMap (; 2 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
local.get $1
i32.const 22
i32.ge_u
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 130
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $1
i32.const 2
i32.shl
local.get $0
i32.add
local.get $2
i32.store offset=4
)
(func $~lib/allocator/tlsf/Root#setHead (; 3 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
local.get $1
i32.const 22
i32.ge_u
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 153
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $2
i32.const 32
i32.ge_u
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 154
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $1
i32.const 5
i32.shl
local.get $2
i32.add
i32.const 2
i32.shl
local.get $0
i32.add
local.get $3
i32.store offset=96
)
(func $~lib/allocator/tlsf/Block#get:right (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.load
i32.const -4
i32.and
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 76
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $0
i32.const 8
i32.add
local.get $0
i32.load
i32.const -4
i32.and
i32.add
local.tee $0
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 77
2019-03-09 02:04:08 +01:00
i32.const 11
call $~lib/env/abort
unreachable
end
local.get $0
)
(func $~lib/allocator/tlsf/fls<usize> (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 414
2019-03-09 02:04:08 +01:00
i32.const 2
call $~lib/env/abort
unreachable
end
i32.const 31
local.get $0
i32.clz
i32.sub
)
(func $~lib/allocator/tlsf/Root#getHead (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
local.get $1
i32.const 22
i32.ge_u
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 144
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $2
i32.const 32
i32.ge_u
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 145
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $1
i32.const 5
i32.shl
local.get $2
i32.add
i32.const 2
i32.shl
local.get $0
i32.add
i32.load offset=96
)
(func $~lib/allocator/tlsf/Root#getSLMap (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
local.get $1
i32.const 22
i32.ge_u
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 124
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $1
i32.const 2
i32.shl
local.get $0
i32.add
i32.load offset=4
)
(func $~lib/allocator/tlsf/Root#remove (; 8 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
local.get $1
i32.load
local.tee $2
i32.const 1
i32.and
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 244
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $2
i32.const -4
i32.and
local.tee $3
i32.const 16
i32.ge_u
local.tee $2
if
local.get $3
i32.const 1073741824
i32.lt_u
local.set $2
end
local.get $2
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 246
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $3
i32.const 256
i32.lt_u
if (result i32)
local.get $3
i32.const 8
i32.div_u
local.set $3
i32.const 0
else
local.get $3
local.get $3
call $~lib/allocator/tlsf/fls<usize>
local.tee $4
i32.const 5
i32.sub
i32.shr_u
i32.const 32
i32.xor
local.set $3
local.get $4
i32.const 7
i32.sub
end
local.set $4
local.get $1
i32.load offset=8
local.set $2
local.get $1
i32.load offset=4
local.tee $5
if
local.get $5
local.get $2
i32.store offset=8
end
local.get $2
if
local.get $2
local.get $5
i32.store offset=4
end
local.get $0
local.get $4
local.get $3
call $~lib/allocator/tlsf/Root#getHead
local.get $1
i32.eq
if
local.get $0
local.get $4
local.get $3
local.get $2
call $~lib/allocator/tlsf/Root#setHead
local.get $2
i32.eqz
if
local.get $0
local.get $4
local.get $0
local.get $4
call $~lib/allocator/tlsf/Root#getSLMap
i32.const 1
local.get $3
i32.shl
i32.const -1
i32.xor
i32.and
local.tee $2
call $~lib/allocator/tlsf/Root#setSLMap
local.get $2
i32.eqz
if
local.get $0
local.get $0
i32.load
i32.const 1
local.get $4
i32.shl
i32.const -1
i32.xor
i32.and
i32.store
end
end
end
)
(func $~lib/allocator/tlsf/Block#get:left (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.load
i32.const 2
i32.and
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 68
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $0
i32.const 4
i32.sub
i32.load
local.tee $0
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 69
2019-03-09 02:04:08 +01:00
i32.const 11
call $~lib/env/abort
unreachable
end
local.get $0
)
(func $~lib/allocator/tlsf/Root#setJump (; 10 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
local.get $0
i32.load
i32.const 1
i32.and
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 320
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $0
call $~lib/allocator/tlsf/Block#get:right
local.get $1
i32.ne
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 321
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $1
i32.load
i32.const 2
i32.and
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 322
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $1
i32.const 4
i32.sub
local.get $0
i32.store
)
(func $~lib/allocator/tlsf/Root#insert (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
(local $2 i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
local.get $1
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 175
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $1
i32.load
local.tee $5
i32.const 1
i32.and
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 177
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $1
i32.load
i32.const -4
i32.and
local.tee $3
i32.const 16
i32.ge_u
local.tee $2
if
local.get $3
i32.const 1073741824
i32.lt_u
local.set $2
end
local.get $2
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 179
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $1
call $~lib/allocator/tlsf/Block#get:right
local.tee $2
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 183
2019-03-09 02:04:08 +01:00
i32.const 23
call $~lib/env/abort
unreachable
end
local.get $2
local.tee $3
i32.load
local.tee $6
i32.const 1
i32.and
if
local.get $0
local.get $3
call $~lib/allocator/tlsf/Root#remove
local.get $1
local.get $6
i32.const -4
i32.and
i32.const 8
i32.add
local.get $5
i32.add
local.tee $5
i32.store
local.get $1
call $~lib/allocator/tlsf/Block#get:right
local.tee $3
i32.load
local.set $6
end
local.get $5
i32.const 2
i32.and
if
local.get $1
call $~lib/allocator/tlsf/Block#get:left
local.tee $2
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 197
2019-03-09 02:04:08 +01:00
i32.const 24
call $~lib/env/abort
unreachable
end
local.get $2
i32.load
local.tee $4
i32.const 1
i32.and
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 199
2019-03-09 02:04:08 +01:00
i32.const 6
call $~lib/env/abort
unreachable
end
local.get $0
local.get $2
call $~lib/allocator/tlsf/Root#remove
local.get $2
local.get $5
i32.const -4
i32.and
i32.const 8
i32.add
local.get $4
i32.add
local.tee $4
i32.store
local.get $4
local.set $5
local.get $2
local.set $1
end
local.get $3
local.get $6
i32.const 2
i32.or
i32.store
local.get $1
local.get $3
call $~lib/allocator/tlsf/Root#setJump
local.get $5
i32.const -4
i32.and
local.tee $3
i32.const 16
i32.ge_u
local.tee $4
if
local.get $3
i32.const 1073741824
i32.lt_u
local.set $4
end
local.get $4
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 212
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $0
local.get $3
i32.const 256
i32.lt_u
if (result i32)
local.get $3
i32.const 8
i32.div_u
local.set $4
i32.const 0
else
local.get $3
local.get $3
call $~lib/allocator/tlsf/fls<usize>
local.tee $2
i32.const 5
i32.sub
i32.shr_u
i32.const 32
i32.xor
local.set $4
local.get $2
i32.const 7
i32.sub
end
local.tee $2
local.get $4
call $~lib/allocator/tlsf/Root#getHead
local.set $5
local.get $1
i32.const 0
i32.store offset=4
local.get $1
local.get $5
i32.store offset=8
local.get $5
if
local.get $5
local.get $1
i32.store offset=4
end
local.get $0
local.get $2
local.get $4
local.get $1
call $~lib/allocator/tlsf/Root#setHead
local.get $0
local.get $0
i32.load
i32.const 1
local.get $2
i32.shl
i32.or
i32.store
local.get $0
local.get $2
local.get $0
local.get $2
call $~lib/allocator/tlsf/Root#getSLMap
i32.const 1
local.get $4
i32.shl
i32.or
call $~lib/allocator/tlsf/Root#setSLMap
)
(func $~lib/allocator/tlsf/Root#addMemory (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
(local $3 i32)
(local $4 i32)
local.get $1
local.get $2
i32.gt_u
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 363
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $1
i32.const 7
i32.and
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 364
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $2
i32.const 7
i32.and
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 365
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
i32.const 2912
i32.load
local.tee $3
if
local.get $1
local.get $3
i32.const 4
i32.add
i32.lt_u
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 370
2019-03-09 02:04:08 +01:00
i32.const 6
call $~lib/env/abort
unreachable
end
local.get $1
i32.const 8
i32.sub
local.get $3
i32.eq
if
local.get $3
i32.load
local.set $4
local.get $1
i32.const 8
i32.sub
local.set $1
end
else
local.get $1
local.get $0
i32.const 2916
i32.add
i32.lt_u
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 379
2019-03-09 02:04:08 +01:00
i32.const 6
call $~lib/env/abort
unreachable
end
end
local.get $2
local.get $1
i32.sub
local.tee $2
i32.const 32
i32.lt_u
if
return
end
local.get $1
local.get $4
i32.const 2
i32.and
local.get $2
i32.const 16
i32.sub
i32.const 1
i32.or
i32.or
i32.store
local.get $1
i32.const 0
i32.store offset=4
local.get $1
i32.const 0
i32.store offset=8
local.get $1
local.get $2
i32.add
i32.const 8
i32.sub
local.tee $2
i32.const 2
i32.store
i32.const 2912
local.get $2
i32.store
local.get $0
local.get $1
call $~lib/allocator/tlsf/Root#insert
)
(func $~lib/allocator/tlsf/ffs<usize> (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
local.get $0
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 408
2019-03-09 02:04:08 +01:00
i32.const 2
call $~lib/env/abort
unreachable
end
local.get $0
i32.ctz
)
(func $~lib/allocator/tlsf/Root#search (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
(local $2 i32)
local.get $1
i32.const 16
i32.ge_u
local.tee $2
if
local.get $1
i32.const 1073741824
i32.lt_u
local.set $2
end
local.get $2
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 282
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $1
i32.const 256
i32.lt_u
if (result i32)
i32.const 0
local.set $2
local.get $1
i32.const 8
i32.div_u
else
local.get $1
local.get $1
call $~lib/allocator/tlsf/fls<usize>
local.tee $2
i32.const 5
i32.sub
i32.shr_u
i32.const 32
i32.xor
local.set $1
local.get $2
i32.const 7
i32.sub
local.set $2
local.get $1
i32.const 31
i32.lt_u
if (result i32)
local.get $1
i32.const 1
i32.add
else
local.get $2
i32.const 1
i32.add
local.set $2
i32.const 0
end
end
local.set $1
local.get $0
local.get $2
call $~lib/allocator/tlsf/Root#getSLMap
i32.const -1
local.get $1
i32.shl
i32.and
local.tee $1
if (result i32)
local.get $0
local.get $2
local.get $1
call $~lib/allocator/tlsf/ffs<usize>
call $~lib/allocator/tlsf/Root#getHead
else
local.get $0
i32.load
i32.const -1
local.get $2
i32.const 1
i32.add
i32.shl
i32.and
local.tee $2
if (result i32)
local.get $0
local.get $2
call $~lib/allocator/tlsf/ffs<usize>
local.tee $2
call $~lib/allocator/tlsf/Root#getSLMap
local.tee $1
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 309
2019-03-09 02:04:08 +01:00
i32.const 16
call $~lib/env/abort
unreachable
end
local.get $0
local.get $2
local.get $1
call $~lib/allocator/tlsf/ffs<usize>
call $~lib/allocator/tlsf/Root#getHead
else
i32.const 0
end
end
)
(func $~lib/allocator/tlsf/Root#use (; 15 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
(local $3 i32)
(local $4 i32)
(local $5 i32)
local.get $1
i32.load
local.tee $4
i32.const 1
i32.and
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 334
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $2
i32.const 16
i32.ge_u
local.tee $3
if
local.get $2
i32.const 1073741824
i32.lt_u
local.set $3
end
local.get $3
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 335
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $2
i32.const 7
i32.and
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 336
2019-03-09 02:04:08 +01:00
i32.const 4
call $~lib/env/abort
unreachable
end
local.get $0
local.get $1
call $~lib/allocator/tlsf/Root#remove
local.get $4
i32.const -4
i32.and
local.get $2
i32.sub
local.tee $5
i32.const 24
i32.ge_u
if
local.get $1
local.get $4
i32.const 2
i32.and
local.get $2
i32.or
i32.store
local.get $1
i32.const 8
i32.add
local.get $2
i32.add
local.tee $3
local.get $5
i32.const 8
i32.sub
i32.const 1
i32.or
i32.store
local.get $0
local.get $3
call $~lib/allocator/tlsf/Root#insert
else
local.get $1
local.get $4
i32.const -2
i32.and
i32.store
local.get $1
call $~lib/allocator/tlsf/Block#get:right
local.tee $3
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 354
2019-03-09 02:04:08 +01:00
i32.const 25
call $~lib/env/abort
unreachable
end
local.get $3
local.get $3
i32.load
i32.const -3
i32.and
i32.store
end
local.get $1
i32.const 8
i32.add
)
2019-03-14 12:52:46 +01:00
(func $~lib/memory/memory.allocate (; 16 ;) (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)
2019-03-14 12:52:46 +01:00
local.get $0
local.set $2
2019-03-09 02:04:08 +01:00
global.get $~lib/allocator/tlsf/ROOT
local.tee $3
i32.eqz
if
i32.const 1
current_memory
local.tee $1
2019-03-14 12:52:46 +01:00
i32.gt_s
local.tee $0
2019-03-09 02:04:08 +01:00
if (result i32)
i32.const 1
2019-03-14 12:52:46 +01:00
local.get $1
2019-03-09 02:04:08 +01:00
i32.sub
grow_memory
i32.const 0
i32.lt_s
else
2019-03-14 12:52:46 +01:00
local.get $0
2019-03-09 02:04:08 +01:00
end
if
unreachable
end
2019-03-17 00:11:16 +01:00
i32.const 264
2019-03-09 02:04:08 +01:00
local.set $3
2019-03-17 00:11:16 +01:00
i32.const 264
2019-03-09 02:04:08 +01:00
global.set $~lib/allocator/tlsf/ROOT
i32.const 2912
i32.const 0
i32.store
2019-03-17 00:11:16 +01:00
i32.const 264
2019-03-09 02:04:08 +01:00
i32.const 0
i32.store
i32.const 0
2019-03-14 12:52:46 +01:00
local.set $0
2019-03-09 02:04:08 +01:00
loop $repeat|0
2019-03-14 12:52:46 +01:00
local.get $0
2019-03-09 02:04:08 +01:00
i32.const 22
i32.lt_u
if
2019-03-17 00:11:16 +01:00
i32.const 264
2019-03-14 12:52:46 +01:00
local.get $0
2019-03-09 02:04:08 +01:00
i32.const 0
call $~lib/allocator/tlsf/Root#setSLMap
i32.const 0
2019-03-14 12:52:46 +01:00
local.set $1
2019-03-09 02:04:08 +01:00
loop $repeat|1
2019-03-14 12:52:46 +01:00
local.get $1
2019-03-09 02:04:08 +01:00
i32.const 32
i32.lt_u
if
2019-03-17 00:11:16 +01:00
i32.const 264
2019-03-14 12:52:46 +01:00
local.get $0
2019-03-09 02:04:08 +01:00
local.get $1
i32.const 0
call $~lib/allocator/tlsf/Root#setHead
2019-03-14 12:52:46 +01:00
local.get $1
2019-03-09 02:04:08 +01:00
i32.const 1
i32.add
2019-03-14 12:52:46 +01:00
local.set $1
2019-03-09 02:04:08 +01:00
br $repeat|1
end
end
2019-03-14 12:52:46 +01:00
local.get $0
2019-03-09 02:04:08 +01:00
i32.const 1
i32.add
2019-03-14 12:52:46 +01:00
local.set $0
2019-03-09 02:04:08 +01:00
br $repeat|0
end
end
2019-03-17 00:11:16 +01:00
i32.const 264
i32.const 3184
2019-03-09 02:04:08 +01:00
current_memory
i32.const 16
i32.shl
call $~lib/allocator/tlsf/Root#addMemory
end
2019-03-14 12:52:46 +01:00
local.get $2
2019-03-09 02:04:08 +01:00
i32.const 1073741824
i32.gt_u
if
unreachable
end
2019-03-14 12:52:46 +01:00
local.get $3
local.get $2
i32.const 7
i32.add
i32.const -8
i32.and
local.tee $0
i32.const 16
local.get $0
i32.const 16
i32.gt_u
select
local.tee $2
call $~lib/allocator/tlsf/Root#search
local.tee $0
i32.eqz
if
current_memory
local.tee $1
local.get $2
i32.const 65535
2019-03-09 02:04:08 +01:00
i32.add
2019-03-14 12:52:46 +01:00
i32.const -65536
2019-03-09 02:04:08 +01:00
i32.and
i32.const 16
2019-03-14 12:52:46 +01:00
i32.shr_u
2019-03-09 02:04:08 +01:00
local.tee $0
2019-03-14 12:52:46 +01:00
local.get $1
local.get $0
i32.gt_s
select
grow_memory
i32.const 0
i32.lt_s
2019-03-09 02:04:08 +01:00
if
local.get $0
grow_memory
i32.const 0
i32.lt_s
if
unreachable
end
end
2019-03-14 12:52:46 +01:00
local.get $3
2019-03-09 02:04:08 +01:00
local.get $1
2019-03-14 12:52:46 +01:00
i32.const 16
i32.shl
current_memory
i32.const 16
i32.shl
call $~lib/allocator/tlsf/Root#addMemory
local.get $3
local.get $2
call $~lib/allocator/tlsf/Root#search
local.tee $0
i32.eqz
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 12:52:46 +01:00
i32.const 467
i32.const 12
call $~lib/env/abort
unreachable
end
2019-03-09 02:04:08 +01:00
end
2019-03-14 12:52:46 +01:00
local.get $0
i32.load
i32.const -4
i32.and
local.get $2
i32.lt_u
2019-03-09 02:04:08 +01:00
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 470
2019-03-14 04:33:58 +01:00
i32.const 2
2019-03-09 02:04:08 +01:00
call $~lib/env/abort
unreachable
end
local.get $3
local.get $0
2019-03-14 12:52:46 +01:00
local.get $2
2019-03-09 02:04:08 +01:00
call $~lib/allocator/tlsf/Root#use
)
2019-03-17 00:11:16 +01:00
(func $~lib/runtime/doAllocate (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
2019-03-11 07:45:47 +01:00
(local $1 i32)
i32.const 1
i32.const 32
local.get $0
i32.const 15
i32.add
i32.clz
i32.sub
i32.shl
2019-03-14 12:52:46 +01:00
call $~lib/memory/memory.allocate
2019-03-11 07:45:47 +01:00
local.tee $1
i32.const -1520547049
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
i32.const 16
i32.add
)
2019-03-14 12:46:36 +01:00
(func $~lib/util/memory/memcpy (; 18 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
2019-03-09 02:04:08 +01:00
(local $3 i32)
(local $4 i32)
(local $5 i32)
loop $continue|0
local.get $1
i32.const 3
i32.and
local.get $2
local.get $2
select
if
local.get $0
local.tee $4
i32.const 1
i32.add
local.set $0
local.get $1
local.tee $3
i32.const 1
i32.add
local.set $1
local.get $4
local.get $3
i32.load8_u
i32.store8
local.get $2
i32.const 1
i32.sub
local.set $2
br $continue|0
end
end
local.get $0
i32.const 3
i32.and
i32.eqz
if
loop $continue|1
local.get $2
i32.const 16
i32.ge_u
if
local.get $0
local.get $1
i32.load
i32.store
local.get $0
i32.const 4
i32.add
local.get $1
i32.const 4
i32.add
i32.load
i32.store
local.get $0
i32.const 8
i32.add
local.get $1
i32.const 8
i32.add
i32.load
i32.store
local.get $0
i32.const 12
i32.add
local.get $1
i32.const 12
i32.add
i32.load
i32.store
local.get $1
i32.const 16
i32.add
local.set $1
local.get $0
i32.const 16
i32.add
local.set $0
local.get $2
i32.const 16
i32.sub
local.set $2
br $continue|1
end
end
local.get $2
i32.const 8
i32.and
if
local.get $0
local.get $1
i32.load
i32.store
local.get $0
i32.const 4
i32.add
local.get $1
i32.const 4
i32.add
i32.load
i32.store
local.get $1
i32.const 8
i32.add
local.set $1
local.get $0
i32.const 8
i32.add
local.set $0
end
local.get $2
i32.const 4
i32.and
if
local.get $0
local.get $1
i32.load
i32.store
local.get $1
i32.const 4
i32.add
local.set $1
local.get $0
i32.const 4
i32.add
local.set $0
end
local.get $2
i32.const 2
i32.and
if
local.get $0
local.get $1
i32.load16_u
i32.store16
local.get $1
i32.const 2
i32.add
local.set $1
local.get $0
i32.const 2
i32.add
local.set $0
end
local.get $2
i32.const 1
i32.and
if
local.get $0
local.get $1
i32.load8_u
i32.store8
end
return
end
local.get $2
i32.const 32
i32.ge_u
if
block $break|2
block $case2|2
block $case1|2
local.get $0
i32.const 3
i32.and
local.tee $3
i32.const 1
i32.ne
if
local.get $3
i32.const 2
i32.eq
br_if $case1|2
local.get $3
i32.const 3
i32.eq
br_if $case2|2
br $break|2
end
local.get $1
i32.load
local.set $5
local.get $0
local.get $1
local.tee $3
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $1
local.set $0
local.get $1
local.get $3
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $4
i32.const 1
i32.add
local.set $0
local.get $1
i32.const 1
i32.add
local.tee $3
i32.const 1
i32.add
local.set $1
local.get $4
local.get $3
i32.load8_u
i32.store8
local.get $2
i32.const 3
i32.sub
local.set $2
loop $continue|3
local.get $2
i32.const 17
i32.ge_u
if
local.get $0
local.get $1
i32.const 1
i32.add
i32.load
local.tee $3
i32.const 8
i32.shl
local.get $5
i32.const 24
i32.shr_u
i32.or
i32.store
local.get $0
i32.const 4
i32.add
local.get $1
i32.const 5
i32.add
i32.load
local.tee $5
i32.const 8
i32.shl
local.get $3
i32.const 24
i32.shr_u
i32.or
i32.store
local.get $0
i32.const 8
i32.add
local.get $1
i32.const 9
i32.add
i32.load
local.tee $3
i32.const 8
i32.shl
local.get $5
i32.const 24
i32.shr_u
i32.or
i32.store
local.get $0
i32.const 12
i32.add
local.get $1
i32.const 13
i32.add
i32.load
local.tee $5
i32.const 8
i32.shl
local.get $3
i32.const 24
i32.shr_u
i32.or
i32.store
local.get $1
i32.const 16
i32.add
local.set $1
local.get $0
i32.const 16
i32.add
local.set $0
local.get $2
i32.const 16
i32.sub
local.set $2
br $continue|3
end
end
br $break|2
end
local.get $1
i32.load
local.set $5
local.get $0
local.get $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $4
i32.const 1
i32.add
local.set $0
local.get $1
i32.const 1
i32.add
local.tee $3
i32.const 1
i32.add
local.set $1
local.get $4
local.get $3
i32.load8_u
i32.store8
local.get $2
i32.const 2
i32.sub
local.set $2
loop $continue|4
local.get $2
i32.const 18
i32.ge_u
if
local.get $0
local.get $1
i32.const 2
i32.add
i32.load
local.tee $3
i32.const 16
i32.shl
local.get $5
i32.const 16
i32.shr_u
i32.or
i32.store
local.get $0
i32.const 4
i32.add
local.get $1
i32.const 6
i32.add
i32.load
local.tee $5
i32.const 16
i32.shl
local.get $3
i32.const 16
i32.shr_u
i32.or
i32.store
local.get $0
i32.const 8
i32.add
local.get $1
i32.const 10
i32.add
i32.load
local.tee $3
i32.const 16
i32.shl
local.get $5
i32.const 16
i32.shr_u
i32.or
i32.store
local.get $0
i32.const 12
i32.add
local.get $1
i32.const 14
i32.add
i32.load
local.tee $5
i32.const 16
i32.shl
local.get $3
i32.const 16
i32.shr_u
i32.or
i32.store
local.get $1
i32.const 16
i32.add
local.set $1
local.get $0
i32.const 16
i32.add
local.set $0
local.get $2
i32.const 16
i32.sub
local.set $2
br $continue|4
end
end
br $break|2
end
local.get $1
i32.load
local.set $5
local.get $0
local.tee $4
i32.const 1
i32.add
local.set $0
local.get $1
local.tee $3
i32.const 1
i32.add
local.set $1
local.get $4
local.get $3
i32.load8_u
i32.store8
local.get $2
i32.const 1
i32.sub
local.set $2
loop $continue|5
local.get $2
i32.const 19
i32.ge_u
if
local.get $0
local.get $1
i32.const 3
i32.add
i32.load
local.tee $3
i32.const 24
i32.shl
local.get $5
i32.const 8
i32.shr_u
i32.or
i32.store
local.get $0
i32.const 4
i32.add
local.get $1
i32.const 7
i32.add
i32.load
local.tee $5
i32.const 24
i32.shl
local.get $3
i32.const 8
i32.shr_u
i32.or
i32.store
local.get $0
i32.const 8
i32.add
local.get $1
i32.const 11
i32.add
i32.load
local.tee $3
i32.const 24
i32.shl
local.get $5
i32.const 8
i32.shr_u
i32.or
i32.store
local.get $0
i32.const 12
i32.add
local.get $1
i32.const 15
i32.add
i32.load
local.tee $5
i32.const 24
i32.shl
local.get $3
i32.const 8
i32.shr_u
i32.or
i32.store
local.get $1
i32.const 16
i32.add
local.set $1
local.get $0
i32.const 16
i32.add
local.set $0
local.get $2
i32.const 16
i32.sub
local.set $2
br $continue|5
end
end
end
end
local.get $2
i32.const 16
i32.and
if
local.get $0
local.get $1
local.tee $3
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $1
local.set $0
local.get $1
local.get $3
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $3
local.set $0
local.get $3
local.get $1
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $3
local.set $0
local.get $3
local.get $1
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $3
local.set $0
local.get $3
local.get $1
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $3
local.set $0
local.get $3
local.get $1
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $3
local.set $0
local.get $3
local.get $1
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $3
local.set $0
local.get $3
local.get $1
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $3
local.set $0
local.get $3
local.get $1
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $3
local.set $0
local.get $3
local.get $1
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $3
local.set $0
local.get $3
local.get $1
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $3
local.set $0
local.get $3
local.get $1
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $3
local.set $0
local.get $3
local.get $1
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $3
local.set $0
local.get $3
local.get $1
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $3
local.set $0
local.get $3
local.get $1
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $4
i32.const 1
i32.add
local.set $0
local.get $1
i32.const 1
i32.add
local.tee $3
i32.const 1
i32.add
local.set $1
local.get $4
local.get $3
i32.load8_u
i32.store8
end
local.get $2
i32.const 8
i32.and
if
local.get $0
local.get $1
local.tee $3
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $1
local.set $0
local.get $1
local.get $3
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $3
local.set $0
local.get $3
local.get $1
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $3
local.set $0
local.get $3
local.get $1
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $3
local.set $0
local.get $3
local.get $1
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $3
local.set $0
local.get $3
local.get $1
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $3
local.set $0
local.get $3
local.get $1
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $4
i32.const 1
i32.add
local.set $0
local.get $1
i32.const 1
i32.add
local.tee $3
i32.const 1
i32.add
local.set $1
local.get $4
local.get $3
i32.load8_u
i32.store8
end
local.get $2
i32.const 4
i32.and
if
local.get $0
local.get $1
local.tee $3
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $1
local.set $0
local.get $1
local.get $3
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $3
local.set $0
local.get $3
local.get $1
i32.const 1
i32.add
local.tee $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $4
i32.const 1
i32.add
local.set $0
local.get $1
i32.const 1
i32.add
local.tee $3
i32.const 1
i32.add
local.set $1
local.get $4
local.get $3
i32.load8_u
i32.store8
end
local.get $2
i32.const 2
i32.and
if
local.get $0
local.get $1
i32.load8_u
i32.store8
local.get $0
i32.const 1
i32.add
local.tee $4
i32.const 1
i32.add
local.set $0
local.get $1
i32.const 1
i32.add
local.tee $3
i32.const 1
i32.add
local.set $1
local.get $4
local.get $3
i32.load8_u
i32.store8
end
local.get $2
i32.const 1
i32.and
if
local.get $0
local.get $1
i32.load8_u
i32.store8
end
)
2019-03-14 12:52:46 +01:00
(func $~lib/memory/memory.copy (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
2019-03-09 02:04:08 +01:00
(local $3 i32)
(local $4 i32)
2019-03-14 12:52:46 +01:00
block $~lib/util/memory/memmove|inlined.0
2019-03-09 02:04:08 +01:00
local.get $0
2019-03-17 00:11:16 +01:00
local.get $1
2019-03-14 12:52:46 +01:00
i32.eq
br_if $~lib/util/memory/memmove|inlined.0
2019-03-09 02:04:08 +01:00
local.get $1
local.get $2
2019-03-17 00:11:16 +01:00
i32.add
local.get $0
2019-03-14 12:52:46 +01:00
i32.le_u
2019-03-17 00:11:16 +01:00
local.tee $3
2019-03-14 12:52:46 +01:00
i32.eqz
if
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
local.get $2
i32.add
local.get $1
i32.le_u
2019-03-17 00:11:16 +01:00
local.set $3
2019-03-14 12:52:46 +01:00
end
2019-03-17 00:11:16 +01:00
local.get $3
2019-03-09 02:04:08 +01:00
if
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
local.get $1
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:52:46 +01:00
call $~lib/util/memory/memcpy
br $~lib/util/memory/memmove|inlined.0
end
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
local.get $1
i32.lt_u
if
local.get $1
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
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
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:52:46 +01:00
i32.eqz
br_if $~lib/util/memory/memmove|inlined.0
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
local.get $0
2019-03-14 12:52:46 +01:00
local.tee $4
i32.const 1
i32.add
2019-03-17 00:11:16 +01:00
local.set $0
2019-03-14 12:52:46 +01:00
local.get $1
2019-03-17 00:11:16 +01:00
local.tee $3
2019-03-14 12:52:46 +01:00
i32.const 1
i32.add
local.set $1
local.get $4
2019-03-17 00:11:16 +01:00
local.get $3
2019-03-14 12:52:46 +01:00
i32.load8_u
i32.store8
br $continue|0
end
end
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
2019-03-09 02:04:08 +01:00
if
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
local.get $1
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
2019-03-14 12:52:46 +01:00
local.get $1
i32.const 8
i32.add
local.set $1
br $continue|1
2019-03-09 02:04:08 +01:00
end
2019-03-14 12:52:46 +01:00
end
end
loop $continue|2
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
2019-03-09 02:04:08 +01:00
local.tee $4
i32.const 1
i32.add
2019-03-17 00:11:16 +01:00
local.set $0
2019-03-09 02:04:08 +01:00
local.get $1
2019-03-17 00:11:16 +01:00
local.tee $3
2019-03-09 02:04:08 +01:00
i32.const 1
i32.add
local.set $1
local.get $4
2019-03-17 00:11:16 +01:00
local.get $3
2019-03-09 02:04:08 +01:00
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:52:46 +01:00
br $continue|2
2019-03-09 02:04:08 +01:00
end
end
2019-03-14 12:52:46 +01:00
else
local.get $1
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
loop $continue|3
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-14 12:52:46 +01:00
local.get $2
2019-03-09 02:04:08 +01:00
i32.add
2019-03-14 12:52:46 +01:00
i32.const 7
i32.and
if
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:52:46 +01:00
i32.eqz
br_if $~lib/util/memory/memmove|inlined.0
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.tee $2
local.get $0
2019-03-14 12:52:46 +01:00
i32.add
local.get $1
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:52:46 +01:00
i32.add
i32.load8_u
i32.store8
br $continue|3
end
end
loop $continue|4
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-09 02:04:08 +01:00
i32.const 8
2019-03-14 12:52:46 +01:00
i32.ge_u
if
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.tee $2
local.get $0
2019-03-14 12:52:46 +01:00
i32.add
local.get $1
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-14 12:52:46 +01:00
i32.add
i64.load
i64.store
br $continue|4
end
2019-03-09 02:04:08 +01:00
end
end
2019-03-14 12:52:46 +01:00
loop $continue|5
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-09 02:04:08 +01:00
if
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-09 02:04:08 +01:00
i32.const 1
i32.sub
2019-03-17 00:11:16 +01:00
local.tee $2
local.get $0
2019-03-09 02:04:08 +01:00
i32.add
local.get $1
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-09 02:04:08 +01:00
i32.add
i32.load8_u
i32.store8
2019-03-14 12:52:46 +01:00
br $continue|5
2019-03-09 02:04:08 +01:00
end
end
end
end
)
2019-03-14 12:52:46 +01:00
(func $~lib/memory/memory.fill (; 20 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
2019-03-14 12:46:36 +01:00
(local $2 i32)
2019-03-14 12:52:46 +01:00
block $~lib/util/memory/memset|inlined.0
2019-03-14 12:46:36 +01:00
local.get $1
2019-03-14 12:52:46 +01:00
i32.eqz
br_if $~lib/util/memory/memset|inlined.0
local.get $0
i32.const 0
i32.store8
local.get $0
local.get $1
i32.add
i32.const 1
i32.sub
i32.const 0
i32.store8
local.get $1
i32.const 2
i32.le_u
br_if $~lib/util/memory/memset|inlined.0
local.get $0
i32.const 1
i32.add
i32.const 0
i32.store8
local.get $0
i32.const 2
i32.add
i32.const 0
i32.store8
local.get $0
local.get $1
i32.add
local.tee $2
i32.const 2
i32.sub
i32.const 0
i32.store8
local.get $2
i32.const 3
i32.sub
i32.const 0
i32.store8
local.get $1
i32.const 6
i32.le_u
br_if $~lib/util/memory/memset|inlined.0
local.get $0
i32.const 3
i32.add
i32.const 0
i32.store8
local.get $0
local.get $1
i32.add
i32.const 4
i32.sub
i32.const 0
i32.store8
local.get $1
i32.const 8
i32.le_u
br_if $~lib/util/memory/memset|inlined.0
local.get $1
i32.const 0
local.get $0
i32.sub
i32.const 3
i32.and
local.tee $2
i32.sub
local.set $1
local.get $0
local.get $2
i32.add
local.tee $0
i32.const 0
i32.store
local.get $1
i32.const -4
i32.and
local.tee $1
local.get $0
i32.add
i32.const 4
i32.sub
i32.const 0
i32.store
local.get $1
i32.const 8
i32.le_u
br_if $~lib/util/memory/memset|inlined.0
local.get $0
i32.const 4
i32.add
i32.const 0
i32.store
local.get $0
i32.const 8
i32.add
i32.const 0
i32.store
local.get $0
local.get $1
i32.add
local.tee $2
i32.const 12
i32.sub
i32.const 0
i32.store
local.get $2
i32.const 8
i32.sub
i32.const 0
i32.store
local.get $1
i32.const 24
i32.le_u
br_if $~lib/util/memory/memset|inlined.0
local.get $0
i32.const 12
i32.add
i32.const 0
i32.store
local.get $0
i32.const 16
i32.add
i32.const 0
i32.store
local.get $0
i32.const 20
i32.add
i32.const 0
i32.store
local.get $0
i32.const 24
i32.add
i32.const 0
i32.store
local.get $0
local.get $1
i32.add
local.tee $2
i32.const 28
i32.sub
i32.const 0
i32.store
local.get $2
i32.const 24
i32.sub
i32.const 0
i32.store
local.get $2
i32.const 20
i32.sub
i32.const 0
i32.store
local.get $2
i32.const 16
i32.sub
i32.const 0
i32.store
local.get $0
i32.const 4
i32.and
i32.const 24
i32.add
local.tee $2
local.get $0
i32.add
local.set $0
local.get $1
local.get $2
i32.sub
local.set $1
loop $continue|0
2019-03-14 12:46:36 +01:00
local.get $1
i32.const 32
2019-03-14 12:52:46 +01:00
i32.ge_u
if
local.get $0
i64.const 0
i64.store
local.get $0
i32.const 8
i32.add
i64.const 0
i64.store
local.get $0
i32.const 16
i32.add
i64.const 0
i64.store
local.get $0
i32.const 24
i32.add
i64.const 0
i64.store
local.get $1
i32.const 32
i32.sub
local.set $1
local.get $0
i32.const 32
i32.add
local.set $0
br $continue|0
end
2019-03-14 12:46:36 +01:00
end
end
)
2019-03-14 12:52:46 +01:00
(func $~lib/memory/memory.free (; 21 ;) (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
local.tee $1
if
local.get $0
i32.const 8
i32.sub
local.tee $2
i32.load
local.tee $3
i32.const 1
i32.and
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 24
2019-03-14 07:45:59 +01:00
i32.const 483
2019-03-14 04:33:58 +01:00
i32.const 6
2019-03-09 02:04:08 +01:00
call $~lib/env/abort
unreachable
end
local.get $2
local.get $3
i32.const 1
i32.or
i32.store
local.get $1
local.get $0
i32.const 8
i32.sub
call $~lib/allocator/tlsf/Root#insert
end
end
)
2019-03-17 00:11:16 +01:00
(func $~lib/runtime/doReallocate (; 22 ;) (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.get $0
i32.const 16
i32.sub
2019-03-09 02:37:05 +01:00
local.tee $3
2019-03-09 02:04:08 +01:00
i32.load offset=4
local.tee $2
local.get $1
i32.lt_u
if
i32.const 1
i32.const 32
local.get $2
i32.const 15
i32.add
i32.clz
i32.sub
i32.shl
2019-03-10 21:38:15 +01:00
i32.const 0
local.get $0
2019-03-17 00:11:16 +01:00
i32.const 264
2019-03-10 21:38:15 +01:00
i32.gt_u
select
2019-03-09 02:04:08 +01:00
i32.const 1
i32.const 32
local.get $1
i32.const 15
i32.add
i32.clz
i32.sub
i32.shl
2019-03-09 02:37:05 +01:00
local.tee $4
2019-03-09 02:04:08 +01:00
i32.lt_u
if
2019-03-09 02:37:05 +01:00
local.get $4
2019-03-14 12:52:46 +01:00
call $~lib/memory/memory.allocate
2019-03-09 02:37:05 +01:00
local.tee $5
2019-03-14 12:46:36 +01:00
local.get $3
i32.load
2019-03-09 02:04:08 +01:00
i32.store
2019-03-09 02:37:05 +01:00
local.get $5
2019-03-09 02:04:08 +01:00
i32.const 0
i32.store offset=8
2019-03-09 02:37:05 +01:00
local.get $5
2019-03-09 02:04:08 +01:00
i32.const 0
i32.store offset=12
2019-03-09 02:37:05 +01:00
local.get $5
2019-03-09 02:04:08 +01:00
i32.const 16
i32.add
2019-03-09 02:37:05 +01:00
local.tee $4
2019-03-09 02:04:08 +01:00
local.get $0
local.get $2
2019-03-14 12:52:46 +01:00
call $~lib/memory/memory.copy
2019-03-09 02:04:08 +01:00
local.get $2
2019-03-09 02:37:05 +01:00
local.get $4
2019-03-09 02:04:08 +01:00
i32.add
local.get $1
local.get $2
i32.sub
2019-03-14 04:33:58 +01:00
call $~lib/memory/memory.fill
2019-03-09 02:37:05 +01:00
local.get $3
i32.load
i32.const -1520547049
i32.eq
if
2019-03-10 21:38:15 +01:00
local.get $0
2019-03-17 00:11:16 +01:00
i32.const 264
2019-03-10 21:38:15 +01:00
i32.le_u
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 232
i32.const 107
2019-03-15 09:26:31 +01:00
i32.const 8
2019-03-10 21:38:15 +01:00
call $~lib/env/abort
unreachable
end
2019-03-09 02:37:05 +01:00
local.get $3
2019-03-14 12:52:46 +01:00
call $~lib/memory/memory.free
2019-03-13 09:05:02 +01:00
else
local.get $0
global.set $std/runtime/register_ref
2019-03-09 02:37:05 +01:00
end
2019-03-09 02:04:08 +01:00
local.get $5
2019-03-09 02:37:05 +01:00
local.set $3
2019-03-09 02:04:08 +01:00
local.get $4
local.set $0
else
local.get $0
local.get $2
i32.add
local.get $1
local.get $2
i32.sub
2019-03-14 04:33:58 +01:00
call $~lib/memory/memory.fill
2019-03-09 02:04:08 +01:00
end
end
2019-03-09 02:37:05 +01:00
local.get $3
2019-03-09 02:04:08 +01:00
local.get $1
i32.store offset=4
local.get $0
)
2019-03-17 00:11:16 +01:00
(func $~lib/runtime/assertUnregistered (; 23 ;) (type $FUNCSIG$vi) (param $0 i32)
2019-03-09 02:04:08 +01:00
local.get $0
2019-03-17 00:11:16 +01:00
i32.const 264
2019-03-15 09:26:31 +01:00
i32.le_u
2019-03-09 02:04:08 +01:00
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 232
i32.const 199
2019-03-15 09:26:31 +01:00
i32.const 2
2019-03-09 02:04:08 +01:00
call $~lib/env/abort
unreachable
end
local.get $0
i32.const 16
i32.sub
i32.load
i32.const -1520547049
i32.ne
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 232
i32.const 200
2019-03-15 09:26:31 +01:00
i32.const 2
2019-03-09 02:04:08 +01:00
call $~lib/env/abort
unreachable
end
)
2019-03-14 12:52:46 +01:00
(func $start:std/runtime (; 24 ;) (type $FUNCSIG$v)
2019-03-09 02:04:08 +01:00
(local $0 i32)
(local $1 i32)
(local $2 i32)
loop $repeat|0
2019-03-17 00:11:16 +01:00
local.get $1
2019-03-09 02:04:08 +01:00
i32.const 9000
i32.lt_s
if
i32.const 1
i32.const 32
2019-03-17 00:11:16 +01:00
local.get $1
2019-03-09 02:04:08 +01:00
i32.const 15
i32.add
i32.clz
i32.sub
i32.shl
2019-03-17 00:11:16 +01:00
local.tee $2
2019-03-09 02:04:08 +01:00
i32.const 0
i32.ne
2019-03-17 00:11:16 +01:00
local.tee $0
if
local.get $2
2019-03-09 02:04:08 +01:00
i32.const 1
i32.sub
2019-03-17 00:11:16 +01:00
local.get $2
2019-03-09 02:04:08 +01:00
i32.and
i32.eqz
2019-03-17 00:11:16 +01:00
local.set $0
2019-03-09 02:04:08 +01:00
end
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-09 02:04:08 +01:00
if
2019-03-17 00:11:16 +01:00
local.get $1
2019-03-09 02:04:08 +01:00
i32.const 1
i32.add
2019-03-17 00:11:16 +01:00
local.set $1
2019-03-09 02:04:08 +01:00
br $repeat|0
else
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 88
2019-03-15 09:26:31 +01:00
i32.const 31
2019-03-09 02:04:08 +01:00
i32.const 2
call $~lib/env/abort
unreachable
end
unreachable
end
end
i32.const 16
global.set $std/runtime/barrier1
global.get $std/runtime/barrier1
i32.const 1
i32.add
global.set $std/runtime/barrier2
loop $continue|1
i32.const 1
i32.const 32
global.get $std/runtime/barrier2
2019-03-17 00:11:16 +01:00
local.tee $0
2019-03-09 02:04:08 +01:00
i32.const 16
i32.add
i32.clz
i32.sub
i32.shl
i32.const 1
i32.const 32
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-09 02:04:08 +01:00
i32.const 15
i32.add
i32.clz
i32.sub
i32.shl
i32.eq
if
global.get $std/runtime/barrier2
i32.const 1
i32.add
global.set $std/runtime/barrier2
br $continue|1
end
end
global.get $std/runtime/barrier2
i32.const 1
i32.add
global.set $std/runtime/barrier3
loop $continue|2
i32.const 1
i32.const 32
global.get $std/runtime/barrier3
2019-03-17 00:11:16 +01:00
local.tee $0
2019-03-09 02:04:08 +01:00
i32.const 16
i32.add
i32.clz
i32.sub
i32.shl
i32.const 1
i32.const 32
2019-03-17 00:11:16 +01:00
local.get $0
2019-03-09 02:04:08 +01:00
i32.const 15
i32.add
i32.clz
i32.sub
i32.shl
i32.eq
if
global.get $std/runtime/barrier3
i32.const 1
i32.add
global.set $std/runtime/barrier3
br $continue|2
end
end
2019-03-17 00:11:16 +01:00
i32.const 136
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
call $~lib/env/trace
2019-03-17 00:11:16 +01:00
i32.const 168
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
call $~lib/env/trace
2019-03-17 00:11:16 +01:00
i32.const 200
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
call $~lib/env/trace
i32.const 1
2019-03-17 00:11:16 +01:00
call $~lib/runtime/doAllocate
2019-03-09 02:04:08 +01:00
global.set $std/runtime/ref1
global.get $std/runtime/ref1
i32.const 16
i32.sub
global.set $std/runtime/header1
global.get $std/runtime/header1
i32.load
i32.const -1520547049
i32.ne
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 88
2019-03-15 09:26:31 +01:00
i32.const 46
2019-03-09 02:04:08 +01:00
i32.const 0
call $~lib/env/abort
unreachable
end
global.get $std/runtime/header1
i32.load offset=4
i32.const 1
i32.ne
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 88
2019-03-15 09:26:31 +01:00
i32.const 47
2019-03-09 02:04:08 +01:00
i32.const 0
call $~lib/env/abort
unreachable
end
global.get $std/runtime/ref1
2019-03-17 00:11:16 +01:00
local.tee $1
2019-03-09 02:04:08 +01:00
global.get $std/runtime/barrier1
2019-03-17 00:11:16 +01:00
call $~lib/runtime/doReallocate
local.set $2
local.get $1
local.get $2
2019-03-09 02:04:08 +01:00
i32.ne
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 88
2019-03-15 09:26:31 +01:00
i32.const 48
2019-03-09 02:04:08 +01:00
i32.const 0
call $~lib/env/abort
unreachable
end
global.get $std/runtime/barrier1
global.get $std/runtime/header1
i32.load offset=4
i32.ne
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 88
2019-03-15 09:26:31 +01:00
i32.const 49
2019-03-09 02:04:08 +01:00
i32.const 0
call $~lib/env/abort
unreachable
end
global.get $std/runtime/ref1
global.get $std/runtime/barrier2
2019-03-17 00:11:16 +01:00
call $~lib/runtime/doReallocate
2019-03-09 02:04:08 +01:00
global.set $std/runtime/ref2
global.get $std/runtime/ref1
global.get $std/runtime/ref2
i32.eq
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 88
2019-03-15 09:26:31 +01:00
i32.const 51
2019-03-09 02:04:08 +01:00
i32.const 0
call $~lib/env/abort
unreachable
end
global.get $std/runtime/ref2
i32.const 16
i32.sub
global.set $std/runtime/header2
global.get $std/runtime/barrier2
global.get $std/runtime/header2
i32.load offset=4
i32.ne
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 88
2019-03-15 09:26:31 +01:00
i32.const 53
2019-03-09 02:04:08 +01:00
i32.const 0
call $~lib/env/abort
unreachable
end
global.get $std/runtime/ref2
2019-03-17 00:11:16 +01:00
local.tee $1
call $~lib/runtime/assertUnregistered
local.get $1
2019-03-15 09:26:31 +01:00
i32.const 16
i32.sub
2019-03-14 12:52:46 +01:00
call $~lib/memory/memory.free
2019-03-09 02:04:08 +01:00
global.get $std/runtime/barrier2
2019-03-17 00:11:16 +01:00
call $~lib/runtime/doAllocate
2019-03-09 02:04:08 +01:00
global.set $std/runtime/ref3
global.get $std/runtime/ref1
global.get $std/runtime/ref3
i32.ne
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 88
2019-03-15 09:26:31 +01:00
i32.const 56
2019-03-09 02:04:08 +01:00
i32.const 0
call $~lib/env/abort
unreachable
end
global.get $std/runtime/barrier1
2019-03-17 00:11:16 +01:00
call $~lib/runtime/doAllocate
2019-03-09 02:04:08 +01:00
global.set $std/runtime/ref4
2019-03-09 02:37:05 +01:00
global.get $std/runtime/ref4
local.tee $0
2019-03-17 00:11:16 +01:00
call $~lib/runtime/assertUnregistered
2019-03-15 09:26:31 +01:00
local.get $0
i32.const 16
i32.sub
2019-03-10 21:38:15 +01:00
i32.const 2
2019-03-09 02:37:05 +01:00
i32.store
local.get $0
global.set $std/runtime/register_ref
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.ne
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 88
2019-03-15 09:26:31 +01:00
i32.const 60
2019-03-09 02:37:05 +01:00
i32.const 0
call $~lib/env/abort
unreachable
end
global.get $std/runtime/register_ref
i32.const 16
i32.sub
global.set $std/runtime/header4
global.get $std/runtime/header4
i32.load
2019-03-10 21:38:15 +01:00
i32.const 2
2019-03-09 02:37:05 +01:00
i32.ne
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 88
2019-03-15 09:26:31 +01:00
i32.const 62
2019-03-09 02:37:05 +01:00
i32.const 0
call $~lib/env/abort
unreachable
end
global.get $std/runtime/barrier1
global.get $std/runtime/header4
i32.load offset=4
i32.ne
2019-03-09 02:04:08 +01:00
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 88
2019-03-15 09:26:31 +01:00
i32.const 63
2019-03-09 02:44:46 +01:00
i32.const 0
call $~lib/env/abort
unreachable
end
i32.const 10
2019-03-17 00:11:16 +01:00
call $~lib/runtime/doAllocate
2019-03-09 02:44:46 +01:00
global.set $std/runtime/ref5
global.get $std/runtime/ref5
i32.const 16
i32.sub
i32.load offset=4
i32.const 10
i32.ne
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 88
2019-03-15 09:26:31 +01:00
i32.const 66
2019-03-09 02:44:46 +01:00
i32.const 0
call $~lib/env/abort
unreachable
end
global.get $std/runtime/ref5
i32.const 16
i32.sub
i32.load offset=4
i32.const 1
i32.shr_u
i32.const 5
i32.ne
if
i32.const 0
2019-03-17 00:11:16 +01:00
i32.const 88
2019-03-15 09:26:31 +01:00
i32.const 67
2019-03-09 02:04:08 +01:00
i32.const 0
call $~lib/env/abort
unreachable
end
)
2019-03-14 12:52:46 +01:00
(func $start (; 25 ;) (type $FUNCSIG$v)
2019-03-14 04:33:58 +01:00
call $start:std/runtime
2019-03-09 02:04:08 +01:00
)
2019-03-14 12:52:46 +01:00
(func $null (; 26 ;) (type $FUNCSIG$v)
2019-03-09 02:04:08 +01:00
nop
)
)