MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getFunctionArgs

Method getFunctionArgs

Engine/source/console/codeBlock.cpp:718–744  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

716//-------------------------------------------------------------------------
717
718String CodeBlock::getFunctionArgs(U32 ip)
719{
720 StringBuilder str;
721
722 StringTableEntry fnName = CodeToSTE(code, ip);
723 StringTableEntry fnNamespace = CodeToSTE(code, ip + 2);
724 StringTableEntry fnNsName = StringTable->insert(avar("%s::%s", fnNamespace, fnName));
725
726 U32 fnArgc = code[ip + 8];
727 for (U32 i = 0; i < fnArgc; ++i)
728 {
729 StringTableEntry var = variableRegisterTable.localVarToRegister[fnNsName].varList[i];
730
731 if (i != 0)
732 str.append(", ");
733
734 str.append("string ");
735
736 // Try to capture junked parameters
737 if (var[0])
738 str.append(var + 1);
739 else
740 str.append("JUNK");
741 }
742
743 return str.end();
744}
745
746//-------------------------------------------------------------------------
747

Callers 2

printNamespaceEntriesMethod · 0.80
getArgumentsStringMethod · 0.80

Calls 5

CodeToSTEFunction · 0.85
avarFunction · 0.85
insertMethod · 0.45
appendMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected