2019-04-15 12:41:29 +02:00
|
|
|
(module
|
|
|
|
(type $FUNCSIG$ii (func (param i32) (result i32)))
|
|
|
|
(type $FUNCSIG$i (func (result i32)))
|
|
|
|
(type $FUNCSIG$vii (func (param i32 i32)))
|
|
|
|
(type $FUNCSIG$viii (func (param i32 i32 i32)))
|
|
|
|
(type $FUNCSIG$viiii (func (param i32 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)))
|
|
|
|
(type $FUNCSIG$v (func))
|
|
|
|
(memory $0 0)
|
|
|
|
(global $../../compiler/runtime/asrt/ROOT (mut i32) (i32.const 0))
|
|
|
|
(export "memory" (memory $0))
|
|
|
|
(export "memory.allocate" (func $assembly/index/memory.allocate))
|
|
|
|
(export "memory.free" (func $assembly/index/memory.free))
|
|
|
|
(func $../../compiler/runtime/asrt/setTail (; 0 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
2019-04-15 13:10:41 +02:00
|
|
|
i32.store offset=2784
|
2019-04-15 12:41:29 +02:00
|
|
|
)
|
|
|
|
(func $../../compiler/runtime/asrt/setSLMap (; 1 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
i32.add
|
|
|
|
local.get $2
|
|
|
|
i32.store offset=4
|
|
|
|
)
|
|
|
|
(func $../../compiler/runtime/asrt/setHead (; 2 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
i32.const 5
|
|
|
|
i32.shl
|
|
|
|
local.get $2
|
|
|
|
i32.add
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
i32.add
|
|
|
|
local.get $3
|
|
|
|
i32.store offset=96
|
|
|
|
)
|
|
|
|
(func $../../compiler/runtime/asrt/getRight (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
|
|
|
local.get $0
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
local.get $0
|
|
|
|
i32.load
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
i32.add
|
|
|
|
)
|
|
|
|
(func $../../compiler/runtime/asrt/fls<usize> (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
|
|
|
i32.const 31
|
|
|
|
local.get $0
|
|
|
|
i32.clz
|
|
|
|
i32.sub
|
|
|
|
)
|
|
|
|
(func $../../compiler/runtime/asrt/getHead (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
i32.const 5
|
|
|
|
i32.shl
|
|
|
|
local.get $2
|
|
|
|
i32.add
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
i32.add
|
|
|
|
i32.load offset=96
|
|
|
|
)
|
|
|
|
(func $../../compiler/runtime/asrt/getSLMap (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
i32.const 2
|
|
|
|
i32.shl
|
|
|
|
i32.add
|
|
|
|
i32.load offset=4
|
|
|
|
)
|
|
|
|
(func $../../compiler/runtime/asrt/removeBlock (; 7 ;) (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
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
local.tee $2
|
2019-04-15 13:10:41 +02:00
|
|
|
i32.const 512
|
2019-04-15 12:41:29 +02:00
|
|
|
i32.lt_u
|
|
|
|
if (result i32)
|
|
|
|
local.get $2
|
2019-04-15 13:10:41 +02:00
|
|
|
i32.const 16
|
2019-04-15 12:41:29 +02:00
|
|
|
i32.div_u
|
|
|
|
local.set $4
|
|
|
|
i32.const 0
|
|
|
|
else
|
|
|
|
local.get $2
|
|
|
|
local.get $2
|
|
|
|
call $../../compiler/runtime/asrt/fls<usize>
|
|
|
|
local.tee $3
|
|
|
|
i32.const 5
|
|
|
|
i32.sub
|
|
|
|
i32.shr_u
|
|
|
|
i32.const 32
|
|
|
|
i32.xor
|
|
|
|
local.set $4
|
|
|
|
local.get $3
|
2019-04-15 13:10:41 +02:00
|
|
|
i32.const 8
|
2019-04-15 12:41:29 +02:00
|
|
|
i32.sub
|
|
|
|
end
|
|
|
|
local.set $3
|
|
|
|
local.get $1
|
|
|
|
i32.load offset=20
|
|
|
|
local.set $2
|
|
|
|
local.get $1
|
|
|
|
i32.load offset=16
|
|
|
|
local.tee $5
|
|
|
|
if
|
|
|
|
local.get $5
|
|
|
|
local.get $2
|
|
|
|
i32.store offset=20
|
|
|
|
end
|
|
|
|
local.get $2
|
|
|
|
if
|
|
|
|
local.get $2
|
|
|
|
local.get $5
|
|
|
|
i32.store offset=16
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
local.get $3
|
|
|
|
local.get $4
|
|
|
|
call $../../compiler/runtime/asrt/getHead
|
|
|
|
local.get $1
|
|
|
|
i32.eq
|
|
|
|
if
|
|
|
|
local.get $0
|
|
|
|
local.get $3
|
|
|
|
local.get $4
|
|
|
|
local.get $2
|
|
|
|
call $../../compiler/runtime/asrt/setHead
|
|
|
|
local.get $2
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
local.get $0
|
|
|
|
local.get $3
|
|
|
|
local.get $0
|
|
|
|
local.get $3
|
|
|
|
call $../../compiler/runtime/asrt/getSLMap
|
|
|
|
i32.const 1
|
|
|
|
local.get $4
|
|
|
|
i32.shl
|
|
|
|
i32.const -1
|
|
|
|
i32.xor
|
|
|
|
i32.and
|
|
|
|
local.tee $1
|
|
|
|
call $../../compiler/runtime/asrt/setSLMap
|
|
|
|
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
|
|
|
|
)
|
|
|
|
(func $../../compiler/runtime/asrt/insertBlock (; 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.set $2
|
|
|
|
local.get $1
|
|
|
|
call $../../compiler/runtime/asrt/getRight
|
|
|
|
local.tee $3
|
|
|
|
i32.load
|
|
|
|
local.tee $4
|
|
|
|
i32.const 1
|
|
|
|
i32.and
|
|
|
|
if
|
|
|
|
local.get $0
|
|
|
|
local.get $3
|
|
|
|
call $../../compiler/runtime/asrt/removeBlock
|
|
|
|
local.get $1
|
|
|
|
local.get $2
|
|
|
|
local.get $4
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
i32.add
|
|
|
|
local.tee $2
|
|
|
|
i32.store
|
|
|
|
local.get $1
|
|
|
|
call $../../compiler/runtime/asrt/getRight
|
|
|
|
local.tee $3
|
|
|
|
i32.load
|
|
|
|
local.set $4
|
|
|
|
end
|
|
|
|
local.get $2
|
|
|
|
i32.const 2
|
|
|
|
i32.and
|
|
|
|
if
|
|
|
|
local.get $1
|
|
|
|
i32.const 4
|
|
|
|
i32.sub
|
|
|
|
i32.load
|
|
|
|
local.tee $1
|
|
|
|
i32.load
|
|
|
|
local.set $5
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
call $../../compiler/runtime/asrt/removeBlock
|
|
|
|
local.get $1
|
|
|
|
local.get $5
|
|
|
|
local.get $2
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
i32.add
|
|
|
|
local.tee $2
|
|
|
|
i32.store
|
|
|
|
end
|
|
|
|
local.get $3
|
|
|
|
local.get $4
|
|
|
|
i32.const 2
|
|
|
|
i32.or
|
|
|
|
i32.store
|
|
|
|
local.get $3
|
|
|
|
i32.const 4
|
|
|
|
i32.sub
|
|
|
|
local.get $1
|
|
|
|
i32.store
|
|
|
|
local.get $0
|
|
|
|
local.get $2
|
|
|
|
i32.const -4
|
|
|
|
i32.and
|
|
|
|
local.tee $2
|
2019-04-15 13:10:41 +02:00
|
|
|
i32.const 512
|
2019-04-15 12:41:29 +02:00
|
|
|
i32.lt_u
|
|
|
|
if (result i32)
|
|
|
|
local.get $2
|
2019-04-15 13:10:41 +02:00
|
|
|
i32.const 16
|
2019-04-15 12:41:29 +02:00
|
|
|
i32.div_u
|
|
|
|
local.set $2
|
|
|
|
i32.const 0
|
|
|
|
else
|
|
|
|
local.get $2
|
|
|
|
local.get $2
|
|
|
|
call $../../compiler/runtime/asrt/fls<usize>
|
|
|
|
local.tee $3
|
|
|
|
i32.const 5
|
|
|
|
i32.sub
|
|
|
|
i32.shr_u
|
|
|
|
i32.const 32
|
|
|
|
i32.xor
|
|
|
|
local.set $2
|
|
|
|
local.get $3
|
2019-04-15 13:10:41 +02:00
|
|
|
i32.const 8
|
2019-04-15 12:41:29 +02:00
|
|
|
i32.sub
|
|
|
|
end
|
|
|
|
local.tee $3
|
|
|
|
local.get $2
|
|
|
|
call $../../compiler/runtime/asrt/getHead
|
|
|
|
local.set $4
|
|
|
|
local.get $1
|
|
|
|
i32.const 0
|
|
|
|
i32.store offset=16
|
|
|
|
local.get $1
|
|
|
|
local.get $4
|
|
|
|
i32.store offset=20
|
|
|
|
local.get $4
|
|
|
|
if
|
|
|
|
local.get $4
|
|
|
|
local.get $1
|
|
|
|
i32.store offset=16
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
local.get $3
|
|
|
|
local.get $2
|
|
|
|
local.get $1
|
|
|
|
call $../../compiler/runtime/asrt/setHead
|
|
|
|
local.get $0
|
|
|
|
local.get $0
|
|
|
|
i32.load
|
|
|
|
i32.const 1
|
|
|
|
local.get $3
|
|
|
|
i32.shl
|
|
|
|
i32.or
|
|
|
|
i32.store
|
|
|
|
local.get $0
|
|
|
|
local.get $3
|
|
|
|
local.get $0
|
|
|
|
local.get $3
|
|
|
|
call $../../compiler/runtime/asrt/getSLMap
|
|
|
|
i32.const 1
|
|
|
|
local.get $2
|
|
|
|
i32.shl
|
|
|
|
i32.or
|
|
|
|
call $../../compiler/runtime/asrt/setSLMap
|
|
|
|
)
|
|
|
|
(func $../../compiler/runtime/asrt/addMemory (; 9 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
|
|
|
(local $3 i32)
|
|
|
|
local.get $2
|
|
|
|
block (result i32)
|
|
|
|
local.get $0
|
2019-04-15 13:10:41 +02:00
|
|
|
i32.load offset=2784
|
2019-04-15 12:41:29 +02:00
|
|
|
local.tee $2
|
|
|
|
if
|
|
|
|
local.get $1
|
|
|
|
i32.const 16
|
|
|
|
i32.sub
|
|
|
|
local.get $2
|
|
|
|
i32.eq
|
|
|
|
if
|
|
|
|
local.get $2
|
|
|
|
i32.load
|
|
|
|
local.set $3
|
|
|
|
local.get $1
|
|
|
|
i32.const 16
|
|
|
|
i32.sub
|
|
|
|
local.set $1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
local.get $1
|
|
|
|
end
|
|
|
|
i32.sub
|
|
|
|
local.tee $2
|
|
|
|
i32.const 48
|
|
|
|
i32.lt_u
|
|
|
|
if
|
|
|
|
return
|
|
|
|
end
|
|
|
|
local.get $1
|
|
|
|
local.get $3
|
|
|
|
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
|
|
|
|
call $../../compiler/runtime/asrt/setTail
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
call $../../compiler/runtime/asrt/insertBlock
|
|
|
|
)
|
|
|
|
(func $../../compiler/runtime/asrt/initialize (; 10 ;) (type $FUNCSIG$i) (result i32)
|
|
|
|
(local $0 i32)
|
|
|
|
(local $1 i32)
|
|
|
|
(local $2 i32)
|
|
|
|
(local $3 i32)
|
2019-04-15 13:10:41 +02:00
|
|
|
i32.const 16
|
2019-04-15 12:41:29 +02:00
|
|
|
local.tee $3
|
2019-04-15 13:10:41 +02:00
|
|
|
i32.const 68323
|
2019-04-15 12:41:29 +02:00
|
|
|
i32.add
|
|
|
|
i32.const -65536
|
|
|
|
i32.and
|
|
|
|
i32.const 16
|
|
|
|
i32.shr_u
|
|
|
|
local.tee $1
|
|
|
|
current_memory
|
|
|
|
local.tee $0
|
|
|
|
i32.gt_s
|
|
|
|
if (result i32)
|
|
|
|
local.get $1
|
|
|
|
local.get $0
|
|
|
|
i32.sub
|
|
|
|
grow_memory
|
|
|
|
i32.const 0
|
|
|
|
i32.lt_s
|
|
|
|
else
|
|
|
|
i32.const 0
|
|
|
|
end
|
|
|
|
if
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $3
|
|
|
|
local.tee $0
|
|
|
|
i32.const 0
|
|
|
|
i32.store
|
|
|
|
local.get $0
|
|
|
|
i32.const 0
|
|
|
|
call $../../compiler/runtime/asrt/setTail
|
|
|
|
loop $repeat|0
|
|
|
|
block $break|0
|
|
|
|
local.get $2
|
2019-04-15 13:10:41 +02:00
|
|
|
i32.const 21
|
2019-04-15 12:41:29 +02:00
|
|
|
i32.ge_u
|
|
|
|
br_if $break|0
|
|
|
|
local.get $0
|
|
|
|
local.get $2
|
|
|
|
i32.const 0
|
|
|
|
call $../../compiler/runtime/asrt/setSLMap
|
|
|
|
i32.const 0
|
|
|
|
local.set $1
|
|
|
|
loop $repeat|1
|
|
|
|
block $break|1
|
|
|
|
local.get $1
|
|
|
|
i32.const 32
|
|
|
|
i32.ge_u
|
|
|
|
br_if $break|1
|
|
|
|
local.get $0
|
|
|
|
local.get $2
|
|
|
|
local.get $1
|
|
|
|
i32.const 0
|
|
|
|
call $../../compiler/runtime/asrt/setHead
|
|
|
|
local.get $1
|
|
|
|
i32.const 1
|
|
|
|
i32.add
|
|
|
|
local.set $1
|
|
|
|
br $repeat|1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
local.get $2
|
|
|
|
i32.const 1
|
|
|
|
i32.add
|
|
|
|
local.set $2
|
|
|
|
br $repeat|0
|
|
|
|
end
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
local.get $3
|
2019-04-15 13:10:41 +02:00
|
|
|
i32.const 2803
|
2019-04-15 12:41:29 +02:00
|
|
|
i32.add
|
2019-04-15 13:10:41 +02:00
|
|
|
i32.const -16
|
2019-04-15 12:41:29 +02:00
|
|
|
i32.and
|
|
|
|
current_memory
|
|
|
|
i32.const 16
|
|
|
|
i32.shl
|
|
|
|
call $../../compiler/runtime/asrt/addMemory
|
|
|
|
local.get $0
|
|
|
|
)
|
|
|
|
(func $../../compiler/runtime/asrt/searchBlock (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
|
|
|
(local $2 i32)
|
|
|
|
local.get $1
|
2019-04-15 13:10:41 +02:00
|
|
|
i32.const 512
|
2019-04-15 12:41:29 +02:00
|
|
|
i32.lt_u
|
|
|
|
if (result i32)
|
|
|
|
local.get $1
|
2019-04-15 13:10:41 +02:00
|
|
|
i32.const 16
|
2019-04-15 12:41:29 +02:00
|
|
|
i32.div_u
|
|
|
|
else
|
|
|
|
local.get $1
|
|
|
|
local.get $1
|
|
|
|
call $../../compiler/runtime/asrt/fls<usize>
|
|
|
|
local.tee $2
|
|
|
|
i32.const 5
|
|
|
|
i32.sub
|
|
|
|
i32.shr_u
|
|
|
|
i32.const 32
|
|
|
|
i32.xor
|
|
|
|
local.set $1
|
|
|
|
local.get $2
|
2019-04-15 13:10:41 +02:00
|
|
|
i32.const 8
|
2019-04-15 12:41:29 +02:00
|
|
|
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 $../../compiler/runtime/asrt/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
|
|
|
|
i32.ctz
|
|
|
|
call $../../compiler/runtime/asrt/getHead
|
|
|
|
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 $0
|
|
|
|
local.get $1
|
|
|
|
i32.ctz
|
|
|
|
local.tee $1
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
call $../../compiler/runtime/asrt/getSLMap
|
|
|
|
i32.ctz
|
|
|
|
call $../../compiler/runtime/asrt/getHead
|
|
|
|
else
|
|
|
|
i32.const 0
|
|
|
|
end
|
|
|
|
end
|
|
|
|
)
|
|
|
|
(func $../../compiler/runtime/asrt/growMemory (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
|
|
|
(local $2 i32)
|
|
|
|
(local $3 i32)
|
|
|
|
(local $4 i32)
|
|
|
|
current_memory
|
|
|
|
local.tee $2
|
|
|
|
local.tee $3
|
|
|
|
local.get $1
|
|
|
|
i32.const 65535
|
|
|
|
i32.add
|
|
|
|
i32.const -65536
|
|
|
|
i32.and
|
|
|
|
i32.const 16
|
|
|
|
i32.shr_u
|
|
|
|
local.tee $1
|
|
|
|
local.tee $4
|
|
|
|
local.get $3
|
|
|
|
local.get $4
|
|
|
|
i32.gt_s
|
|
|
|
select
|
|
|
|
grow_memory
|
|
|
|
i32.const 0
|
|
|
|
i32.lt_s
|
|
|
|
if
|
|
|
|
local.get $1
|
|
|
|
grow_memory
|
|
|
|
i32.const 0
|
|
|
|
i32.lt_s
|
|
|
|
if
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
local.get $2
|
|
|
|
i32.const 16
|
|
|
|
i32.shl
|
|
|
|
current_memory
|
|
|
|
i32.const 16
|
|
|
|
i32.shl
|
|
|
|
call $../../compiler/runtime/asrt/addMemory
|
|
|
|
)
|
|
|
|
(func $../../compiler/runtime/asrt/prepareBlock (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
|
|
|
(local $3 i32)
|
|
|
|
(local $4 i32)
|
|
|
|
local.get $1
|
|
|
|
i32.load
|
|
|
|
local.set $3
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
call $../../compiler/runtime/asrt/removeBlock
|
|
|
|
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 $2
|
|
|
|
local.get $3
|
|
|
|
i32.const 2
|
|
|
|
i32.and
|
|
|
|
i32.or
|
|
|
|
i32.store
|
|
|
|
local.get $1
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
local.get $2
|
|
|
|
i32.add
|
|
|
|
local.tee $2
|
|
|
|
local.get $4
|
|
|
|
i32.const 16
|
|
|
|
i32.sub
|
|
|
|
i32.const 1
|
|
|
|
i32.or
|
|
|
|
i32.store
|
|
|
|
local.get $0
|
|
|
|
local.get $2
|
|
|
|
call $../../compiler/runtime/asrt/insertBlock
|
|
|
|
else
|
|
|
|
local.get $1
|
|
|
|
local.get $3
|
|
|
|
i32.const -2
|
|
|
|
i32.and
|
|
|
|
i32.store
|
|
|
|
local.get $1
|
|
|
|
call $../../compiler/runtime/asrt/getRight
|
|
|
|
local.get $1
|
|
|
|
call $../../compiler/runtime/asrt/getRight
|
|
|
|
i32.load
|
|
|
|
i32.const -3
|
|
|
|
i32.and
|
|
|
|
i32.store
|
|
|
|
end
|
|
|
|
local.get $1
|
|
|
|
i32.const 16
|
|
|
|
i32.add
|
|
|
|
)
|
|
|
|
(func $../../compiler/runtime/asrt/__mm_allocate (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
|
|
|
(local $1 i32)
|
|
|
|
(local $2 i32)
|
|
|
|
global.get $../../compiler/runtime/asrt/ROOT
|
|
|
|
local.tee $2
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
call $../../compiler/runtime/asrt/initialize
|
|
|
|
local.tee $2
|
|
|
|
global.set $../../compiler/runtime/asrt/ROOT
|
|
|
|
end
|
|
|
|
local.get $0
|
|
|
|
i32.const 1073741824
|
|
|
|
i32.gt_u
|
|
|
|
if
|
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
local.get $2
|
|
|
|
local.get $0
|
2019-04-15 13:10:41 +02:00
|
|
|
i32.const 15
|
2019-04-15 12:41:29 +02:00
|
|
|
i32.add
|
2019-04-15 13:10:41 +02:00
|
|
|
i32.const -16
|
2019-04-15 12:41:29 +02:00
|
|
|
i32.and
|
|
|
|
local.tee $0
|
|
|
|
i32.const 16
|
|
|
|
local.tee $1
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
i32.gt_u
|
|
|
|
select
|
|
|
|
local.tee $1
|
|
|
|
call $../../compiler/runtime/asrt/searchBlock
|
|
|
|
local.tee $0
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
local.get $2
|
|
|
|
local.get $1
|
|
|
|
call $../../compiler/runtime/asrt/growMemory
|
|
|
|
local.get $2
|
|
|
|
local.get $1
|
|
|
|
call $../../compiler/runtime/asrt/searchBlock
|
|
|
|
local.set $0
|
|
|
|
end
|
|
|
|
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 $1
|
|
|
|
i32.store offset=12
|
|
|
|
local.get $2
|
|
|
|
local.get $0
|
|
|
|
local.get $1
|
|
|
|
call $../../compiler/runtime/asrt/prepareBlock
|
|
|
|
)
|
|
|
|
(func $assembly/index/memory.allocate (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
|
|
|
local.get $0
|
|
|
|
call $../../compiler/runtime/asrt/__mm_allocate
|
|
|
|
)
|
|
|
|
(func $../../compiler/runtime/asrt/__mm_free (; 16 ;) (type $FUNCSIG$vi) (param $0 i32)
|
|
|
|
(local $1 i32)
|
|
|
|
local.get $0
|
|
|
|
if
|
|
|
|
global.get $../../compiler/runtime/asrt/ROOT
|
|
|
|
local.tee $1
|
|
|
|
if
|
|
|
|
local.get $0
|
|
|
|
i32.const 16
|
|
|
|
i32.sub
|
|
|
|
local.tee $0
|
|
|
|
local.get $0
|
|
|
|
i32.load
|
|
|
|
i32.const 1
|
|
|
|
i32.or
|
|
|
|
i32.store
|
|
|
|
local.get $1
|
|
|
|
local.get $0
|
|
|
|
call $../../compiler/runtime/asrt/insertBlock
|
|
|
|
end
|
|
|
|
end
|
|
|
|
)
|
|
|
|
(func $assembly/index/memory.free (; 17 ;) (type $FUNCSIG$vi) (param $0 i32)
|
|
|
|
local.get $0
|
|
|
|
call $../../compiler/runtime/asrt/__mm_free
|
|
|
|
)
|
|
|
|
(func $null (; 18 ;) (type $FUNCSIG$v)
|
|
|
|
nop
|
|
|
|
)
|
|
|
|
)
|