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); assert((block.info & ~TAGS) >= size);
data = root.use(block, size); data = root.use(<Block>block, size);
} }
return data; return data;

View File

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

View File

@ -1,5 +1,4 @@
(module (module
(type $i (func (result i32)))
(type $ii (func (param i32) (result i32))) (type $ii (func (param i32) (result i32)))
(type $iv (func (param i32))) (type $iv (func (param i32)))
(type $v (func)) (type $v (func))
@ -9,7 +8,7 @@
(global $~lib/internal/allocator/MAX_SIZE_32 i32 (i32.const 1073741824)) (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/startOffset (mut i32) (i32.const 0))
(global $~lib/allocator/arena/offset (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) (memory $0 1)
(export "allocate_memory" (func $~lib/allocator/arena/allocate_memory)) (export "allocate_memory" (func $~lib/allocator/arena/allocate_memory))
(export "free_memory" (func $~lib/allocator/arena/free_memory)) (export "free_memory" (func $~lib/allocator/arena/free_memory))
@ -142,7 +141,7 @@
;;@ ~lib/allocator/arena.ts:25:37 ;;@ ~lib/allocator/arena.ts:25:37
(i32.const 0) (i32.const 0)
) )
;;@ ~lib/allocator/arena.ts:26:8 ;;@ ~lib/allocator/arena.ts:25:40
(if (if
;;@ ~lib/allocator/arena.ts:26:12 ;;@ ~lib/allocator/arena.ts:26:12
(i32.lt_s (i32.lt_s
@ -153,7 +152,7 @@
;;@ ~lib/allocator/arena.ts:26:39 ;;@ ~lib/allocator/arena.ts:26:39
(i32.const 0) (i32.const 0)
) )
;;@ ~lib/allocator/arena.ts:27:10 ;;@ ~lib/allocator/arena.ts:26:42
(unreachable) (unreachable)
) )
) )
@ -176,9 +175,11 @@
) )
) )
(func $~lib/allocator/arena/free_memory (; 1 ;) (type $iv) (param $0 i32) (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) (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 (set_global $~lib/allocator/arena/offset
;;@ ~lib/allocator/arena.ts:44:11 ;;@ ~lib/allocator/arena.ts:44:11
(get_global $~lib/allocator/arena/startOffset) (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/NODE_IS_SPLIT_END (mut i32) (i32.const 0))
(global $~lib/allocator/buddy/base_ptr (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 $~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) (memory $0 1)
(export "allocate_memory" (func $~lib/allocator/buddy/allocate_memory)) (export "allocate_memory" (func $~lib/allocator/buddy/allocate_memory))
(export "free_memory" (func $~lib/allocator/buddy/free_memory)) (export "free_memory" (func $~lib/allocator/buddy/free_memory))
@ -62,8 +62,9 @@
;;@ ~lib/allocator/buddy.ts:182:43 ;;@ ~lib/allocator/buddy.ts:182:43
(i32.const 0) (i32.const 0)
) )
;;@ ~lib/allocator/buddy.ts:183:13 ;;@ ~lib/allocator/buddy.ts:182:46
(return (return
;;@ ~lib/allocator/buddy.ts:183:13
(i32.const 0) (i32.const 0)
) )
) )
@ -479,8 +480,9 @@
) )
) )
) )
;;@ ~lib/allocator/buddy.ts:323:13 ;;@ ~lib/allocator/buddy.ts:322:50
(return (return
;;@ ~lib/allocator/buddy.ts:323:13
(i32.const 0) (i32.const 0)
) )
) )
@ -527,7 +529,7 @@
(i32.const 2) (i32.const 2)
) )
) )
;;@ ~lib/allocator/buddy.ts:334:6 ;;@ ~lib/allocator/buddy.ts:333:19
(call $~lib/allocator/buddy/flip_parent_is_split (call $~lib/allocator/buddy/flip_parent_is_split
;;@ ~lib/allocator/buddy.ts:334:27 ;;@ ~lib/allocator/buddy.ts:334:27
(get_local $1) (get_local $1)
@ -634,8 +636,9 @@
) )
) )
) )
;;@ ~lib/allocator/buddy.ts:363:13 ;;@ ~lib/allocator/buddy.ts:362:47
(return (return
;;@ ~lib/allocator/buddy.ts:363:13
(i32.const 0) (i32.const 0)
) )
) )
@ -694,8 +697,9 @@
(get_local $1) (get_local $1)
) )
) )
;;@ ~lib/allocator/buddy.ts:390:13 ;;@ ~lib/allocator/buddy.ts:389:37
(return (return
;;@ ~lib/allocator/buddy.ts:390:13
(i32.const 0) (i32.const 0)
) )
) )
@ -761,8 +765,9 @@
) )
) )
) )
;;@ ~lib/allocator/buddy.ts:416:15 ;;@ ~lib/allocator/buddy.ts:415:43
(return (return
;;@ ~lib/allocator/buddy.ts:416:15
(i32.const 0) (i32.const 0)
) )
) )
@ -855,7 +860,7 @@
(get_local $1) (get_local $1)
) )
) )
;;@ ~lib/allocator/buddy.ts:445:6 ;;@ ~lib/allocator/buddy.ts:444:16
(call $~lib/allocator/buddy/flip_parent_is_split (call $~lib/allocator/buddy/flip_parent_is_split
;;@ ~lib/allocator/buddy.ts:445:27 ;;@ ~lib/allocator/buddy.ts:445:27
(get_local $3) (get_local $3)
@ -946,7 +951,7 @@
;;@ ~lib/allocator/buddy.ts:483:7 ;;@ ~lib/allocator/buddy.ts:483:7
(get_local $0) (get_local $0)
) )
;;@ ~lib/allocator/buddy.ts:484:4 ;;@ ~lib/allocator/buddy.ts:483:12
(return) (return)
) )
;;@ ~lib/allocator/buddy.ts:493:2 ;;@ ~lib/allocator/buddy.ts:493:2
@ -993,7 +998,7 @@
;;@ ~lib/allocator/buddy.ts:507:25 ;;@ ~lib/allocator/buddy.ts:507:25
(get_local $0) (get_local $0)
) )
;;@ ~lib/allocator/buddy.ts:518:6 ;;@ ~lib/allocator/buddy.ts:517:54
(br_if $break|0 (br_if $break|0
;;@ ~lib/allocator/buddy.ts:517:8 ;;@ ~lib/allocator/buddy.ts:517:8
(if (result i32) (if (result i32)

View File

@ -1,12 +1,11 @@
(module (module
(type $i (func (result i32)))
(type $ii (func (param i32) (result i32))) (type $ii (func (param i32) (result i32)))
(type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32)))
(type $iv (func (param i32))) (type $iv (func (param i32)))
(type $iiv (func (param i32 i32))) (type $iiv (func (param i32 i32)))
(type $iii (func (param i32 i32) (result i32))) (type $iii (func (param i32 i32) (result i32)))
(type $v (func)) (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/HEADER_SIZE i32 (i32.const 8))
(global $~lib/allocator/buddy/MIN_ALLOC_LOG2 i32 (i32.const 4)) (global $~lib/allocator/buddy/MIN_ALLOC_LOG2 i32 (i32.const 4))
(global $~lib/allocator/buddy/MIN_ALLOC i32 (i32.const 16)) (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/NODE_IS_SPLIT_END (mut i32) (i32.const 0))
(global $~lib/allocator/buddy/base_ptr (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 $~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) (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 "allocate_memory" (func $~lib/allocator/buddy/allocate_memory))
(export "free_memory" (func $~lib/allocator/buddy/free_memory)) (export "free_memory" (func $~lib/allocator/buddy/free_memory))
(export "memory" (memory $0)) (export "memory" (memory $0))
@ -81,9 +80,9 @@
) )
) )
(block (block
(call $abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
(i32.const 4) (i32.const 8)
(i32.const 181) (i32.const 181)
(i32.const 4) (i32.const 4)
) )
@ -105,8 +104,9 @@
;;@ ~lib/allocator/buddy.ts:182:43 ;;@ ~lib/allocator/buddy.ts:182:43
(i32.const 0) (i32.const 0)
) )
;;@ ~lib/allocator/buddy.ts:183:13 ;;@ ~lib/allocator/buddy.ts:182:46
(return (return
;;@ ~lib/allocator/buddy.ts:183:13
(i32.const 0) (i32.const 0)
) )
) )
@ -138,9 +138,9 @@
) )
) )
(block (block
(call $abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
(i32.const 4) (i32.const 8)
(i32.const 101) (i32.const 101)
(i32.const 2) (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) (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 (return
;;@ ~lib/allocator/buddy.ts:252:9 ;;@ ~lib/allocator/buddy.ts:252:9
(i32.sub (i32.sub
@ -312,9 +312,9 @@
) )
) )
(block (block
(call $abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
(i32.const 4) (i32.const 8)
(i32.const 147) (i32.const 147)
(i32.const 2) (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) (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 (return
;;@ ~lib/allocator/buddy.ts:243:9 ;;@ ~lib/allocator/buddy.ts:243:9
(i32.add (i32.add
@ -458,9 +458,9 @@
) )
) )
(block (block
(call $abort (call $~lib/env/abort
(i32.const 0) (i32.const 0)
(i32.const 4) (i32.const 8)
(i32.const 152) (i32.const 152)
(i32.const 2) (i32.const 2)
) )
@ -554,8 +554,6 @@
(get_global $~lib/allocator/buddy/bucket_limit) (get_global $~lib/allocator/buddy/bucket_limit)
) )
) )
;;@ ~lib/allocator/buddy.ts:298:4
(nop)
;;@ ~lib/allocator/buddy.ts:306:4 ;;@ ~lib/allocator/buddy.ts:306:4
(if (if
;;@ ~lib/allocator/buddy.ts:306:8 ;;@ ~lib/allocator/buddy.ts:306:8
@ -632,8 +630,9 @@
) )
) )
) )
;;@ ~lib/allocator/buddy.ts:323:13 ;;@ ~lib/allocator/buddy.ts:322:50
(return (return
;;@ ~lib/allocator/buddy.ts:323:13
(i32.const 0) (i32.const 0)
) )
) )
@ -686,7 +685,7 @@
;;@ ~lib/allocator/buddy.ts:333:16 ;;@ ~lib/allocator/buddy.ts:333:16
(i32.const 0) (i32.const 0)
) )
;;@ ~lib/allocator/buddy.ts:334:6 ;;@ ~lib/allocator/buddy.ts:333:19
(call $~lib/allocator/buddy/flip_parent_is_split (call $~lib/allocator/buddy/flip_parent_is_split
;;@ ~lib/allocator/buddy.ts:334:27 ;;@ ~lib/allocator/buddy.ts:334:27
(get_local $1) (get_local $1)
@ -743,8 +742,6 @@
(local $5 i32) (local $5 i32)
(local $6 i32) (local $6 i32)
(local $7 i32) (local $7 i32)
;;@ ~lib/allocator/buddy.ts:343:2
(nop)
;;@ ~lib/allocator/buddy.ts:350:2 ;;@ ~lib/allocator/buddy.ts:350:2
(if (if
;;@ ~lib/allocator/buddy.ts:350:6 ;;@ ~lib/allocator/buddy.ts:350:6
@ -820,8 +817,9 @@
) )
) )
) )
;;@ ~lib/allocator/buddy.ts:363:13 ;;@ ~lib/allocator/buddy.ts:362:47
(return (return
;;@ ~lib/allocator/buddy.ts:363:13
(i32.const 0) (i32.const 0)
) )
) )
@ -884,284 +882,280 @@
;;@ ~lib/allocator/buddy.ts:381:23 ;;@ ~lib/allocator/buddy.ts:381:23
(i32.const 0) (i32.const 0)
) )
;;@ ~lib/allocator/buddy.ts:381:26
(block (block
(block ;;@ ~lib/allocator/buddy.ts:389:4
;;@ ~lib/allocator/buddy.ts:382:4 (if
(nop) ;;@ ~lib/allocator/buddy.ts:389:8
;;@ ~lib/allocator/buddy.ts:383:4 (i32.eqz
(nop) ;;@ ~lib/allocator/buddy.ts:389:9
;;@ ~lib/allocator/buddy.ts:389:4 (call $~lib/allocator/buddy/lower_bucket_limit
(if ;;@ ~lib/allocator/buddy.ts:389:28
;;@ ~lib/allocator/buddy.ts:389:8 (get_local $2)
(i32.eqz )
;;@ ~lib/allocator/buddy.ts:389:9 )
(call $~lib/allocator/buddy/lower_bucket_limit ;;@ ~lib/allocator/buddy.ts:389:37
;;@ ~lib/allocator/buddy.ts:389:28 (return
(get_local $2) ;;@ ~lib/allocator/buddy.ts:390:13
(i32.const 0)
)
)
;;@ ~lib/allocator/buddy.ts:397:4
(set_local $6
;;@ ~lib/allocator/buddy.ts:397:10
(call $~lib/allocator/buddy/list_pop
;;@ ~lib/allocator/buddy.ts:397:37
(call $~lib/allocator/buddy/buckets$get
;;@ ~lib/allocator/buddy.ts:397:49
(get_local $2)
)
)
)
;;@ ~lib/allocator/buddy.ts:398:4
(if
;;@ ~lib/allocator/buddy.ts:398:8
(i32.eqz
;;@ ~lib/allocator/buddy.ts:398:9
(get_local $6)
)
;;@ ~lib/allocator/buddy.ts:398:14
(block
;;@ ~lib/allocator/buddy.ts:403:6
(if
;;@ ~lib/allocator/buddy.ts:403:10
(if (result i32)
(tee_local $7
(i32.ne
(get_local $2)
;;@ ~lib/allocator/buddy.ts:403:20
(get_global $~lib/allocator/buddy/bucket_limit)
)
)
(get_local $7)
;;@ ~lib/allocator/buddy.ts:403:36
(i32.eq
(get_local $2)
;;@ ~lib/allocator/buddy.ts:403:46
(i32.const 0)
)
)
;;@ ~lib/allocator/buddy.ts:403:49
(block
;;@ ~lib/allocator/buddy.ts:404:8
(set_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
)
;;@ ~lib/allocator/buddy.ts:405:8
(br $continue|0)
) )
) )
;;@ ~lib/allocator/buddy.ts:390:13 ;;@ ~lib/allocator/buddy.ts:415:6
(if
;;@ ~lib/allocator/buddy.ts:415:10
(i32.eqz
;;@ ~lib/allocator/buddy.ts:415:11
(call $~lib/allocator/buddy/lower_bucket_limit
;;@ ~lib/allocator/buddy.ts:415:30
(i32.sub
(get_local $2)
;;@ ~lib/allocator/buddy.ts:415:39
(i32.const 1)
)
)
)
;;@ ~lib/allocator/buddy.ts:415:43
(return
;;@ ~lib/allocator/buddy.ts:416:15
(i32.const 0)
)
)
;;@ ~lib/allocator/buddy.ts:418:6
(set_local $6
;;@ ~lib/allocator/buddy.ts:418:12
(call $~lib/allocator/buddy/list_pop
;;@ ~lib/allocator/buddy.ts:418:39
(call $~lib/allocator/buddy/buckets$get
;;@ ~lib/allocator/buddy.ts:418:51
(get_local $2)
)
)
)
)
)
;;@ ~lib/allocator/buddy.ts:425:4
(set_local $3
;;@ ~lib/allocator/buddy.ts:425:11
(i32.shl
(i32.const 1)
;;@ ~lib/allocator/buddy.ts:425:16
(i32.sub
;;@ ~lib/allocator/buddy.ts:425:17
(i32.const 30)
;;@ ~lib/allocator/buddy.ts:425:34
(get_local $2)
)
)
)
;;@ ~lib/allocator/buddy.ts:426:4
(set_local $4
;;@ ~lib/allocator/buddy.ts:426:19
(if (result i32)
(i32.lt_u
(get_local $2)
;;@ ~lib/allocator/buddy.ts:426:28
(get_local $1)
)
;;@ ~lib/allocator/buddy.ts:426:46
(i32.add
(i32.div_u
(get_local $3)
;;@ ~lib/allocator/buddy.ts:426:53
(i32.const 2)
)
;;@ ~lib/allocator/buddy.ts:426:57
(i32.const 8)
)
;;@ ~lib/allocator/buddy.ts:426:69
(get_local $3)
)
)
;;@ ~lib/allocator/buddy.ts:427:4
(if
;;@ ~lib/allocator/buddy.ts:427:8
(i32.eqz
;;@ ~lib/allocator/buddy.ts:427:9
(call $~lib/allocator/buddy/update_max_ptr
;;@ ~lib/allocator/buddy.ts:427:24
(i32.add
(get_local $6)
;;@ ~lib/allocator/buddy.ts:427:30
(get_local $4)
)
)
)
;;@ ~lib/allocator/buddy.ts:427:45
(block
;;@ ~lib/allocator/buddy.ts:428:6
(call $~lib/allocator/buddy/list_push
;;@ ~lib/allocator/buddy.ts:428:16
(call $~lib/allocator/buddy/buckets$get
;;@ ~lib/allocator/buddy.ts:428:28
(get_local $2)
)
;;@ ~lib/allocator/buddy.ts:428:37
(get_local $6)
)
;;@ ~lib/allocator/buddy.ts:429:13
(return (return
(i32.const 0) (i32.const 0)
) )
) )
;;@ ~lib/allocator/buddy.ts:397:4 )
(set_local $6 ;;@ ~lib/allocator/buddy.ts:443:4
;;@ ~lib/allocator/buddy.ts:397:10 (set_local $5
(call $~lib/allocator/buddy/list_pop ;;@ ~lib/allocator/buddy.ts:443:8
;;@ ~lib/allocator/buddy.ts:397:37 (call $~lib/allocator/buddy/node_for_ptr
(call $~lib/allocator/buddy/buckets$get ;;@ ~lib/allocator/buddy.ts:443:21
;;@ ~lib/allocator/buddy.ts:397:49 (get_local $6)
(get_local $2) ;;@ ~lib/allocator/buddy.ts:443:26
) (get_local $2)
)
) )
;;@ ~lib/allocator/buddy.ts:398:4 )
(if ;;@ ~lib/allocator/buddy.ts:444:4
;;@ ~lib/allocator/buddy.ts:398:8 (if
(i32.eqz ;;@ ~lib/allocator/buddy.ts:444:8
;;@ ~lib/allocator/buddy.ts:398:9 (i32.ne
(get_local $6) (get_local $5)
) ;;@ ~lib/allocator/buddy.ts:444:13
;;@ ~lib/allocator/buddy.ts:398:14 (i32.const 0)
(block
;;@ ~lib/allocator/buddy.ts:403:6
(if
;;@ ~lib/allocator/buddy.ts:403:10
(if (result i32)
(tee_local $7
(i32.ne
(get_local $2)
;;@ ~lib/allocator/buddy.ts:403:20
(get_global $~lib/allocator/buddy/bucket_limit)
)
)
(get_local $7)
;;@ ~lib/allocator/buddy.ts:403:36
(i32.eq
(get_local $2)
;;@ ~lib/allocator/buddy.ts:403:46
(i32.const 0)
)
)
;;@ ~lib/allocator/buddy.ts:403:49
(block
;;@ ~lib/allocator/buddy.ts:404:8
(set_local $2
(i32.sub
(get_local $2)
(i32.const 1)
)
)
;;@ ~lib/allocator/buddy.ts:405:8
(br $continue|0)
)
)
;;@ ~lib/allocator/buddy.ts:415:6
(if
;;@ ~lib/allocator/buddy.ts:415:10
(i32.eqz
;;@ ~lib/allocator/buddy.ts:415:11
(call $~lib/allocator/buddy/lower_bucket_limit
;;@ ~lib/allocator/buddy.ts:415:30
(i32.sub
(get_local $2)
;;@ ~lib/allocator/buddy.ts:415:39
(i32.const 1)
)
)
)
;;@ ~lib/allocator/buddy.ts:416:15
(return
(i32.const 0)
)
)
;;@ ~lib/allocator/buddy.ts:418:6
(set_local $6
;;@ ~lib/allocator/buddy.ts:418:12
(call $~lib/allocator/buddy/list_pop
;;@ ~lib/allocator/buddy.ts:418:39
(call $~lib/allocator/buddy/buckets$get
;;@ ~lib/allocator/buddy.ts:418:51
(get_local $2)
)
)
)
)
) )
;;@ ~lib/allocator/buddy.ts:425:4 ;;@ ~lib/allocator/buddy.ts:444:16
(set_local $3 (call $~lib/allocator/buddy/flip_parent_is_split
;;@ ~lib/allocator/buddy.ts:425:11 ;;@ ~lib/allocator/buddy.ts:445:27
(i32.shl (get_local $5)
(i32.const 1)
;;@ ~lib/allocator/buddy.ts:425:16
(i32.sub
;;@ ~lib/allocator/buddy.ts:425:17
(i32.const 30)
;;@ ~lib/allocator/buddy.ts:425:34
(get_local $2)
)
)
) )
;;@ ~lib/allocator/buddy.ts:426:4 )
(set_local $4 ;;@ ~lib/allocator/buddy.ts:455:4
;;@ ~lib/allocator/buddy.ts:426:19 (block $break|1
(if (result i32) (loop $continue|1
(if
;;@ ~lib/allocator/buddy.ts:455:11
(i32.lt_u (i32.lt_u
(get_local $2) (get_local $2)
;;@ ~lib/allocator/buddy.ts:426:28 ;;@ ~lib/allocator/buddy.ts:455:20
(get_local $1) (get_local $1)
) )
;;@ ~lib/allocator/buddy.ts:426:46 (block
(i32.add
(i32.div_u
(get_local $3)
;;@ ~lib/allocator/buddy.ts:426:53
(i32.const 2)
)
;;@ ~lib/allocator/buddy.ts:426:57
(i32.const 8)
)
;;@ ~lib/allocator/buddy.ts:426:69
(get_local $3)
)
)
;;@ ~lib/allocator/buddy.ts:427:4
(if
;;@ ~lib/allocator/buddy.ts:427:8
(i32.eqz
;;@ ~lib/allocator/buddy.ts:427:9
(call $~lib/allocator/buddy/update_max_ptr
;;@ ~lib/allocator/buddy.ts:427:24
(i32.add
(get_local $6)
;;@ ~lib/allocator/buddy.ts:427:30
(get_local $4)
)
)
)
;;@ ~lib/allocator/buddy.ts:427:45
(block
;;@ ~lib/allocator/buddy.ts:428:6
(call $~lib/allocator/buddy/list_push
;;@ ~lib/allocator/buddy.ts:428:16
(call $~lib/allocator/buddy/buckets$get
;;@ ~lib/allocator/buddy.ts:428:28
(get_local $2)
)
;;@ ~lib/allocator/buddy.ts:428:37
(get_local $6)
)
;;@ ~lib/allocator/buddy.ts:429:13
(return
(i32.const 0)
)
)
)
;;@ ~lib/allocator/buddy.ts:443:4
(set_local $5
;;@ ~lib/allocator/buddy.ts:443:8
(call $~lib/allocator/buddy/node_for_ptr
;;@ ~lib/allocator/buddy.ts:443:21
(get_local $6)
;;@ ~lib/allocator/buddy.ts:443:26
(get_local $2)
)
)
;;@ ~lib/allocator/buddy.ts:444:4
(if
;;@ ~lib/allocator/buddy.ts:444:8
(i32.ne
(get_local $5)
;;@ ~lib/allocator/buddy.ts:444:13
(i32.const 0)
)
;;@ ~lib/allocator/buddy.ts:445:6
(call $~lib/allocator/buddy/flip_parent_is_split
;;@ ~lib/allocator/buddy.ts:445:27
(get_local $5)
)
)
;;@ ~lib/allocator/buddy.ts:455:4
(block $break|1
(loop $continue|1
(if
;;@ ~lib/allocator/buddy.ts:455:11
(i32.lt_u
(get_local $2)
;;@ ~lib/allocator/buddy.ts:455:20
(get_local $1)
)
(block (block
(block ;;@ ~lib/allocator/buddy.ts:456:6
;;@ ~lib/allocator/buddy.ts:456:6 (set_local $5
(set_local $5 ;;@ ~lib/allocator/buddy.ts:456:10
;;@ ~lib/allocator/buddy.ts:456:10 (i32.add
(i32.add (i32.mul
(i32.mul (get_local $5)
(get_local $5) ;;@ ~lib/allocator/buddy.ts:456:14
;;@ ~lib/allocator/buddy.ts:456:14 (i32.const 2)
(i32.const 2)
)
;;@ ~lib/allocator/buddy.ts:456:18
(i32.const 1)
)
)
;;@ ~lib/allocator/buddy.ts:457:6
(set_local $2
(i32.add
(get_local $2)
(i32.const 1)
)
)
;;@ ~lib/allocator/buddy.ts:458:6
(call $~lib/allocator/buddy/flip_parent_is_split
;;@ ~lib/allocator/buddy.ts:458:27
(get_local $5)
)
;;@ ~lib/allocator/buddy.ts:459:6
(call $~lib/allocator/buddy/list_push
;;@ ~lib/allocator/buddy.ts:460:8
(call $~lib/allocator/buddy/buckets$get
;;@ ~lib/allocator/buddy.ts:460:20
(get_local $2)
)
;;@ ~lib/allocator/buddy.ts:461:8
(call $~lib/allocator/buddy/ptr_for_node
;;@ ~lib/allocator/buddy.ts:461:38
(i32.add
(get_local $5)
;;@ ~lib/allocator/buddy.ts:461:42
(i32.const 1)
)
;;@ ~lib/allocator/buddy.ts:461:45
(get_local $2)
) )
;;@ ~lib/allocator/buddy.ts:456:18
(i32.const 1)
)
)
;;@ ~lib/allocator/buddy.ts:457:6
(set_local $2
(i32.add
(get_local $2)
(i32.const 1)
)
)
;;@ ~lib/allocator/buddy.ts:458:6
(call $~lib/allocator/buddy/flip_parent_is_split
;;@ ~lib/allocator/buddy.ts:458:27
(get_local $5)
)
;;@ ~lib/allocator/buddy.ts:459:6
(call $~lib/allocator/buddy/list_push
;;@ ~lib/allocator/buddy.ts:460:8
(call $~lib/allocator/buddy/buckets$get
;;@ ~lib/allocator/buddy.ts:460:20
(get_local $2)
)
;;@ ~lib/allocator/buddy.ts:461:8
(call $~lib/allocator/buddy/ptr_for_node
;;@ ~lib/allocator/buddy.ts:461:38
(i32.add
(get_local $5)
;;@ ~lib/allocator/buddy.ts:461:42
(i32.const 1)
)
;;@ ~lib/allocator/buddy.ts:461:45
(get_local $2)
) )
) )
(br $continue|1)
) )
(br $continue|1)
) )
) )
) )
;;@ ~lib/allocator/buddy.ts:469:4
(i32.store
;;@ ~lib/allocator/buddy.ts:469:17
(get_local $6)
;;@ ~lib/allocator/buddy.ts:469:22
(get_local $0)
)
;;@ ~lib/allocator/buddy.ts:470:17
(return
;;@ ~lib/allocator/buddy.ts:470:11
(i32.add
(get_local $6)
;;@ ~lib/allocator/buddy.ts:470:17
(i32.const 8)
)
)
) )
(br $continue|0) ;;@ ~lib/allocator/buddy.ts:469:4
(i32.store
;;@ ~lib/allocator/buddy.ts:469:17
(get_local $6)
;;@ ~lib/allocator/buddy.ts:469:22
(get_local $0)
)
;;@ ~lib/allocator/buddy.ts:470:17
(return
;;@ ~lib/allocator/buddy.ts:470:11
(i32.add
(get_local $6)
;;@ ~lib/allocator/buddy.ts:470:17
(i32.const 8)
)
)
) )
) )
) )
@ -1175,8 +1169,6 @@
(local $1 i32) (local $1 i32)
(local $2 i32) (local $2 i32)
(local $3 i32) (local $3 i32)
;;@ ~lib/allocator/buddy.ts:478:2
(nop)
;;@ ~lib/allocator/buddy.ts:483:2 ;;@ ~lib/allocator/buddy.ts:483:2
(if (if
;;@ ~lib/allocator/buddy.ts:483:6 ;;@ ~lib/allocator/buddy.ts:483:6
@ -1184,7 +1176,7 @@
;;@ ~lib/allocator/buddy.ts:483:7 ;;@ ~lib/allocator/buddy.ts:483:7
(get_local $0) (get_local $0)
) )
;;@ ~lib/allocator/buddy.ts:484:4 ;;@ ~lib/allocator/buddy.ts:483:12
(return) (return)
) )
;;@ ~lib/allocator/buddy.ts:492:2 ;;@ ~lib/allocator/buddy.ts:492:2
@ -1256,7 +1248,7 @@
(get_global $~lib/allocator/buddy/bucket_limit) (get_global $~lib/allocator/buddy/bucket_limit)
) )
) )
;;@ ~lib/allocator/buddy.ts:518:6 ;;@ ~lib/allocator/buddy.ts:517:54
(br $break|0) (br $break|0)
) )
;;@ ~lib/allocator/buddy.ts:528:4 ;;@ ~lib/allocator/buddy.ts:528:4

View File

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

File diff suppressed because it is too large Load Diff