MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / set

Function set

src/polyfill/bigint64array.js:64–76  ·  view source on GitHub ↗
(source, targetOffset)

Source from the content-addressed store, hash-verified

62 return proxy;
63 },
64 set(source, targetOffset) {
65 targetOffset ??= 0;
66 if (2 * (source.length + targetOffset) > array.length) {
67 // This is the Chrome error message
68 // Firefox: "invalid or out-of-range index"
69 throw new RangeError("offset is out of bounds");
70 }
71 for (var i = 0; i < source.length; i++) {
72 var value = source[i];
73 var pair = bigIntToParts(value);
74 array.set(pair, 2 * (targetOffset + i));
75 }
76 },
77 },
78 {
79 get(target, idx, receiver) {

Callers

nothing calls this directly

Calls 3

bigIntToPartsFunction · 0.85
setMethod · 0.65
testMethod · 0.45

Tested by

no test coverage detected