summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.h
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)
commitb28a38b6fe8f6cacbdf12b371e2e5b169b5ec0a0 (patch)
tree76e0629bdd11d03e1d08818f19358386c3c14018 /generic/tclCompile.h
parent75857eb1811ac33b4d22fe4dc0949b9975a005a8 (diff)
downloadtcl-b28a38b6fe8f6cacbdf12b371e2e5b169b5ec0a0.zip
tcl-b28a38b6fe8f6cacbdf12b371e2e5b169b5ec0a0.tar.gz
tcl-b28a38b6fe8f6cacbdf12b371e2e5b169b5ec0a0.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/tclCompile.h')
-rw-r--r--generic/tclCompile.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index 69b0c82..b3431f8 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.33.2.6 2008/08/14 02:12:27 das Exp $
+ * RCS: @(#) $Id: tclCompile.h,v 1.33.2.7 2009/07/14 16:31:49 andreas_kupries Exp $
*/
#ifndef _TCLCOMPILATION
@@ -140,15 +140,20 @@ typedef struct ECL {
int nline; /* Number of words in the command */
int* line; /* line information for all words in the command */
} ECL;
+
typedef struct ExtCmdLoc {
int type; /* Context type */
Tcl_Obj* path; /* Path of the sourced file the command is in */
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;
#endif