summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2008-07-22 21:41:10 (GMT)
committerandreas_kupries <akupries@shaw.ca>2008-07-22 21:41:10 (GMT)
commit29341bbc6ca4be934e01b591b98bc01f0a93f57b (patch)
tree75818190d610cf0a24cef9ff5ccfa0384c131e8c /generic/tclInt.h
parentaf7d3aa263b52ca80b11922cf1af375a3b683d0e (diff)
downloadtcl-29341bbc6ca4be934e01b591b98bc01f0a93f57b.zip
tcl-29341bbc6ca4be934e01b591b98bc01f0a93f57b.tar.gz
tcl-29341bbc6ca4be934e01b591b98bc01f0a93f57b.tar.bz2
* generic/tclBasic.c: Reworked the handling of bytecode literals
* generic/tclCompile.c: for #280 to fix the abysmal performance * generic/tclCompile.h: for deep recursion, replaced the linear * generic/tclExecute.c: search through the whole stack with * generic/tclInt.h: another hashtable and simplified the data structure used by the compiler (array instead of hashtable). Incidentially this also fixes the memory leak reported via [Bug 2024937].
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index e0e65e4..bbbdf2f 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclInt.h,v 1.362.2.2 2008/07/21 19:38:18 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.362.2.3 2008/07/22 21:41:13 andreas_kupries Exp $
*/
#ifndef _TCLINT
@@ -1147,6 +1147,19 @@ typedef struct CFWord {
int refCount; /* #times the word is on the stack */
} CFWord;
+typedef struct ExtIndex {
+ Tcl_Obj* obj; /* Reference to the word */
+ int pc; /* Instruction pointer of a command in ExtCmdLoc.loc[.] */
+ int word; /* Index of word in ExtCmdLoc.loc[cmd]->line[.] */
+} ExtIndex;
+
+
+typedef struct CFWordBC {
+ CmdFrame* framePtr; /* CmdFrame to acess */
+ ExtIndex* eiPtr; /* Word info: PC and index */
+ int refCount; /* #times the word is on the stack */
+} CFWordBC;
+
/*
* The following macros define the allowed values for the type field of the
* CmdFrame structure above. Some of the values occur only in the extended
@@ -1845,6 +1858,7 @@ typedef struct Interp {
* body. It is keyed by the address of the
* Proc structure for a procedure. The values
* are "struct ExtCmdLoc*" (See tclCompile.h) */
+ Tcl_HashTable* lineLABCPtr;
Tcl_HashTable* lineLAPtr; /* This table remembers for each argument of a
* command on the execution stack the index of
* the argument in the command, and the
@@ -2457,6 +2471,10 @@ MODULE_SCOPE void TclArgumentRelease(Tcl_Interp* interp,
Tcl_Obj* objv[], int objc);
MODULE_SCOPE void TclArgumentGet(Tcl_Interp* interp, Tcl_Obj* obj,
CmdFrame** cfPtrPtr, int* wordPtr);
+MODULE_SCOPE void TclArgumentBCEnter(Tcl_Interp* interp,
+ void* codePtr, CmdFrame* cfPtr);
+MODULE_SCOPE void TclArgumentBCRelease(Tcl_Interp* interp,
+ void* codePtr);
MODULE_SCOPE int TclArraySet(Tcl_Interp *interp,
Tcl_Obj *arrayNameObj, Tcl_Obj *arrayElemObj);
MODULE_SCOPE double TclBignumToDouble(mp_int *bignum);