| 4667 | } |
| 4668 | |
| 4669 | int GenerateFunctionDeclaration(CompiledFunction *func) |
| 4670 | //return the ID of the Function Type |
| 4671 | { |
| 4672 | List<RefPtr<ILType>> args; |
| 4673 | for (auto & instr : *func->Code) |
| 4674 | if (auto arg = instr.As<FetchArgInstruction>()) |
| 4675 | if (arg->ArgId != 0) |
| 4676 | { |
| 4677 | args.Add(arg->Type); |
| 4678 | } |
| 4679 | int funcTypeID = ctx.AddInstrTypeFunction(func, args, func->ReturnType); |
| 4680 | ctx.FunctionNameToFunctionID[func->Name] = ++ctx.CurrentID; |
| 4681 | return funcTypeID; |
| 4682 | } |
| 4683 | |
| 4684 | int GenerateFunctionDefinition(CompiledFunction *func, ILOperand *vertexOutput = nullptr) |
| 4685 | //return the ID of the Function |
no test coverage detected