summaryrefslogtreecommitdiffstats
path: root/generic/tclCompExpr.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-09-11 02:32:04 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-09-11 02:32:04 (GMT)
commit28bb618586416fbb3c1c9a710cf88e5f8d924025 (patch)
tree839942de6fc4c53e649fea70d7bca0113ad34847 /generic/tclCompExpr.c
parentba7223881b8ae57b0edb93eae8dd280190dfd78e (diff)
downloadtcl-28bb618586416fbb3c1c9a710cf88e5f8d924025.zip
tcl-28bb618586416fbb3c1c9a710cf88e5f8d924025.tar.gz
tcl-28bb618586416fbb3c1c9a710cf88e5f8d924025.tar.bz2
Stop the save and restore of currStackDepth. Just manage it correctly so
it doesn't need correcting.
Diffstat (limited to 'generic/tclCompExpr.c')
-rw-r--r--generic/tclCompExpr.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c
index 2a48117..c2b5a1a 100644
--- a/generic/tclCompExpr.c
+++ b/generic/tclCompExpr.c
@@ -490,8 +490,6 @@ typedef struct JumpList {
JumpFixup jump; /* Pass this argument to matching calls of
* TclEmitForwardJump() and
* TclFixupForwardJump(). */
- int depth; /* Remember the currStackDepth of the
- * CompileEnv here. */
int offset; /* Data used to compute jump lengths to pass
* to TclFixupForwardJump() */
int convert; /* Temporary storage used to compute whether
@@ -2269,7 +2267,6 @@ CompileExprTree(
newJump = TclStackAlloc(interp, sizeof(JumpList));
newJump->next = jumpPtr;
jumpPtr = newJump;
- jumpPtr->depth = envPtr->currStackDepth;
convert = 1;
break;
case AND:
@@ -2283,7 +2280,6 @@ CompileExprTree(
newJump = TclStackAlloc(interp, sizeof(JumpList));
newJump->next = jumpPtr;
jumpPtr = newJump;
- jumpPtr->depth = envPtr->currStackDepth;
break;
}
} else if (nodePtr->mark == MARK_RIGHT) {
@@ -2323,7 +2319,7 @@ CompileExprTree(
CLANG_ASSERT(jumpPtr);
TclEmitForwardJump(envPtr, TCL_UNCONDITIONAL_JUMP,
&jumpPtr->next->jump);
- envPtr->currStackDepth = jumpPtr->depth;
+ TclAdjustStackDepth(-1, envPtr);
jumpPtr->offset = (envPtr->codeNext - envPtr->codeStart);
jumpPtr->convert = convert;
convert = 1;
@@ -2383,7 +2379,6 @@ CompileExprTree(
TclFixupForwardJump(envPtr, &jumpPtr->jump,
jumpPtr->offset - jumpPtr->jump.codeOffset, 127);
convert |= jumpPtr->convert;
- envPtr->currStackDepth = jumpPtr->depth + 1;
freePtr = jumpPtr;
jumpPtr = jumpPtr->next;
TclStackFree(interp, freePtr);
@@ -2411,7 +2406,6 @@ CompileExprTree(
TclFixupForwardJumpToHere(envPtr, &jumpPtr->next->next->jump,
127);
convert = 0;
- envPtr->currStackDepth = jumpPtr->depth + 1;
freePtr = jumpPtr;
jumpPtr = jumpPtr->next;
TclStackFree(interp, freePtr);