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

Method cpy

g2all/700/module/mem.js:206–223  ·  view source on GitHub ↗
(dst, src, len)

Source from the content-addressed store, hash-verified

204
205 // dst and src may overlap
206 cpy(dst, src, len) {
207 if (!(isInteger(len) && 0 <= len && len <= 0xffffffff)) {
208 throw TypeError("len not a unsigned 32-bit integer");
209 }
210
211 const dvals = lohi_from_one(dst);
212 const svals = lohi_from_one(src);
213 const dset = this._dst_setter;
214 const sset = this._src_setter;
215
216 dset[0] = dvals[0];
217 dset[1] = dvals[1];
218 sset[0] = svals[0];
219 sset[1] = svals[1];
220 sset[2] = len;
221
222 this._cpydst.set(this._cpysrc);
223 }
224
225 // allocate Garbage Collector managed memory. returns [address_of_memory,
226 // backer]. backer is the JSCell that is keeping the returned memory alive,

Callers 5

patch_kernelFunction · 0.45
initFunction · 0.45
initFunction · 0.45
initFunction · 0.45
initFunction · 0.45

Calls 2

lohi_from_oneFunction · 0.90
setMethod · 0.45

Tested by

no test coverage detected