summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-12-31 23:34:57 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-12-31 23:34:57 (GMT)
commit16764976baae41730e54afdca94fdf9fd18dceed (patch)
tree95bcbfee5fb1ccefd71ff195c3b86e0c34d4d098
parent0fa7053fd789959b2c0f1efcb486958e16e22ba0 (diff)
downloadtcl-16764976baae41730e54afdca94fdf9fd18dceed.zip
tcl-16764976baae41730e54afdca94fdf9fd18dceed.tar.gz
tcl-16764976baae41730e54afdca94fdf9fd18dceed.tar.bz2
another jump peephole, this time with string comparisons
-rw-r--r--generic/tclExecute.c14
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 {