[jruby-joni] 86/194: cleanup
Hideki Yamane
henrich at moszumanska.debian.org
Thu Feb 1 12:04:30 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 e2390ddb0bc44e246bc87685b32f729af665f355
Author: Marcin Mielzynski <lopx at gazeta.pl>
Date: Tue Jan 2 16:50:12 2018 +0100
cleanup
---
src/org/joni/ArrayCompiler.java | 6 +++---
src/org/joni/CodeRangeBuffer.java | 13 ++++++-------
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/src/org/joni/ArrayCompiler.java b/src/org/joni/ArrayCompiler.java
index 9715c72..8a5f309 100644
--- a/src/org/joni/ArrayCompiler.java
+++ b/src/org/joni/ArrayCompiler.java
@@ -265,8 +265,8 @@ final class ArrayCompiler extends Compiler {
}
private void addMultiByteCClass(CodeRangeBuffer mbuf) {
- addLength(mbuf.used);
- addInts(mbuf.p, mbuf.used);
+ addLength(mbuf.getUsed());
+ addInts(mbuf.getCodeRange(), mbuf.getUsed());
}
private int compileLengthCClassNode(CClassNode cc) {
@@ -280,7 +280,7 @@ final class ArrayCompiler extends Compiler {
len = OPSize.OPCODE + BitSet.BITSET_SIZE;
}
- len += OPSize.LENGTH + cc.mbuf.used;
+ len += OPSize.LENGTH + cc.mbuf.getUsed();
}
return len;
}
diff --git a/src/org/joni/CodeRangeBuffer.java b/src/org/joni/CodeRangeBuffer.java
index 5b4edea..1cf04d3 100644
--- a/src/org/joni/CodeRangeBuffer.java
+++ b/src/org/joni/CodeRangeBuffer.java
@@ -27,13 +27,8 @@ public final class CodeRangeBuffer {
private static final int INIT_MULTI_BYTE_RANGE_SIZE = 5;
public static final int ALL_MULTI_BYTE_RANGE = 0x7fffffff;
- int[]p;
- int used;
-
- public CodeRangeBuffer(int[]ranges) {
- p = ranges;
- used = ranges[0] + 1;
- }
+ private int[]p;
+ private int used;
public CodeRangeBuffer() {
p = new int[INIT_MULTI_BYTE_RANGE_SIZE];
@@ -44,6 +39,10 @@ public final class CodeRangeBuffer {
return p;
}
+ public int getUsed() {
+ return used;
+ }
+
private CodeRangeBuffer(CodeRangeBuffer orig) {
p = new int[orig.p.length];
System.arraycopy(orig.p, 0, p, 0, p.length);
--
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