Subject: Fixed bug in parent revision [832a1994c7] unpredictably breaking the execution of precompiled bytecode (i.e. tbcload'ed bytecode).

From: andreask <andreask>
Date: Mon, 13 May 2013 16:51:23 +0000

The semi-inversion of a guard condition dropped the part about
TCL_BYTECODE_PRECOMPILED of the original condition, allowing the core
to attempt to recompile code for which there are no script sources
(anymore), which then fails.
---
 generic/tclExecute.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 628dfe7..98e150c 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -2328,8 +2328,9 @@ TEBCresume(
 	iPtr->cmdCount += TclGetUInt4AtPtr(pc+5);
 	if (checkInterp) {
 	    checkInterp = 0;
-	    if ((codePtr->compileEpoch != iPtr->compileEpoch)
-		    || (codePtr->nsEpoch != iPtr->varFramePtr->nsPtr->resolverEpoch)) {
+	    if (((codePtr->compileEpoch != iPtr->compileEpoch) ||
+		 (codePtr->nsEpoch != iPtr->varFramePtr->nsPtr->resolverEpoch)) &&
+		!(codePtr->flags & TCL_BYTECODE_PRECOMPILED)) {
 		goto instStartCmdFailed;
 	    }
 	}
-- 
cgit v0.12