Test formatting; Wire webpack loader to asc

This commit is contained in:
dcodeIO
2018-02-05 17:10:14 +01:00
parent a0b39da7cf
commit 41c0f2c6c3
5 changed files with 244 additions and 201 deletions

View File

@ -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;