MCPcopy Create free account
hub / github.com/GamerHack/GamerHack.github.io / addrof

Method addrof

g2all/900/module/mem.js:521–546  ·  view source on GitHub ↗
(object)

Source from the content-addressed store, hash-verified

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) {

Callers 14

constructorMethod · 0.95
mallocFunction · 0.45
malloc32Function · 0.45
array_from_addressFunction · 0.45
send.jsFile · 0.45
dump_evalFunction · 0.45
dump_scrollLeftFunction · 0.45
get_basesFunction · 0.45
constructorMethod · 0.45
get_basesFunction · 0.45
constructorMethod · 0.45
gc_allocMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected