| 745 | } |
| 746 | |
| 747 | void 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 | |
| 781 | void ExprEvalState::popFrame() |
| 782 | { |