| 799 | } |
| 800 | |
| 801 | void ExprEvalState::pushFrameRef(S32 stackIndex) |
| 802 | { |
| 803 | AssertFatal( stackIndex >= 0 && stackIndex < stack.size(), "You must be asking for a valid frame!" ); |
| 804 | |
| 805 | #ifdef DEBUG_SPEW |
| 806 | validate(); |
| 807 | |
| 808 | Platform::outputDebugString( "[ConsoleInternal] Cloning frame from %i to %i", |
| 809 | stackIndex, mStackDepth ); |
| 810 | #endif |
| 811 | |
| 812 | if( mStackDepth + 1 > stack.size() ) |
| 813 | { |
| 814 | #ifdef DEBUG_SPEW |
| 815 | Platform::outputDebugString( "[ConsoleInternal] Growing stack by one frame" ); |
| 816 | #endif |
| 817 | |
| 818 | stack.push_back( new Dictionary ); |
| 819 | } |
| 820 | |
| 821 | Dictionary& newFrame = *( stack[ mStackDepth ] ); |
| 822 | newFrame.setState( this, stack[ stackIndex ] ); |
| 823 | |
| 824 | mStackDepth ++; |
| 825 | currentVariable = NULL; |
| 826 | |
| 827 | #ifdef DEBUG_SPEW |
| 828 | validate(); |
| 829 | #endif |
| 830 | } |
| 831 | |
| 832 | ExprEvalState::ExprEvalState() |
| 833 | { |