summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.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/tclInt.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/tclInt.h')
-rw-r--r--generic/tclInt.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 5d7e6ab..b7e34c9 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.6 2009/04/27 21:45:20 ferrieux Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.362.2.7 2009/07/14 16:33:12 andreas_kupries Exp $
*/
#ifndef _TCLINT
@@ -1147,17 +1147,11 @@ 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 */
+ int pc; /* Instruction pointer of a command in ExtCmdLoc.loc[.] */
+ int word; /* Index of word in ExtCmdLoc.loc[cmd]->line[.] */
+ struct CFWordBC* prevPtr;
} CFWordBC;
/*
@@ -2472,9 +2466,11 @@ MODULE_SCOPE void TclArgumentRelease(Tcl_Interp* interp,
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);
+ Tcl_Obj* objv[], int objc,
+ void* codePtr, CmdFrame* cfPtr, int pc);
MODULE_SCOPE void TclArgumentBCRelease(Tcl_Interp* interp,
- void* codePtr);
+ Tcl_Obj* objv[], int objc,
+ void* codePtr, int pc);
MODULE_SCOPE int TclArraySet(Tcl_Interp *interp,
Tcl_Obj *arrayNameObj, Tcl_Obj *arrayElemObj);
MODULE_SCOPE double TclBignumToDouble(mp_int *bignum);