summaryrefslogtreecommitdiffstats
path: root/generic/tclInt.h
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2008-07-21 22:50:30 (GMT)
committerandreas_kupries <akupries@shaw.ca>2008-07-21 22:50:30 (GMT)
commitd0b609270a5168026fc5df405c4245ae2e33deed (patch)
tree29f73567f546804a17604f4a80c01c4551d51979 /generic/tclInt.h
parent57bdff7e68cb1e0fe66a2671b18ce67ecbb79e69 (diff)
downloadtcl-d0b609270a5168026fc5df405c4245ae2e33deed.zip
tcl-d0b609270a5168026fc5df405c4245ae2e33deed.tar.gz
tcl-d0b609270a5168026fc5df405c4245ae2e33deed.tar.bz2
* generic/tclBasic.c: Extended the existing TIP #280 system (info
* generic/tclCmdAH.c: frame), added the ability to track the * generic/tclCompCmds.c: absolute location of literal procedure * generic/tclCompile.c: arguments, and making this information * generic/tclCompile.h: available to uplevel, eval, and * generic/tclInterp.c: siblings. This allows proper tracking of * generic/tclInt.h: absolute location through custom (Tcl-coded) * generic/tclNamesp.c: control structures based on uplevel, etc. * generic/tclProc.c: * tests/info.test:
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r--generic/tclInt.h33
1 files changed, 30 insertions, 3 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 1857153..7614f32 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -14,7 +14,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.375 2008/07/21 16:26:06 msofer Exp $
+ * RCS: @(#) $Id: tclInt.h,v 1.376 2008/07/21 22:50:34 andreas_kupries Exp $
*/
#ifndef _TCLINT
@@ -1150,6 +1150,12 @@ typedef struct CmdFrame {
} cmd;
} CmdFrame;
+typedef struct CFWord {
+ CmdFrame* framePtr; /* CmdFrame to acess */
+ int word; /* Index of the word in the command */
+ int refCount; /* #times the word is on the stack */
+} CFWord;
+
/*
* 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
@@ -1862,11 +1868,26 @@ typedef struct Interp {
Tcl_HashTable *linePBodyPtr;/* This table remembers for each statically
* defined procedure the location information
* for its body. It is keyed by the address of
- * the Proc structure for a procedure. */
+ * the Proc structure for a procedure. The
+ * values are "struct CmdFrame*". */
Tcl_HashTable *lineBCPtr; /* This table remembers for each ByteCode
* object the location information for its
* body. It is keyed by the address of the
- * Proc structure for a procedure. */
+ * Proc structure for a procedure. The values
+ * are "struct ExtCmdLoc*" (See tclCompile.h) */
+ 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
+ * location data of the command. It is keyed
+ * by the address of the Tcl_Obj containing
+ * the argument. The values are "struct
+ * CFWord*" (See tclBasic.c). This allows
+ * commands like uplevel, eval, etc. to find
+ * location information for their arguments,
+ * if they are a proper literal argument to an
+ * invoking command. Alt view: An index to the
+ * CmdFrame stack keyed by command argument
+ * holders. */
/*
* TIP #268. The currently active selection mode, i.e. the package require
* preferences.
@@ -2486,6 +2507,12 @@ MODULE_SCOPE int TclEvalObjv(Tcl_Interp *interp, int objc,
MODULE_SCOPE void TclAdvanceLines(int *line, const char *start,
const char *end);
+MODULE_SCOPE void TclArgumentEnter(Tcl_Interp* interp,
+ Tcl_Obj* objv[], int objc, CmdFrame* cf);
+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 int TclArraySet(Tcl_Interp *interp,
Tcl_Obj *arrayNameObj, Tcl_Obj *arrayElemObj);
MODULE_SCOPE double TclBignumToDouble(mp_int *bignum);