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

Method addImport

deps/v8/test/mjsunit/wasm/wasm-module-builder.js:1660–1667  ·  view source on GitHub ↗
(module, name, type, kind = kExternalFunction)

Source from the content-addressed store, hash-verified

1658 }
1659
1660 addImport(module, name, type, kind = kExternalFunction) {
1661 if (this.functions.length != 0) {
1662 throw new Error('Imported functions must be declared before local ones');
1663 }
1664 let type_index = (typeof type) == 'number' ? type : this.addType(type);
1665 this.imports.push({module, name, kind, type_index});
1666 return this.num_imported_funcs++;
1667 }
1668
1669 addImportedGlobal(module, name, type, mutable = false, shared = false) {
1670 if (this.globals.length != 0) {

Callers 15

buildModuleBytesFunction · 0.95
runFunction · 0.95
testCallFFIFunction · 0.95
testCallBinopVoidFunction · 0.95
createExportFunction · 0.95
TestNestedSuspendersFunction · 0.95
testFunction · 0.95
MakeInstanceFunction · 0.95
genUnopFunction · 0.95
genBinopFunction · 0.95
generateBuilderFunction · 0.95

Calls 2

addTypeMethod · 0.95
pushMethod · 0.45

Tested by 2

testFunction · 0.76
testFunction · 0.76