MCPcopy Create free account
hub / github.com/nodejs/node / makeWtf16TestDataSegment

Function makeWtf16TestDataSegment

deps/v8/test/mjsunit/wasm/stringrefs-exec-gc.js:251–263  ·  view source on GitHub ↗
(strings)

Source from the content-addressed store, hash-verified

249}
250
251function makeWtf16TestDataSegment(strings) {
252 let data = []
253 let valid = {};
254
255 for (let str of strings) {
256 valid[str] = { offset: data.length, length: str.length };
257 for (let byte of encodeWtf16LE(str)) {
258 data.push(byte);
259 }
260 }
261
262 return { valid, data: Uint8Array.from(data) };
263};
264
265(function TestStringNewWtf16Array() {
266 print(arguments.callee.name);

Callers 1

Calls 3

encodeWtf16LEFunction · 0.70
pushMethod · 0.45
fromMethod · 0.45

Tested by

no test coverage detected