| 719 | } |
| 720 | |
| 721 | void ExprEvalState::popFrame() |
| 722 | { |
| 723 | AssertFatal(mStackDepth > 0, "ExprEvalState::popFrame - Stack Underflow!"); |
| 724 | |
| 725 | #ifdef DEBUG_SPEW |
| 726 | validate(); |
| 727 | |
| 728 | Platform::outputDebugString("[ConsoleInternal] Popping %sframe at %i", |
| 729 | getCurrentFrame().isOwner() ? "" : "shared ", mStackDepth - 1); |
| 730 | #endif |
| 731 | |
| 732 | mStackDepth--; |
| 733 | stack[mStackDepth]->reset(); |
| 734 | currentVariable = NULL; |
| 735 | |
| 736 | const ConsoleValueFrame& frame = localStack.last(); |
| 737 | localStack.pop_back(); |
| 738 | if (!frame.isReference) |
| 739 | delete[] frame.values; |
| 740 | |
| 741 | currentRegisterArray = localStack.size() ? &localStack.last() : NULL; |
| 742 | |
| 743 | AssertFatal(mStackDepth == localStack.size(), avar("Stack sizes do not match. mStackDepth = %d, localStack = %d", mStackDepth, localStack.size())); |
| 744 | |
| 745 | #ifdef DEBUG_SPEW |
| 746 | validate(); |
| 747 | #endif |
| 748 | } |
| 749 | |
| 750 | void ExprEvalState::pushFrameRef(S32 stackIndex) |
| 751 | { |