Function
add_and_set_addr
(mem, offset, base_lo, base_hi)
Source from the content-addressed store, hash-verified
| 30 | } |
| 31 | |
| 32 | function add_and_set_addr(mem, offset, base_lo, base_hi) { |
| 33 | const values = lohi_from_one(offset); |
| 34 | const main = mem._main; |
| 35 | |
| 36 | const low = base_lo + values[0]; |
| 37 | |
| 38 | // no need to use ">>> 0" to convert to unsigned here |
| 39 | main[off_vector] = low; |
| 40 | main[off_vector2] = base_hi + values[1] + (low > 0xffffffff); |
| 41 | } |
| 42 | |
| 43 | export class Addr extends Int { |
| 44 | read8(offset) { |
Tested by
no test coverage detected