| 880 | } |
| 881 | |
| 882 | void 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 | |
| 900 | void AddBinaryCommandNode(const char* pos, CmdID id) |
| 901 | { |
no test coverage detected