[jruby-joni] 164/194: rejigger ExactMB2Nx opcodes
Hideki Yamane
henrich at moszumanska.debian.org
Thu Feb 1 12:04:37 UTC 2018
This is an automated email from the git hooks/post-receive script.
henrich pushed a commit to branch debian/sid
in repository jruby-joni.
commit 52b057b8cd22907e9728fbf16c534aabfd3ae020
Author: Marcin Mielzynski <lopx at gazeta.pl>
Date: Sun Jan 14 22:20:09 2018 +0100
rejigger ExactMB2Nx opcodes
---
src/org/joni/ByteCodeMachine.java | 34 ++++++++++------------------------
1 file changed, 10 insertions(+), 24 deletions(-)
diff --git a/src/org/joni/ByteCodeMachine.java b/src/org/joni/ByteCodeMachine.java
index 00cfdac..37c28c6 100644
--- a/src/org/joni/ByteCodeMachine.java
+++ b/src/org/joni/ByteCodeMachine.java
@@ -598,41 +598,27 @@ class ByteCodeMachine extends StackMachine {
}
private void opExactMB2N1() {
- if (s + 2 > range) {opFail(); return;}
- if (code[ip] != bytes[s]) {opFail(); return;}
- ip++; s++;
- if (code[ip] != bytes[s]) {opFail(); return;}
- ip++; s++;
- sprev = sbegin; // break;
+ if (s + 2 > range || code[ip] != bytes[s] || code[++ip] != bytes[++s]) {
+ opFail();
+ } else {
+ ip++; s++;
+ sprev = sbegin; // break;
+ }
}
private void opExactMB2N2() {
- if (s + 4 > range) {opFail(); return;}
- if (code[ip] != bytes[s]) {opFail(); return;}
- ip++; s++;
- if (code[ip] != bytes[s]) {opFail(); return;}
+ if (s + 4 > range || code[ip] != bytes[s] || code[++ip] != bytes[++s]) {opFail(); return;}
ip++; s++;
sprev = s;
- if (code[ip] != bytes[s]) {opFail(); return;}
- ip++; s++;
- if (code[ip] != bytes[s]) {opFail(); return;}
+ if (code[ip] != bytes[s] || code[++ip] != bytes[++s]) {opFail(); return;}
ip++; s++;
}
private void opExactMB2N3() {
- if (s + 6 > range) {opFail(); return;}
- if (code[ip] != bytes[s]) {opFail(); return;}
- ip++; s++;
- if (code[ip] != bytes[s]) {opFail(); return;}
- ip++; s++;
- if (code[ip] != bytes[s]) {opFail(); return;}
- ip++; s++;
- if (code[ip] != bytes[s]) {opFail(); return;}
+ if (s + 6 > range || code[ip] != bytes[s] || code[++ip] != bytes[++s] || code[++ip] != bytes[++s] || code[++ip] != bytes[++s]) {opFail(); return;}
ip++; s++;
sprev = s;
- if (code[ip] != bytes[s]) {opFail(); return;}
- ip++; s++;
- if (code[ip] != bytes[s]) {opFail(); return;}
+ if (code[ip] != bytes[s] || code[++ip] != bytes[++s]) {opFail(); return;}
ip++; s++;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jruby-joni.git
More information about the pkg-java-commits
mailing list