(object)
| 519 | } |
| 520 | |
| 521 | addrof(object) { |
| 522 | // typeof considers null as a object. blacklist it as it isn't a |
| 523 | // JSObject |
| 524 | if (object === null |
| 525 | || (typeof object !== 'object' && typeof object !== 'function') |
| 526 | ) { |
| 527 | throw TypeError('argument not a JS object'); |
| 528 | } |
| 529 | |
| 530 | const obj = this._obj; |
| 531 | const worker = this._worker; |
| 532 | const main = this._main; |
| 533 | |
| 534 | obj.addr = object; |
| 535 | |
| 536 | main[off_vector] = this._addr_low; |
| 537 | main[off_vector2] = this._addr_high; |
| 538 | |
| 539 | const res = new Addr( |
| 540 | worker.getUint32(0, true), |
| 541 | worker.getUint32(4, true), |
| 542 | ); |
| 543 | obj.addr = null; |
| 544 | |
| 545 | return res; |
| 546 | } |
| 547 | |
| 548 | // expects addr to be a Int |
| 549 | _set_addr_direct(addr) { |
no outgoing calls
no test coverage detected