MCPcopy Index your code
hub / github.com/nodejs/node / newModule

Function newModule

deps/v8/test/mjsunit/wasm/instance-gc.js:11–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9let nogc = () => {};
10
11function newModule() {
12 let builder = new WasmModuleBuilder();
13 builder.addMemory(1, 1);
14 builder.exportMemoryAs("memory");
15 builder.addFunction("main", kSig_i_v)
16 .addBody([kExprI32Const, 0, kExprI32LoadMem, 0, 0])
17 .exportFunc();
18
19 return new WebAssembly.Module(builder.toBuffer());
20}
21
22function newInstance(module, val) {
23 var instance = new WebAssembly.Instance(module);

Callers 3

TestSingleLiveInstanceFunction · 0.85
TestMultiInstanceFunction · 0.85

Calls 6

addMemoryMethod · 0.95
exportMemoryAsMethod · 0.95
addFunctionMethod · 0.95
toBufferMethod · 0.95
exportFuncMethod · 0.45
addBodyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…