summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.h
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-07-15 19:40:33 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-07-15 19:40:33 (GMT)
commitcb0803df0cdcda3e486b73757f4522b467d90a83 (patch)
tree48845410ef798fd91e8246e9d6b9925f4bbe3ad8 /generic/tclCompile.h
parentd86dc18415900f56ffc3591cf7dceb210f3b3c9d (diff)
parenta398b126a43e46efa6d6044b0bcf57a4b9385c4e (diff)
downloadtcl-cb0803df0cdcda3e486b73757f4522b467d90a83.zip
tcl-cb0803df0cdcda3e486b73757f4522b467d90a83.tar.gz
tcl-cb0803df0cdcda3e486b73757f4522b467d90a83.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclCompile.h')
-rw-r--r--generic/tclCompile.h30
1 files changed, 13 insertions, 17 deletions
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index cbe104c..0bcd84e 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -1075,7 +1075,7 @@ MODULE_SCOPE void TclPrintSource(FILE *outFile,
MODULE_SCOPE void TclPushVarName(Tcl_Interp *interp,
Tcl_Token *varTokenPtr, CompileEnv *envPtr,
int flags, int *localIndexPtr,
- int *isScalarPtr, int line, int *clNext);
+ int *isScalarPtr);
MODULE_SCOPE int TclRegisterLiteral(CompileEnv *envPtr,
char *bytes, int length, int flags);
MODULE_SCOPE void TclReleaseLiteral(Tcl_Interp *interp, Tcl_Obj *objPtr);
@@ -1408,16 +1408,16 @@ MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst);
#define TclMax(i, j) ((((int) i) > ((int) j))? (i) : (j))
/*
- * Convenience macro for use when compiling bodies of commands. The ANSI C
- * "prototype" for this macro is:
+ * Convenience macros for use when compiling bodies of commands. The ANSI C
+ * "prototype" for these macros are:
*
- * static void CompileBody(CompileEnv *envPtr, Tcl_Token *tokenPtr,
- * Tcl_Interp *interp);
+ * static void BODY(Tcl_Token *tokenPtr, int word);
*/
-#define CompileBody(envPtr, tokenPtr, interp) \
- TclCompileCmdWord((interp), (tokenPtr)+1, (tokenPtr)->numComponents, \
- (envPtr))
+#define BODY(tokenPtr, word) \
+ SetLineInformation((word)); \
+ TclCompileCmdWord(interp, (tokenPtr)+1, (tokenPtr)->numComponents, \
+ envPtr)
/*
* Convenience macro for use when compiling tokens to be pushed. The ANSI C
@@ -1516,13 +1516,10 @@ MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst);
#define CompileWord(envPtr, tokenPtr, interp, word) \
if ((tokenPtr)->type == TCL_TOKEN_SIMPLE_WORD) { \
- TclEmitPush(TclRegisterNewLiteral((envPtr), (tokenPtr)[1].start, \
- (tokenPtr)[1].size), (envPtr)); \
+ PushLiteral((envPtr), (tokenPtr)[1].start, (tokenPtr)[1].size); \
} else { \
- envPtr->line = mapPtr->loc[eclIndex].line[word]; \
- envPtr->clNext = mapPtr->loc[eclIndex].next[word]; \
- TclCompileTokens((interp), (tokenPtr)+1, (tokenPtr)->numComponents, \
- (envPtr)); \
+ SetLineInformation((word)); \
+ CompileTokens((envPtr), (tokenPtr), (interp)); \
}
/*
@@ -1543,9 +1540,8 @@ MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst);
envPtr->clNext = mapPtr->loc[eclIndex].next[(word)]
#define PushVarNameWord(i,v,e,f,l,sc,word) \
- TclPushVarName(i,v,e,f,l,sc, \
- mapPtr->loc[eclIndex].line[(word)], \
- mapPtr->loc[eclIndex].next[(word)])
+ SetLineInformation(word); \
+ TclPushVarName(i,v,e,f,l,sc)
/*
* Often want to issue one of two versions of an instruction based on whether