summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2009-07-14 16:31:48 (GMT)
committerandreas_kupries <akupries@shaw.ca>2009-07-14 16:31:48 (GMT)
commitd8c329fda447542c49590afdb0dcd2495e6afbd0 (patch)
tree76e0629bdd11d03e1d08818f19358386c3c14018 /generic/tclExecute.c
parent6532e6dc199559f5343ea5cdee20998919aab294 (diff)
downloadtcl-d8c329fda447542c49590afdb0dcd2495e6afbd0.zip
tcl-d8c329fda447542c49590afdb0dcd2495e6afbd0.tar.gz
tcl-d8c329fda447542c49590afdb0dcd2495e6afbd0.tar.bz2
* generic/tclBasic.c (DeleteInterpProc,TclArgumentBCEnter,
TclArgumentBCRelease, TclArgumentGet): * generic/tclCompile.c (EnterCmdWordIndex, TclCleanupByteCode, TclInitCompileEnv, TclCompileScript): * generic/tclCompile.h (ExtCmdLoc): * generic/tclExecute.c (TclExecuteByteCode): * generic/tclInt.h (ExtIndex, CFWordBC): * tests/info.test (info-39.0): Backport of some changes made to the Tcl head, to handle literal sharing better. The code here is much simpler (trimmed down) compared to the head as the 8.4 branch is not bytecode compiling whole files, and doesn't compile eval'd code either. Reworked the handling of literal command arguments in bytecode to be saved (compiler) and used (execution) per command (See the TCL_INVOKE_STK* instructions), and not per the whole bytecode. This removes the problems with location data caused by literal sharing in proc bodies. Simplified the associated datastructures (ExtIndex is gone, as is the function EnterCmdWordIndex).
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 065024c..8dcf877 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.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: tclExecute.c,v 1.94.2.28 2009/03/20 14:22:54 dgp Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.94.2.29 2009/07/14 16:31:49 andreas_kupries Exp $
*/
#include "tclInt.h"
@@ -1245,8 +1245,6 @@ TclExecuteByteCode(interp, codePtr)
bcFrame.data.tebc.pc = NULL;
bcFrame.cmd.str.cmd = NULL;
bcFrame.cmd.str.len = 0;
-
- TclArgumentBCEnter((Tcl_Interp*) iPtr,codePtr,&bcFrame);
#endif
#ifdef TCL_COMPILE_DEBUG
@@ -1584,12 +1582,18 @@ TclExecuteByteCode(interp, codePtr)
#ifdef TCL_TIP280
bcFrame.data.tebc.pc = pc;
iPtr->cmdFramePtr = &bcFrame;
+ TclArgumentBCEnter((Tcl_Interp*) iPtr, objv, objc,
+ codePtr, &bcFrame,
+ pc - codePtr->codeStart);
#endif
DECACHE_STACK_INFO();
Tcl_ResetResult(interp);
result = TclEvalObjvInternal(interp, objc, objv, bytes, length, 0);
CACHE_STACK_INFO();
#ifdef TCL_TIP280
+ TclArgumentBCRelease((Tcl_Interp*) iPtr, objv, objc,
+ codePtr,
+ pc - codePtr->codeStart);
iPtr->cmdFramePtr = iPtr->cmdFramePtr->nextPtr;
#endif
@@ -4523,10 +4527,6 @@ TclExecuteByteCode(interp, codePtr)
}
eePtr->stackTop = initStackTop;
-#ifdef TCL_TIP280
- TclArgumentBCRelease((Tcl_Interp*) iPtr,codePtr);
-#endif
-
return result;
#undef STATIC_CATCH_STACK_SIZE
}