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

Method pushFrameRef

Engine/source/console/consoleInternal.cpp:750–785  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

748}
749
750void ExprEvalState::pushFrameRef(S32 stackIndex)
751{
752 AssertFatal(stackIndex >= 0 && stackIndex < mStackDepth, "You must be asking for a valid frame!");
753
754#ifdef DEBUG_SPEW
755 validate();
756
757 Platform::outputDebugString("[ConsoleInternal] Cloning frame from %i to %i",
758 stackIndex, mStackDepth);
759#endif
760
761 if (mStackDepth + 1 > stack.size())
762 {
763#ifdef DEBUG_SPEW
764 Platform::outputDebugString("[ConsoleInternal] Growing stack by one frame");
765#endif
766
767 stack.push_back(new Dictionary);
768 }
769
770 Dictionary& newFrame = *(stack[mStackDepth]);
771 newFrame.setState(this, stack[stackIndex]);
772
773 mStackDepth++;
774 currentVariable = NULL;
775
776 ConsoleValue* values = localStack[stackIndex].values;
777 localStack.push_back(ConsoleValueFrame(values, true));
778 currentRegisterArray = &localStack.last();
779
780 AssertFatal(mStackDepth == localStack.size(), avar("Stack sizes do not match. mStackDepth = %d, localStack = %d", mStackDepth, localStack.size()));
781
782#ifdef DEBUG_SPEW
783 validate();
784#endif
785}
786
787void ExprEvalState::pushDebugFrame(S32 stackIndex)
788{

Callers 1

execMethod · 0.80

Calls 7

validateFunction · 0.85
ConsoleValueFrameClass · 0.85
avarFunction · 0.85
sizeMethod · 0.45
push_backMethod · 0.45
setStateMethod · 0.45
lastMethod · 0.45

Tested by

no test coverage detected