Initial external decorator for annotating explicit import names; Use file name as default module name in imports; Emit empty memory if there are no static segments; Update TLSF and examples accordingly

This commit is contained in:
dcodeIO
2018-06-28 01:44:32 +02:00
parent 27e61f8f67
commit 9c16363796
110 changed files with 17069 additions and 16757 deletions

View File

@ -5,7 +5,7 @@
(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 8))
(memory $0 1)
(memory $0 0)
(export "allocate_memory" (func $~lib/allocator/arena/allocate_memory))
(export "free_memory" (func $~lib/allocator/arena/free_memory))
(export "reset_memory" (func $~lib/allocator/arena/reset_memory))
@ -142,11 +142,10 @@
(i32.const 0)
)
(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:43:37
;;@ ~lib/allocator/arena.ts:44:2
(set_global $~lib/allocator/arena/offset
;;@ ~lib/allocator/arena.ts:44:11
(get_global $~lib/allocator/arena/startOffset)

View File

@ -9,7 +9,7 @@
(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 8))
(memory $0 1)
(memory $0 0)
(export "allocate_memory" (func $~lib/allocator/arena/allocate_memory))
(export "free_memory" (func $~lib/allocator/arena/free_memory))
(export "reset_memory" (func $~lib/allocator/arena/reset_memory))
@ -170,16 +170,13 @@
)
)
;;@ ~lib/allocator/arena.ts:34:9
(return
(i32.const 0)
)
(i32.const 0)
)
(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:43:37
;;@ ~lib/allocator/arena.ts:44:2
(set_global $~lib/allocator/arena/offset
;;@ ~lib/allocator/arena.ts:44:11
(get_global $~lib/allocator/arena/startOffset)

View File

@ -12,7 +12,7 @@
(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 8))
(memory $0 1)
(memory $0 0)
(export "allocate_memory" (func $~lib/allocator/buddy/allocate_memory))
(export "free_memory" (func $~lib/allocator/buddy/free_memory))
(export "memory" (memory $0))
@ -83,7 +83,7 @@
(i32.const 1)
)
(func $~lib/allocator/buddy/buckets$get (; 1 ;) (type $ii) (param $0 i32) (result i32)
;;@ ~lib/allocator/buddy.ts:102:9
;;@ ~lib/allocator/buddy.ts:102:59
(i32.add
;;@ ~lib/allocator/buddy.ts:102:26
(get_global $~lib/allocator/buddy/BUCKETS_START)
@ -186,8 +186,9 @@
(get_local $1)
)
(func $~lib/allocator/buddy/node_for_ptr (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
;;@ ~lib/allocator/buddy.ts:252:9
;;@ ~lib/allocator/buddy.ts:252:75
(i32.sub
;;@ ~lib/allocator/buddy.ts:252:9
(i32.add
(i32.shr_u
;;@ ~lib/allocator/buddy.ts:252:10
@ -218,7 +219,7 @@
)
)
(func $~lib/allocator/buddy/node_is_split$get (; 6 ;) (type $ii) (param $0 i32) (result i32)
;;@ ~lib/allocator/buddy.ts:148:9
;;@ ~lib/allocator/buddy.ts:148:45
(i32.load8_u
;;@ ~lib/allocator/buddy.ts:148:18
(i32.add
@ -229,8 +230,9 @@
)
)
(func $~lib/allocator/buddy/parent_is_split (; 7 ;) (type $ii) (param $0 i32) (result i32)
;;@ ~lib/allocator/buddy.ts:260:9
;;@ ~lib/allocator/buddy.ts:260:70
(i32.eq
;;@ ~lib/allocator/buddy.ts:260:9
(i32.and
;;@ ~lib/allocator/buddy.ts:260:10
(i32.shr_u
@ -298,8 +300,9 @@
)
)
(func $~lib/allocator/buddy/ptr_for_node (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
;;@ ~lib/allocator/buddy.ts:243:9
;;@ ~lib/allocator/buddy.ts:243:77
(i32.add
;;@ ~lib/allocator/buddy.ts:243:9
(get_global $~lib/allocator/buddy/base_ptr)
;;@ ~lib/allocator/buddy.ts:243:20
(i32.shl

View File

@ -122,9 +122,7 @@
)
)
;;@ ~lib/allocator/buddy.ts:188:9
(return
(i32.const 1)
)
(i32.const 1)
)
(func $~lib/allocator/buddy/buckets$get (; 2 ;) (type $ii) (param $0 i32) (result i32)
;;@ ~lib/allocator/buddy.ts:101:2
@ -148,17 +146,14 @@
)
)
;;@ ~lib/allocator/buddy.ts:102:59
(return
;;@ ~lib/allocator/buddy.ts:102:9
(i32.add
;;@ ~lib/allocator/buddy.ts:102:26
(get_global $~lib/allocator/buddy/BUCKETS_START)
;;@ ~lib/allocator/buddy.ts:102:42
(i32.mul
(get_local $0)
;;@ ~lib/allocator/buddy.ts:102:50
(i32.const 8)
)
(i32.add
;;@ ~lib/allocator/buddy.ts:102:26
(get_global $~lib/allocator/buddy/BUCKETS_START)
;;@ ~lib/allocator/buddy.ts:102:42
(i32.mul
(get_local $0)
;;@ ~lib/allocator/buddy.ts:102:50
(i32.const 8)
)
)
)
@ -261,43 +256,39 @@
)
)
;;@ ~lib/allocator/buddy.ts:287:9
(return
(get_local $1)
)
(get_local $1)
)
(func $~lib/allocator/buddy/node_for_ptr (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
;;@ ~lib/allocator/buddy.ts:251:56
(return
;;@ ~lib/allocator/buddy.ts:252:75
(i32.sub
;;@ ~lib/allocator/buddy.ts:252:9
(i32.sub
(i32.add
(i32.shr_u
;;@ ~lib/allocator/buddy.ts:252:10
(i32.sub
;;@ ~lib/allocator/buddy.ts:252:11
(get_local $0)
;;@ ~lib/allocator/buddy.ts:252:17
(get_global $~lib/allocator/buddy/base_ptr)
)
;;@ ~lib/allocator/buddy.ts:252:30
(i32.sub
;;@ ~lib/allocator/buddy.ts:252:31
(i32.const 30)
;;@ ~lib/allocator/buddy.ts:252:48
(get_local $1)
)
(i32.add
(i32.shr_u
;;@ ~lib/allocator/buddy.ts:252:10
(i32.sub
;;@ ~lib/allocator/buddy.ts:252:11
(get_local $0)
;;@ ~lib/allocator/buddy.ts:252:17
(get_global $~lib/allocator/buddy/base_ptr)
)
;;@ ~lib/allocator/buddy.ts:252:59
(i32.shl
;;@ ~lib/allocator/buddy.ts:252:60
(i32.const 1)
;;@ ~lib/allocator/buddy.ts:252:65
;;@ ~lib/allocator/buddy.ts:252:30
(i32.sub
;;@ ~lib/allocator/buddy.ts:252:31
(i32.const 30)
;;@ ~lib/allocator/buddy.ts:252:48
(get_local $1)
)
)
;;@ ~lib/allocator/buddy.ts:252:75
(i32.const 1)
;;@ ~lib/allocator/buddy.ts:252:59
(i32.shl
;;@ ~lib/allocator/buddy.ts:252:60
(i32.const 1)
;;@ ~lib/allocator/buddy.ts:252:65
(get_local $1)
)
)
;;@ ~lib/allocator/buddy.ts:252:75
(i32.const 1)
)
)
(func $~lib/allocator/buddy/node_is_split$get (; 7 ;) (type $ii) (param $0 i32) (result i32)
@ -322,15 +313,12 @@
)
)
;;@ ~lib/allocator/buddy.ts:148:45
(return
;;@ ~lib/allocator/buddy.ts:148:9
(i32.load8_u
;;@ ~lib/allocator/buddy.ts:148:18
(i32.add
(get_global $~lib/allocator/buddy/NODE_IS_SPLIT_START)
;;@ ~lib/allocator/buddy.ts:148:40
(get_local $0)
)
(i32.load8_u
;;@ ~lib/allocator/buddy.ts:148:18
(i32.add
(get_global $~lib/allocator/buddy/NODE_IS_SPLIT_START)
;;@ ~lib/allocator/buddy.ts:148:40
(get_local $0)
)
)
)
@ -350,35 +338,33 @@
)
)
;;@ ~lib/allocator/buddy.ts:260:70
(return
(i32.eq
;;@ ~lib/allocator/buddy.ts:260:9
(i32.eq
(i32.and
;;@ ~lib/allocator/buddy.ts:260:10
(i32.shr_u
;;@ ~lib/allocator/buddy.ts:260:11
(call $~lib/allocator/buddy/node_is_split$get
;;@ ~lib/allocator/buddy.ts:260:29
(i32.div_u
(get_local $0)
;;@ ~lib/allocator/buddy.ts:260:37
(i32.const 8)
)
)
;;@ ~lib/allocator/buddy.ts:260:44
(i32.rem_u
;;@ ~lib/allocator/buddy.ts:260:50
(i32.and
;;@ ~lib/allocator/buddy.ts:260:10
(i32.shr_u
;;@ ~lib/allocator/buddy.ts:260:11
(call $~lib/allocator/buddy/node_is_split$get
;;@ ~lib/allocator/buddy.ts:260:29
(i32.div_u
(get_local $0)
;;@ ~lib/allocator/buddy.ts:260:58
;;@ ~lib/allocator/buddy.ts:260:37
(i32.const 8)
)
)
;;@ ~lib/allocator/buddy.ts:260:64
(i32.const 1)
;;@ ~lib/allocator/buddy.ts:260:44
(i32.rem_u
;;@ ~lib/allocator/buddy.ts:260:50
(get_local $0)
;;@ ~lib/allocator/buddy.ts:260:58
(i32.const 8)
)
)
;;@ ~lib/allocator/buddy.ts:260:70
;;@ ~lib/allocator/buddy.ts:260:64
(i32.const 1)
)
;;@ ~lib/allocator/buddy.ts:260:70
(i32.const 1)
)
)
(func $~lib/allocator/buddy/list_remove (; 9 ;) (type $iv) (param $0 i32)
@ -412,36 +398,34 @@
)
)
(func $~lib/allocator/buddy/ptr_for_node (; 10 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
;;@ ~lib/allocator/buddy.ts:242:58
(return
;;@ ~lib/allocator/buddy.ts:243:77
(i32.add
;;@ ~lib/allocator/buddy.ts:243:9
(i32.add
(get_global $~lib/allocator/buddy/base_ptr)
;;@ ~lib/allocator/buddy.ts:243:20
(i32.shl
;;@ ~lib/allocator/buddy.ts:243:21
(i32.add
;;@ ~lib/allocator/buddy.ts:243:22
(i32.sub
(get_local $0)
;;@ ~lib/allocator/buddy.ts:243:30
(i32.shl
;;@ ~lib/allocator/buddy.ts:243:31
(i32.const 1)
;;@ ~lib/allocator/buddy.ts:243:36
(get_local $1)
)
)
;;@ ~lib/allocator/buddy.ts:243:46
(i32.const 1)
)
;;@ ~lib/allocator/buddy.ts:243:52
(get_global $~lib/allocator/buddy/base_ptr)
;;@ ~lib/allocator/buddy.ts:243:20
(i32.shl
;;@ ~lib/allocator/buddy.ts:243:21
(i32.add
;;@ ~lib/allocator/buddy.ts:243:22
(i32.sub
;;@ ~lib/allocator/buddy.ts:243:53
(i32.const 30)
;;@ ~lib/allocator/buddy.ts:243:70
(get_local $1)
(get_local $0)
;;@ ~lib/allocator/buddy.ts:243:30
(i32.shl
;;@ ~lib/allocator/buddy.ts:243:31
(i32.const 1)
;;@ ~lib/allocator/buddy.ts:243:36
(get_local $1)
)
)
;;@ ~lib/allocator/buddy.ts:243:46
(i32.const 1)
)
;;@ ~lib/allocator/buddy.ts:243:52
(i32.sub
;;@ ~lib/allocator/buddy.ts:243:53
(i32.const 30)
;;@ ~lib/allocator/buddy.ts:243:70
(get_local $1)
)
)
)
@ -698,9 +682,7 @@
)
)
;;@ ~lib/allocator/buddy.ts:338:9
(return
(i32.const 1)
)
(i32.const 1)
)
(func $~lib/allocator/buddy/list_pop (; 14 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
@ -730,9 +712,7 @@
(get_local $1)
)
;;@ ~lib/allocator/buddy.ts:233:9
(return
(get_local $1)
)
(get_local $1)
)
(func $~lib/allocator/buddy/allocate_memory (; 15 ;) (type $ii) (param $0 i32) (result i32)
(local $1 i32)
@ -1161,9 +1141,7 @@
)
)
;;@ ~lib/allocator/buddy.ts:473:9
(return
(i32.const 0)
)
(i32.const 0)
)
(func $~lib/allocator/buddy/free_memory (; 16 ;) (type $iv) (param $0 i32)
(local $1 i32)

View File

@ -8,12 +8,12 @@
(type $iv (func (param i32)))
(global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0))
(global $HEAP_BASE i32 (i32.const 8))
(memory $0 1)
(memory $0 0)
(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:28
;;@ ~lib/allocator/tlsf.ts:181:30
(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:143:40
;;@ ~lib/allocator/tlsf.ts:145:4
(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:166:57
;;@ ~lib/allocator/tlsf.ts:169:4
(i32.store offset=96
;;@ ~lib/allocator/tlsf.ts:170:6
(i32.add
@ -65,7 +65,7 @@
)
)
(func $~lib/allocator/tlsf/Block#get:right (; 3 ;) (type $ii) (param $0 i32) (result i32)
;;@ ~lib/allocator/tlsf.ts:90:11
;;@ ~lib/allocator/tlsf.ts:94:4
(i32.add
;;@ ~lib/allocator/tlsf.ts:92:8
(i32.add
@ -84,8 +84,9 @@
)
)
(func $~lib/allocator/tlsf/fls<usize> (; 4 ;) (type $ii) (param $0 i32) (result i32)
;;@ ~lib/allocator/tlsf.ts:430:9
;;@ ~lib/allocator/tlsf.ts:430:26
(i32.sub
;;@ ~lib/allocator/tlsf.ts:430:9
(i32.const 31)
;;@ ~lib/allocator/tlsf.ts:430:15
(i32.clz
@ -95,7 +96,7 @@
)
)
(func $~lib/allocator/tlsf/Root#getHead (; 5 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
;;@ ~lib/allocator/tlsf.ts:160:11
;;@ ~lib/allocator/tlsf.ts:162:20
(i32.load offset=96
;;@ ~lib/allocator/tlsf.ts:161:6
(i32.add
@ -119,7 +120,7 @@
)
)
(func $~lib/allocator/tlsf/Root#getSLMap (; 6 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
;;@ ~lib/allocator/tlsf.ts:139:11
;;@ ~lib/allocator/tlsf.ts:139:68
(i32.load offset=4
;;@ ~lib/allocator/tlsf.ts:139:21
(i32.add
@ -1080,8 +1081,9 @@
)
)
)
;;@ ~lib/allocator/tlsf.ts:372:11
;;@ ~lib/allocator/tlsf.ts:372:44
(i32.add
;;@ ~lib/allocator/tlsf.ts:372:11
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:372:38
(i32.const 8)
@ -1105,347 +1107,401 @@
)
;;@ ~lib/allocator/tlsf.ts:444:13
(block
;;@ ~lib/allocator/tlsf.ts:446:4
(set_global $~lib/allocator/tlsf/ROOT
;;@ ~lib/allocator/tlsf.ts:446:11
(tee_local $2
;;@ ~lib/allocator/tlsf.ts:445:4
;;@ ~lib/allocator/tlsf.ts:448:4
(if
;;@ ~lib/allocator/tlsf.ts:448:8
(if (result i32)
(tee_local $3
;;@ ~lib/allocator/tlsf.ts:445:21
(i32.and
(i32.add
;;@ ~lib/allocator/tlsf.ts:445:22
(get_global $HEAP_BASE)
;;@ ~lib/allocator/tlsf.ts:445:34
(i32.const 7)
(i32.gt_s
;;@ ~lib/allocator/tlsf.ts:447:4
(tee_local $1
;;@ ~lib/allocator/tlsf.ts:447:22
(i32.shr_u
;;@ ~lib/allocator/tlsf.ts:447:28
(i32.and
(i32.add
;;@ ~lib/allocator/tlsf.ts:445:4
(tee_local $4
;;@ ~lib/allocator/tlsf.ts:445:21
(i32.and
(i32.add
;;@ ~lib/allocator/tlsf.ts:445:22
(get_global $HEAP_BASE)
;;@ ~lib/allocator/tlsf.ts:445:34
(i32.const 7)
)
(i32.const -8)
)
)
(i32.const 68451)
)
(i32.const -65536)
)
;;@ ~lib/allocator/tlsf.ts:447:80
(i32.const 16)
)
)
;;@ ~lib/allocator/tlsf.ts:446:4
(tee_local $5
;;@ ~lib/allocator/tlsf.ts:446:22
(current_memory)
)
(i32.const -8)
)
)
;;@ ~lib/allocator/tlsf.ts:448:37
(i32.lt_s
(grow_memory
;;@ ~lib/allocator/tlsf.ts:448:49
(i32.sub
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:448:63
(get_local $5)
)
)
;;@ ~lib/allocator/tlsf.ts:448:78
(i32.const 0)
)
(get_local $3)
)
)
;;@ ~lib/allocator/tlsf.ts:447:4
(call $~lib/allocator/tlsf/Root#set:tailRef
(get_local $2)
;;@ ~lib/allocator/tlsf.ts:447:19
(i32.const 0)
)
;;@ ~lib/allocator/tlsf.ts:448:4
(i32.store
(get_local $2)
;;@ ~lib/allocator/tlsf.ts:448:17
(i32.const 0)
;;@ ~lib/allocator/tlsf.ts:448:81
(unreachable)
)
;;@ ~lib/allocator/tlsf.ts:449:4
(set_global $~lib/allocator/tlsf/ROOT
;;@ ~lib/allocator/tlsf.ts:449:11
(tee_local $2
;;@ ~lib/allocator/tlsf.ts:449:18
(get_local $4)
)
)
;;@ ~lib/allocator/tlsf.ts:450:4
(call $~lib/allocator/tlsf/Root#set:tailRef
(get_local $2)
;;@ ~lib/allocator/tlsf.ts:450:19
(i32.const 0)
)
;;@ ~lib/allocator/tlsf.ts:451:4
(i32.store
(get_local $2)
;;@ ~lib/allocator/tlsf.ts:451:17
(i32.const 0)
)
;;@ ~lib/allocator/tlsf.ts:452:4
(block $break|0
;;@ ~lib/allocator/tlsf.ts:452:9
(set_local $3
;;@ ~lib/allocator/tlsf.ts:452:25
(i32.const 0)
)
(loop $repeat|0
(br_if $break|0
;;@ ~lib/allocator/tlsf.ts:449:28
;;@ ~lib/allocator/tlsf.ts:452:28
(i32.ge_u
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:449:33
(get_local $3)
;;@ ~lib/allocator/tlsf.ts:452:33
(i32.const 22)
)
)
;;@ ~lib/allocator/tlsf.ts:450:11
;;@ ~lib/allocator/tlsf.ts:453:11
(call $~lib/allocator/tlsf/Root#setSLMap
;;@ ~lib/allocator/tlsf.ts:450:6
;;@ ~lib/allocator/tlsf.ts:453:6
(get_local $2)
;;@ ~lib/allocator/tlsf.ts:450:20
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:450:24
;;@ ~lib/allocator/tlsf.ts:453:20
(get_local $3)
;;@ ~lib/allocator/tlsf.ts:453:24
(i32.const 0)
)
;;@ ~lib/allocator/tlsf.ts:451:6
;;@ ~lib/allocator/tlsf.ts:454:6
(block $break|1
;;@ ~lib/allocator/tlsf.ts:451:11
(set_local $4
;;@ ~lib/allocator/tlsf.ts:451:25
;;@ ~lib/allocator/tlsf.ts:454:11
(set_local $1
;;@ ~lib/allocator/tlsf.ts:454:25
(i32.const 0)
)
(loop $repeat|1
(br_if $break|1
;;@ ~lib/allocator/tlsf.ts:451:28
;;@ ~lib/allocator/tlsf.ts:454:28
(i32.ge_u
(get_local $4)
;;@ ~lib/allocator/tlsf.ts:451:33
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:454:33
(i32.const 32)
)
)
;;@ ~lib/allocator/tlsf.ts:451:48
;;@ ~lib/allocator/tlsf.ts:454:48
(call $~lib/allocator/tlsf/Root#setHead
;;@ ~lib/allocator/tlsf.ts:452:8
;;@ ~lib/allocator/tlsf.ts:455:8
(get_local $2)
;;@ ~lib/allocator/tlsf.ts:452:21
;;@ ~lib/allocator/tlsf.ts:455:21
(get_local $3)
;;@ ~lib/allocator/tlsf.ts:455:25
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:452:25
(get_local $4)
;;@ ~lib/allocator/tlsf.ts:452:29
;;@ ~lib/allocator/tlsf.ts:455:29
(i32.const 0)
)
;;@ ~lib/allocator/tlsf.ts:451:42
(set_local $4
;;@ ~lib/allocator/tlsf.ts:454:42
(set_local $1
(i32.add
;;@ ~lib/allocator/tlsf.ts:451:44
(get_local $4)
;;@ ~lib/allocator/tlsf.ts:454:44
(get_local $1)
(i32.const 1)
)
)
(br $repeat|1)
)
)
;;@ ~lib/allocator/tlsf.ts:449:42
(set_local $1
;;@ ~lib/allocator/tlsf.ts:452:42
(set_local $3
(i32.add
;;@ ~lib/allocator/tlsf.ts:449:44
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:452:44
(get_local $3)
(i32.const 1)
)
)
(br $repeat|0)
)
)
;;@ ~lib/allocator/tlsf.ts:455:9
;;@ ~lib/allocator/tlsf.ts:458:9
(drop
(call $~lib/allocator/tlsf/Root#addMemory
;;@ ~lib/allocator/tlsf.ts:455:4
;;@ ~lib/allocator/tlsf.ts:458:4
(get_local $2)
;;@ ~lib/allocator/tlsf.ts:455:19
;;@ ~lib/allocator/tlsf.ts:458:19
(i32.and
(i32.add
;;@ ~lib/allocator/tlsf.ts:455:20
(get_local $3)
;;@ ~lib/allocator/tlsf.ts:458:20
(get_local $4)
(i32.const 2923)
)
(i32.const -8)
)
;;@ ~lib/allocator/tlsf.ts:455:66
;;@ ~lib/allocator/tlsf.ts:458:66
(i32.shl
(current_memory)
;;@ ~lib/allocator/tlsf.ts:455:86
;;@ ~lib/allocator/tlsf.ts:458:86
(i32.const 16)
)
)
)
)
)
;;@ ~lib/allocator/tlsf.ts:459:2
(set_local $1
;;@ ~lib/allocator/tlsf.ts:459:20
;;@ ~lib/allocator/tlsf.ts:462:2
(set_local $4
;;@ ~lib/allocator/tlsf.ts:462:20
(i32.const 0)
)
;;@ ~lib/allocator/tlsf.ts:460:2
;;@ ~lib/allocator/tlsf.ts:463:2
(if
;;@ ~lib/allocator/tlsf.ts:460:6
;;@ ~lib/allocator/tlsf.ts:463:6
(get_local $0)
;;@ ~lib/allocator/tlsf.ts:460:12
;;@ ~lib/allocator/tlsf.ts:463:12
(block
;;@ ~lib/allocator/tlsf.ts:461:4
;;@ ~lib/allocator/tlsf.ts:464:4
(if
;;@ ~lib/allocator/tlsf.ts:461:8
;;@ ~lib/allocator/tlsf.ts:464:8
(i32.gt_u
(get_local $0)
;;@ ~lib/allocator/tlsf.ts:461:15
;;@ ~lib/allocator/tlsf.ts:464:15
(i32.const 1073741824)
)
;;@ ~lib/allocator/tlsf.ts:461:31
;;@ ~lib/allocator/tlsf.ts:464:31
(unreachable)
)
;;@ ~lib/allocator/tlsf.ts:466:4
;;@ ~lib/allocator/tlsf.ts:469:4
(if
;;@ ~lib/allocator/tlsf.ts:466:8
;;@ ~lib/allocator/tlsf.ts:469:8
(i32.eqz
;;@ ~lib/allocator/tlsf.ts:465:4
(tee_local $3
;;@ ~lib/allocator/tlsf.ts:465:21
;;@ ~lib/allocator/tlsf.ts:468:4
(tee_local $1
;;@ ~lib/allocator/tlsf.ts:468:21
(call $~lib/allocator/tlsf/Root#search
;;@ ~lib/allocator/tlsf.ts:465:16
;;@ ~lib/allocator/tlsf.ts:468:16
(get_local $2)
;;@ ~lib/allocator/tlsf.ts:463:4
;;@ ~lib/allocator/tlsf.ts:466:4
(tee_local $0
;;@ ~lib/allocator/tlsf.ts:463:11
;;@ ~lib/allocator/tlsf.ts:466:11
(select
(tee_local $3
;;@ ~lib/allocator/tlsf.ts:463:22
(tee_local $1
;;@ ~lib/allocator/tlsf.ts:466:22
(i32.and
(i32.add
;;@ ~lib/allocator/tlsf.ts:463:23
;;@ ~lib/allocator/tlsf.ts:466:23
(get_local $0)
;;@ ~lib/allocator/tlsf.ts:463:30
;;@ ~lib/allocator/tlsf.ts:466:30
(i32.const 7)
)
(i32.const -8)
)
)
(tee_local $1
;;@ ~lib/allocator/tlsf.ts:463:51
(tee_local $5
;;@ ~lib/allocator/tlsf.ts:466:51
(i32.const 16)
)
(i32.gt_u
(get_local $3)
(get_local $1)
(get_local $5)
)
)
)
)
)
)
;;@ ~lib/allocator/tlsf.ts:466:16
;;@ ~lib/allocator/tlsf.ts:469:16
(block
;;@ ~lib/allocator/tlsf.ts:472:6
;;@ ~lib/allocator/tlsf.ts:475:6
(if
;;@ ~lib/allocator/tlsf.ts:472:10
;;@ ~lib/allocator/tlsf.ts:475:10
(i32.lt_s
(grow_memory
;;@ ~lib/allocator/tlsf.ts:471:24
;;@ ~lib/allocator/tlsf.ts:474:24
(select
(tee_local $3
;;@ ~lib/allocator/tlsf.ts:469:6
(tee_local $1
;;@ ~lib/allocator/tlsf.ts:469:24
;;@ ~lib/allocator/tlsf.ts:472:6
(tee_local $5
;;@ ~lib/allocator/tlsf.ts:472:24
(current_memory)
)
)
(tee_local $5
;;@ ~lib/allocator/tlsf.ts:470:6
(tee_local $1
;;@ ~lib/allocator/tlsf.ts:473:6
(tee_local $4
;;@ ~lib/allocator/tlsf.ts:470:24
;;@ ~lib/allocator/tlsf.ts:473:24
(i32.shr_u
;;@ ~lib/allocator/tlsf.ts:473:30
(i32.and
;;@ ~lib/allocator/tlsf.ts:470:25
;;@ ~lib/allocator/tlsf.ts:473:31
(i32.add
;;@ ~lib/allocator/tlsf.ts:470:26
;;@ ~lib/allocator/tlsf.ts:473:32
(get_local $0)
;;@ ~lib/allocator/tlsf.ts:470:33
;;@ ~lib/allocator/tlsf.ts:473:39
(i32.const 65535)
)
(i32.const -65536)
)
;;@ ~lib/allocator/tlsf.ts:470:56
;;@ ~lib/allocator/tlsf.ts:473:62
(i32.const 16)
)
)
)
(i32.gt_s
(get_local $3)
(get_local $5)
(get_local $1)
)
)
)
;;@ ~lib/allocator/tlsf.ts:472:37
;;@ ~lib/allocator/tlsf.ts:475:37
(i32.const 0)
)
;;@ ~lib/allocator/tlsf.ts:472:40
;;@ ~lib/allocator/tlsf.ts:475:40
(if
;;@ ~lib/allocator/tlsf.ts:473:12
;;@ ~lib/allocator/tlsf.ts:476:12
(i32.lt_s
(grow_memory
;;@ ~lib/allocator/tlsf.ts:473:24
;;@ ~lib/allocator/tlsf.ts:476:24
(get_local $4)
)
;;@ ~lib/allocator/tlsf.ts:473:39
;;@ ~lib/allocator/tlsf.ts:476:39
(i32.const 0)
)
;;@ ~lib/allocator/tlsf.ts:473:42
;;@ ~lib/allocator/tlsf.ts:476:42
(unreachable)
)
)
;;@ ~lib/allocator/tlsf.ts:478:11
;;@ ~lib/allocator/tlsf.ts:481:11
(drop
(call $~lib/allocator/tlsf/Root#addMemory
;;@ ~lib/allocator/tlsf.ts:478:6
;;@ ~lib/allocator/tlsf.ts:481:6
(get_local $2)
;;@ ~lib/allocator/tlsf.ts:478:21
;;@ ~lib/allocator/tlsf.ts:481:21
(i32.shl
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:478:43
(get_local $5)
;;@ ~lib/allocator/tlsf.ts:481:43
(i32.const 16)
)
;;@ ~lib/allocator/tlsf.ts:478:47
;;@ ~lib/allocator/tlsf.ts:481:47
(i32.shl
;;@ ~lib/allocator/tlsf.ts:477:23
;;@ ~lib/allocator/tlsf.ts:480:23
(current_memory)
;;@ ~lib/allocator/tlsf.ts:478:68
;;@ ~lib/allocator/tlsf.ts:481:68
(i32.const 16)
)
)
)
;;@ ~lib/allocator/tlsf.ts:479:6
(set_local $3
;;@ ~lib/allocator/tlsf.ts:479:14
;;@ ~lib/allocator/tlsf.ts:482:6
(set_local $1
;;@ ~lib/allocator/tlsf.ts:482:14
(call $~lib/allocator/tlsf/Root#search
;;@ ~lib/allocator/tlsf.ts:479:21
;;@ ~lib/allocator/tlsf.ts:482:21
(get_local $2)
;;@ ~lib/allocator/tlsf.ts:479:33
;;@ ~lib/allocator/tlsf.ts:482:33
(get_local $0)
)
)
)
)
;;@ ~lib/allocator/tlsf.ts:483:4
(set_local $1
;;@ ~lib/allocator/tlsf.ts:483:16
;;@ ~lib/allocator/tlsf.ts:486:4
(set_local $4
;;@ ~lib/allocator/tlsf.ts:486:16
(call $~lib/allocator/tlsf/Root#use
;;@ ~lib/allocator/tlsf.ts:483:11
;;@ ~lib/allocator/tlsf.ts:486:11
(get_local $2)
;;@ ~lib/allocator/tlsf.ts:483:20
(get_local $3)
;;@ ~lib/allocator/tlsf.ts:483:34
;;@ ~lib/allocator/tlsf.ts:486:20
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:486:34
(get_local $0)
)
)
)
)
;;@ ~lib/allocator/tlsf.ts:486:9
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:489:9
(get_local $4)
)
(func $~lib/allocator/tlsf/free_memory (; 13 ;) (type $iv) (param $0 i32)
(local $1 i32)
(local $2 i32)
;;@ ~lib/allocator/tlsf.ts:491:47
;;@ ~lib/allocator/tlsf.ts:495:2
(if
;;@ ~lib/allocator/tlsf.ts:492:6
;;@ ~lib/allocator/tlsf.ts:495:6
(get_local $0)
;;@ ~lib/allocator/tlsf.ts:494:4
;;@ ~lib/allocator/tlsf.ts:497:4
(if
;;@ ~lib/allocator/tlsf.ts:493:4
;;@ ~lib/allocator/tlsf.ts:496:4
(tee_local $1
;;@ ~lib/allocator/tlsf.ts:493:15
;;@ ~lib/allocator/tlsf.ts:496:15
(get_global $~lib/allocator/tlsf/ROOT)
)
;;@ ~lib/allocator/tlsf.ts:494:14
;;@ ~lib/allocator/tlsf.ts:497:14
(block
;;@ ~lib/allocator/tlsf.ts:498:6
;;@ ~lib/allocator/tlsf.ts:501:6
(i32.store
;;@ ~lib/allocator/tlsf.ts:495:6
;;@ ~lib/allocator/tlsf.ts:498:6
(tee_local $2
;;@ ~lib/allocator/tlsf.ts:495:18
;;@ ~lib/allocator/tlsf.ts:498:18
(i32.sub
;;@ ~lib/allocator/tlsf.ts:495:36
;;@ ~lib/allocator/tlsf.ts:498:36
(get_local $0)
;;@ ~lib/allocator/tlsf.ts:495:43
;;@ ~lib/allocator/tlsf.ts:498:43
(i32.const 8)
)
)
;;@ ~lib/allocator/tlsf.ts:498:19
;;@ ~lib/allocator/tlsf.ts:501:19
(i32.or
;;@ ~lib/allocator/tlsf.ts:496:22
;;@ ~lib/allocator/tlsf.ts:499:22
(i32.load
(get_local $2)
)
;;@ ~lib/allocator/tlsf.ts:498:31
;;@ ~lib/allocator/tlsf.ts:501:31
(i32.const 1)
)
)
;;@ ~lib/allocator/tlsf.ts:499:11
;;@ ~lib/allocator/tlsf.ts:502:11
(call $~lib/allocator/tlsf/Root#insert
;;@ ~lib/allocator/tlsf.ts:499:6
;;@ ~lib/allocator/tlsf.ts:502:6
(get_local $1)
;;@ ~lib/allocator/tlsf.ts:499:18
;;@ ~lib/allocator/tlsf.ts:502:18
(i32.sub
;;@ ~lib/allocator/tlsf.ts:499:36
;;@ ~lib/allocator/tlsf.ts:502:36
(get_local $0)
;;@ ~lib/allocator/tlsf.ts:499:43
;;@ ~lib/allocator/tlsf.ts:502:43
(i32.const 8)
)
)

File diff suppressed because it is too large Load Diff