diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-01-01 12:36:14 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-01-01 12:36:14 (GMT) |
commit | 545882a1d47f149fbf0fc1d2c24f03f86cf6465e (patch) | |
tree | 8c06f36835634b18354e3ec1b57c6357078c29c2 /generic/tclCompile.h | |
parent | 3087b57c3bfd15c4030da483146567e5e143035f (diff) | |
parent | 16764976baae41730e54afdca94fdf9fd18dceed (diff) | |
download | tcl-545882a1d47f149fbf0fc1d2c24f03f86cf6465e.zip tcl-545882a1d47f149fbf0fc1d2c24f03f86cf6465e.tar.gz tcl-545882a1d47f149fbf0fc1d2c24f03f86cf6465e.tar.bz2 |
merge trunk
Diffstat (limited to 'generic/tclCompile.h')
-rw-r--r-- | generic/tclCompile.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 959c2af..7c67f0a 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -1169,6 +1169,21 @@ MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst); (envPtr)->currStackDepth += (delta); \ } while (0) +#define TclGetStackDepth(envPtr) \ + ((envPtr)->currStackDepth) + +#define TclSetStackDepth(depth, envPtr) \ + (envPtr)->currStackDepth = (depth) + +#define TclCheckStackDepth(depth, envPtr) \ + do { \ + int dd = (depth); \ + if (dd != (envPtr)->currStackDepth) { \ + Tcl_Panic("bad stack depth computations: is %i, should be %i", \ + (envPtr)->currStackDepth, dd); \ + } \ + } while (0) + /* * Macro used to update the stack requirements. It is called by the macros * TclEmitOpCode, TclEmitInst1 and TclEmitInst4. @@ -1309,6 +1324,18 @@ MODULE_SCOPE Tcl_Obj *TclNewInstNameObj(unsigned char inst); } while (0) /* + * If the expr compiler finished with TRY_CONVERT, macro to remove it when the + * job is done by the following instruction. + */ + +#define TclClearNumConversion(envPtr) \ + do { \ + if (*(envPtr->codeNext - 1) == INST_TRY_CVT_TO_NUMERIC) { \ + envPtr->codeNext--; \ + } \ + } while (0) + +/* * Macros to update a (signed or unsigned) integer starting at a pointer. The * two variants depend on the number of bytes. The ANSI C "prototypes" for * these macros are: |