MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / pushFrame

Method pushFrame

Engine/source/console/consoleInternal.cpp:747–779  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

745}
746
747void ExprEvalState::pushFrame(StringTableEntry frameName, Namespace *ns)
748{
749 #ifdef DEBUG_SPEW
750 validate();
751
752 Platform::outputDebugString( "[ConsoleInternal] Pushing new frame for '%s' at %i",
753 frameName, mStackDepth );
754 #endif
755
756 if( mStackDepth + 1 > stack.size() )
757 {
758 #ifdef DEBUG_SPEW
759 Platform::outputDebugString( "[ConsoleInternal] Growing stack by one frame" );
760 #endif
761
762 stack.push_back( new Dictionary );
763 }
764
765 Dictionary& newFrame = *( stack[ mStackDepth ] );
766 newFrame.setState( this );
767
768 newFrame.scopeName = frameName;
769 newFrame.scopeNamespace = ns;
770
771 mStackDepth ++;
772 currentVariable = NULL;
773
774 AssertFatal( !newFrame.getCount(), "ExprEvalState::pushFrame - Dictionary not empty!" );
775
776 #ifdef DEBUG_SPEW
777 validate();
778 #endif
779}
780
781void ExprEvalState::popFrame()
782{

Callers

nothing calls this directly

Calls 5

validateFunction · 0.85
sizeMethod · 0.45
push_backMethod · 0.45
setStateMethod · 0.45
getCountMethod · 0.45

Tested by

no test coverage detected