MCPcopy
hub / github.com/gpujs/gpu.js / inferArgumentTypesIfNeeded

Method inferArgumentTypesIfNeeded

src/backend/function-node.js:582–592  ·  view source on GitHub ↗
(functionName, args)

Source from the content-addressed store, hash-verified

580 }
581
582 inferArgumentTypesIfNeeded(functionName, args) {
583 // ensure arguments are filled in, so when we lookup return type, we already can infer it
584 for (let i = 0; i < args.length; i++) {
585 if (!this.needsArgumentType(functionName, i)) continue;
586 const type = this.getType(args[i]);
587 if (!type) {
588 throw this.astErrorOutput(`Unable to infer argument ${i}`, args[i]);
589 }
590 this.assignArgumentType(functionName, i, type);
591 }
592 }
593
594 isAstMathVariable(ast) {
595 const mathProperties = [

Callers 1

getTypeMethod · 0.95

Calls 4

getTypeMethod · 0.95
astErrorOutputMethod · 0.95
needsArgumentTypeMethod · 0.80
assignArgumentTypeMethod · 0.80

Tested by

no test coverage detected