diff options
| author | donal.k.fellows@manchester.ac.uk <dkf> | 2010-01-30 16:33:25 (GMT) |
|---|---|---|
| committer | donal.k.fellows@manchester.ac.uk <dkf> | 2010-01-30 16:33:25 (GMT) |
| commit | 03572904badb00b8f5a2dca7f27745aa7d74b945 (patch) | |
| tree | 8f37ec0b8c0aca813318fc602941b066f8fd80f2 /generic/tclCompile.c | |
| parent | dc6054fc8ee4cbc80a34a49b8ec589d147869afc (diff) | |
| download | tcl-03572904badb00b8f5a2dca7f27745aa7d74b945.zip tcl-03572904badb00b8f5a2dca7f27745aa7d74b945.tar.gz tcl-03572904badb00b8f5a2dca7f27745aa7d74b945.tar.bz2 | |
Make the [unset] command be bytecode compiled.
Diffstat (limited to 'generic/tclCompile.c')
| -rw-r--r-- | generic/tclCompile.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 57e3a9d..726aefb 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompile.c,v 1.179 2009/11/18 21:59:50 nijtmans Exp $ + * RCS: @(#) $Id: tclCompile.c,v 1.180 2010/01/30 16:33:25 dkf Exp $ */ #include "tclInt.h" @@ -399,6 +399,7 @@ InstructionDesc const tclInstructionTable[] = { * stknext */ {"existStk", 1, 0, 0, {OPERAND_NONE}}, /* Test if general variable exists; unparsed variable name is stktop*/ + {"nop", 1, 0, 0, {OPERAND_NONE}}, /* Do nothing */ {"returnCodeBranch", 1, -1, 0, {OPERAND_NONE}}, @@ -406,9 +407,23 @@ InstructionDesc const tclInstructionTable[] = { * ERROR: +1; RETURN: +3; BREAK: +5; CONTINUE: +7; * Other non-OK: +9 */ + + {"unsetScalar", 6, 0, 2, {OPERAND_UINT1, OPERAND_LVT4}}, + /* Make scalar variable at index op2 in call frame cease to exist; + * op1 is 1 for errors on problems, 0 otherwise */ + {"unsetArray", 6, -1, 2, {OPERAND_UINT1, OPERAND_LVT4}}, + /* Make array element cease to exist; array at slot op2, element is + * stktop; op1 is 1 for errors on problems, 0 otherwise */ + {"unsetArrayStk", 2, -2, 1, {OPERAND_UINT1}}, + /* Make array element cease to exist; element is stktop, array name is + * stknext; op1 is 1 for errors on problems, 0 otherwise */ + {"unsetStk", 2, -1, 1, {OPERAND_UINT1}}, + /* Make general variable cease to exist; unparsed variable name is + * stktop; op1 is 1 for errors on problems, 0 otherwise */ + {NULL, 0, 0, 0, {OPERAND_NONE}} }; - + /* * Prototypes for procedures defined later in this file: */ |
