MCPcopy Index your code
hub / github.com/gpujs/gpu.js / onNestedFunction

Method onNestedFunction

src/backend/function-builder.js:88–110  ·  view source on GitHub ↗
(ast, source)

Source from the content-addressed store, hash-verified

86 };
87
88 const onNestedFunction = (ast, source) => {
89 const argumentNames = [];
90 for (let i = 0; i < ast.params.length; i++) {
91 argumentNames.push(ast.params[i].name);
92 }
93 const nestedFunction = new FunctionNode(source, Object.assign({}, nodeOptions, {
94 returnType: null,
95 ast,
96 name: ast.id.name,
97 argumentNames,
98 lookupReturnType,
99 lookupFunctionArgumentTypes,
100 lookupFunctionArgumentName,
101 lookupFunctionArgumentBitRatio,
102 needsArgumentType,
103 assignArgumentType,
104 triggerImplyArgumentType,
105 triggerImplyArgumentBitRatio,
106 onFunctionCall,
107 }));
108 nestedFunction.traceFunctionAST(ast);
109 functionBuilder.addFunctionNode(nestedFunction);
110 };
111
112 const nodeOptions = Object.assign({
113 isRootKernel: false,

Callers

nothing calls this directly

Calls 2

traceFunctionASTMethod · 0.95
addFunctionNodeMethod · 0.80

Tested by

no test coverage detected