summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2009-06-13 14:38:44 (GMT)
committerdgp@users.sourceforge.net <dgp>2009-06-13 14:38:44 (GMT)
commit26fdfad1eb171a4fb8d6159b740a4173b54e94a8 (patch)
treeba2f380d72e881d52e3720c24fccf6aad4eb80c3 /generic
parentd04231b6061f087bc4fcecc9ae8ca440f5243fb1 (diff)
downloadtcl-26fdfad1eb171a4fb8d6159b740a4173b54e94a8.zip
tcl-26fdfad1eb171a4fb8d6159b740a4173b54e94a8.tar.gz
tcl-26fdfad1eb171a4fb8d6159b740a4173b54e94a8.tar.bz2
* generic/tclCompile.c: The value stashed in iPtr->compiledProcPtr
* generic/tclProc.c: when compiling a proc survives too long. We * tests/execute.test: only need it there long enough for the right TclInitCompileEnv() call to re-stash it into envPtr->procPtr. Once that is done, the CompileEnv controls. If we let the value of iPtr->compiledProcPtr linger, though, then any other bytecode compile operation that takes place will also have its CompileEnv initialized with it, and that's not correct. The value is meant to control the compile of the proc body only, not other compile tasks that happen along. Thanks to Carlos Tasada for discovering and reporting the problem. [Bug 2802881].
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompile.c3
-rw-r--r--generic/tclProc.c7
2 files changed, 3 insertions, 7 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 44ee69b..98ccc50 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompile.c,v 1.43.2.13 2008/07/28 20:01:09 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclCompile.c,v 1.43.2.14 2009/06/13 14:38:44 dgp Exp $
*/
#include "tclInt.h"
@@ -773,6 +773,7 @@ TclInitCompileEnv(interp, envPtr, string, numBytes, invoker, word)
envPtr->source = string;
envPtr->numSrcBytes = numBytes;
envPtr->procPtr = iPtr->compiledProcPtr;
+ iPtr->compiledProcPtr = NULL;
envPtr->numCommands = 0;
envPtr->exceptDepth = 0;
envPtr->maxExceptDepth = 0;
diff --git a/generic/tclProc.c b/generic/tclProc.c
index 950d448..1e9f6b4 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclProc.c,v 1.44.2.9 2008/08/11 20:13:43 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclProc.c,v 1.44.2.10 2009/06/13 14:38:44 dgp Exp $
*/
#include "tclInt.h"
@@ -1300,7 +1300,6 @@ ProcCompileProc(interp, procPtr, bodyPtr, nsPtr, description,
Interp *iPtr = (Interp*)interp;
int i, result;
Tcl_CallFrame frame;
- Proc *saveProcPtr;
ByteCode *codePtr = (ByteCode *) bodyPtr->internalRep.otherValuePtr;
CompiledLocal *localPtr;
@@ -1369,8 +1368,6 @@ ProcCompileProc(interp, procPtr, bodyPtr, nsPtr, description,
* compiled in the appropriate class context.
*/
- saveProcPtr = iPtr->compiledProcPtr;
-
if (procPtrPtr != NULL && procPtr->refCount > 1) {
Tcl_Command token;
Tcl_CmdInfo info;
@@ -1455,8 +1452,6 @@ ProcCompileProc(interp, procPtr, bodyPtr, nsPtr, description,
Tcl_PopCallFrame(interp);
}
- iPtr->compiledProcPtr = saveProcPtr;
-
if (result != TCL_OK) {
if (result == TCL_ERROR) {
char buf[100 + TCL_INTEGER_SPACE];