diff options
author | andreas_kupries <akupries@shaw.ca> | 2009-07-14 16:31:48 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2009-07-14 16:31:48 (GMT) |
commit | b28a38b6fe8f6cacbdf12b371e2e5b169b5ec0a0 (patch) | |
tree | 76e0629bdd11d03e1d08818f19358386c3c14018 /generic/tclInt.h | |
parent | 75857eb1811ac33b4d22fe4dc0949b9975a005a8 (diff) | |
download | tcl-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/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index 43870e7..fc56e6e 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.33 2009/04/27 22:10:28 ferrieux Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.118.2.34 2009/07/14 16:31:49 andreas_kupries Exp $ */ #ifndef _TCLINT @@ -917,17 +917,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,literal}[.] */ + struct CFWordBC* prevPtr; } CFWordBC; #endif /* TCL_TIP280 */ @@ -1873,9 +1867,11 @@ EXTERN void TclArgumentEnter _ANSI_ARGS_((Tcl_Interp* interp, 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)); + Tcl_Obj* objv[], int objc, + void* codePtr, CmdFrame* cfPtr, int pc)); EXTERN void TclArgumentBCRelease _ANSI_ARGS_((Tcl_Interp* interp, - void* codePtr)); + Tcl_Obj* objv[], int objc, + void* codePtr, int pc)); EXTERN void TclArgumentGet _ANSI_ARGS_((Tcl_Interp* interp, Tcl_Obj* obj, CmdFrame** cfPtrPtr, int* wordPtr)); |