(object)
| 258 | } |
| 259 | |
| 260 | addrof(object) { |
| 261 | // typeof considers null as a object. blacklist it as it isn't a |
| 262 | // JSObject |
| 263 | if (object === null || (typeof object !== "object" && typeof object !== "function")) { |
| 264 | throw TypeError("argument not a JS object"); |
| 265 | } |
| 266 | |
| 267 | const obj = this._obj; |
| 268 | const worker = this._worker; |
| 269 | const main = this._main; |
| 270 | |
| 271 | obj.addr = object; |
| 272 | |
| 273 | main[off_vector] = this._addr_low; |
| 274 | main[off_vector2] = this._addr_high; |
| 275 | |
| 276 | const res = new Addr(worker.getUint32(0, true), worker.getUint32(4, true)); |
| 277 | obj.addr = null; |
| 278 | |
| 279 | return res; |
| 280 | } |
| 281 | |
| 282 | // expects addr to be a Int |
| 283 | _set_addr_direct(addr) { |
no outgoing calls
no test coverage detected