diff options
author | dgp <dgp@noemail.net> | 2009-06-13 14:31:54 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2009-06-13 14:31:54 (GMT) |
commit | c26a2d2e5816bc8310be6afe0e9ed84209ebac33 (patch) | |
tree | 8a8bac4cfc411db6707e3d29ce9f63736576578c /generic/tclProc.c | |
parent | 808f71616a27688ab19ecbefb4023b68b5b3c431 (diff) | |
download | tcl-c26a2d2e5816bc8310be6afe0e9ed84209ebac33.zip tcl-c26a2d2e5816bc8310be6afe0e9ed84209ebac33.tar.gz tcl-c26a2d2e5816bc8310be6afe0e9ed84209ebac33.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].
FossilOrigin-Name: cd62c79f0e3f8f7c19ad95db61edee33c205d9a0
Diffstat (limited to 'generic/tclProc.c')
-rw-r--r-- | generic/tclProc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/generic/tclProc.c b/generic/tclProc.c index 2062672..7696015 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -12,7 +12,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.171 2009/03/24 09:30:07 dkf Exp $ + * RCS: @(#) $Id: tclProc.c,v 1.172 2009/06/13 14:31:54 dgp Exp $ */ #include "tclInt.h" @@ -1939,7 +1939,6 @@ TclProcCompileProc( { Interp *iPtr = (Interp *) interp; Tcl_CallFrame *framePtr; - Proc *saveProcPtr; ByteCode *codePtr = bodyPtr->internalRep.otherValuePtr; /* @@ -2009,7 +2008,6 @@ TclProcCompileProc( * appropriate class context. */ - saveProcPtr = iPtr->compiledProcPtr; iPtr->compiledProcPtr = procPtr; if (procPtr->numCompiledLocals > procPtr->numArgs) { @@ -2055,7 +2053,6 @@ TclProcCompileProc( tclByteCodeType.setFromAnyProc(interp, bodyPtr); iPtr->invokeCmdFramePtr = NULL; TclPopStackFrame(interp); - iPtr->compiledProcPtr = saveProcPtr; } else if (codePtr->nsEpoch != nsPtr->resolverEpoch) { /* * The resolver epoch has changed, but we only need to invalidate the |