MCPcopy Create free account
hub / github.com/WheretIB/nullc / WrapNodeToFunction

Function WrapNodeToFunction

NULLC/Callbacks.cpp:882–898  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

880}
881
882void WrapNodeToFunction(const char* pos)
883{
884 NodeZeroOP *wrapee = CodeInfo::nodeList.back();
885 CodeInfo::nodeList.pop_back();
886
887 char *functionName = AllocateString(16);
888 sprintf(functionName, "$funcw%d", inplaceVariableNum++);
889 currType = NULL;
890 FunctionAdd(pos, functionName);
891 FunctionStart(pos);
892 const char *lastFunc = SetCurrentFunction(NULL);
893 CodeInfo::nodeList.push_back(wrapee);
894 AddReturnNode(pos);
895 SetCurrentFunction(lastFunc);
896 FunctionEnd(pos);
897 ConvertFunctionToPointer(pos);
898}
899
900void AddBinaryCommandNode(const char* pos, CmdID id)
901{

Callers 1

AddBinaryCommandNodeFunction · 0.85

Calls 9

AllocateStringFunction · 0.85
FunctionAddFunction · 0.85
FunctionStartFunction · 0.85
SetCurrentFunctionFunction · 0.85
AddReturnNodeFunction · 0.85
FunctionEndFunction · 0.85
ConvertFunctionToPointerFunction · 0.85
pop_backMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected