2018-03-04 17:25:32 +01:00
|
|
|
(module
|
|
|
|
(type $ii (func (param i32) (result i32)))
|
|
|
|
(type $iv (func (param i32)))
|
|
|
|
(type $iiv (func (param i32 i32)))
|
|
|
|
(type $iii (func (param i32 i32) (result i32)))
|
|
|
|
(type $v (func))
|
|
|
|
(global "$(lib)/allocator/buddy/BUCKETS_START" (mut i32) (i32.const 0))
|
|
|
|
(global "$(lib)/allocator/buddy/BUCKETS_END" (mut i32) (i32.const 0))
|
|
|
|
(global "$(lib)/allocator/buddy/bucket_limit" (mut i32) (i32.const 0))
|
|
|
|
(global "$(lib)/allocator/buddy/NODE_IS_SPLIT_START" (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/max_ptr" (mut i32) (i32.const 0))
|
|
|
|
(global $HEAP_BASE i32 (i32.const 4))
|
|
|
|
(memory $0 1)
|
|
|
|
(export "allocate_memory" (func "$(lib)/allocator/buddy/allocate_memory"))
|
|
|
|
(export "free_memory" (func "$(lib)/allocator/buddy/free_memory"))
|
|
|
|
(export "memory" (memory $0))
|
|
|
|
(start $start)
|
|
|
|
(func "$(lib)/allocator/buddy/update_max_ptr" (; 0 ;) (type $ii) (param $0 i32) (result i32)
|
|
|
|
(local $1 i32)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:175:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:175:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.gt_u
|
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:175:18
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global "$(lib)/allocator/buddy/max_ptr")
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:175:27
|
2018-03-04 17:25:32 +01:00
|
|
|
(block
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:182:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:182:8
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.lt_s
|
|
|
|
(grow_memory
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:182:20
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.sub
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:180:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(tee_local $1
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:180:19
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.shr_u
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:180:25
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.and
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:180:26
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.add
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:180:27
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:180:39
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 65535)
|
|
|
|
)
|
|
|
|
(i32.const -65536)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:180:61
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 16)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:179:19
|
2018-03-04 17:25:32 +01:00
|
|
|
(current_memory)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:182:43
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:183:13
|
2018-03-04 17:25:32 +01:00
|
|
|
(return
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:186:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(set_global "$(lib)/allocator/buddy/max_ptr"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:186:14
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.shl
|
|
|
|
(get_local $1)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:186:33
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 16)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:188:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(func "$(lib)/allocator/buddy/buckets$get" (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:102:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.add
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:102:26
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global "$(lib)/allocator/buddy/BUCKETS_START")
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:102:42
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.shl
|
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:102:50
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 3)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(func "$(lib)/allocator/buddy/list_init" (; 2 ;) (type $iv) (param $0 i32)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:197:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.store
|
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:197:14
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:198:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.store offset=4
|
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:198:14
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(func "$(lib)/allocator/buddy/list_push" (; 3 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
|
|
|
(local $2 i32)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:207:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.store
|
|
|
|
(get_local $1)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:206:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(tee_local $2
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:206:13
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.load
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:208:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.store offset=4
|
|
|
|
(get_local $1)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:208:15
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:209:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.store offset=4
|
|
|
|
(get_local $2)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:209:14
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:210:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.store
|
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:210:14
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(func "$(lib)/allocator/buddy/bucket_for_request" (; 4 ;) (type $ii) (param $0 i32) (result i32)
|
|
|
|
(local $1 i32)
|
|
|
|
(local $2 i32)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:279:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(set_local $1
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:279:15
|
2018-03-12 14:06:39 +01:00
|
|
|
(i32.const 26)
|
2018-03-04 17:25:32 +01:00
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:280:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(set_local $2
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:280:13
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 16)
|
|
|
|
)
|
|
|
|
(loop $continue|0
|
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:282:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.lt_u
|
|
|
|
(get_local $2)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:282:16
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
(block
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:283:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(set_local $1
|
|
|
|
(i32.sub
|
|
|
|
(get_local $1)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:284:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(set_local $2
|
|
|
|
(i32.shl
|
|
|
|
(get_local $2)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:284:12
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $continue|0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:287:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
(func "$(lib)/allocator/buddy/node_for_ptr" (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:252:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.sub
|
|
|
|
(i32.add
|
|
|
|
(i32.shr_u
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:252:10
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.sub
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:252:11
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:252:17
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global "$(lib)/allocator/buddy/base_ptr")
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:252:30
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.sub
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:252:31
|
2018-03-12 14:06:39 +01:00
|
|
|
(i32.const 30)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:252:48
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:252:59
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.shl
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:252:60
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:252:65
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:252:75
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(func "$(lib)/allocator/buddy/node_is_split$get" (; 6 ;) (type $ii) (param $0 i32) (result i32)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:148:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.load8_u
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:148:18
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.add
|
|
|
|
(get_global "$(lib)/allocator/buddy/NODE_IS_SPLIT_START")
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:148:40
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(func "$(lib)/allocator/buddy/parent_is_split" (; 7 ;) (type $ii) (param $0 i32) (result i32)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:260:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.and
|
|
|
|
(i32.shr_u
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:260:10
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/node_is_split$get"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:260:28
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.div_u
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:259:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(tee_local $0
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:259:10
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.div_u
|
|
|
|
(i32.sub
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:259:11
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:259:19
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:259:24
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:260:36
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:260:43
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.and
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:260:49
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:260:57
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 7)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:260:63
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(func "$(lib)/allocator/buddy/list_remove" (; 8 ;) (type $iv) (param $0 i32)
|
|
|
|
(local $1 i32)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:222:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.store offset=4
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:220:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(tee_local $1
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:220:13
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.load
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:221:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(tee_local $0
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:221:13
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.load offset=4
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:223:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.store
|
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:223:14
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(func "$(lib)/allocator/buddy/ptr_for_node" (; 9 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:243:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.add
|
|
|
|
(get_global "$(lib)/allocator/buddy/base_ptr")
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:243:20
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.shl
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:243:21
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.add
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:243:22
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.sub
|
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:243:30
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.shl
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:243:31
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:243:36
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:243:46
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:243:52
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.sub
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:243:53
|
2018-03-12 14:06:39 +01:00
|
|
|
(i32.const 30)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:243:70
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(func "$(lib)/allocator/buddy/flip_parent_is_split" (; 10 ;) (type $iv) (param $0 i32)
|
|
|
|
(local $1 i32)
|
|
|
|
(local $2 i32)
|
|
|
|
(set_local $2
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:268:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(tee_local $1
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:268:18
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.div_u
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:267:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(tee_local $0
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:267:10
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.div_u
|
|
|
|
(i32.sub
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:267:11
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:267:19
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:267:24
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:268:26
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_local $0
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:270:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.xor
|
|
|
|
(call "$(lib)/allocator/buddy/node_is_split$get"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:270:22
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:270:35
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.shl
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:270:41
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:270:46
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.and
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:270:47
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:270:55
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 7)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(i32.store8
|
|
|
|
(i32.add
|
|
|
|
(get_global "$(lib)/allocator/buddy/NODE_IS_SPLIT_START")
|
|
|
|
(get_local $2)
|
|
|
|
)
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(func "$(lib)/allocator/buddy/lower_bucket_limit" (; 11 ;) (type $ii) (param $0 i32) (result i32)
|
|
|
|
(local $1 i32)
|
|
|
|
(local $2 i32)
|
|
|
|
(loop $continue|0
|
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:296:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.lt_u
|
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:296:18
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global "$(lib)/allocator/buddy/bucket_limit")
|
|
|
|
)
|
|
|
|
(block
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:306:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:306:8
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.eqz
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:306:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/parent_is_split"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:297:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(tee_local $1
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:297:15
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/node_for_ptr"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:297:28
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global "$(lib)/allocator/buddy/base_ptr")
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:297:38
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global "$(lib)/allocator/buddy/bucket_limit")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:306:32
|
2018-03-04 17:25:32 +01:00
|
|
|
(block
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:307:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/list_remove"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:307:18
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global "$(lib)/allocator/buddy/base_ptr")
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:308:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/list_init"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:308:16
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/buckets$get"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:308:28
|
2018-03-04 17:25:32 +01:00
|
|
|
(block (result i32)
|
|
|
|
(set_global "$(lib)/allocator/buddy/bucket_limit"
|
|
|
|
(i32.sub
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:308:30
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global "$(lib)/allocator/buddy/bucket_limit")
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(get_global "$(lib)/allocator/buddy/bucket_limit")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:309:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/list_push"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:309:16
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/buckets$get"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:309:28
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global "$(lib)/allocator/buddy/bucket_limit")
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:309:43
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global "$(lib)/allocator/buddy/base_ptr")
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:310:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(br $continue|0)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:322:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:322:8
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.eqz
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:322:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/update_max_ptr"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:322:24
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.add
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:321:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(tee_local $2
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:321:18
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/ptr_for_node"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:321:31
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.add
|
|
|
|
(get_local $1)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:321:38
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:321:41
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global "$(lib)/allocator/buddy/bucket_limit")
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:322:38
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:323:13
|
2018-03-04 17:25:32 +01:00
|
|
|
(return
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:325:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/list_push"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:325:14
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/buckets$get"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:325:26
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global "$(lib)/allocator/buddy/bucket_limit")
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:325:41
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $2)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:326:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/list_init"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:326:14
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/buckets$get"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:326:26
|
2018-03-04 17:25:32 +01:00
|
|
|
(block (result i32)
|
|
|
|
(set_global "$(lib)/allocator/buddy/bucket_limit"
|
|
|
|
(i32.sub
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:326:28
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global "$(lib)/allocator/buddy/bucket_limit")
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(get_global "$(lib)/allocator/buddy/bucket_limit")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:333:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:332:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(tee_local $1
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:332:11
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.div_u
|
|
|
|
(i32.sub
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:332:12
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:332:19
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:332:24
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:334:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/flip_parent_is_split"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:334:27
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $continue|0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:338:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
(func "$(lib)/allocator/buddy/list_pop" (; 12 ;) (type $ii) (param $0 i32) (result i32)
|
|
|
|
(local $1 i32)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:231:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:231:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.eq
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:230:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(tee_local $1
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:230:13
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.load
|
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:231:14
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:231:27
|
2018-03-04 17:25:32 +01:00
|
|
|
(return
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:232:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/list_remove"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:232:14
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:233:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
(func "$(lib)/allocator/buddy/allocate_memory" (; 13 ;) (type $ii) (param $0 i32) (result i32)
|
|
|
|
(local $1 i32)
|
|
|
|
(local $2 i32)
|
|
|
|
(local $3 i32)
|
|
|
|
(local $4 i32)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:350:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:350:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.gt_u
|
|
|
|
(i32.add
|
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:350:16
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 8)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:350:30
|
2018-03-12 14:06:39 +01:00
|
|
|
(i32.const 1073741824)
|
2018-03-04 17:25:32 +01:00
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:351:11
|
2018-03-04 17:25:32 +01:00
|
|
|
(return
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:359:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(if
|
|
|
|
(i32.eqz
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:359:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global "$(lib)/allocator/buddy/base_ptr")
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:359:21
|
2018-03-04 17:25:32 +01:00
|
|
|
(block
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:361:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(set_global "$(lib)/allocator/buddy/base_ptr"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:361:15
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.and
|
|
|
|
(i32.add
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:361:16
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global "$(lib)/allocator/buddy/NODE_IS_SPLIT_END")
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:361:36
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 7)
|
|
|
|
)
|
|
|
|
(i32.const -8)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:362:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(set_global "$(lib)/allocator/buddy/max_ptr"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:362:14
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.shl
|
|
|
|
(current_memory)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:362:41
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 16)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:363:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(set_global "$(lib)/allocator/buddy/bucket_limit"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:363:19
|
2018-03-12 14:06:39 +01:00
|
|
|
(i32.const 26)
|
2018-03-04 17:25:32 +01:00
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:364:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:364:8
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.eqz
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:364:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/update_max_ptr"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:364:24
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.add
|
|
|
|
(get_global "$(lib)/allocator/buddy/base_ptr")
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:364:35
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:365:13
|
2018-03-04 17:25:32 +01:00
|
|
|
(return
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:367:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/list_init"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:367:14
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/buckets$get"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:367:26
|
2018-03-12 14:06:39 +01:00
|
|
|
(i32.const 26)
|
2018-03-04 17:25:32 +01:00
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:368:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/list_push"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:368:14
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/buckets$get"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:368:26
|
2018-03-12 14:06:39 +01:00
|
|
|
(i32.const 26)
|
2018-03-04 17:25:32 +01:00
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:368:45
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global "$(lib)/allocator/buddy/base_ptr")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:376:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(set_local $4
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:375:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(tee_local $1
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:375:11
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/bucket_for_request"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:375:30
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.add
|
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:375:40
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(loop $continue|0
|
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:383:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.add
|
|
|
|
(get_local $1)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:383:18
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:383:26
|
2018-03-04 17:25:32 +01:00
|
|
|
(block
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:391:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:391:8
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.eqz
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:391:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/lower_bucket_limit"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:391:28
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:392:13
|
2018-03-04 17:25:32 +01:00
|
|
|
(return
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:400:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:400:8
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.eqz
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:399:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(tee_local $2
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:399:10
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/list_pop"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:399:37
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/buckets$get"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:399:49
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:400:14
|
2018-03-04 17:25:32 +01:00
|
|
|
(block
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:405:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:405:10
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.and
|
|
|
|
(if (result i32)
|
|
|
|
(tee_local $2
|
|
|
|
(i32.ne
|
|
|
|
(get_local $1)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:405:20
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global "$(lib)/allocator/buddy/bucket_limit")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(get_local $2)
|
|
|
|
(i32.eqz
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:405:36
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:405:49
|
2018-03-04 17:25:32 +01:00
|
|
|
(block
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:406:8
|
2018-03-04 17:25:32 +01:00
|
|
|
(set_local $1
|
|
|
|
(i32.sub
|
|
|
|
(get_local $1)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:407:8
|
2018-03-04 17:25:32 +01:00
|
|
|
(br $continue|0)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:417:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:417:10
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.eqz
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:417:11
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/lower_bucket_limit"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:417:30
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.sub
|
|
|
|
(get_local $1)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:417:39
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:418:15
|
2018-03-04 17:25:32 +01:00
|
|
|
(return
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:420:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(set_local $2
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:420:12
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/list_pop"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:420:39
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/buckets$get"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:420:51
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:427:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(set_local $3
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:427:11
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.shl
|
|
|
|
(i32.const 1)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:427:16
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.sub
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:427:17
|
2018-03-12 14:06:39 +01:00
|
|
|
(i32.const 30)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:427:34
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:429:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:429:8
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.eqz
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:429:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/update_max_ptr"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:429:24
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.add
|
|
|
|
(get_local $2)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:428:19
|
2018-03-04 17:25:32 +01:00
|
|
|
(if (result i32)
|
|
|
|
(i32.lt_u
|
|
|
|
(get_local $1)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:428:28
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $4)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:428:46
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.add
|
|
|
|
(i32.div_u
|
|
|
|
(get_local $3)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:428:53
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 2)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:428:57
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 8)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:428:69
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $3)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:429:45
|
2018-03-04 17:25:32 +01:00
|
|
|
(block
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:430:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/list_push"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:430:16
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/buckets$get"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:430:28
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:430:37
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $2)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:431:13
|
2018-03-04 17:25:32 +01:00
|
|
|
(return
|
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:446:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:445:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(tee_local $3
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:445:8
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/node_for_ptr"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:445:21
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $2)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:445:26
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:447:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/flip_parent_is_split"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:447:27
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $3)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(loop $continue|1
|
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:457:11
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.lt_u
|
|
|
|
(get_local $1)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:457:20
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $4)
|
|
|
|
)
|
|
|
|
(block
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:460:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/flip_parent_is_split"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:458:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(tee_local $3
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:458:10
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.add
|
|
|
|
(i32.shl
|
|
|
|
(get_local $3)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:458:14
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:458:18
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:461:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/list_push"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:462:8
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/buckets$get"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:459:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(tee_local $1
|
|
|
|
(i32.add
|
|
|
|
(get_local $1)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:463:8
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/ptr_for_node"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:463:38
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.add
|
|
|
|
(get_local $3)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:463:42
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:463:45
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $continue|1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:471:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.store
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:471:17
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $2)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:471:22
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:472:17
|
2018-03-04 17:25:32 +01:00
|
|
|
(return
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:472:11
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.add
|
|
|
|
(get_local $2)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:472:17
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:475:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 0)
|
|
|
|
)
|
|
|
|
(func "$(lib)/allocator/buddy/free_memory" (; 14 ;) (type $iv) (param $0 i32)
|
|
|
|
(local $1 i32)
|
|
|
|
(local $2 i32)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:485:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:485:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.eqz
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:485:7
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:486:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(return)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:495:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(set_local $1
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:495:11
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/bucket_for_request"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:495:30
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.add
|
|
|
|
(i32.load
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:494:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(tee_local $0
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:494:8
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.sub
|
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:494:14
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:495:49
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 8)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:496:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(set_local $0
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:496:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/node_for_ptr"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:496:19
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:496:24
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:502:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(block $break|0
|
|
|
|
(loop $continue|0
|
|
|
|
(if
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:502:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
|
|
|
(block
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:509:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/flip_parent_is_split"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:509:25
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:520:6
|
2018-03-04 17:25:32 +01:00
|
|
|
(br_if $break|0
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:519:8
|
2018-03-04 17:25:32 +01:00
|
|
|
(if (result i32)
|
|
|
|
(tee_local $2
|
|
|
|
(call "$(lib)/allocator/buddy/parent_is_split"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:519:24
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(get_local $2)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:519:30
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.eq
|
|
|
|
(get_local $1)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:519:40
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global "$(lib)/allocator/buddy/bucket_limit")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:530:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/list_remove"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:530:16
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/ptr_for_node"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:530:46
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.add
|
|
|
|
(i32.xor
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:530:47
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.sub
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:530:48
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:530:52
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:530:57
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:530:62
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:530:65
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:531:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(set_local $0
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:531:8
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.div_u
|
|
|
|
(i32.sub
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:531:9
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:531:13
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 1)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:531:18
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.const 2)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:532:4
|
2018-03-04 17:25:32 +01:00
|
|
|
(set_local $1
|
|
|
|
(i32.sub
|
|
|
|
(get_local $1)
|
|
|
|
(i32.const 1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(br $continue|0)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:541:2
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/list_push"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:541:12
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/buckets$get"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:541:24
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:541:33
|
2018-03-04 17:25:32 +01:00
|
|
|
(call "$(lib)/allocator/buddy/ptr_for_node"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:541:63
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $0)
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:541:66
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_local $1)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
(func $start (; 15 ;) (type $v)
|
|
|
|
(set_global "$(lib)/allocator/buddy/BUCKETS_START"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:97:27
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global $HEAP_BASE)
|
|
|
|
)
|
|
|
|
(set_global "$(lib)/allocator/buddy/BUCKETS_END"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:98:25
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.add
|
|
|
|
(get_global "$(lib)/allocator/buddy/BUCKETS_START")
|
2018-03-12 14:06:39 +01:00
|
|
|
(i32.const 216)
|
2018-03-04 17:25:32 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
(set_global "$(lib)/allocator/buddy/NODE_IS_SPLIT_START"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:143:33
|
2018-03-04 17:25:32 +01:00
|
|
|
(get_global "$(lib)/allocator/buddy/BUCKETS_END")
|
|
|
|
)
|
|
|
|
(set_global "$(lib)/allocator/buddy/NODE_IS_SPLIT_END"
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:144:31
|
2018-03-04 17:25:32 +01:00
|
|
|
(i32.add
|
|
|
|
(get_global "$(lib)/allocator/buddy/NODE_IS_SPLIT_START")
|
2018-03-19 19:36:39 +01:00
|
|
|
;;@ (lib)/allocator/buddy.ts:144:53
|
2018-03-12 14:06:39 +01:00
|
|
|
(i32.const 8388608)
|
2018-03-04 17:25:32 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|