diff options
| author | mig <mig> | 2013-12-06 05:24:07 (GMT) |
|---|---|---|
| committer | mig <mig> | 2013-12-06 05:24:07 (GMT) |
| commit | 2f6378c76cb15fa0e9d096639a7483cb7ea65590 (patch) | |
| tree | 72bbbf92c101d838c551ad5c496c397d35d0352f /generic/tclCompile.h | |
| parent | b597fec19ecaf09c3bbe1ac8fd012e32c10705d9 (diff) | |
| parent | 39f93d6f377120e8e489f3c1648ffe8e18100db0 (diff) | |
| download | tcl-2f6378c76cb15fa0e9d096639a7483cb7ea65590.zip tcl-2f6378c76cb15fa0e9d096639a7483cb7ea65590.tar.gz tcl-2f6378c76cb15fa0e9d096639a7483cb7ea65590.tar.bz2 | |
3x speed improvement in foreach, via new compiler and opcodes. The old version remains for old .tbc sake, but is unused in the core.
Diffstat (limited to 'generic/tclCompile.h')
| -rw-r--r-- | generic/tclCompile.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/generic/tclCompile.h b/generic/tclCompile.h index a39e0f1..c4e6222 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -586,8 +586,8 @@ typedef struct ByteCode { #define INST_CONTINUE 66 /* Opcodes 67 to 68 */ -#define INST_FOREACH_START4 67 -#define INST_FOREACH_STEP4 68 +#define INST_FOREACH_START4 67 /* DEPRECATED */ +#define INST_FOREACH_STEP4 68 /* DEPRECATED */ /* Opcodes 69 to 72 */ #define INST_BEGIN_CATCH4 69 @@ -768,8 +768,14 @@ typedef struct ByteCode { #define INST_EXPAND_DROP 165 +/* New foreach implementation */ + +#define INST_FOREACH_START 166 +#define INST_FOREACH_STEP 167 +#define INST_FOREACH_END 168 + /* The last opcode */ -#define LAST_INST_OPCODE 165 +#define LAST_INST_OPCODE 168 /* * Table describing the Tcl bytecode instructions: their name (for displaying |
