summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2008-07-22 21:40:03 (GMT)
committerandreas_kupries <akupries@shaw.ca>2008-07-22 21:40:03 (GMT)
commit1a2015301662b5c0554f2f7ccfef588da923588b (patch)
treecef9d19da7d093c66b64a11ba40714de761a2840 /generic/tclInt.h
parentc24d3516daee359922217e9267ba9e0e8aad1ce0 (diff)
downloadtcl-1a2015301662b5c0554f2f7ccfef588da923588b.zip
tcl-1a2015301662b5c0554f2f7ccfef588da923588b.tar.gz
tcl-1a2015301662b5c0554f2f7ccfef588da923588b.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 18f1c70..7de3d01 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.118.2.31 2008/07/21 19:37:43 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.118.2.32 2008/07/22 21:40:32 andreas_kupries Exp $
*/
#ifndef _TCLINT
@@ -916,6 +916,19 @@ typedef struct CFWord {
int word; /* Index of the word in the command */
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;
#endif /* TCL_TIP280 */
/*
@@ -1505,6 +1518,7 @@ typedef struct Interp {
* values are "struct ExtCmdLoc*" (See
* tclCompile.h).
*/
+ Tcl_HashTable* lineLABCPtr;
Tcl_HashTable* lineLAPtr;
/* This table remembers for each
* argument of a command on the
@@ -1858,6 +1872,10 @@ EXTERN void TclArgumentEnter _ANSI_ARGS_((Tcl_Interp* interp,
Tcl_Obj* objv[], int objc, CmdFrame* cf));
EXTERN void TclArgumentRelease _ANSI_ARGS_((Tcl_Interp* interp,
Tcl_Obj* objv[], int objc));
+EXTERN void TclArgumentBCEnter _ANSI_ARGS_((Tcl_Interp* interp,
+ void* codePtr, CmdFrame* cfPtr));
+EXTERN void TclArgumentBCRelease _ANSI_ARGS_((Tcl_Interp* interp,
+ void* codePtr));
EXTERN void TclArgumentGet _ANSI_ARGS_((Tcl_Interp* interp, Tcl_Obj* obj,
CmdFrame** cfPtrPtr, int* wordPtr));