summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.h
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-12-23 18:32:17 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-12-23 18:32:17 (GMT)
commitc3ba85a17b5051093a6ed4290f7b8f3e424be236 (patch)
tree6282fcbeda8091900bc7600acae7bdba8824a3d1 /generic/tclCompile.h
parent959c0b7ee6f676289f4bcb26638947b88e7d576b (diff)
parent3b06f70775be10c7547c05c27e55d4ef0a65ee0c (diff)
downloadtcl-c3ba85a17b5051093a6ed4290f7b8f3e424be236.zip
tcl-c3ba85a17b5051093a6ed4290f7b8f3e424be236.tar.gz
tcl-c3ba85a17b5051093a6ed4290f7b8f3e424be236.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclCompile.h')
-rw-r--r--generic/tclCompile.h31
1 files changed, 28 insertions, 3 deletions
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index b2a4b52..6226f7f 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -1074,7 +1074,7 @@ MODULE_SCOPE void TclFinalizeLoopExceptionRange(CompileEnv *envPtr,
MODULE_SCOPE char * TclLiteralStats(LiteralTable *tablePtr);
MODULE_SCOPE int TclLog2(int value);
#endif
-MODULE_SCOPE void TclOptimizeBytecode(CompileEnv *envPtr);
+MODULE_SCOPE void TclOptimizeBytecode(void *envPtr);
#ifdef TCL_COMPILE_DEBUG
MODULE_SCOPE void TclPrintByteCodeObj(Tcl_Interp *interp,
Tcl_Obj *objPtr);
@@ -1089,8 +1089,6 @@ MODULE_SCOPE void TclPushVarName(Tcl_Interp *interp,
Tcl_Token *varTokenPtr, CompileEnv *envPtr,
int flags, int *localIndexPtr,
int *isScalarPtr);
-MODULE_SCOPE int TclRegisterLiteral(CompileEnv *envPtr,
- char *bytes, int length, int flags);
MODULE_SCOPE void TclReleaseLiteral(Tcl_Interp *interp, Tcl_Obj *objPtr);
MODULE_SCOPE void TclInvalidateCmdLiteral(Tcl_Interp *interp,
const char *name, Namespace *nsPtr);
@@ -1181,6 +1179,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.
@@ -1321,6 +1334,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: