diff options
| author | dkf <donal.k.fellows@manchester.ac.uk> | 2013-12-31 23:34:57 (GMT) |
|---|---|---|
| committer | dkf <donal.k.fellows@manchester.ac.uk> | 2013-12-31 23:34:57 (GMT) |
| commit | f9dd75e79c423909b22ef0aaaee246b7e8960fc6 (patch) | |
| tree | 95bcbfee5fb1ccefd71ff195c3b86e0c34d4d098 | |
| parent | c45f1130d1a169b181c45ba4bc6ce954746a3239 (diff) | |
| download | tcl-f9dd75e79c423909b22ef0aaaee246b7e8960fc6.zip tcl-f9dd75e79c423909b22ef0aaaee246b7e8960fc6.tar.gz tcl-f9dd75e79c423909b22ef0aaaee246b7e8960fc6.tar.bz2 | |
another jump peephole, this time with string comparisons
| -rw-r--r-- | generic/tclExecute.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 6d98cea..c7d0918 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -4987,6 +4987,20 @@ TEBCresume( break; } } + +#ifndef TCL_COMPILE_DEBUG + switch (*(pc+1)) { + case INST_JUMP_FALSE1: + NEXT_INST_F((match? 3 : TclGetInt1AtPtr(pc+2)+1), 2, 0); + case INST_JUMP_TRUE1: + NEXT_INST_F((match? TclGetInt1AtPtr(pc+2)+1 : 3), 2, 0); + case INST_JUMP_FALSE4: + NEXT_INST_F((match? 6 : TclGetInt4AtPtr(pc+2)+1), 2, 0); + case INST_JUMP_TRUE4: + NEXT_INST_F((match? TclGetInt4AtPtr(pc+2)+1 : 6), 2, 0); + } +#endif + if (match < 0) { TclNewIntObj(objResultPtr, -1); } else { |
