summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.h
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2009-07-14 16:33:12 (GMT)
committerandreas_kupries <akupries@shaw.ca>2009-07-14 16:33:12 (GMT)
commit06eaea4df70451d16154d922e94eaba288cc8839 (patch)
treef52fafcaabff986052846ac6eeb3fb691118e600 /generic/tclCompile.h
parent96886634efaa755005489a262696057f0611f32f (diff)
downloadtcl-06eaea4df70451d16154d922e94eaba288cc8839.zip
tcl-06eaea4df70451d16154d922e94eaba288cc8839.tar.gz
tcl-06eaea4df70451d16154d922e94eaba288cc8839.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.5 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/tclCompile.h')
-rw-r--r--generic/tclCompile.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index 1e32569..2eb8489 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -9,7 +9,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.h,v 1.90.2.5 2008/08/14 02:22:15 das Exp $
+ * RCS: @(#) $Id: tclCompile.h,v 1.90.2.6 2009/07/14 16:33:12 andreas_kupries Exp $
*/
#ifndef _TCLCOMPILATION
@@ -141,9 +141,13 @@ typedef struct ExtCmdLoc {
ECL *loc; /* Command word locations (lines). */
int nloc; /* Number of allocated entries in 'loc'. */
int nuloc; /* Number of used entries in 'loc'. */
- ExtIndex* eiloc;
- int neiloc;
- int nueiloc;
+ Tcl_HashTable litInfo; /* Indexed by bytecode 'PC', to have the
+ * information accessible per command and
+ * argument, not per whole bytecode. Value is
+ * index of command in 'loc', giving us the
+ * literals to associate with line information
+ * as command argument, see
+ * TclArgumentBCEnter() */
} ExtCmdLoc;
/*