2019-05-20 23:10:06 +02:00
|
|
|
(module
|
|
|
|
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
|
|
|
|
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
|
|
|
|
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
|
|
|
|
(type $FUNCSIG$v (func))
|
|
|
|
(type $FUNCSIG$vii (func (param i32 i32)))
|
|
|
|
(type $FUNCSIG$ii (func (param i32) (result i32)))
|
|
|
|
(type $FUNCSIG$viii (func (param i32 i32 i32)))
|
|
|
|
(type $FUNCSIG$vi (func (param i32)))
|
|
|
|
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
|
2019-05-23 16:41:26 +02:00
|
|
|
(import "rtrace" "onalloc" (func $~lib/rt/rtrace/onalloc (param i32)))
|
|
|
|
(import "rtrace" "onincrement" (func $~lib/rt/rtrace/onincrement (param i32)))
|
|
|
|
(import "rtrace" "ondecrement" (func $~lib/rt/rtrace/ondecrement (param i32)))
|
|
|
|
(import "rtrace" "onfree" (func $~lib/rt/rtrace/onfree (param i32)))
|
2019-05-20 23:10:06 +02:00
|
|
|
(memory $0 1)
|
2019-05-23 03:08:25 +02:00
|
|
|
(data (i32.const 8) "\1c\00\00\00\01\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h")
|
|
|
|
(data (i32.const 56) "&\00\00\00\01\00\00\00\01\00\00\00&\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s")
|
|
|
|
(data (i32.const 112) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00t\00l\00s\00f\00.\00t\00s")
|
|
|
|
(data (i32.const 160) "(\00\00\00\01\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e")
|
|
|
|
(data (i32.const 216) "\1e\00\00\00\01\00\00\00\01\00\00\00\1e\00\00\00~\00l\00i\00b\00/\00r\00t\00/\00p\00u\00r\00e\00.\00t\00s")
|
|
|
|
(data (i32.const 264) "$\00\00\00\01\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e")
|
|
|
|
(data (i32.const 320) "\14\00\00\00\01\00\00\00\01\00\00\00\14\00\00\00~\00l\00i\00b\00/\00r\00t\00.\00t\00s")
|
|
|
|
(data (i32.const 360) "\1a\00\00\00\01\00\00\00\01\00\00\00\1a\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s")
|
|
|
|
(data (i32.const 408) "\1c\00\00\00\01\00\00\00\01\00\00\00\1c\00\00\00A\00r\00r\00a\00y\00 \00i\00s\00 \00e\00m\00p\00t\00y")
|
|
|
|
(data (i32.const 456) "^\00\00\00\01\00\00\00\01\00\00\00^\00\00\00E\00l\00e\00m\00e\00n\00t\00 \00t\00y\00p\00e\00 \00m\00u\00s\00t\00 \00b\00e\00 \00n\00u\00l\00l\00a\00b\00l\00e\00 \00i\00f\00 \00a\00r\00r\00a\00y\00 \00i\00s\00 \00h\00o\00l\00e\00y")
|
|
|
|
(data (i32.const 572) "\01\00\00\00\01")
|
|
|
|
(data (i32.const 584) "\02\00\00\00\01\00\00\00\01\00\00\00\02\00\00\00a")
|
|
|
|
(data (i32.const 608) "\02\00\00\00\01\00\00\00\01\00\00\00\02\00\00\00b")
|
|
|
|
(data (i32.const 632) "\08\00\00\00\01\00\00\00\01\00\00\00\08\00\00\00n\00u\00l\00l")
|
|
|
|
(data (i32.const 656) "\02\00\00\00\01\00\00\00\01\00\00\00\02\00\00\00d")
|
2019-05-25 14:40:13 +02:00
|
|
|
(data (i32.const 680) "\05\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\10\00\00\00\00\00\00\00\93\04\00\00\02\00\00\00\93 \00\00\02")
|
2019-05-20 23:10:06 +02:00
|
|
|
(global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0))
|
2019-05-23 03:08:25 +02:00
|
|
|
(global $~lib/rt/pure/CUR (mut i32) (i32.const 0))
|
|
|
|
(global $~lib/rt/pure/END (mut i32) (i32.const 0))
|
|
|
|
(global $~lib/rt/pure/ROOTS (mut i32) (i32.const 0))
|
2019-05-20 23:10:06 +02:00
|
|
|
(global $~lib/started (mut i32) (i32.const 0))
|
|
|
|
(export "memory" (memory $0))
|
|
|
|
(export "main" (func $retain-release-sanity/main))
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/tlsf/removeBlock (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $2 i32)
|
|
|
|
(local $3 i32)
|
|
|
|
(local $4 i32)
|
|
|
|
(local $5 i32)
|
|
|
|
local.get $1
|
|
|
|
i32.load
|
|
|
|
local.tee $3
|
|
|
|
i32.const 1
|
|
|
|
i32.and
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 276
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 13
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $3
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
local.tee $2
|
|
|
|
i32.const 16
|
|
|
|
i32.ge_u
|
|
|
|
if (result i32)
|
|
|
|
local.get $2
|
|
|
|
i32.const 1073741808
|
|
|
|
i32.lt_u
|
|
|
|
else
|
|
|
|
i32.const 0
|
|
|
|
end
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 278
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 13
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $2
|
|
|
|
i32.const 256
|
|
|
|
i32.lt_u
|
|
|
|
if (result i32)
|
|
|
|
local.get $2
|
|
|
|
i32.const 4
|
|
|
|
i32.shr_u
|
|
|
|
local.set $2
|
|
|
|
i32.const 0
|
|
|
|
else
|
|
|
|
local.get $2
|
|
|
|
i32.const 31
|
|
|
|
local.get $2
|
|
|
|
i32.clz
|
|
|
|
i32.sub
|
|
|
|
local.tee $3
|
|
|
|
i32.const 4
|
|
|
|
i32.sub
|
|
|
|
i32.shr_u
|
|
|
|
i32.const 16
|
|
|
|
i32.xor
|
|
|
|
local.set $2
|
|
|
|
local.get $3
|
|
|
|
i32.const 7
|
|
|
|
i32.sub
|
|
|
|
end
|
|
|
|
local.tee $3
|
|
|
|
i32.const 23
|
|
|
|
i32.lt_u
|
|
|
|
if (result i32)
|
|
|
|
local.get $2
|
|
|
|
i32.const 16
|
|
|
|
i32.lt_u
|
|
|
|
else
|
|
|
|
i32.const 0
|
|
|
|
end
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 291
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 13
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $1
|
|
|
|
i32.load offset=20
|
|
|
|
local.set $4
|
|
|
|
local.get $1
|
|
|
|
i32.load offset=16
|
|
|
|
local.tee $5
|
|
|
|
if
|
|
|
|
local.get $5
|
|
|
|
local.get $4
|
|
|
|
i32.store offset=20
|
|
|
|
end
|
|
|
|
local.get $4
|
|
|
|
if
|
|
|
|
local.get $4
|
|
|
|
local.get $5
|
|
|
|
i32.store offset=16
|
|
|
|
end
|
|
|
|
local.get $3
|
|
|
|
i32.const 4
|
|
|
|
i32.shl
|
|
|
|
local.get $2
|
|
|
|
i32.add
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
local.get $0
|
|
|
|
i32.add
|
|
|
|
i32.load offset=96
|
|
|
|
local.get $1
|
|
|
|
i32.eq
|
|
|
|
if
|
|
|
|
local.get $3
|
|
|
|
i32.const 4
|
|
|
|
i32.shl
|
|
|
|
local.get $2
|
|
|
|
i32.add
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
local.get $0
|
|
|
|
i32.add
|
|
|
|
local.get $4
|
|
|
|
i32.store offset=96
|
|
|
|
local.get $4
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
local.get $3
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
local.get $0
|
|
|
|
i32.add
|
|
|
|
local.get $3
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
local.get $0
|
|
|
|
i32.add
|
|
|
|
i32.load offset=4
|
|
|
|
i32.const 1
|
|
|
|
local.get $2
|
|
|
|
i32.shl
|
|
|
|
i32.const -1
|
|
|
|
i32.xor
|
|
|
|
i32.and
|
|
|
|
local.tee $1
|
|
|
|
i32.store offset=4
|
|
|
|
local.get $1
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
local.get $0
|
|
|
|
local.get $0
|
|
|
|
i32.load
|
|
|
|
i32.const 1
|
|
|
|
local.get $3
|
|
|
|
i32.shl
|
|
|
|
i32.const -1
|
|
|
|
i32.xor
|
|
|
|
i32.and
|
|
|
|
i32.store
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/tlsf/insertBlock (; 6 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $2 i32)
|
|
|
|
(local $3 i32)
|
|
|
|
(local $4 i32)
|
|
|
|
(local $5 i32)
|
|
|
|
(local $6 i32)
|
|
|
|
(local $7 i32)
|
|
|
|
local.get $1
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 204
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 13
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $1
|
|
|
|
i32.load
|
|
|
|
local.tee $3
|
|
|
|
i32.const 1
|
|
|
|
i32.and
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 206
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 13
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $1
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
local.get $1
|
|
|
|
i32.load
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
i32.add
|
|
|
|
local.tee $4
|
|
|
|
i32.load
|
|
|
|
local.tee $5
|
|
|
|
i32.const 1
|
|
|
|
i32.and
|
|
|
|
if
|
|
|
|
local.get $3
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
local.get $5
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
i32.add
|
|
|
|
local.tee $2
|
|
|
|
i32.const 1073741808
|
|
|
|
i32.lt_u
|
|
|
|
if
|
|
|
|
local.get $0
|
|
|
|
local.get $4
|
|
|
|
call $~lib/rt/tlsf/removeBlock
|
|
|
|
local.get $1
|
|
|
|
local.get $3
|
|
|
|
i32.const 3
|
|
|
|
i32.and
|
|
|
|
local.get $2
|
|
|
|
i32.or
|
|
|
|
local.tee $3
|
|
|
|
i32.store
|
|
|
|
local.get $1
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
local.get $1
|
|
|
|
i32.load
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
i32.add
|
|
|
|
local.tee $4
|
|
|
|
i32.load
|
|
|
|
local.set $5
|
|
|
|
end
|
|
|
|
end
|
|
|
|
local.get $3
|
|
|
|
i32.const 2
|
|
|
|
i32.and
|
|
|
|
if
|
|
|
|
local.get $1
|
|
|
|
i32.const 4
|
|
|
|
i32.sub
|
|
|
|
i32.load
|
|
|
|
local.tee $2
|
|
|
|
i32.load
|
|
|
|
local.tee $6
|
|
|
|
i32.const 1
|
|
|
|
i32.and
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 227
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 15
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $6
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
local.get $3
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
i32.add
|
|
|
|
local.tee $7
|
|
|
|
i32.const 1073741808
|
|
|
|
i32.lt_u
|
|
|
|
if (result i32)
|
|
|
|
local.get $0
|
|
|
|
local.get $2
|
|
|
|
call $~lib/rt/tlsf/removeBlock
|
|
|
|
local.get $2
|
|
|
|
local.get $6
|
|
|
|
i32.const 3
|
|
|
|
i32.and
|
|
|
|
local.get $7
|
|
|
|
i32.or
|
|
|
|
local.tee $3
|
|
|
|
i32.store
|
|
|
|
local.get $2
|
|
|
|
else
|
|
|
|
local.get $1
|
|
|
|
end
|
|
|
|
local.set $1
|
|
|
|
end
|
|
|
|
local.get $4
|
|
|
|
local.get $5
|
|
|
|
i32.const 2
|
|
|
|
i32.or
|
|
|
|
i32.store
|
|
|
|
local.get $3
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
local.tee $2
|
|
|
|
i32.const 16
|
|
|
|
i32.ge_u
|
|
|
|
if (result i32)
|
|
|
|
local.get $2
|
|
|
|
i32.const 1073741808
|
|
|
|
i32.lt_u
|
|
|
|
else
|
|
|
|
i32.const 0
|
|
|
|
end
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 242
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 13
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $4
|
|
|
|
local.get $1
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
local.get $2
|
|
|
|
i32.add
|
|
|
|
i32.ne
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 243
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 13
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $4
|
|
|
|
i32.const 4
|
|
|
|
i32.sub
|
|
|
|
local.get $1
|
|
|
|
i32.store
|
|
|
|
local.get $2
|
|
|
|
i32.const 256
|
|
|
|
i32.lt_u
|
|
|
|
if (result i32)
|
|
|
|
local.get $2
|
|
|
|
i32.const 4
|
|
|
|
i32.shr_u
|
|
|
|
local.set $4
|
|
|
|
i32.const 0
|
|
|
|
else
|
|
|
|
local.get $2
|
|
|
|
i32.const 31
|
|
|
|
local.get $2
|
|
|
|
i32.clz
|
|
|
|
i32.sub
|
|
|
|
local.tee $2
|
|
|
|
i32.const 4
|
|
|
|
i32.sub
|
|
|
|
i32.shr_u
|
|
|
|
i32.const 16
|
|
|
|
i32.xor
|
|
|
|
local.set $4
|
|
|
|
local.get $2
|
|
|
|
i32.const 7
|
|
|
|
i32.sub
|
|
|
|
end
|
|
|
|
local.tee $3
|
|
|
|
i32.const 23
|
|
|
|
i32.lt_u
|
|
|
|
if (result i32)
|
|
|
|
local.get $4
|
|
|
|
i32.const 16
|
|
|
|
i32.lt_u
|
|
|
|
else
|
|
|
|
i32.const 0
|
|
|
|
end
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 259
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 13
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $3
|
|
|
|
i32.const 4
|
|
|
|
i32.shl
|
|
|
|
local.get $4
|
|
|
|
i32.add
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
local.get $0
|
|
|
|
i32.add
|
|
|
|
i32.load offset=96
|
|
|
|
local.set $2
|
|
|
|
local.get $1
|
|
|
|
i32.const 0
|
|
|
|
i32.store offset=16
|
|
|
|
local.get $1
|
|
|
|
local.get $2
|
|
|
|
i32.store offset=20
|
|
|
|
local.get $2
|
|
|
|
if
|
|
|
|
local.get $2
|
|
|
|
local.get $1
|
|
|
|
i32.store offset=16
|
|
|
|
end
|
|
|
|
local.get $3
|
|
|
|
i32.const 4
|
|
|
|
i32.shl
|
|
|
|
local.get $4
|
|
|
|
i32.add
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
local.get $0
|
|
|
|
i32.add
|
|
|
|
local.get $1
|
|
|
|
i32.store offset=96
|
|
|
|
local.get $0
|
|
|
|
local.get $0
|
|
|
|
i32.load
|
|
|
|
i32.const 1
|
|
|
|
local.get $3
|
|
|
|
i32.shl
|
|
|
|
i32.or
|
|
|
|
i32.store
|
|
|
|
local.get $3
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
local.get $0
|
|
|
|
i32.add
|
|
|
|
local.get $3
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
local.get $0
|
|
|
|
i32.add
|
|
|
|
i32.load offset=4
|
|
|
|
i32.const 1
|
|
|
|
local.get $4
|
|
|
|
i32.shl
|
|
|
|
i32.or
|
|
|
|
i32.store offset=4
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/tlsf/addMemory (; 7 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $3 i32)
|
|
|
|
(local $4 i32)
|
|
|
|
local.get $2
|
|
|
|
i32.const 15
|
|
|
|
i32.and
|
|
|
|
i32.eqz
|
|
|
|
i32.const 0
|
|
|
|
local.get $1
|
|
|
|
i32.const 15
|
|
|
|
i32.and
|
|
|
|
i32.eqz
|
|
|
|
i32.const 0
|
|
|
|
local.get $1
|
|
|
|
local.get $2
|
|
|
|
i32.le_u
|
|
|
|
select
|
|
|
|
select
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 385
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 4
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=1568
|
|
|
|
local.tee $3
|
|
|
|
if
|
|
|
|
local.get $1
|
|
|
|
local.get $3
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
i32.lt_u
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 395
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 15
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $1
|
|
|
|
i32.const 16
|
|
|
|
i32.sub
|
|
|
|
local.get $3
|
|
|
|
i32.eq
|
|
|
|
if
|
|
|
|
local.get $3
|
|
|
|
i32.load
|
|
|
|
local.set $4
|
|
|
|
local.get $1
|
|
|
|
i32.const 16
|
|
|
|
i32.sub
|
|
|
|
local.set $1
|
|
|
|
end
|
|
|
|
else
|
|
|
|
local.get $1
|
|
|
|
local.get $0
|
|
|
|
i32.const 1572
|
|
|
|
i32.add
|
|
|
|
i32.lt_u
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 407
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 4
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
end
|
|
|
|
local.get $2
|
|
|
|
local.get $1
|
|
|
|
i32.sub
|
|
|
|
local.tee $2
|
|
|
|
i32.const 48
|
|
|
|
i32.lt_u
|
|
|
|
if
|
|
|
|
return
|
|
|
|
end
|
|
|
|
local.get $1
|
|
|
|
local.get $4
|
|
|
|
i32.const 2
|
|
|
|
i32.and
|
|
|
|
local.get $2
|
|
|
|
i32.const 32
|
|
|
|
i32.sub
|
|
|
|
i32.const 1
|
|
|
|
i32.or
|
|
|
|
i32.or
|
|
|
|
i32.store
|
|
|
|
local.get $1
|
|
|
|
i32.const 0
|
|
|
|
i32.store offset=16
|
|
|
|
local.get $1
|
|
|
|
i32.const 0
|
|
|
|
i32.store offset=20
|
|
|
|
local.get $1
|
|
|
|
local.get $2
|
|
|
|
i32.add
|
|
|
|
i32.const 16
|
|
|
|
i32.sub
|
|
|
|
local.tee $2
|
|
|
|
i32.const 2
|
|
|
|
i32.store
|
|
|
|
local.get $0
|
|
|
|
local.get $2
|
|
|
|
i32.store offset=1568
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
call $~lib/rt/tlsf/insertBlock
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/tlsf/initializeRoot (; 8 ;) (type $FUNCSIG$v)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $0 i32)
|
|
|
|
(local $1 i32)
|
|
|
|
i32.const 1
|
2019-05-23 13:20:10 +02:00
|
|
|
memory.size
|
2019-05-20 23:10:06 +02:00
|
|
|
local.tee $0
|
|
|
|
i32.gt_s
|
|
|
|
if (result i32)
|
|
|
|
i32.const 1
|
|
|
|
local.get $0
|
|
|
|
i32.sub
|
2019-05-23 13:20:10 +02:00
|
|
|
memory.grow
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 0
|
|
|
|
i32.lt_s
|
|
|
|
else
|
|
|
|
i32.const 0
|
|
|
|
end
|
|
|
|
if
|
|
|
|
unreachable
|
|
|
|
end
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 736
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 0
|
|
|
|
i32.store
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 2304
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 0
|
|
|
|
i32.store
|
|
|
|
i32.const 0
|
|
|
|
local.set $0
|
|
|
|
loop $repeat|0
|
|
|
|
block $break|0
|
|
|
|
local.get $0
|
|
|
|
i32.const 23
|
|
|
|
i32.ge_u
|
|
|
|
br_if $break|0
|
|
|
|
local.get $0
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 736
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.add
|
|
|
|
i32.const 0
|
|
|
|
i32.store offset=4
|
|
|
|
i32.const 0
|
|
|
|
local.set $1
|
|
|
|
loop $repeat|1
|
|
|
|
block $break|1
|
|
|
|
local.get $1
|
|
|
|
i32.const 16
|
|
|
|
i32.ge_u
|
|
|
|
br_if $break|1
|
|
|
|
local.get $0
|
|
|
|
i32.const 4
|
|
|
|
i32.shl
|
|
|
|
local.get $1
|
|
|
|
i32.add
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 736
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.add
|
|
|
|
i32.const 0
|
|
|
|
i32.store offset=96
|
|
|
|
local.get $1
|
|
|
|
i32.const 1
|
|
|
|
i32.add
|
|
|
|
local.set $1
|
|
|
|
br $repeat|1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
i32.const 1
|
|
|
|
i32.add
|
|
|
|
local.set $0
|
|
|
|
br $repeat|0
|
|
|
|
end
|
|
|
|
end
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 736
|
|
|
|
i32.const 2320
|
2019-05-23 13:20:10 +02:00
|
|
|
memory.size
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 16
|
|
|
|
i32.shl
|
|
|
|
call $~lib/rt/tlsf/addMemory
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 736
|
2019-05-20 23:10:06 +02:00
|
|
|
global.set $~lib/rt/tlsf/ROOT
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/tlsf/prepareSize (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
|
|
|
i32.const 1073741808
|
|
|
|
i32.ge_u
|
|
|
|
if
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 176
|
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 447
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 29
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
i32.const 15
|
|
|
|
i32.add
|
|
|
|
i32.const -16
|
|
|
|
i32.and
|
|
|
|
local.tee $0
|
|
|
|
i32.const 16
|
|
|
|
local.get $0
|
|
|
|
i32.const 16
|
|
|
|
i32.gt_u
|
|
|
|
select
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/tlsf/searchBlock (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $2 i32)
|
|
|
|
local.get $1
|
|
|
|
i32.const 256
|
|
|
|
i32.lt_u
|
|
|
|
if (result i32)
|
|
|
|
local.get $1
|
|
|
|
i32.const 4
|
|
|
|
i32.shr_u
|
|
|
|
local.set $1
|
|
|
|
i32.const 0
|
|
|
|
else
|
|
|
|
local.get $1
|
|
|
|
i32.const 536870904
|
|
|
|
i32.lt_u
|
|
|
|
if
|
|
|
|
i32.const 1
|
|
|
|
i32.const 27
|
|
|
|
local.get $1
|
|
|
|
i32.clz
|
|
|
|
i32.sub
|
|
|
|
i32.shl
|
|
|
|
local.get $1
|
|
|
|
i32.add
|
|
|
|
i32.const 1
|
|
|
|
i32.sub
|
|
|
|
local.set $1
|
|
|
|
end
|
|
|
|
local.get $1
|
|
|
|
i32.const 31
|
|
|
|
local.get $1
|
|
|
|
i32.clz
|
|
|
|
i32.sub
|
|
|
|
local.tee $2
|
|
|
|
i32.const 4
|
|
|
|
i32.sub
|
|
|
|
i32.shr_u
|
|
|
|
i32.const 16
|
|
|
|
i32.xor
|
|
|
|
local.set $1
|
|
|
|
local.get $2
|
|
|
|
i32.const 7
|
|
|
|
i32.sub
|
|
|
|
end
|
|
|
|
local.tee $2
|
|
|
|
i32.const 23
|
|
|
|
i32.lt_u
|
|
|
|
if (result i32)
|
|
|
|
local.get $1
|
|
|
|
i32.const 16
|
|
|
|
i32.lt_u
|
|
|
|
else
|
|
|
|
i32.const 0
|
|
|
|
end
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 337
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 13
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $2
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
local.get $0
|
|
|
|
i32.add
|
|
|
|
i32.load offset=4
|
|
|
|
i32.const -1
|
|
|
|
local.get $1
|
|
|
|
i32.shl
|
|
|
|
i32.and
|
|
|
|
local.tee $1
|
|
|
|
if (result i32)
|
|
|
|
local.get $1
|
|
|
|
i32.ctz
|
|
|
|
local.get $2
|
|
|
|
i32.const 4
|
|
|
|
i32.shl
|
|
|
|
i32.add
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
local.get $0
|
|
|
|
i32.add
|
|
|
|
i32.load offset=96
|
|
|
|
else
|
|
|
|
local.get $0
|
|
|
|
i32.load
|
|
|
|
i32.const -1
|
|
|
|
local.get $2
|
|
|
|
i32.const 1
|
|
|
|
i32.add
|
|
|
|
i32.shl
|
|
|
|
i32.and
|
|
|
|
local.tee $1
|
|
|
|
if (result i32)
|
|
|
|
local.get $1
|
|
|
|
i32.ctz
|
|
|
|
local.tee $1
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
local.get $0
|
|
|
|
i32.add
|
|
|
|
i32.load offset=4
|
|
|
|
local.tee $2
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 350
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 17
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $2
|
|
|
|
i32.ctz
|
|
|
|
local.get $1
|
|
|
|
i32.const 4
|
|
|
|
i32.shl
|
|
|
|
i32.add
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
local.get $0
|
|
|
|
i32.add
|
|
|
|
i32.load offset=96
|
|
|
|
else
|
|
|
|
i32.const 0
|
|
|
|
end
|
|
|
|
end
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/tlsf/growMemory (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $2 i32)
|
2019-05-23 13:20:10 +02:00
|
|
|
memory.size
|
2019-05-20 23:10:06 +02:00
|
|
|
local.tee $2
|
|
|
|
local.get $1
|
|
|
|
i32.const 65535
|
|
|
|
i32.add
|
|
|
|
i32.const -65536
|
|
|
|
i32.and
|
|
|
|
i32.const 16
|
|
|
|
i32.shr_u
|
|
|
|
local.tee $1
|
|
|
|
local.get $2
|
|
|
|
local.get $1
|
|
|
|
i32.gt_s
|
|
|
|
select
|
2019-05-23 13:20:10 +02:00
|
|
|
memory.grow
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 0
|
|
|
|
i32.lt_s
|
|
|
|
if
|
|
|
|
local.get $1
|
2019-05-23 13:20:10 +02:00
|
|
|
memory.grow
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 0
|
|
|
|
i32.lt_s
|
|
|
|
if
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
local.get $2
|
|
|
|
i32.const 16
|
|
|
|
i32.shl
|
2019-05-23 13:20:10 +02:00
|
|
|
memory.size
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 16
|
|
|
|
i32.shl
|
|
|
|
call $~lib/rt/tlsf/addMemory
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/tlsf/prepareBlock (; 12 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $3 i32)
|
|
|
|
(local $4 i32)
|
|
|
|
local.get $1
|
|
|
|
i32.load
|
|
|
|
local.set $3
|
|
|
|
local.get $2
|
|
|
|
i32.const 15
|
|
|
|
i32.and
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 364
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 13
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $3
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
local.get $2
|
|
|
|
i32.sub
|
|
|
|
local.tee $4
|
|
|
|
i32.const 32
|
|
|
|
i32.ge_u
|
|
|
|
if
|
|
|
|
local.get $1
|
|
|
|
local.get $3
|
|
|
|
i32.const 2
|
|
|
|
i32.and
|
|
|
|
local.get $2
|
|
|
|
i32.or
|
|
|
|
i32.store
|
|
|
|
local.get $1
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
local.get $2
|
|
|
|
i32.add
|
|
|
|
local.tee $1
|
|
|
|
local.get $4
|
|
|
|
i32.const 16
|
|
|
|
i32.sub
|
|
|
|
i32.const 1
|
|
|
|
i32.or
|
|
|
|
i32.store
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
call $~lib/rt/tlsf/insertBlock
|
|
|
|
else
|
|
|
|
local.get $1
|
|
|
|
local.get $3
|
|
|
|
i32.const -2
|
|
|
|
i32.and
|
|
|
|
i32.store
|
|
|
|
local.get $1
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
local.get $1
|
|
|
|
i32.load
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
i32.add
|
|
|
|
local.get $1
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
local.get $1
|
|
|
|
i32.load
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
i32.add
|
|
|
|
i32.load
|
|
|
|
i32.const -3
|
|
|
|
i32.and
|
|
|
|
i32.store
|
|
|
|
end
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/tlsf/allocateBlock (; 13 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $2 i32)
|
|
|
|
(local $3 i32)
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
call $~lib/rt/tlsf/prepareSize
|
|
|
|
local.tee $3
|
|
|
|
call $~lib/rt/tlsf/searchBlock
|
|
|
|
local.tee $2
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
local.get $0
|
|
|
|
local.get $3
|
|
|
|
call $~lib/rt/tlsf/growMemory
|
|
|
|
local.get $0
|
|
|
|
local.get $3
|
|
|
|
call $~lib/rt/tlsf/searchBlock
|
|
|
|
local.tee $2
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 477
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 15
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
end
|
|
|
|
local.get $2
|
|
|
|
i32.load
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
local.get $3
|
|
|
|
i32.lt_u
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 479
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 13
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $2
|
|
|
|
i32.const 0
|
|
|
|
i32.store offset=4
|
|
|
|
local.get $2
|
|
|
|
local.get $1
|
|
|
|
i32.store offset=12
|
|
|
|
local.get $0
|
|
|
|
local.get $2
|
|
|
|
call $~lib/rt/tlsf/removeBlock
|
|
|
|
local.get $0
|
|
|
|
local.get $2
|
|
|
|
local.get $3
|
|
|
|
call $~lib/rt/tlsf/prepareBlock
|
|
|
|
local.get $2
|
2019-05-23 16:41:26 +02:00
|
|
|
call $~lib/rt/rtrace/onalloc
|
|
|
|
local.get $2
|
2019-05-20 23:10:06 +02:00
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/tlsf/__alloc (; 14 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $2 i32)
|
|
|
|
global.get $~lib/rt/tlsf/ROOT
|
|
|
|
local.tee $2
|
|
|
|
if (result i32)
|
|
|
|
local.get $2
|
|
|
|
else
|
|
|
|
call $~lib/rt/tlsf/initializeRoot
|
|
|
|
global.get $~lib/rt/tlsf/ROOT
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
call $~lib/rt/tlsf/allocateBlock
|
|
|
|
local.tee $0
|
|
|
|
local.get $1
|
|
|
|
i32.store offset=8
|
|
|
|
local.get $0
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/pure/increment (; 15 ;) (type $FUNCSIG$vi) (param $0 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $1 i32)
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=4
|
|
|
|
local.tee $1
|
|
|
|
i32.const -268435456
|
|
|
|
i32.and
|
|
|
|
local.get $1
|
|
|
|
i32.const 1
|
|
|
|
i32.add
|
|
|
|
i32.const -268435456
|
|
|
|
i32.and
|
|
|
|
i32.ne
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 232
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 104
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 2
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
i32.const 1
|
|
|
|
i32.add
|
|
|
|
i32.store offset=4
|
|
|
|
local.get $0
|
2019-05-23 16:41:26 +02:00
|
|
|
call $~lib/rt/rtrace/onincrement
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
|
|
|
i32.load
|
|
|
|
i32.const 1
|
|
|
|
i32.and
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 232
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 107
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 13
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/pure/__retain (; 16 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 724
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.gt_u
|
|
|
|
if
|
|
|
|
local.get $0
|
|
|
|
i32.const 16
|
|
|
|
i32.sub
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/increment
|
2019-05-20 23:10:06 +02:00
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/tlsf/freeBlock (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
2019-05-23 03:08:25 +02:00
|
|
|
(local $2 i32)
|
|
|
|
local.get $1
|
|
|
|
i32.load
|
|
|
|
local.tee $2
|
|
|
|
i32.const 1
|
|
|
|
i32.and
|
2019-05-20 23:10:06 +02:00
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 531
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 2
|
2019-05-20 23:10:06 +02:00
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $1
|
|
|
|
local.get $2
|
|
|
|
i32.const 1
|
|
|
|
i32.or
|
|
|
|
i32.store
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
|
|
|
local.get $1
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/tlsf/insertBlock
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $1
|
2019-05-23 16:41:26 +02:00
|
|
|
call $~lib/rt/rtrace/onfree
|
2019-05-20 23:10:06 +02:00
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/__typeinfo (; 18 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $0
|
|
|
|
i32.const 680
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.load
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.gt_u
|
2019-05-20 23:10:06 +02:00
|
|
|
if
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 280
|
|
|
|
i32.const 336
|
|
|
|
i32.const 22
|
|
|
|
i32.const 27
|
2019-05-20 23:10:06 +02:00
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 3
|
|
|
|
i32.shl
|
|
|
|
i32.const 684
|
|
|
|
i32.add
|
|
|
|
i32.load
|
2019-05-20 23:10:06 +02:00
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/memory/memory.copy (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $3 i32)
|
|
|
|
(local $4 i32)
|
|
|
|
block $~lib/util/memory/memmove|inlined.0
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $2
|
|
|
|
local.set $3
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
i32.eq
|
|
|
|
br_if $~lib/util/memory/memmove|inlined.0
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
i32.lt_u
|
|
|
|
if
|
|
|
|
local.get $1
|
|
|
|
i32.const 7
|
|
|
|
i32.and
|
|
|
|
local.get $0
|
|
|
|
i32.const 7
|
|
|
|
i32.and
|
|
|
|
i32.eq
|
|
|
|
if
|
|
|
|
loop $continue|0
|
|
|
|
local.get $0
|
|
|
|
i32.const 7
|
|
|
|
i32.and
|
|
|
|
if
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $3
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.eqz
|
|
|
|
br_if $~lib/util/memory/memmove|inlined.0
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $3
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 1
|
|
|
|
i32.sub
|
2019-05-23 03:08:25 +02:00
|
|
|
local.set $3
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
local.tee $2
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 1
|
|
|
|
i32.add
|
|
|
|
local.set $0
|
|
|
|
local.get $1
|
|
|
|
local.tee $4
|
|
|
|
i32.const 1
|
|
|
|
i32.add
|
|
|
|
local.set $1
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $2
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $4
|
|
|
|
i32.load8_u
|
|
|
|
i32.store8
|
|
|
|
br $continue|0
|
|
|
|
end
|
|
|
|
end
|
|
|
|
loop $continue|1
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $3
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 8
|
|
|
|
i32.ge_u
|
|
|
|
if
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
i64.load
|
|
|
|
i64.store
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $3
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 8
|
|
|
|
i32.sub
|
2019-05-23 03:08:25 +02:00
|
|
|
local.set $3
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
|
|
|
i32.const 8
|
|
|
|
i32.add
|
|
|
|
local.set $0
|
|
|
|
local.get $1
|
|
|
|
i32.const 8
|
|
|
|
i32.add
|
|
|
|
local.set $1
|
|
|
|
br $continue|1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
loop $continue|2
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $3
|
2019-05-20 23:10:06 +02:00
|
|
|
if
|
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
local.tee $2
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 1
|
|
|
|
i32.add
|
|
|
|
local.set $0
|
|
|
|
local.get $1
|
|
|
|
local.tee $4
|
|
|
|
i32.const 1
|
|
|
|
i32.add
|
|
|
|
local.set $1
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $2
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $4
|
|
|
|
i32.load8_u
|
|
|
|
i32.store8
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $3
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 1
|
|
|
|
i32.sub
|
2019-05-23 03:08:25 +02:00
|
|
|
local.set $3
|
2019-05-20 23:10:06 +02:00
|
|
|
br $continue|2
|
|
|
|
end
|
|
|
|
end
|
|
|
|
else
|
|
|
|
local.get $1
|
|
|
|
i32.const 7
|
|
|
|
i32.and
|
|
|
|
local.get $0
|
|
|
|
i32.const 7
|
|
|
|
i32.and
|
|
|
|
i32.eq
|
|
|
|
if
|
|
|
|
loop $continue|3
|
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $3
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.add
|
|
|
|
i32.const 7
|
|
|
|
i32.and
|
|
|
|
if
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $3
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.eqz
|
|
|
|
br_if $~lib/util/memory/memmove|inlined.0
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $0
|
|
|
|
local.get $3
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 1
|
|
|
|
i32.sub
|
2019-05-23 03:08:25 +02:00
|
|
|
local.tee $3
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.add
|
|
|
|
local.get $1
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $3
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.add
|
|
|
|
i32.load8_u
|
|
|
|
i32.store8
|
|
|
|
br $continue|3
|
|
|
|
end
|
|
|
|
end
|
|
|
|
loop $continue|4
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $3
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 8
|
|
|
|
i32.ge_u
|
|
|
|
if
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $0
|
|
|
|
local.get $3
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 8
|
|
|
|
i32.sub
|
2019-05-23 03:08:25 +02:00
|
|
|
local.tee $3
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.add
|
|
|
|
local.get $1
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $3
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.add
|
|
|
|
i64.load
|
|
|
|
i64.store
|
|
|
|
br $continue|4
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
loop $continue|5
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $3
|
2019-05-20 23:10:06 +02:00
|
|
|
if
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $0
|
|
|
|
local.get $3
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 1
|
|
|
|
i32.sub
|
2019-05-23 03:08:25 +02:00
|
|
|
local.tee $3
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.add
|
|
|
|
local.get $1
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $3
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.add
|
|
|
|
i32.load8_u
|
|
|
|
i32.store8
|
|
|
|
br $continue|5
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/pure/growRoots (; 20 ;) (type $FUNCSIG$v)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $0 i32)
|
|
|
|
(local $1 i32)
|
|
|
|
(local $2 i32)
|
|
|
|
(local $3 i32)
|
2019-05-23 03:08:25 +02:00
|
|
|
global.get $~lib/rt/pure/CUR
|
|
|
|
global.get $~lib/rt/pure/ROOTS
|
2019-05-20 23:10:06 +02:00
|
|
|
local.tee $2
|
|
|
|
i32.sub
|
|
|
|
local.tee $1
|
|
|
|
i32.const 1
|
|
|
|
i32.shl
|
|
|
|
local.tee $0
|
|
|
|
i32.const 256
|
|
|
|
local.get $0
|
|
|
|
i32.const 256
|
|
|
|
i32.gt_u
|
|
|
|
select
|
|
|
|
local.tee $3
|
|
|
|
i32.const 0
|
|
|
|
call $~lib/rt/tlsf/__alloc
|
|
|
|
local.tee $0
|
|
|
|
local.get $2
|
|
|
|
local.get $1
|
|
|
|
call $~lib/memory/memory.copy
|
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
global.set $~lib/rt/pure/ROOTS
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
i32.add
|
2019-05-23 03:08:25 +02:00
|
|
|
global.set $~lib/rt/pure/CUR
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
|
|
|
local.get $3
|
|
|
|
i32.add
|
2019-05-23 03:08:25 +02:00
|
|
|
global.set $~lib/rt/pure/END
|
2019-05-20 23:10:06 +02:00
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/pure/appendRoot (; 21 ;) (type $FUNCSIG$vi) (param $0 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $1 i32)
|
2019-05-23 03:08:25 +02:00
|
|
|
global.get $~lib/rt/pure/CUR
|
2019-05-20 23:10:06 +02:00
|
|
|
local.tee $1
|
2019-05-23 03:08:25 +02:00
|
|
|
global.get $~lib/rt/pure/END
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.ge_u
|
|
|
|
if
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/growRoots
|
|
|
|
global.get $~lib/rt/pure/CUR
|
2019-05-20 23:10:06 +02:00
|
|
|
local.set $1
|
|
|
|
end
|
|
|
|
local.get $1
|
|
|
|
local.get $0
|
|
|
|
i32.store
|
|
|
|
local.get $1
|
|
|
|
i32.const 1
|
|
|
|
i32.add
|
2019-05-23 03:08:25 +02:00
|
|
|
global.set $~lib/rt/pure/CUR
|
2019-05-20 23:10:06 +02:00
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/pure/decrement (; 22 ;) (type $FUNCSIG$vi) (param $0 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $1 i32)
|
|
|
|
(local $2 i32)
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=4
|
|
|
|
local.tee $2
|
|
|
|
i32.const 268435455
|
|
|
|
i32.and
|
|
|
|
local.set $1
|
|
|
|
local.get $0
|
2019-05-23 16:41:26 +02:00
|
|
|
call $~lib/rt/rtrace/ondecrement
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
|
|
|
i32.load
|
|
|
|
i32.const 1
|
|
|
|
i32.and
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 232
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 115
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 13
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $1
|
|
|
|
i32.const 1
|
|
|
|
i32.eq
|
|
|
|
if
|
|
|
|
local.get $0
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
i32.const 1
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/__visit_members
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $2
|
|
|
|
i32.const -2147483648
|
|
|
|
i32.and
|
|
|
|
if
|
|
|
|
local.get $0
|
|
|
|
i32.const -2147483648
|
|
|
|
i32.store offset=4
|
|
|
|
else
|
|
|
|
global.get $~lib/rt/tlsf/ROOT
|
|
|
|
local.get $0
|
|
|
|
call $~lib/rt/tlsf/freeBlock
|
|
|
|
end
|
|
|
|
else
|
|
|
|
local.get $1
|
|
|
|
i32.const 0
|
|
|
|
i32.le_u
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 232
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 124
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 15
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=8
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/__typeinfo
|
2019-05-25 01:14:26 +02:00
|
|
|
i32.const 16
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.and
|
|
|
|
if
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
i32.const 1
|
|
|
|
i32.sub
|
|
|
|
local.get $2
|
|
|
|
i32.const -268435456
|
|
|
|
i32.and
|
|
|
|
i32.or
|
|
|
|
i32.store offset=4
|
|
|
|
else
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
i32.const 1
|
|
|
|
i32.sub
|
|
|
|
i32.const -1342177280
|
|
|
|
i32.or
|
|
|
|
i32.store offset=4
|
|
|
|
local.get $2
|
|
|
|
i32.const -2147483648
|
|
|
|
i32.and
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/appendRoot
|
2019-05-20 23:10:06 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/pure/__retainRelease (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $1
|
|
|
|
i32.ne
|
2019-05-20 23:10:06 +02:00
|
|
|
if
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $1
|
|
|
|
i32.const 724
|
|
|
|
i32.gt_u
|
|
|
|
if
|
|
|
|
local.get $1
|
|
|
|
i32.const 16
|
|
|
|
i32.sub
|
|
|
|
call $~lib/rt/pure/increment
|
|
|
|
end
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 724
|
|
|
|
i32.gt_u
|
|
|
|
if
|
|
|
|
local.get $0
|
|
|
|
i32.const 16
|
|
|
|
i32.sub
|
|
|
|
call $~lib/rt/pure/decrement
|
|
|
|
end
|
2019-05-20 23:10:06 +02:00
|
|
|
end
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $1
|
2019-05-20 23:10:06 +02:00
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/arraybuffer/ArrayBufferView#constructor (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
2019-05-23 03:08:25 +02:00
|
|
|
(local $2 i32)
|
|
|
|
local.get $1
|
|
|
|
i32.const 268435452
|
|
|
|
i32.gt_u
|
|
|
|
if
|
|
|
|
i32.const 24
|
|
|
|
i32.const 72
|
|
|
|
i32.const 14
|
|
|
|
i32.const 56
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $1
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
local.tee $2
|
|
|
|
i32.const 0
|
|
|
|
call $~lib/rt/tlsf/__alloc
|
|
|
|
local.set $1
|
|
|
|
local.get $0
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 12
|
|
|
|
i32.const 2
|
|
|
|
call $~lib/rt/tlsf/__alloc
|
|
|
|
call $~lib/rt/pure/__retain
|
|
|
|
local.set $0
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
i32.const 0
|
|
|
|
i32.store
|
|
|
|
local.get $0
|
|
|
|
i32.const 0
|
|
|
|
i32.store offset=4
|
|
|
|
local.get $0
|
|
|
|
i32.const 0
|
|
|
|
i32.store offset=8
|
|
|
|
local.get $0
|
|
|
|
local.get $0
|
|
|
|
i32.load
|
|
|
|
local.get $1
|
|
|
|
call $~lib/rt/pure/__retainRelease
|
|
|
|
i32.store
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
i32.store offset=4
|
|
|
|
local.get $0
|
|
|
|
local.get $2
|
|
|
|
i32.store offset=8
|
|
|
|
local.get $0
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/tlsf/reallocateBlock (; 25 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $3 i32)
|
|
|
|
(local $4 i32)
|
|
|
|
(local $5 i32)
|
|
|
|
(local $6 i32)
|
|
|
|
local.get $2
|
|
|
|
call $~lib/rt/tlsf/prepareSize
|
|
|
|
local.set $3
|
|
|
|
local.get $1
|
|
|
|
i32.load
|
|
|
|
local.tee $4
|
|
|
|
i32.const 1
|
|
|
|
i32.and
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 493
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 13
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $3
|
|
|
|
local.get $4
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
i32.le_u
|
|
|
|
if
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
local.get $3
|
|
|
|
call $~lib/rt/tlsf/prepareBlock
|
|
|
|
local.get $1
|
|
|
|
local.get $2
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.store offset=12
|
|
|
|
local.get $1
|
|
|
|
return
|
|
|
|
end
|
|
|
|
local.get $1
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
local.get $1
|
|
|
|
i32.load
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
i32.add
|
|
|
|
local.tee $6
|
|
|
|
i32.load
|
|
|
|
local.tee $5
|
|
|
|
i32.const 1
|
|
|
|
i32.and
|
|
|
|
if
|
|
|
|
local.get $4
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
local.get $5
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
i32.add
|
|
|
|
local.tee $5
|
|
|
|
local.get $3
|
|
|
|
i32.ge_u
|
|
|
|
if
|
|
|
|
local.get $0
|
|
|
|
local.get $6
|
|
|
|
call $~lib/rt/tlsf/removeBlock
|
|
|
|
local.get $1
|
|
|
|
local.get $4
|
|
|
|
i32.const 3
|
|
|
|
i32.and
|
|
|
|
local.get $5
|
|
|
|
i32.or
|
|
|
|
i32.store
|
|
|
|
local.get $1
|
|
|
|
local.get $2
|
|
|
|
i32.store offset=12
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
local.get $3
|
|
|
|
call $~lib/rt/tlsf/prepareBlock
|
|
|
|
local.get $1
|
|
|
|
return
|
|
|
|
end
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
local.get $2
|
|
|
|
call $~lib/rt/tlsf/allocateBlock
|
|
|
|
local.tee $3
|
|
|
|
local.get $1
|
|
|
|
i32.load offset=4
|
|
|
|
i32.store offset=4
|
|
|
|
local.get $3
|
|
|
|
local.get $1
|
|
|
|
i32.load offset=8
|
|
|
|
i32.store offset=8
|
|
|
|
local.get $3
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
local.get $1
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
local.get $2
|
|
|
|
call $~lib/memory/memory.copy
|
|
|
|
local.get $1
|
|
|
|
local.get $4
|
|
|
|
i32.const 1
|
|
|
|
i32.or
|
|
|
|
i32.store
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
call $~lib/rt/tlsf/insertBlock
|
|
|
|
local.get $3
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/tlsf/__realloc (; 26 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
2019-05-23 03:08:25 +02:00
|
|
|
global.get $~lib/rt/tlsf/ROOT
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 553
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 13
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
i32.const 15
|
|
|
|
i32.and
|
|
|
|
i32.eqz
|
|
|
|
i32.const 0
|
|
|
|
local.get $0
|
|
|
|
select
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
|
|
|
i32.const 128
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 554
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 2
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
global.get $~lib/rt/tlsf/ROOT
|
|
|
|
local.get $0
|
|
|
|
i32.const 16
|
|
|
|
i32.sub
|
|
|
|
local.get $1
|
|
|
|
call $~lib/rt/tlsf/reallocateBlock
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/memory/memory.fill (; 27 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
2019-05-23 03:08:25 +02:00
|
|
|
(local $2 i32)
|
|
|
|
block $~lib/util/memory/memset|inlined.0
|
|
|
|
local.get $1
|
|
|
|
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 $1
|
|
|
|
i32.sub
|
|
|
|
local.set $2
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
i32.add
|
|
|
|
local.tee $0
|
|
|
|
i32.const 0
|
|
|
|
i32.store
|
|
|
|
local.get $2
|
|
|
|
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
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 16
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.sub
|
|
|
|
i32.const 0
|
|
|
|
i32.store
|
|
|
|
local.get $0
|
|
|
|
i32.const 4
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.and
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 24
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.add
|
2019-05-23 03:08:25 +02:00
|
|
|
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-05-20 23:10:06 +02:00
|
|
|
local.get $1
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 32
|
|
|
|
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-05-20 23:10:06 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/array/ensureSize (; 28 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $2 i32)
|
|
|
|
(local $3 i32)
|
|
|
|
(local $4 i32)
|
|
|
|
local.get $1
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=8
|
|
|
|
local.tee $2
|
|
|
|
i32.const 2
|
|
|
|
i32.shr_u
|
|
|
|
i32.gt_u
|
|
|
|
if
|
|
|
|
local.get $1
|
|
|
|
i32.const 268435452
|
|
|
|
i32.gt_u
|
|
|
|
if
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 24
|
|
|
|
i32.const 376
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 14
|
|
|
|
i32.const 47
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
i32.load
|
|
|
|
local.tee $4
|
|
|
|
local.get $1
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
local.tee $3
|
|
|
|
call $~lib/rt/tlsf/__realloc
|
|
|
|
local.tee $1
|
|
|
|
local.get $2
|
|
|
|
i32.add
|
|
|
|
local.get $3
|
|
|
|
local.get $2
|
|
|
|
i32.sub
|
|
|
|
call $~lib/memory/memory.fill
|
|
|
|
local.get $1
|
|
|
|
local.get $4
|
|
|
|
i32.ne
|
|
|
|
if
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__retain
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.store
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
i32.store offset=4
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
local.get $3
|
|
|
|
i32.store offset=8
|
|
|
|
end
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/array/Array<i32>#push (; 29 ;) (type $FUNCSIG$vi) (param $0 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $1 i32)
|
|
|
|
(local $2 i32)
|
|
|
|
local.get $0
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=12
|
|
|
|
local.tee $1
|
|
|
|
i32.const 1
|
|
|
|
i32.add
|
|
|
|
local.tee $2
|
|
|
|
call $~lib/array/ensureSize
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=4
|
|
|
|
local.get $1
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
i32.add
|
|
|
|
i32.const 123
|
|
|
|
i32.store
|
|
|
|
local.get $0
|
|
|
|
local.get $2
|
|
|
|
i32.store offset=12
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/array/Array<i32>#pop (; 30 ;) (type $FUNCSIG$vi) (param $0 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $1 i32)
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=12
|
|
|
|
local.tee $1
|
|
|
|
i32.const 1
|
|
|
|
i32.lt_s
|
|
|
|
if
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 424
|
|
|
|
i32.const 376
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 250
|
|
|
|
i32.const 20
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=4
|
|
|
|
local.get $1
|
|
|
|
i32.const 1
|
|
|
|
i32.sub
|
|
|
|
local.tee $1
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
i32.add
|
|
|
|
i32.load
|
|
|
|
drop
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
i32.store offset=12
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/rt/pure/__release (; 31 ;) (type $FUNCSIG$vi) (param $0 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 724
|
|
|
|
i32.gt_u
|
2019-05-20 23:10:06 +02:00
|
|
|
if
|
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 16
|
|
|
|
i32.sub
|
|
|
|
call $~lib/rt/pure/decrement
|
2019-05-20 23:10:06 +02:00
|
|
|
end
|
|
|
|
)
|
2019-05-23 16:41:26 +02:00
|
|
|
(func $~lib/array/Array<~lib/string/String>#push (; 32 ;) (type $FUNCSIG$vi) (param $0 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $1 i32)
|
|
|
|
(local $2 i32)
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 584
|
|
|
|
call $~lib/rt/pure/__retain
|
2019-05-20 23:10:06 +02:00
|
|
|
drop
|
|
|
|
local.get $0
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=12
|
|
|
|
local.tee $1
|
|
|
|
i32.const 1
|
|
|
|
i32.add
|
|
|
|
local.tee $2
|
|
|
|
call $~lib/array/ensureSize
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=4
|
|
|
|
local.get $1
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
i32.add
|
|
|
|
local.tee $1
|
|
|
|
local.get $1
|
|
|
|
i32.load
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 584
|
|
|
|
call $~lib/rt/pure/__retainRelease
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.store
|
|
|
|
local.get $0
|
|
|
|
local.get $2
|
|
|
|
i32.store offset=12
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 584
|
|
|
|
call $~lib/rt/pure/__release
|
2019-05-20 23:10:06 +02:00
|
|
|
)
|
2019-05-24 14:45:27 +02:00
|
|
|
(func $~lib/string/String#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
|
|
|
local.get $0
|
|
|
|
i32.const 16
|
|
|
|
i32.sub
|
|
|
|
i32.load offset=12
|
|
|
|
i32.const 1
|
|
|
|
i32.shr_u
|
|
|
|
)
|
|
|
|
(func $~lib/string/String#concat (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $2 i32)
|
|
|
|
(local $3 i32)
|
|
|
|
(local $4 i32)
|
|
|
|
local.get $1
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__retain
|
2019-05-20 23:10:06 +02:00
|
|
|
drop
|
2019-05-24 14:45:27 +02:00
|
|
|
local.get $1
|
|
|
|
i32.eqz
|
|
|
|
if
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $1
|
2019-05-24 14:45:27 +02:00
|
|
|
i32.const 648
|
|
|
|
call $~lib/rt/pure/__retainRelease
|
|
|
|
local.set $1
|
2019-05-20 23:10:06 +02:00
|
|
|
end
|
2019-05-24 14:45:27 +02:00
|
|
|
local.get $0
|
|
|
|
call $~lib/string/String#get:length
|
|
|
|
i32.const 1
|
|
|
|
i32.shl
|
|
|
|
local.tee $3
|
|
|
|
local.get $1
|
|
|
|
call $~lib/string/String#get:length
|
|
|
|
i32.const 1
|
|
|
|
i32.shl
|
|
|
|
local.tee $4
|
|
|
|
i32.add
|
|
|
|
local.tee $2
|
|
|
|
i32.eqz
|
2019-05-20 23:10:06 +02:00
|
|
|
if
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 584
|
|
|
|
call $~lib/rt/pure/__retain
|
2019-05-20 23:10:06 +02:00
|
|
|
local.set $0
|
|
|
|
local.get $1
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__release
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
|
|
|
return
|
|
|
|
end
|
|
|
|
local.get $2
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 1
|
2019-05-20 23:10:06 +02:00
|
|
|
call $~lib/rt/tlsf/__alloc
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__retain
|
2019-05-20 23:10:06 +02:00
|
|
|
local.tee $2
|
|
|
|
local.get $0
|
|
|
|
local.get $3
|
|
|
|
call $~lib/memory/memory.copy
|
|
|
|
local.get $2
|
|
|
|
local.get $3
|
|
|
|
i32.add
|
|
|
|
local.get $1
|
|
|
|
local.get $4
|
|
|
|
call $~lib/memory/memory.copy
|
|
|
|
local.get $1
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__release
|
|
|
|
local.get $2
|
2019-05-20 23:10:06 +02:00
|
|
|
)
|
2019-05-24 14:45:27 +02:00
|
|
|
(func $~lib/string/String.__concat (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $2 i32)
|
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__retain
|
2019-05-20 23:10:06 +02:00
|
|
|
drop
|
|
|
|
local.get $1
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__retain
|
2019-05-20 23:10:06 +02:00
|
|
|
drop
|
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 648
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
|
|
|
select
|
|
|
|
local.get $1
|
|
|
|
call $~lib/string/String#concat
|
2019-05-23 03:08:25 +02:00
|
|
|
local.set $2
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__release
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $1
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__release
|
|
|
|
local.get $2
|
2019-05-20 23:10:06 +02:00
|
|
|
)
|
2019-05-24 14:45:27 +02:00
|
|
|
(func $~lib/rt/pure/markGray (; 36 ;) (type $FUNCSIG$vi) (param $0 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $1 i32)
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=4
|
|
|
|
local.tee $1
|
|
|
|
i32.const 1879048192
|
|
|
|
i32.and
|
|
|
|
i32.const 268435456
|
|
|
|
i32.ne
|
|
|
|
if
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
i32.const -1879048193
|
|
|
|
i32.and
|
|
|
|
i32.const 268435456
|
|
|
|
i32.or
|
|
|
|
i32.store offset=4
|
|
|
|
local.get $0
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
i32.const 2
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/__visit_members
|
2019-05-20 23:10:06 +02:00
|
|
|
end
|
|
|
|
)
|
2019-05-24 14:45:27 +02:00
|
|
|
(func $~lib/rt/pure/scanBlack (; 37 ;) (type $FUNCSIG$vi) (param $0 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=4
|
|
|
|
i32.const -1879048193
|
|
|
|
i32.and
|
|
|
|
i32.store offset=4
|
|
|
|
local.get $0
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
i32.const 4
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/__visit_members
|
2019-05-20 23:10:06 +02:00
|
|
|
)
|
2019-05-24 14:45:27 +02:00
|
|
|
(func $~lib/rt/pure/scan (; 38 ;) (type $FUNCSIG$vi) (param $0 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $1 i32)
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=4
|
|
|
|
local.tee $1
|
|
|
|
i32.const 1879048192
|
|
|
|
i32.and
|
|
|
|
i32.const 268435456
|
|
|
|
i32.eq
|
|
|
|
if
|
|
|
|
local.get $1
|
|
|
|
i32.const 268435455
|
|
|
|
i32.and
|
|
|
|
i32.const 0
|
|
|
|
i32.gt_u
|
|
|
|
if
|
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/scanBlack
|
2019-05-20 23:10:06 +02:00
|
|
|
else
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
i32.const -1879048193
|
|
|
|
i32.and
|
|
|
|
i32.const 536870912
|
|
|
|
i32.or
|
|
|
|
i32.store offset=4
|
|
|
|
local.get $0
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
i32.const 3
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/__visit_members
|
2019-05-20 23:10:06 +02:00
|
|
|
end
|
|
|
|
end
|
|
|
|
)
|
2019-05-24 14:45:27 +02:00
|
|
|
(func $~lib/rt/pure/collectWhite (; 39 ;) (type $FUNCSIG$vi) (param $0 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $1 i32)
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=4
|
|
|
|
local.tee $1
|
|
|
|
i32.const 1879048192
|
|
|
|
i32.and
|
|
|
|
i32.const 536870912
|
|
|
|
i32.eq
|
|
|
|
if (result i32)
|
|
|
|
local.get $1
|
|
|
|
i32.const -2147483648
|
|
|
|
i32.and
|
|
|
|
i32.eqz
|
|
|
|
else
|
|
|
|
i32.const 0
|
|
|
|
end
|
|
|
|
if
|
|
|
|
local.get $0
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
i32.const 5
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/__visit_members
|
2019-05-20 23:10:06 +02:00
|
|
|
end
|
|
|
|
global.get $~lib/rt/tlsf/ROOT
|
|
|
|
local.get $0
|
|
|
|
call $~lib/rt/tlsf/freeBlock
|
|
|
|
)
|
2019-05-24 14:45:27 +02:00
|
|
|
(func $~lib/rt/pure/__collect (; 40 ;) (type $FUNCSIG$v)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $0 i32)
|
|
|
|
(local $1 i32)
|
|
|
|
(local $2 i32)
|
|
|
|
(local $3 i32)
|
|
|
|
(local $4 i32)
|
|
|
|
(local $5 i32)
|
2019-05-23 03:08:25 +02:00
|
|
|
global.get $~lib/rt/pure/ROOTS
|
2019-05-20 23:10:06 +02:00
|
|
|
local.tee $5
|
|
|
|
local.tee $2
|
|
|
|
local.set $3
|
2019-05-23 03:08:25 +02:00
|
|
|
global.get $~lib/rt/pure/CUR
|
2019-05-20 23:10:06 +02:00
|
|
|
local.set $0
|
|
|
|
loop $repeat|0
|
|
|
|
block $break|0
|
|
|
|
local.get $3
|
|
|
|
local.get $0
|
|
|
|
i32.ge_u
|
|
|
|
br_if $break|0
|
|
|
|
local.get $3
|
|
|
|
i32.load
|
|
|
|
local.tee $4
|
|
|
|
i32.load offset=4
|
|
|
|
local.tee $1
|
|
|
|
i32.const 1879048192
|
|
|
|
i32.and
|
|
|
|
i32.const 805306368
|
|
|
|
i32.eq
|
|
|
|
if (result i32)
|
|
|
|
local.get $1
|
|
|
|
i32.const 268435455
|
|
|
|
i32.and
|
|
|
|
i32.const 0
|
|
|
|
i32.gt_u
|
|
|
|
else
|
|
|
|
i32.const 0
|
|
|
|
end
|
|
|
|
if
|
|
|
|
local.get $4
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/markGray
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $2
|
|
|
|
local.get $4
|
|
|
|
i32.store
|
|
|
|
local.get $2
|
|
|
|
i32.const 4
|
|
|
|
i32.add
|
|
|
|
local.set $2
|
|
|
|
else
|
|
|
|
i32.const 0
|
|
|
|
local.get $1
|
|
|
|
i32.const 268435455
|
|
|
|
i32.and
|
|
|
|
i32.eqz
|
|
|
|
local.get $1
|
|
|
|
i32.const 1879048192
|
|
|
|
i32.and
|
|
|
|
select
|
|
|
|
if
|
|
|
|
global.get $~lib/rt/tlsf/ROOT
|
|
|
|
local.get $4
|
|
|
|
call $~lib/rt/tlsf/freeBlock
|
|
|
|
else
|
|
|
|
local.get $4
|
|
|
|
local.get $1
|
|
|
|
i32.const 2147483647
|
|
|
|
i32.and
|
|
|
|
i32.store offset=4
|
|
|
|
end
|
|
|
|
end
|
|
|
|
local.get $3
|
|
|
|
i32.const 4
|
|
|
|
i32.add
|
|
|
|
local.set $3
|
|
|
|
br $repeat|0
|
|
|
|
end
|
|
|
|
end
|
|
|
|
local.get $2
|
2019-05-23 03:08:25 +02:00
|
|
|
global.set $~lib/rt/pure/CUR
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $5
|
|
|
|
local.set $0
|
|
|
|
loop $repeat|1
|
|
|
|
block $break|1
|
|
|
|
local.get $0
|
|
|
|
local.get $2
|
|
|
|
i32.ge_u
|
|
|
|
br_if $break|1
|
|
|
|
local.get $0
|
|
|
|
i32.load
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/scan
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
|
|
|
i32.const 4
|
|
|
|
i32.add
|
|
|
|
local.set $0
|
|
|
|
br $repeat|1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
local.get $5
|
|
|
|
local.set $0
|
|
|
|
loop $repeat|2
|
|
|
|
block $break|2
|
|
|
|
local.get $0
|
|
|
|
local.get $2
|
|
|
|
i32.ge_u
|
|
|
|
br_if $break|2
|
|
|
|
local.get $0
|
|
|
|
i32.load
|
|
|
|
local.tee $1
|
|
|
|
local.get $1
|
|
|
|
i32.load offset=4
|
|
|
|
i32.const 2147483647
|
|
|
|
i32.and
|
|
|
|
i32.store offset=4
|
|
|
|
local.get $1
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/collectWhite
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
|
|
|
i32.const 4
|
|
|
|
i32.add
|
|
|
|
local.set $0
|
|
|
|
br $repeat|2
|
|
|
|
end
|
|
|
|
end
|
|
|
|
local.get $5
|
2019-05-23 03:08:25 +02:00
|
|
|
global.set $~lib/rt/pure/CUR
|
2019-05-20 23:10:06 +02:00
|
|
|
)
|
2019-05-24 14:45:27 +02:00
|
|
|
(func $start:retain-release-sanity (; 41 ;) (type $FUNCSIG$v)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $0 i32)
|
|
|
|
(local $1 i32)
|
|
|
|
(local $2 i32)
|
|
|
|
(local $3 i32)
|
|
|
|
i32.const 16
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 3
|
2019-05-20 23:10:06 +02:00
|
|
|
call $~lib/rt/tlsf/__alloc
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__retain
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 3
|
|
|
|
call $~lib/arraybuffer/ArrayBufferView#constructor
|
|
|
|
local.tee $0
|
|
|
|
i32.const 0
|
|
|
|
i32.store offset=12
|
|
|
|
local.get $0
|
|
|
|
i32.const 3
|
|
|
|
i32.store offset=12
|
|
|
|
local.get $0
|
|
|
|
call $~lib/array/Array<i32>#push
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $0
|
2019-05-20 23:10:06 +02:00
|
|
|
call $~lib/array/Array<i32>#push
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $0
|
2019-05-20 23:10:06 +02:00
|
|
|
call $~lib/array/Array<i32>#pop
|
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__release
|
2019-05-20 23:10:06 +02:00
|
|
|
loop $repeat|0
|
|
|
|
local.get $1
|
|
|
|
i32.const 10
|
|
|
|
i32.lt_s
|
|
|
|
if
|
|
|
|
i32.const 16
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 4
|
2019-05-20 23:10:06 +02:00
|
|
|
call $~lib/rt/tlsf/__alloc
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__retain
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 0
|
|
|
|
call $~lib/arraybuffer/ArrayBufferView#constructor
|
|
|
|
local.tee $0
|
|
|
|
i32.const 0
|
|
|
|
i32.store offset=12
|
|
|
|
local.get $0
|
|
|
|
i32.const 0
|
|
|
|
i32.store offset=12
|
|
|
|
i32.const 0
|
|
|
|
local.set $2
|
|
|
|
loop $repeat|1
|
|
|
|
local.get $2
|
|
|
|
i32.const 10
|
|
|
|
i32.lt_s
|
|
|
|
if
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $0
|
2019-05-20 23:10:06 +02:00
|
|
|
call $~lib/array/Array<~lib/string/String>#push
|
|
|
|
local.get $2
|
|
|
|
i32.const 1
|
|
|
|
i32.add
|
|
|
|
local.set $2
|
|
|
|
br $repeat|1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__release
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $1
|
|
|
|
i32.const 1
|
|
|
|
i32.add
|
|
|
|
local.set $1
|
|
|
|
br $repeat|0
|
|
|
|
end
|
|
|
|
end
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 600
|
|
|
|
call $~lib/rt/pure/__retain
|
2019-05-20 23:10:06 +02:00
|
|
|
local.tee $0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 624
|
2019-05-20 23:10:06 +02:00
|
|
|
call $~lib/string/String.__concat
|
|
|
|
local.tee $1
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__retain
|
2019-05-20 23:10:06 +02:00
|
|
|
local.tee $2
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 672
|
2019-05-20 23:10:06 +02:00
|
|
|
call $~lib/string/String.__concat
|
|
|
|
local.set $3
|
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__release
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $1
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__release
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $2
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__release
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $3
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__release
|
|
|
|
call $~lib/rt/pure/__collect
|
2019-05-20 23:10:06 +02:00
|
|
|
)
|
2019-05-24 14:45:27 +02:00
|
|
|
(func $retain-release-sanity/main (; 42 ;) (type $FUNCSIG$v)
|
2019-05-20 23:10:06 +02:00
|
|
|
global.get $~lib/started
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
call $start:retain-release-sanity
|
|
|
|
i32.const 1
|
|
|
|
global.set $~lib/started
|
|
|
|
end
|
|
|
|
)
|
2019-05-24 14:45:27 +02:00
|
|
|
(func $~lib/rt/pure/__visit (; 43 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 724
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.lt_u
|
|
|
|
if
|
|
|
|
return
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
i32.const 16
|
|
|
|
i32.sub
|
|
|
|
local.set $0
|
|
|
|
block $break|0
|
|
|
|
block $case5|0
|
|
|
|
block $case4|0
|
|
|
|
block $case3|0
|
|
|
|
block $case2|0
|
|
|
|
block $case1|0
|
|
|
|
local.get $1
|
|
|
|
i32.const 1
|
|
|
|
i32.ne
|
|
|
|
if
|
|
|
|
local.get $1
|
|
|
|
i32.const 2
|
|
|
|
i32.eq
|
|
|
|
br_if $case1|0
|
|
|
|
block $tablify|0
|
|
|
|
local.get $1
|
|
|
|
i32.const 3
|
|
|
|
i32.sub
|
|
|
|
br_table $case2|0 $case3|0 $case4|0 $tablify|0
|
|
|
|
end
|
|
|
|
br $case5|0
|
|
|
|
end
|
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/decrement
|
2019-05-20 23:10:06 +02:00
|
|
|
br $break|0
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=4
|
|
|
|
i32.const 268435455
|
|
|
|
i32.and
|
|
|
|
i32.const 0
|
|
|
|
i32.le_u
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 232
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 75
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 17
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=4
|
|
|
|
i32.const 1
|
|
|
|
i32.sub
|
|
|
|
i32.store offset=4
|
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/markGray
|
2019-05-20 23:10:06 +02:00
|
|
|
br $break|0
|
|
|
|
end
|
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/scan
|
2019-05-20 23:10:06 +02:00
|
|
|
br $break|0
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=4
|
|
|
|
local.tee $1
|
|
|
|
i32.const -268435456
|
|
|
|
i32.and
|
|
|
|
local.get $1
|
|
|
|
i32.const 1
|
|
|
|
i32.add
|
|
|
|
i32.const -268435456
|
|
|
|
i32.and
|
|
|
|
i32.ne
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 232
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 86
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 6
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
i32.const 1
|
|
|
|
i32.add
|
|
|
|
i32.store offset=4
|
|
|
|
local.get $1
|
|
|
|
i32.const 1879048192
|
|
|
|
i32.and
|
|
|
|
if
|
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/scanBlack
|
2019-05-20 23:10:06 +02:00
|
|
|
end
|
|
|
|
br $break|0
|
|
|
|
end
|
|
|
|
local.get $0
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/collectWhite
|
2019-05-20 23:10:06 +02:00
|
|
|
br $break|0
|
|
|
|
end
|
|
|
|
i32.const 0
|
2019-05-23 03:08:25 +02:00
|
|
|
i32.const 232
|
2019-05-23 16:41:26 +02:00
|
|
|
i32.const 97
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.const 24
|
|
|
|
call $~lib/builtins/abort
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
)
|
2019-05-24 14:45:27 +02:00
|
|
|
(func $~lib/array/Array<~lib/string/String>#__visit_impl (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
2019-05-20 23:10:06 +02:00
|
|
|
(local $2 i32)
|
|
|
|
(local $3 i32)
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=4
|
|
|
|
local.tee $2
|
|
|
|
local.get $0
|
|
|
|
i32.load offset=8
|
|
|
|
i32.add
|
2019-05-23 03:08:25 +02:00
|
|
|
local.set $0
|
2019-05-20 23:10:06 +02:00
|
|
|
loop $continue|0
|
|
|
|
local.get $2
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $0
|
2019-05-20 23:10:06 +02:00
|
|
|
i32.lt_u
|
|
|
|
if
|
|
|
|
local.get $2
|
|
|
|
i32.load
|
2019-05-23 03:08:25 +02:00
|
|
|
local.tee $3
|
2019-05-20 23:10:06 +02:00
|
|
|
if
|
2019-05-23 03:08:25 +02:00
|
|
|
local.get $3
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $1
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__visit
|
2019-05-20 23:10:06 +02:00
|
|
|
end
|
|
|
|
local.get $2
|
|
|
|
i32.const 4
|
|
|
|
i32.add
|
|
|
|
local.set $2
|
|
|
|
br $continue|0
|
|
|
|
end
|
|
|
|
end
|
|
|
|
)
|
2019-05-24 14:45:27 +02:00
|
|
|
(func $~lib/rt/__visit_members (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
2019-05-23 03:08:25 +02:00
|
|
|
block $block$4$break
|
|
|
|
block $switch$1$default
|
|
|
|
block $switch$1$case$6
|
|
|
|
block $switch$1$case$2
|
|
|
|
local.get $0
|
|
|
|
i32.const 8
|
|
|
|
i32.sub
|
|
|
|
i32.load
|
|
|
|
br_table $switch$1$case$2 $switch$1$case$2 $block$4$break $block$4$break $switch$1$case$6 $switch$1$default
|
2019-05-20 23:10:06 +02:00
|
|
|
end
|
|
|
|
return
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/array/Array<~lib/string/String>#__visit_impl
|
|
|
|
br $block$4$break
|
2019-05-20 23:10:06 +02:00
|
|
|
end
|
2019-05-23 03:08:25 +02:00
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
i32.load
|
|
|
|
local.tee $0
|
|
|
|
if
|
2019-05-20 23:10:06 +02:00
|
|
|
local.get $0
|
|
|
|
local.get $1
|
2019-05-23 03:08:25 +02:00
|
|
|
call $~lib/rt/pure/__visit
|
2019-05-20 23:10:06 +02:00
|
|
|
end
|
|
|
|
)
|
2019-05-24 14:45:27 +02:00
|
|
|
(func $null (; 46 ;) (type $FUNCSIG$v)
|
2019-05-20 23:10:06 +02:00
|
|
|
nop
|
|
|
|
)
|
|
|
|
)
|