mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-26 15:32:16 +00:00
load/store Block
This commit is contained in:
parent
2dec52976a
commit
dd2bdd0383
@ -165,20 +165,18 @@ import { AL_BITS, AL_SIZE, AL_MASK, DEBUG, CommonBlock } from "./common";
|
|||||||
/** Gets the head of the free list for the specified combination of first and second level. */
|
/** Gets the head of the free list for the specified combination of first and second level. */
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@inline function GETHEAD(root: Root, fl: usize, sl: u32): Block | null {
|
@inline function GETHEAD(root: Root, fl: usize, sl: u32): Block | null {
|
||||||
return changetype<Block>(
|
return load<Block>(
|
||||||
load<usize>(
|
|
||||||
changetype<usize>(root) + (((fl << SL_BITS) + <usize>sl) << alignof<usize>()),
|
changetype<usize>(root) + (((fl << SL_BITS) + <usize>sl) << alignof<usize>()),
|
||||||
HL_START
|
HL_START
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets the head of the free list for the specified combination of first and second level. */
|
/** Sets the head of the free list for the specified combination of first and second level. */
|
||||||
// @ts-ignore: decorator
|
// @ts-ignore: decorator
|
||||||
@inline function SETHEAD(root: Root, fl: usize, sl: u32, head: Block | null): void {
|
@inline function SETHEAD(root: Root, fl: usize, sl: u32, head: Block | null): void {
|
||||||
store<usize>(
|
store<Block>(
|
||||||
changetype<usize>(root) + (((fl << SL_BITS) + <usize>sl) << alignof<usize>()),
|
changetype<usize>(root) + (((fl << SL_BITS) + <usize>sl) << alignof<usize>()),
|
||||||
changetype<usize>(head),
|
head,
|
||||||
HL_START
|
HL_START
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -517,7 +517,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 450
|
i32.const 448
|
||||||
i32.const 29
|
i32.const 29
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
|
Binary file not shown.
@ -63,7 +63,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 279
|
i32.const 277
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -88,7 +88,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 281
|
i32.const 279
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -140,7 +140,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 294
|
i32.const 292
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -278,7 +278,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 207
|
i32.const 205
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -293,7 +293,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 209
|
i32.const 207
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -392,7 +392,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 230
|
i32.const 228
|
||||||
i32.const 15
|
i32.const 15
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -455,7 +455,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 245
|
i32.const 243
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -471,7 +471,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 246
|
i32.const 244
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -528,7 +528,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 262
|
i32.const 260
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -651,7 +651,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 388
|
i32.const 386
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -676,7 +676,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 398
|
i32.const 396
|
||||||
i32.const 15
|
i32.const 15
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -707,7 +707,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 410
|
i32.const 408
|
||||||
i32.const 4
|
i32.const 4
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -940,7 +940,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 450
|
i32.const 448
|
||||||
i32.const 29
|
i32.const 29
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1034,7 +1034,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 340
|
i32.const 338
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1099,7 +1099,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 353
|
i32.const 351
|
||||||
i32.const 17
|
i32.const 17
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1217,7 +1217,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 367
|
i32.const 365
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1328,7 +1328,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 480
|
i32.const 478
|
||||||
i32.const 15
|
i32.const 15
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1346,7 +1346,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 482
|
i32.const 480
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1622,7 +1622,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 495
|
i32.const 493
|
||||||
i32.const 13
|
i32.const 13
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
@ -1789,7 +1789,7 @@
|
|||||||
if
|
if
|
||||||
i32.const 0
|
i32.const 0
|
||||||
i32.const 24
|
i32.const 24
|
||||||
i32.const 533
|
i32.const 531
|
||||||
i32.const 2
|
i32.const 2
|
||||||
call $~lib/builtins/abort
|
call $~lib/builtins/abort
|
||||||
unreachable
|
unreachable
|
||||||
|
Loading…
x
Reference in New Issue
Block a user