summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-05-11 20:02:43 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-05-11 20:02:43 (GMT)
commitb5dfface8d2bbb92709c3ce349d4f101a4354361 (patch)
tree97b8fc6e423461141b89ee540d8a912fb774310c
parent9571165813914daaf16bd8fb71b4f97e7affa1d6 (diff)
downloadtcl-b5dfface8d2bbb92709c3ce349d4f101a4354361.zip
tcl-b5dfface8d2bbb92709c3ce349d4f101a4354361.tar.gz
tcl-b5dfface8d2bbb92709c3ce349d4f101a4354361.tar.bz2
Partial fix: still ongoing
-rw-r--r--generic/tclCompCmds.c3
-rw-r--r--generic/tclCompile.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 9ffdbc3..c2495bd 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -5761,6 +5761,7 @@ TclCompileReturnCmd(
Tcl_DecrRefCount(returnOpts);
TclEmitOpcode(INST_DONE, envPtr);
+ envPtr->currStackDepth = savedStackDepth;
return TCL_OK;
}
}
@@ -5778,6 +5779,7 @@ TclCompileReturnCmd(
*/
CompileReturnInternal(envPtr, INST_RETURN_IMM, code, level, returnOpts);
+ envPtr->currStackDepth = savedStackDepth + 1;
return TCL_OK;
issueRuntimeReturn:
@@ -5807,6 +5809,7 @@ TclCompileReturnCmd(
*/
TclEmitOpcode(INST_RETURN_STK, envPtr);
+ envPtr->currStackDepth = savedStackDepth + 1;
return TCL_OK;
}
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 1da6e03..838d801 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -1434,7 +1434,7 @@ TclInitCompileEnv(
{
Interp *iPtr = (Interp *) interp;
- assert(tclInstructionTable[LAST_INST_OPCODE].name == NULL);
+ assert(tclInstructionTable[LAST_INST_OPCODE+1].name == NULL);
envPtr->iPtr = iPtr;
envPtr->source = stringPtr;