mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-25 12:41:50 +00:00
Test formatting; Wire webpack loader to asc
This commit is contained in:
@ -93,15 +93,15 @@ class Block {
|
||||
// 3 2 1
|
||||
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 bits
|
||||
// ├─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┤ ┐
|
||||
// │ 0 | flMap S│ ◄────┐
|
||||
// │ 0 | flMap S│ ◄────┐
|
||||
// ╞═══════════════════════════════════════════════════════════════╡ │
|
||||
// │ slMap[0] (small blocks) │ ◄─┐ │
|
||||
// │ slMap[0] S │ ◄─┐ │
|
||||
// ├───────────────────────────────────────────────────────────────┤ │ │
|
||||
// │ slMap[1] │ ◄─┤ │
|
||||
// ├───────────────────────────────────────────────────────────────┤ u32 │
|
||||
// │ ... │ ◄─┤ │
|
||||
// ├───────────────────────────────────────────────────────────────┤ │ │
|
||||
// │ slMap[22] * │ ◄─┘ │
|
||||
// │ slMap[22] P │ ◄─┘ │
|
||||
// ╞═══════════════════════════════════════════════════════════════╡ usize
|
||||
// │ head[0] │ ◄────┤
|
||||
// ├───────────────────────────────────────────────────────────────┤ │
|
||||
@ -109,7 +109,7 @@ class Block {
|
||||
// ├───────────────────────────────────────────────────────────────┤ │
|
||||
// │ head[736] │ ◄────┘
|
||||
// └───────────────────────────────────────────────────────────────┘ SIZE ┘
|
||||
// *: Possibly followed by padding if 64-bit
|
||||
// S: Small blocks map, P: Possibly padded if 64-bit
|
||||
|
||||
assert((1 << SL_BITS) <= 32); // second level must fit into 32 bits
|
||||
|
||||
@ -398,7 +398,7 @@ function ffs<T>(word: T): T {
|
||||
return ctz<T>(word); // differs from ffs only for 0
|
||||
}
|
||||
|
||||
/** Determins the last (LSB to MSB) set bit's index of a word. */
|
||||
/** Determines the last (LSB to MSB) set bit's index of a word. */
|
||||
function fls<T>(word: T): T {
|
||||
assert(word != 0); // word cannot be 0
|
||||
const inv: T = (sizeof<T>() << 3) - 1;
|
||||
|
Reference in New Issue
Block a user