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

Function addGlobalGetterAndSetter

deps/v8/test/mjsunit/wasm/import-mutable-global.js:55–62  ·  view source on GitHub ↗
(builder, index, name, type)

Source from the content-addressed store, hash-verified

53})();
54
55function addGlobalGetterAndSetter(builder, index, name, type) {
56 builder.addFunction('get' + name, makeSig([], [type]))
57 .addBody([kExprGlobalGet, index])
58 .exportFunc();
59 builder.addFunction('set' + name, makeSig([type], []))
60 .addBody([kExprLocalGet, 0, kExprGlobalSet, index])
61 .exportFunc();
62}
63
64(function TestImportMutableGlobal() {
65 const globalDesc = [

Callers 1

Calls 4

makeSigFunction · 0.70
exportFuncMethod · 0.45
addBodyMethod · 0.45
addFunctionMethod · 0.45

Tested by

no test coverage detected