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

Method addrof

g2all/700/module/mem.js:260–280  ·  view source on GitHub ↗
(object)

Source from the content-addressed store, hash-verified

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

Callers 15

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
initFunction · 0.45
get_basesFunction · 0.45
initFunction · 0.45
get_basesFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected