* @param {number} origin * @param {number} capacity * @param {number} level * @param {VNode | undefined} [root] The trie root, or `undefined` when every * in-range value lives in the tail (or is a virtual `undefined`). * @param {VNode | undefined} [tail] * @param {OwnerID} [ownerID] * @para
(origin, capacity, level, root, tail, ownerID, hash)
| 439 | * @param {number} [hash] |
| 440 | */ |
| 441 | function makeList(origin, capacity, level, root, tail, ownerID, hash) { |
| 442 | const list = Object.create(ListPrototype); |
| 443 | list.size = capacity - origin; |
| 444 | list._origin = origin; |
| 445 | list._capacity = capacity; |
| 446 | list._level = level; |
| 447 | list._root = root; |
| 448 | list._tail = tail; |
| 449 | list.__ownerID = ownerID; |
| 450 | list.__hash = hash; |
| 451 | list.__altered = false; |
| 452 | return list; |
| 453 | } |
| 454 | |
| 455 | export function emptyList() { |
| 456 | return makeList(0, 0, SHIFT); |
no outgoing calls
no test coverage detected