mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-01 11:33:48 +00:00
Shifted CodeBlock::smCurrentLineText to be a const char* so it's use is clearer
Ensured CodeBlock::smCurrentLineText is cleared at the end of execution Tweaked and cleaned up the context lines passed along for further debugging data in the event of a script assert
This commit is contained in:
parent
171211c4e2
commit
9084e81bc1
11 changed files with 107 additions and 23 deletions
|
|
@ -35,7 +35,7 @@ using namespace Compiler;
|
|||
|
||||
bool CodeBlock::smInFunction = false;
|
||||
CodeBlock * CodeBlock::smCodeBlockList = NULL;
|
||||
StringTableEntry CodeBlock::smCurrentLineText = StringTable->EmptyString();
|
||||
const char* CodeBlock::smCurrentLineText = "\0";
|
||||
TorqueScriptParser *CodeBlock::smCurrentParser = NULL;
|
||||
|
||||
extern FuncVars gEvalFuncVars;
|
||||
|
|
@ -625,6 +625,7 @@ Con::EvalResult CodeBlock::compileExec(StringTableEntry fileName, const char *in
|
|||
|
||||
if (!Script::gStatementList)
|
||||
{
|
||||
smCurrentLineText = "\0";
|
||||
delete this;
|
||||
return Con::EvalResult(Con::getVariable("$ScriptError"));
|
||||
}
|
||||
|
|
@ -670,7 +671,10 @@ Con::EvalResult CodeBlock::compileExec(StringTableEntry fileName, const char *in
|
|||
Con::warnf(ConsoleLogEntry::General, "precompile size mismatch, precompile: %d compile: %d", codeSize, lastIp);
|
||||
|
||||
// repurpose argc as local register counter for global state
|
||||
return (exec(0, fileName, NULL, localRegisterCount, 0, noCalls, NULL, setFrame));
|
||||
Con::EvalResult execResult = (exec(0, fileName, NULL, localRegisterCount, 0, noCalls, NULL, setFrame));
|
||||
|
||||
smCurrentLineText = "\0";
|
||||
return execResult;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue