Fix TLSF test

This commit is contained in:
dcodeIO 2018-06-09 02:27:10 +02:00
parent 47f2e0950a
commit e9094bbd6f
7 changed files with 605 additions and 625 deletions

View File

@ -480,7 +480,7 @@ export function allocate_memory(size: usize): usize {
}
assert((block.info & ~TAGS) >= size);
data = root.use(block, size);
data = root.use(<Block>block, size);
}
return data;

View File

@ -4,7 +4,7 @@
(type $v (func))
(global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0))
(global $~lib/allocator/arena/offset (mut i32) (i32.const 0))
(global $HEAP_BASE i32 (i32.const 4))
(global $HEAP_BASE i32 (i32.const 8))
(memory $0 1)
(export "allocate_memory" (func $~lib/allocator/arena/allocate_memory))
(export "free_memory" (func $~lib/allocator/arena/free_memory))
@ -38,7 +38,7 @@
;;@ ~lib/allocator/arena.ts:22:8
(i32.gt_u
;;@ ~lib/allocator/arena.ts:20:4
(tee_local $2
(tee_local $0
;;@ ~lib/allocator/arena.ts:20:17
(i32.and
(i32.add
@ -61,7 +61,7 @@
;;@ ~lib/allocator/arena.ts:22:17
(i32.shl
;;@ ~lib/allocator/arena.ts:21:4
(tee_local $0
(tee_local $2
;;@ ~lib/allocator/arena.ts:21:22
(current_memory)
)
@ -77,7 +77,7 @@
;;@ ~lib/allocator/arena.ts:24:24
(select
;;@ ~lib/allocator/arena.ts:24:28
(get_local $0)
(get_local $2)
(tee_local $4
;;@ ~lib/allocator/arena.ts:23:6
(tee_local $3
@ -88,7 +88,7 @@
(i32.add
;;@ ~lib/allocator/arena.ts:23:26
(i32.sub
(get_local $2)
(get_local $0)
;;@ ~lib/allocator/arena.ts:23:35
(get_local $1)
)
@ -103,7 +103,7 @@
)
)
(i32.gt_s
(get_local $0)
(get_local $2)
(get_local $4)
)
)
@ -111,7 +111,7 @@
;;@ ~lib/allocator/arena.ts:25:37
(i32.const 0)
)
;;@ ~lib/allocator/arena.ts:26:8
;;@ ~lib/allocator/arena.ts:25:40
(if
;;@ ~lib/allocator/arena.ts:26:12
(i32.lt_s
@ -122,7 +122,7 @@
;;@ ~lib/allocator/arena.ts:26:39
(i32.const 0)
)
;;@ ~lib/allocator/arena.ts:27:10
;;@ ~lib/allocator/arena.ts:26:42
(unreachable)
)
)
@ -130,7 +130,7 @@
;;@ ~lib/allocator/arena.ts:31:4
(set_global $~lib/allocator/arena/offset
;;@ ~lib/allocator/arena.ts:31:13
(get_local $2)
(get_local $0)
)
;;@ ~lib/allocator/arena.ts:32:11
(return
@ -146,7 +146,7 @@
(nop)
)
(func $~lib/allocator/arena/reset_memory (; 2 ;) (type $v)
;;@ ~lib/allocator/arena.ts:44:2
;;@ ~lib/allocator/arena.ts:43:37
(set_global $~lib/allocator/arena/offset
;;@ ~lib/allocator/arena.ts:44:11
(get_global $~lib/allocator/arena/startOffset)

View File

@ -1,5 +1,4 @@
(module
(type $i (func (result i32)))
(type $ii (func (param i32) (result i32)))
(type $iv (func (param i32)))
(type $v (func))
@ -9,7 +8,7 @@
(global $~lib/internal/allocator/MAX_SIZE_32 i32 (i32.const 1073741824))
(global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0))
(global $~lib/allocator/arena/offset (mut i32) (i32.const 0))
(global $HEAP_BASE i32 (i32.const 4))
(global $HEAP_BASE i32 (i32.const 8))
(memory $0 1)
(export "allocate_memory" (func $~lib/allocator/arena/allocate_memory))
(export "free_memory" (func $~lib/allocator/arena/free_memory))
@ -142,7 +141,7 @@
;;@ ~lib/allocator/arena.ts:25:37
(i32.const 0)
)
;;@ ~lib/allocator/arena.ts:26:8
;;@ ~lib/allocator/arena.ts:25:40
(if
;;@ ~lib/allocator/arena.ts:26:12
(i32.lt_s
@ -153,7 +152,7 @@
;;@ ~lib/allocator/arena.ts:26:39
(i32.const 0)
)
;;@ ~lib/allocator/arena.ts:27:10
;;@ ~lib/allocator/arena.ts:26:42
(unreachable)
)
)
@ -176,9 +175,11 @@
)
)
(func $~lib/allocator/arena/free_memory (; 1 ;) (type $iv) (param $0 i32)
;;@ ~lib/allocator/arena.ts:38:46
(nop)
)
(func $~lib/allocator/arena/reset_memory (; 2 ;) (type $v)
;;@ ~lib/allocator/arena.ts:44:2
;;@ ~lib/allocator/arena.ts:43:37
(set_global $~lib/allocator/arena/offset
;;@ ~lib/allocator/arena.ts:44:11
(get_global $~lib/allocator/arena/startOffset)

View File

@ -11,7 +11,7 @@
(global $~lib/allocator/buddy/NODE_IS_SPLIT_END (mut i32) (i32.const 0))
(global $~lib/allocator/buddy/base_ptr (mut i32) (i32.const 0))
(global $~lib/allocator/buddy/max_ptr (mut i32) (i32.const 0))
(global $HEAP_BASE i32 (i32.const 4))
(global $HEAP_BASE i32 (i32.const 8))
(memory $0 1)
(export "allocate_memory" (func $~lib/allocator/buddy/allocate_memory))
(export "free_memory" (func $~lib/allocator/buddy/free_memory))
@ -62,8 +62,9 @@
;;@ ~lib/allocator/buddy.ts:182:43
(i32.const 0)
)
;;@ ~lib/allocator/buddy.ts:183:13
;;@ ~lib/allocator/buddy.ts:182:46
(return
;;@ ~lib/allocator/buddy.ts:183:13
(i32.const 0)
)
)
@ -479,8 +480,9 @@
)
)
)
;;@ ~lib/allocator/buddy.ts:323:13
;;@ ~lib/allocator/buddy.ts:322:50
(return
;;@ ~lib/allocator/buddy.ts:323:13
(i32.const 0)
)
)
@ -527,7 +529,7 @@
(i32.const 2)
)
)
;;@ ~lib/allocator/buddy.ts:334:6
;;@ ~lib/allocator/buddy.ts:333:19
(call $~lib/allocator/buddy/flip_parent_is_split
;;@ ~lib/allocator/buddy.ts:334:27
(get_local $1)
@ -634,8 +636,9 @@
)
)
)
;;@ ~lib/allocator/buddy.ts:363:13
;;@ ~lib/allocator/buddy.ts:362:47
(return
;;@ ~lib/allocator/buddy.ts:363:13
(i32.const 0)
)
)
@ -694,8 +697,9 @@
(get_local $1)
)
)
;;@ ~lib/allocator/buddy.ts:390:13
;;@ ~lib/allocator/buddy.ts:389:37
(return
;;@ ~lib/allocator/buddy.ts:390:13
(i32.const 0)
)
)
@ -761,8 +765,9 @@
)
)
)
;;@ ~lib/allocator/buddy.ts:416:15
;;@ ~lib/allocator/buddy.ts:415:43
(return
;;@ ~lib/allocator/buddy.ts:416:15
(i32.const 0)
)
)
@ -855,7 +860,7 @@
(get_local $1)
)
)
;;@ ~lib/allocator/buddy.ts:445:6
;;@ ~lib/allocator/buddy.ts:444:16
(call $~lib/allocator/buddy/flip_parent_is_split
;;@ ~lib/allocator/buddy.ts:445:27
(get_local $3)
@ -946,7 +951,7 @@
;;@ ~lib/allocator/buddy.ts:483:7
(get_local $0)
)
;;@ ~lib/allocator/buddy.ts:484:4
;;@ ~lib/allocator/buddy.ts:483:12
(return)
)
;;@ ~lib/allocator/buddy.ts:493:2
@ -993,7 +998,7 @@
;;@ ~lib/allocator/buddy.ts:507:25
(get_local $0)
)
;;@ ~lib/allocator/buddy.ts:518:6
;;@ ~lib/allocator/buddy.ts:517:54
(br_if $break|0
;;@ ~lib/allocator/buddy.ts:517:8
(if (result i32)

View File

@ -1,12 +1,11 @@
(module
(type $i (func (result i32)))
(type $ii (func (param i32) (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32)))
(type $iv (func (param i32)))
(type $iiv (func (param i32 i32)))
(type $iii (func (param i32 i32) (result i32)))
(type $v (func))
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(global $~lib/allocator/buddy/HEADER_SIZE i32 (i32.const 8))
(global $~lib/allocator/buddy/MIN_ALLOC_LOG2 i32 (i32.const 4))
(global $~lib/allocator/buddy/MIN_ALLOC i32 (i32.const 16))
@ -21,9 +20,9 @@
(global $~lib/allocator/buddy/NODE_IS_SPLIT_END (mut i32) (i32.const 0))
(global $~lib/allocator/buddy/base_ptr (mut i32) (i32.const 0))
(global $~lib/allocator/buddy/max_ptr (mut i32) (i32.const 0))
(global $HEAP_BASE i32 (i32.const 56))
(global $HEAP_BASE i32 (i32.const 60))
(memory $0 1)
(data (i32.const 4) "\17\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00b\00u\00d\00d\00y\00.\00t\00s\00")
(data (i32.const 8) "\17\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00b\00u\00d\00d\00y\00.\00t\00s\00")
(export "allocate_memory" (func $~lib/allocator/buddy/allocate_memory))
(export "free_memory" (func $~lib/allocator/buddy/free_memory))
(export "memory" (memory $0))
@ -81,9 +80,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 181)
(i32.const 4)
)
@ -105,8 +104,9 @@
;;@ ~lib/allocator/buddy.ts:182:43
(i32.const 0)
)
;;@ ~lib/allocator/buddy.ts:183:13
;;@ ~lib/allocator/buddy.ts:182:46
(return
;;@ ~lib/allocator/buddy.ts:183:13
(i32.const 0)
)
)
@ -138,9 +138,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 101)
(i32.const 2)
)
@ -266,7 +266,7 @@
)
)
(func $~lib/allocator/buddy/node_for_ptr (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
;;@ ~lib/allocator/buddy.ts:252:75
;;@ ~lib/allocator/buddy.ts:251:56
(return
;;@ ~lib/allocator/buddy.ts:252:9
(i32.sub
@ -312,9 +312,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 147)
(i32.const 2)
)
@ -412,7 +412,7 @@
)
)
(func $~lib/allocator/buddy/ptr_for_node (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
;;@ ~lib/allocator/buddy.ts:243:77
;;@ ~lib/allocator/buddy.ts:242:58
(return
;;@ ~lib/allocator/buddy.ts:243:9
(i32.add
@ -458,9 +458,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 152)
(i32.const 2)
)
@ -554,8 +554,6 @@
(get_global $~lib/allocator/buddy/bucket_limit)
)
)
;;@ ~lib/allocator/buddy.ts:298:4
(nop)
;;@ ~lib/allocator/buddy.ts:306:4
(if
;;@ ~lib/allocator/buddy.ts:306:8
@ -632,8 +630,9 @@
)
)
)
;;@ ~lib/allocator/buddy.ts:323:13
;;@ ~lib/allocator/buddy.ts:322:50
(return
;;@ ~lib/allocator/buddy.ts:323:13
(i32.const 0)
)
)
@ -686,7 +685,7 @@
;;@ ~lib/allocator/buddy.ts:333:16
(i32.const 0)
)
;;@ ~lib/allocator/buddy.ts:334:6
;;@ ~lib/allocator/buddy.ts:333:19
(call $~lib/allocator/buddy/flip_parent_is_split
;;@ ~lib/allocator/buddy.ts:334:27
(get_local $1)
@ -743,8 +742,6 @@
(local $5 i32)
(local $6 i32)
(local $7 i32)
;;@ ~lib/allocator/buddy.ts:343:2
(nop)
;;@ ~lib/allocator/buddy.ts:350:2
(if
;;@ ~lib/allocator/buddy.ts:350:6
@ -820,8 +817,9 @@
)
)
)
;;@ ~lib/allocator/buddy.ts:363:13
;;@ ~lib/allocator/buddy.ts:362:47
(return
;;@ ~lib/allocator/buddy.ts:363:13
(i32.const 0)
)
)
@ -884,12 +882,8 @@
;;@ ~lib/allocator/buddy.ts:381:23
(i32.const 0)
)
;;@ ~lib/allocator/buddy.ts:381:26
(block
(block
;;@ ~lib/allocator/buddy.ts:382:4
(nop)
;;@ ~lib/allocator/buddy.ts:383:4
(nop)
;;@ ~lib/allocator/buddy.ts:389:4
(if
;;@ ~lib/allocator/buddy.ts:389:8
@ -900,8 +894,9 @@
(get_local $2)
)
)
;;@ ~lib/allocator/buddy.ts:390:13
;;@ ~lib/allocator/buddy.ts:389:37
(return
;;@ ~lib/allocator/buddy.ts:390:13
(i32.const 0)
)
)
@ -971,8 +966,9 @@
)
)
)
;;@ ~lib/allocator/buddy.ts:416:15
;;@ ~lib/allocator/buddy.ts:415:43
(return
;;@ ~lib/allocator/buddy.ts:416:15
(i32.const 0)
)
)
@ -1076,7 +1072,7 @@
;;@ ~lib/allocator/buddy.ts:444:13
(i32.const 0)
)
;;@ ~lib/allocator/buddy.ts:445:6
;;@ ~lib/allocator/buddy.ts:444:16
(call $~lib/allocator/buddy/flip_parent_is_split
;;@ ~lib/allocator/buddy.ts:445:27
(get_local $5)
@ -1161,8 +1157,6 @@
)
)
)
(br $continue|0)
)
)
)
)
@ -1175,8 +1169,6 @@
(local $1 i32)
(local $2 i32)
(local $3 i32)
;;@ ~lib/allocator/buddy.ts:478:2
(nop)
;;@ ~lib/allocator/buddy.ts:483:2
(if
;;@ ~lib/allocator/buddy.ts:483:6
@ -1184,7 +1176,7 @@
;;@ ~lib/allocator/buddy.ts:483:7
(get_local $0)
)
;;@ ~lib/allocator/buddy.ts:484:4
;;@ ~lib/allocator/buddy.ts:483:12
(return)
)
;;@ ~lib/allocator/buddy.ts:492:2
@ -1256,7 +1248,7 @@
(get_global $~lib/allocator/buddy/bucket_limit)
)
)
;;@ ~lib/allocator/buddy.ts:518:6
;;@ ~lib/allocator/buddy.ts:517:54
(br $break|0)
)
;;@ ~lib/allocator/buddy.ts:528:4

View File

@ -7,13 +7,13 @@
(type $iii (func (param i32 i32) (result i32)))
(type $iv (func (param i32)))
(global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0))
(global $HEAP_BASE i32 (i32.const 4))
(global $HEAP_BASE i32 (i32.const 8))
(memory $0 1)
(export "allocate_memory" (func $~lib/allocator/tlsf/allocate_memory))
(export "free_memory" (func $~lib/allocator/tlsf/free_memory))
(export "memory" (memory $0))
(func $~lib/allocator/tlsf/Root#set:tailRef (; 0 ;) (type $iiv) (param $0 i32) (param $1 i32)
;;@ ~lib/allocator/tlsf.ts:181:30
;;@ ~lib/allocator/tlsf.ts:181:28
(i32.store
;;@ ~lib/allocator/tlsf.ts:181:43
(i32.const 2912)
@ -22,7 +22,7 @@
)
)
(func $~lib/allocator/tlsf/Root#setSLMap (; 1 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
;;@ ~lib/allocator/tlsf.ts:145:4
;;@ ~lib/allocator/tlsf.ts:143:40
(i32.store offset=4
;;@ ~lib/allocator/tlsf.ts:145:15
(i32.add
@ -39,7 +39,7 @@
)
)
(func $~lib/allocator/tlsf/Root#setHead (; 2 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
;;@ ~lib/allocator/tlsf.ts:169:4
;;@ ~lib/allocator/tlsf.ts:166:57
(i32.store offset=96
;;@ ~lib/allocator/tlsf.ts:170:6
(i32.add
@ -665,7 +665,7 @@
(i32.const 2912)
)
)
;;@ ~lib/allocator/tlsf.ts:387:6
;;@ ~lib/allocator/tlsf.ts:383:17
(if
;;@ ~lib/allocator/tlsf.ts:387:10
(i32.eq
@ -702,7 +702,7 @@
;;@ ~lib/allocator/tlsf.ts:398:8
(i32.lt_u
;;@ ~lib/allocator/tlsf.ts:397:4
(tee_local $3
(tee_local $2
;;@ ~lib/allocator/tlsf.ts:397:15
(i32.sub
(get_local $2)
@ -713,24 +713,22 @@
;;@ ~lib/allocator/tlsf.ts:398:45
(i32.const 32)
)
;;@ ~lib/allocator/tlsf.ts:399:13
;;@ ~lib/allocator/tlsf.ts:398:57
(return
;;@ ~lib/allocator/tlsf.ts:399:13
(i32.const 0)
)
)
;;@ ~lib/allocator/tlsf.ts:405:4
(i32.store
;;@ ~lib/allocator/tlsf.ts:404:4
(tee_local $2
;;@ ~lib/allocator/tlsf.ts:404:15
(get_local $1)
)
;;@ ~lib/allocator/tlsf.ts:405:16
(i32.or
(i32.or
;;@ ~lib/allocator/tlsf.ts:403:19
(i32.sub
(get_local $3)
(get_local $2)
(i32.const 16)
)
;;@ ~lib/allocator/tlsf.ts:405:27
@ -747,27 +745,27 @@
)
;;@ ~lib/allocator/tlsf.ts:406:4
(i32.store offset=4
(get_local $2)
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:406:16
(i32.const 0)
)
;;@ ~lib/allocator/tlsf.ts:407:4
(i32.store offset=8
(get_local $2)
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:407:16
(i32.const 0)
)
;;@ ~lib/allocator/tlsf.ts:411:4
(i32.store
;;@ ~lib/allocator/tlsf.ts:410:4
(tee_local $1
(tee_local $2
;;@ ~lib/allocator/tlsf.ts:410:15
(i32.sub
;;@ ~lib/allocator/tlsf.ts:410:33
(i32.add
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:410:41
(get_local $3)
(get_local $2)
)
;;@ ~lib/allocator/tlsf.ts:410:48
(i32.const 8)
@ -779,14 +777,14 @@
(call $~lib/allocator/tlsf/Root#set:tailRef
(get_local $0)
;;@ ~lib/allocator/tlsf.ts:412:19
(get_local $1)
(get_local $2)
)
;;@ ~lib/allocator/tlsf.ts:414:9
(call $~lib/allocator/tlsf/Root#insert
;;@ ~lib/allocator/tlsf.ts:414:4
(get_local $0)
;;@ ~lib/allocator/tlsf.ts:414:16
(get_local $2)
(get_local $1)
)
;;@ ~lib/allocator/tlsf.ts:416:11
(i32.const 1)
@ -1065,7 +1063,7 @@
;;@ ~lib/allocator/tlsf.ts:369:6
(i32.store
;;@ ~lib/allocator/tlsf.ts:368:6
(tee_local $0
(tee_local $2
;;@ ~lib/allocator/tlsf.ts:368:25
(call $~lib/allocator/tlsf/Block#get:right
;;@ ~lib/allocator/tlsf.ts:368:32
@ -1075,7 +1073,7 @@
(i32.and
;;@ ~lib/allocator/tlsf.ts:369:6
(i32.load
(get_local $0)
(get_local $2)
)
(i32.const -3)
)
@ -1112,7 +1110,7 @@
;;@ ~lib/allocator/tlsf.ts:446:11
(tee_local $2
;;@ ~lib/allocator/tlsf.ts:445:4
(tee_local $4
(tee_local $3
;;@ ~lib/allocator/tlsf.ts:445:21
(i32.and
(i32.add
@ -1138,15 +1136,17 @@
;;@ ~lib/allocator/tlsf.ts:448:17
(i32.const 0)
)
(loop $continue|0
(if
;;@ ~lib/allocator/tlsf.ts:449:4
(block $break|0
(loop $repeat|0
(br_if $break|0
;;@ ~lib/allocator/tlsf.ts:449:28
(i32.lt_u
(i32.ge_u
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:449:33
(i32.const 22)
)
(block
)
;;@ ~lib/allocator/tlsf.ts:450:11
(call $~lib/allocator/tlsf/Root#setSLMap
;;@ ~lib/allocator/tlsf.ts:450:6
@ -1156,41 +1156,42 @@
;;@ ~lib/allocator/tlsf.ts:450:24
(i32.const 0)
)
;;@ ~lib/allocator/tlsf.ts:451:6
(block $break|1
;;@ ~lib/allocator/tlsf.ts:451:11
(set_local $3
(set_local $4
;;@ ~lib/allocator/tlsf.ts:451:25
(i32.const 0)
)
(loop $continue|1
(if
(loop $repeat|1
(br_if $break|1
;;@ ~lib/allocator/tlsf.ts:451:28
(i32.lt_u
(get_local $3)
(i32.ge_u
(get_local $4)
;;@ ~lib/allocator/tlsf.ts:451:33
(i32.const 32)
)
(block
;;@ ~lib/allocator/tlsf.ts:452:13
)
;;@ ~lib/allocator/tlsf.ts:451:48
(call $~lib/allocator/tlsf/Root#setHead
;;@ ~lib/allocator/tlsf.ts:452:8
(get_local $2)
;;@ ~lib/allocator/tlsf.ts:452:21
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:452:25
(get_local $3)
(get_local $4)
;;@ ~lib/allocator/tlsf.ts:452:29
(i32.const 0)
)
;;@ ~lib/allocator/tlsf.ts:451:42
(set_local $3
(set_local $4
(i32.add
;;@ ~lib/allocator/tlsf.ts:451:44
(get_local $3)
(get_local $4)
(i32.const 1)
)
)
(br $continue|1)
)
(br $repeat|1)
)
)
;;@ ~lib/allocator/tlsf.ts:449:42
@ -1201,8 +1202,7 @@
(i32.const 1)
)
)
(br $continue|0)
)
(br $repeat|0)
)
)
;;@ ~lib/allocator/tlsf.ts:455:9
@ -1214,7 +1214,7 @@
(i32.and
(i32.add
;;@ ~lib/allocator/tlsf.ts:455:20
(get_local $4)
(get_local $3)
(i32.const 2923)
)
(i32.const -8)
@ -1256,7 +1256,7 @@
;;@ ~lib/allocator/tlsf.ts:466:8
(i32.eqz
;;@ ~lib/allocator/tlsf.ts:465:4
(tee_local $1
(tee_local $3
;;@ ~lib/allocator/tlsf.ts:465:21
(call $~lib/allocator/tlsf/Root#search
;;@ ~lib/allocator/tlsf.ts:465:16
@ -1265,7 +1265,7 @@
(tee_local $0
;;@ ~lib/allocator/tlsf.ts:463:11
(select
(tee_local $1
(tee_local $3
;;@ ~lib/allocator/tlsf.ts:463:22
(i32.and
(i32.add
@ -1277,13 +1277,13 @@
(i32.const -8)
)
)
(tee_local $3
(tee_local $1
;;@ ~lib/allocator/tlsf.ts:463:51
(i32.const 16)
)
(i32.gt_u
(get_local $1)
(get_local $3)
(get_local $1)
)
)
)
@ -1299,16 +1299,16 @@
(grow_memory
;;@ ~lib/allocator/tlsf.ts:471:24
(select
(tee_local $1
;;@ ~lib/allocator/tlsf.ts:469:6
(tee_local $3
;;@ ~lib/allocator/tlsf.ts:469:6
(tee_local $1
;;@ ~lib/allocator/tlsf.ts:469:24
(current_memory)
)
)
(tee_local $4
;;@ ~lib/allocator/tlsf.ts:470:6
(tee_local $5
;;@ ~lib/allocator/tlsf.ts:470:6
(tee_local $4
;;@ ~lib/allocator/tlsf.ts:470:24
(i32.shr_u
(i32.and
@ -1327,26 +1327,26 @@
)
)
(i32.gt_s
(get_local $1)
(get_local $4)
(get_local $3)
(get_local $5)
)
)
)
;;@ ~lib/allocator/tlsf.ts:472:37
(i32.const 0)
)
;;@ ~lib/allocator/tlsf.ts:473:8
;;@ ~lib/allocator/tlsf.ts:472:40
(if
;;@ ~lib/allocator/tlsf.ts:473:12
(i32.lt_s
(grow_memory
;;@ ~lib/allocator/tlsf.ts:473:24
(get_local $5)
(get_local $4)
)
;;@ ~lib/allocator/tlsf.ts:473:39
(i32.const 0)
)
;;@ ~lib/allocator/tlsf.ts:474:10
;;@ ~lib/allocator/tlsf.ts:473:42
(unreachable)
)
)
@ -1357,7 +1357,7 @@
(get_local $2)
;;@ ~lib/allocator/tlsf.ts:478:21
(i32.shl
(get_local $3)
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:478:43
(i32.const 16)
)
@ -1371,7 +1371,7 @@
)
)
;;@ ~lib/allocator/tlsf.ts:479:6
(set_local $1
(set_local $3
;;@ ~lib/allocator/tlsf.ts:479:14
(call $~lib/allocator/tlsf/Root#search
;;@ ~lib/allocator/tlsf.ts:479:21
@ -1389,8 +1389,8 @@
;;@ ~lib/allocator/tlsf.ts:483:11
(get_local $2)
;;@ ~lib/allocator/tlsf.ts:483:20
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:483:27
(get_local $3)
;;@ ~lib/allocator/tlsf.ts:483:34
(get_local $0)
)
)
@ -1402,7 +1402,7 @@
(func $~lib/allocator/tlsf/free_memory (; 13 ;) (type $iv) (param $0 i32)
(local $1 i32)
(local $2 i32)
;;@ ~lib/allocator/tlsf.ts:492:2
;;@ ~lib/allocator/tlsf.ts:491:47
(if
;;@ ~lib/allocator/tlsf.ts:492:6
(get_local $0)

View File

@ -1,5 +1,4 @@
(module
(type $i (func (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32)))
(type $ii (func (param i32) (result i32)))
(type $iiv (func (param i32 i32)))
@ -8,7 +7,7 @@
(type $iii (func (param i32 i32) (result i32)))
(type $iv (func (param i32)))
(type $v (func))
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
(global $~lib/internal/allocator/AL_BITS i32 (i32.const 3))
(global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8))
(global $~lib/internal/allocator/AL_MASK i32 (i32.const 7))
@ -22,15 +21,15 @@
(global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2))
(global $~lib/allocator/tlsf/TAGS i32 (i32.const 3))
(global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0))
(global $HEAP_BASE i32 (i32.const 52))
(global $HEAP_BASE i32 (i32.const 56))
(memory $0 1)
(data (i32.const 4) "\16\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00")
(data (i32.const 8) "\16\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00")
(export "allocate_memory" (func $~lib/allocator/tlsf/allocate_memory))
(export "free_memory" (func $~lib/allocator/tlsf/free_memory))
(export "memory" (memory $0))
(start $start)
(func $~lib/allocator/tlsf/Root#set:tailRef (; 1 ;) (type $iiv) (param $0 i32) (param $1 i32)
;;@ ~lib/allocator/tlsf.ts:181:30
;;@ ~lib/allocator/tlsf.ts:181:28
(i32.store offset=2912
;;@ ~lib/allocator/tlsf.ts:181:43
(i32.const 0)
@ -50,9 +49,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 144)
(i32.const 4)
)
@ -87,9 +86,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 167)
(i32.const 4)
)
@ -107,9 +106,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 168)
(i32.const 4)
)
@ -142,7 +141,7 @@
)
)
(func $~lib/allocator/tlsf/Root#get:tailRef (; 4 ;) (type $ii) (param $0 i32) (result i32)
;;@ ~lib/allocator/tlsf.ts:180:58
;;@ ~lib/allocator/tlsf.ts:180:23
(return
;;@ ~lib/allocator/tlsf.ts:180:32
(i32.load offset=2912
@ -170,9 +169,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 89)
(i32.const 4)
)
@ -210,9 +209,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 90)
(i32.const 11)
)
@ -234,17 +233,15 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 428)
(i32.const 2)
)
(unreachable)
)
)
;;@ ~lib/allocator/tlsf.ts:429:2
(nop)
;;@ ~lib/allocator/tlsf.ts:430:26
(return
;;@ ~lib/allocator/tlsf.ts:430:9
@ -270,9 +267,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 158)
(i32.const 4)
)
@ -290,9 +287,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 159)
(i32.const 4)
)
@ -337,9 +334,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 138)
(i32.const 4)
)
@ -389,9 +386,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 258)
(i32.const 4)
)
@ -433,17 +430,15 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 260)
(i32.const 4)
)
(unreachable)
)
)
;;@ ~lib/allocator/tlsf.ts:263:4
(nop)
;;@ ~lib/allocator/tlsf.ts:264:4
(if
;;@ ~lib/allocator/tlsf.ts:264:8
@ -674,9 +669,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 81)
(i32.const 4)
)
@ -701,9 +696,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 82)
(i32.const 11)
)
@ -727,9 +722,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 334)
(i32.const 4)
)
@ -749,9 +744,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 335)
(i32.const 4)
)
@ -771,9 +766,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 336)
(i32.const 4)
)
@ -802,7 +797,6 @@
(local $8 i32)
(local $9 i32)
(local $10 i32)
(local $11 i32)
;;@ ~lib/allocator/tlsf.ts:189:4
(if
(i32.eqz
@ -810,9 +804,9 @@
(get_local $1)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 189)
(i32.const 4)
)
@ -837,17 +831,15 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 191)
(i32.const 4)
)
(unreachable)
)
)
;;@ ~lib/allocator/tlsf.ts:192:4
(nop)
;;@ ~lib/allocator/tlsf.ts:193:4
(if
(i32.eqz
@ -883,9 +875,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 193)
(i32.const 4)
)
@ -905,9 +897,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 197)
(i32.const 23)
)
@ -1005,9 +997,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 211)
(i32.const 24)
)
@ -1034,9 +1026,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 213)
(i32.const 6)
)
@ -1125,7 +1117,7 @@
(i32.eqz
;;@ ~lib/allocator/tlsf.ts:226:11
(if (result i32)
(tee_local $8
(tee_local $7
(i32.ge_u
(get_local $3)
;;@ ~lib/allocator/tlsf.ts:226:19
@ -1138,21 +1130,19 @@
;;@ ~lib/allocator/tlsf.ts:226:44
(i32.const 1073741824)
)
(get_local $8)
(get_local $7)
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 226)
(i32.const 4)
)
(unreachable)
)
)
;;@ ~lib/allocator/tlsf.ts:229:4
(nop)
;;@ ~lib/allocator/tlsf.ts:230:4
(if
;;@ ~lib/allocator/tlsf.ts:230:8
@ -1164,12 +1154,12 @@
;;@ ~lib/allocator/tlsf.ts:230:24
(block
;;@ ~lib/allocator/tlsf.ts:231:6
(set_local $9
(set_local $8
;;@ ~lib/allocator/tlsf.ts:231:11
(i32.const 0)
)
;;@ ~lib/allocator/tlsf.ts:232:6
(set_local $10
(set_local $9
;;@ ~lib/allocator/tlsf.ts:232:11
(i32.div_u
;;@ ~lib/allocator/tlsf.ts:232:17
@ -1182,7 +1172,7 @@
;;@ ~lib/allocator/tlsf.ts:233:11
(block
;;@ ~lib/allocator/tlsf.ts:234:6
(set_local $9
(set_local $8
;;@ ~lib/allocator/tlsf.ts:234:11
(call $~lib/allocator/tlsf/fls<usize>
;;@ ~lib/allocator/tlsf.ts:234:22
@ -1190,7 +1180,7 @@
)
)
;;@ ~lib/allocator/tlsf.ts:235:6
(set_local $10
(set_local $9
;;@ ~lib/allocator/tlsf.ts:235:11
(i32.xor
;;@ ~lib/allocator/tlsf.ts:235:17
@ -1200,7 +1190,7 @@
;;@ ~lib/allocator/tlsf.ts:235:26
(i32.sub
;;@ ~lib/allocator/tlsf.ts:235:27
(get_local $9)
(get_local $8)
;;@ ~lib/allocator/tlsf.ts:235:32
(i32.const 5)
)
@ -1215,9 +1205,9 @@
)
)
;;@ ~lib/allocator/tlsf.ts:236:6
(set_local $9
(set_local $8
(i32.sub
(get_local $9)
(get_local $8)
;;@ ~lib/allocator/tlsf.ts:236:12
(i32.sub
(i32.const 8)
@ -1229,15 +1219,15 @@
)
)
;;@ ~lib/allocator/tlsf.ts:240:4
(set_local $11
(set_local $10
;;@ ~lib/allocator/tlsf.ts:240:20
(call $~lib/allocator/tlsf/Root#getHead
;;@ ~lib/allocator/tlsf.ts:240:15
(get_local $0)
;;@ ~lib/allocator/tlsf.ts:240:28
(get_local $9)
(get_local $8)
;;@ ~lib/allocator/tlsf.ts:240:32
(get_local $10)
(get_local $9)
)
)
;;@ ~lib/allocator/tlsf.ts:241:4
@ -1250,15 +1240,15 @@
(i32.store offset=8
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:242:17
(get_local $11)
(get_local $10)
)
;;@ ~lib/allocator/tlsf.ts:243:4
(if
;;@ ~lib/allocator/tlsf.ts:243:8
(get_local $11)
(get_local $10)
;;@ ~lib/allocator/tlsf.ts:243:14
(i32.store offset=4
(get_local $11)
(get_local $10)
;;@ ~lib/allocator/tlsf.ts:243:26
(get_local $1)
)
@ -1268,9 +1258,9 @@
;;@ ~lib/allocator/tlsf.ts:244:4
(get_local $0)
;;@ ~lib/allocator/tlsf.ts:244:17
(get_local $9)
(get_local $8)
;;@ ~lib/allocator/tlsf.ts:244:21
(get_local $10)
(get_local $9)
;;@ ~lib/allocator/tlsf.ts:244:25
(get_local $1)
)
@ -1286,7 +1276,7 @@
;;@ ~lib/allocator/tlsf.ts:247:19
(i32.const 1)
;;@ ~lib/allocator/tlsf.ts:247:24
(get_local $9)
(get_local $8)
)
)
)
@ -1295,7 +1285,7 @@
;;@ ~lib/allocator/tlsf.ts:248:4
(get_local $0)
;;@ ~lib/allocator/tlsf.ts:248:18
(get_local $9)
(get_local $8)
;;@ ~lib/allocator/tlsf.ts:248:22
(i32.or
;;@ ~lib/allocator/tlsf.ts:248:27
@ -1303,14 +1293,14 @@
;;@ ~lib/allocator/tlsf.ts:248:22
(get_local $0)
;;@ ~lib/allocator/tlsf.ts:248:36
(get_local $9)
(get_local $8)
)
;;@ ~lib/allocator/tlsf.ts:248:42
(i32.shl
;;@ ~lib/allocator/tlsf.ts:248:43
(i32.const 1)
;;@ ~lib/allocator/tlsf.ts:248:48
(get_local $10)
(get_local $9)
)
)
)
@ -1333,9 +1323,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 377)
(i32.const 4)
)
@ -1357,9 +1347,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 378)
(i32.const 4)
)
@ -1381,9 +1371,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 379)
(i32.const 4)
)
@ -1423,9 +1413,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 384)
(i32.const 6)
)
@ -1464,7 +1454,7 @@
)
)
)
;;@ ~lib/allocator/tlsf.ts:393:6
;;@ ~lib/allocator/tlsf.ts:392:11
(if
(i32.eqz
;;@ ~lib/allocator/tlsf.ts:393:13
@ -1479,9 +1469,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 393)
(i32.const 6)
)
@ -1514,8 +1504,9 @@
(i32.const 8)
)
)
;;@ ~lib/allocator/tlsf.ts:399:13
;;@ ~lib/allocator/tlsf.ts:398:57
(return
;;@ ~lib/allocator/tlsf.ts:399:13
(i32.const 0)
)
)
@ -1622,9 +1613,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 422)
(i32.const 2)
)
@ -1652,9 +1643,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 422)
(i32.const 2)
)
@ -1699,17 +1690,15 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 296)
(i32.const 4)
)
(unreachable)
)
)
;;@ ~lib/allocator/tlsf.ts:299:4
(nop)
;;@ ~lib/allocator/tlsf.ts:300:4
(if
;;@ ~lib/allocator/tlsf.ts:300:8
@ -1845,8 +1834,6 @@
)
)
)
;;@ ~lib/allocator/tlsf.ts:315:4
(nop)
;;@ ~lib/allocator/tlsf.ts:316:4
(if
;;@ ~lib/allocator/tlsf.ts:316:8
@ -1888,7 +1875,7 @@
;;@ ~lib/allocator/tlsf.ts:319:11
(get_local $2)
)
;;@ ~lib/allocator/tlsf.ts:320:8
;;@ ~lib/allocator/tlsf.ts:319:18
(set_local $6
;;@ ~lib/allocator/tlsf.ts:320:15
(i32.const 0)
@ -1918,9 +1905,9 @@
)
(get_local $7)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 323)
(i32.const 16)
)
@ -1946,7 +1933,7 @@
)
)
)
;;@ ~lib/allocator/tlsf.ts:327:6
;;@ ~lib/allocator/tlsf.ts:326:11
(set_local $6
;;@ ~lib/allocator/tlsf.ts:327:18
(call $~lib/allocator/tlsf/Root#getHead
@ -1971,7 +1958,6 @@
(local $3 i32)
(local $4 i32)
(local $5 i32)
(local $6 i32)
;;@ ~lib/allocator/tlsf.ts:347:4
(set_local $3
;;@ ~lib/allocator/tlsf.ts:347:20
@ -1990,9 +1976,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 348)
(i32.const 4)
)
@ -2021,9 +2007,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 349)
(i32.const 4)
)
@ -2045,9 +2031,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 350)
(i32.const 4)
)
@ -2162,11 +2148,11 @@
)
)
;;@ ~lib/allocator/tlsf.ts:368:6
(set_local $6
(set_local $4
;;@ ~lib/allocator/tlsf.ts:368:25
(if (result i32)
(i32.eqz
(tee_local $6
(tee_local $4
;;@ ~lib/allocator/tlsf.ts:368:32
(call $~lib/allocator/tlsf/Block#get:right
(get_local $1)
@ -2174,23 +2160,23 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 368)
(i32.const 25)
)
(unreachable)
)
(get_local $6)
(get_local $4)
)
)
;;@ ~lib/allocator/tlsf.ts:369:6
(i32.store
(get_local $6)
(get_local $4)
(i32.and
(i32.load
(get_local $6)
(get_local $4)
)
;;@ ~lib/allocator/tlsf.ts:369:20
(i32.xor
@ -2221,9 +2207,6 @@
(local $6 i32)
(local $7 i32)
(local $8 i32)
(local $9 i32)
(local $10 i32)
(local $11 i32)
;;@ ~lib/allocator/tlsf.ts:443:2
(set_local $1
;;@ ~lib/allocator/tlsf.ts:443:13
@ -2283,15 +2266,18 @@
;;@ ~lib/allocator/tlsf.ts:449:25
(i32.const 0)
)
(loop $continue|0
(if
(loop $repeat|0
(br_if $break|0
(i32.eqz
;;@ ~lib/allocator/tlsf.ts:449:28
(i32.lt_u
(get_local $3)
;;@ ~lib/allocator/tlsf.ts:449:33
(i32.const 22)
)
(block
)
)
;;@ ~lib/allocator/tlsf.ts:449:48
(block
;;@ ~lib/allocator/tlsf.ts:450:11
(call $~lib/allocator/tlsf/Root#setSLMap
@ -2309,17 +2295,18 @@
;;@ ~lib/allocator/tlsf.ts:451:25
(i32.const 0)
)
(loop $continue|1
(if
(loop $repeat|1
(br_if $break|1
(i32.eqz
;;@ ~lib/allocator/tlsf.ts:451:28
(i32.lt_u
(get_local $4)
;;@ ~lib/allocator/tlsf.ts:451:33
(i32.const 32)
)
(block
(block
;;@ ~lib/allocator/tlsf.ts:452:13
)
)
;;@ ~lib/allocator/tlsf.ts:451:48
(call $~lib/allocator/tlsf/Root#setHead
;;@ ~lib/allocator/tlsf.ts:452:8
(get_local $1)
@ -2330,7 +2317,6 @@
;;@ ~lib/allocator/tlsf.ts:452:29
(i32.const 0)
)
)
;;@ ~lib/allocator/tlsf.ts:451:42
(set_local $4
(i32.add
@ -2339,9 +2325,7 @@
(i32.const 1)
)
)
(br $continue|1)
)
)
(br $repeat|1)
)
)
)
@ -2353,9 +2337,7 @@
(i32.const 1)
)
)
(br $continue|0)
)
)
(br $repeat|0)
)
)
;;@ ~lib/allocator/tlsf.ts:455:9
@ -2418,7 +2400,7 @@
(set_local $0
;;@ ~lib/allocator/tlsf.ts:463:11
(select
(tee_local $6
(tee_local $2
;;@ ~lib/allocator/tlsf.ts:463:22
(i32.and
(i32.add
@ -2435,18 +2417,18 @@
)
)
)
(tee_local $7
(tee_local $3
;;@ ~lib/allocator/tlsf.ts:463:51
(i32.const 16)
)
(i32.gt_u
(get_local $6)
(get_local $7)
(get_local $2)
(get_local $3)
)
)
)
;;@ ~lib/allocator/tlsf.ts:465:4
(set_local $6
(set_local $2
;;@ ~lib/allocator/tlsf.ts:465:21
(call $~lib/allocator/tlsf/Root#search
;;@ ~lib/allocator/tlsf.ts:465:16
@ -2460,17 +2442,17 @@
;;@ ~lib/allocator/tlsf.ts:466:8
(i32.eqz
;;@ ~lib/allocator/tlsf.ts:466:9
(get_local $6)
(get_local $2)
)
;;@ ~lib/allocator/tlsf.ts:466:16
(block
;;@ ~lib/allocator/tlsf.ts:469:6
(set_local $7
(set_local $3
;;@ ~lib/allocator/tlsf.ts:469:24
(current_memory)
)
;;@ ~lib/allocator/tlsf.ts:470:6
(set_local $8
(set_local $4
;;@ ~lib/allocator/tlsf.ts:470:24
(i32.shr_u
(i32.and
@ -2493,20 +2475,20 @@
)
)
;;@ ~lib/allocator/tlsf.ts:471:6
(set_local $9
(set_local $6
;;@ ~lib/allocator/tlsf.ts:471:24
(select
(tee_local $9
(tee_local $6
;;@ ~lib/allocator/tlsf.ts:471:28
(get_local $7)
(get_local $3)
)
(tee_local $10
(tee_local $7
;;@ ~lib/allocator/tlsf.ts:471:41
(get_local $8)
(get_local $4)
)
(i32.gt_s
(get_local $9)
(get_local $10)
(get_local $6)
(get_local $7)
)
)
)
@ -2516,28 +2498,28 @@
(i32.lt_s
(grow_memory
;;@ ~lib/allocator/tlsf.ts:472:22
(get_local $9)
(get_local $6)
)
;;@ ~lib/allocator/tlsf.ts:472:37
(i32.const 0)
)
;;@ ~lib/allocator/tlsf.ts:473:8
;;@ ~lib/allocator/tlsf.ts:472:40
(if
;;@ ~lib/allocator/tlsf.ts:473:12
(i32.lt_s
(grow_memory
;;@ ~lib/allocator/tlsf.ts:473:24
(get_local $8)
(get_local $4)
)
;;@ ~lib/allocator/tlsf.ts:473:39
(i32.const 0)
)
;;@ ~lib/allocator/tlsf.ts:474:10
;;@ ~lib/allocator/tlsf.ts:473:42
(unreachable)
)
)
;;@ ~lib/allocator/tlsf.ts:477:6
(set_local $10
(set_local $7
;;@ ~lib/allocator/tlsf.ts:477:23
(current_memory)
)
@ -2548,24 +2530,24 @@
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:478:21
(i32.shl
(get_local $7)
(get_local $3)
;;@ ~lib/allocator/tlsf.ts:478:43
(i32.const 16)
)
;;@ ~lib/allocator/tlsf.ts:478:47
(i32.shl
(get_local $10)
(get_local $7)
;;@ ~lib/allocator/tlsf.ts:478:68
(i32.const 16)
)
)
)
;;@ ~lib/allocator/tlsf.ts:479:6
(set_local $6
(set_local $2
;;@ ~lib/allocator/tlsf.ts:479:14
(if (result i32)
(i32.eqz
(tee_local $11
(tee_local $8
;;@ ~lib/allocator/tlsf.ts:479:26
(call $~lib/allocator/tlsf/Root#search
;;@ ~lib/allocator/tlsf.ts:479:21
@ -2576,15 +2558,15 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 479)
(i32.const 14)
)
(unreachable)
)
(get_local $11)
(get_local $8)
)
)
)
@ -2597,7 +2579,7 @@
(i32.and
;;@ ~lib/allocator/tlsf.ts:482:12
(i32.load
(get_local $6)
(get_local $2)
)
;;@ ~lib/allocator/tlsf.ts:482:25
(i32.xor
@ -2611,9 +2593,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 482)
(i32.const 4)
)
@ -2627,8 +2609,8 @@
;;@ ~lib/allocator/tlsf.ts:483:11
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:483:20
(get_local $6)
;;@ ~lib/allocator/tlsf.ts:483:27
(get_local $2)
;;@ ~lib/allocator/tlsf.ts:483:34
(get_local $0)
)
)
@ -2643,7 +2625,7 @@
(local $1 i32)
(local $2 i32)
(local $3 i32)
;;@ ~lib/allocator/tlsf.ts:492:2
;;@ ~lib/allocator/tlsf.ts:491:47
(if
;;@ ~lib/allocator/tlsf.ts:492:6
(get_local $0)
@ -2692,9 +2674,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 497)
(i32.const 6)
)
@ -2745,9 +2727,9 @@
)
)
(block
(call $abort
(call $~lib/env/abort
(i32.const 0)
(i32.const 4)
(i32.const 8)
(i32.const 122)
(i32.const 0)
)