summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-03-04 16:52:01 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-03-04 16:52:01 (GMT)
commite3a722221577f7aaeaa942bb59bbe67306b61229 (patch)
tree52c20b244136cfda64102e6d08625cd9dd99b6b8 /generic/tclCompile.c
parente7d0f5ecae05758ef91de4a3c1e6422bd82953ed (diff)
downloadtcl-e3a722221577f7aaeaa942bb59bbe67306b61229.zip
tcl-e3a722221577f7aaeaa942bb59bbe67306b61229.tar.gz
tcl-e3a722221577f7aaeaa942bb59bbe67306b61229.tar.bz2
Compilation of misc info sometimes used in high-performance code.
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 1d88e11..6f3f778 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -37,7 +37,7 @@ TCL_DECLARE_MUTEX(tableMutex)
int tclTraceCompile = 0;
static int traceInitialized = 0;
#endif
-
+
/*
* A table describing the Tcl bytecode instructions. Entries in this table
* must correspond to the instruction opcode definitions in tclCompile.h. The
@@ -435,6 +435,20 @@ InstructionDesc const tclInstructionTable[] = {
* indicated by the LVT index. Part of [dict with].
* Stack: ... path keyList => ... */
+ {"nscurrent", 1, +1, 0, {OPERAND_NONE}},
+ /* Push the name of the interpreter's current namespace as an object
+ * on the stack. */
+ {"coroName", 1, +1, 0, {OPERAND_NONE}},
+ /* Push the name of the interpreter's current coroutine as an object
+ * on the stack. */
+ {"infoLevelNumber", 1, +1, 0, {OPERAND_NONE}},
+ /* Push the stack depth (i.e., [info level]) of the interpreter as an
+ * object on the stack. */
+ {"infoLevelArgs", 1, 0, 0, {OPERAND_NONE}},
+ /* Push the argument words to a stack depth (i.e., [info level <n>])
+ * of the interpreter as an object on the stack.
+ * Stack: ... depth => ... argList */
+
{NULL, 0, 0, 0, {OPERAND_NONE}}
};
@@ -1673,10 +1687,10 @@ TclCompileScript(
&& !(cmdPtr->nsPtr->flags&NS_SUPPRESS_COMPILATION)
&& !(cmdPtr->flags & CMD_HAS_EXEC_TRACES)
&& !(iPtr->flags & DONT_COMPILE_CMDS_INLINE)) {
- int savedNumCmds = envPtr->numCommands;
+ int code, savedNumCmds = envPtr->numCommands;
unsigned savedCodeNext =
envPtr->codeNext - envPtr->codeStart;
- int update = 0, code;
+ int update = 0;
/*
* Mark the start of the command; the proper bytecode
@@ -4627,6 +4641,5 @@ RecordByteCodeStats(
* c-basic-offset: 4
* fill-column: 78
* tab-width: 8
- * indent-tabs-mode: nil
* End:
*/