| 748 | } |
| 749 | |
| 750 | void 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 | |
| 787 | void ExprEvalState::pushDebugFrame(S32 stackIndex) |
| 788 | { |