(v: Value, tag: Tag)
| 33 | } |
| 34 | |
| 35 | function getIndex(v: Value, tag: Tag): number { |
| 36 | if (valueTag(v) !== tag) { |
| 37 | throw "Trying to get index for value with invalid tag"; |
| 38 | } |
| 39 | return v >> TAG_BITS; |
| 40 | } |
| 41 | |
| 42 | export function valueTag(v: Value): Tag { |
| 43 | return v & TAG_MASK; |
no test coverage detected
searching dependent graphs…