MCPcopy Create free account
hub / github.com/CodeGraphContext/CodeGraphContext / addEmAsm

Function addEmAsm

website/public/wasm/web-tree-sitter.js:2331–2344  ·  view source on GitHub ↗
(addr, body)

Source from the content-addressed store, hash-verified

2329 reportUndefinedSymbols();
2330 }
2331 function addEmAsm(addr, body) {
2332 var args = [];
2333 var arity = 0;
2334 for (; arity < 16; arity++) {
2335 if (body.indexOf("$" + arity) != -1) {
2336 args.push("$" + arity);
2337 } else {
2338 break;
2339 }
2340 }
2341 args = args.join(",");
2342 var func = `(${args}) => { ${body} };`;
2343 ASM_CONSTS[start] = eval(func);
2344 }
2345 __name(addEmAsm, "addEmAsm");
2346 if ("__start_em_asm" in moduleExports) {
2347 var start = moduleExports["__start_em_asm"];

Callers 2

postInstantiationMethod · 0.85
postInstantiationFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected