Skip to content
Commits on Source (10)
jruby-joni (2.1.23-1) UNRELEASED; urgency=medium
jruby-joni (2.1.24-1) unstable; urgency=medium
* New upstream release
-- Hideki Yamane <henrich@debian.org> Tue, 02 Oct 2018 19:59:01 +0900
-- Hideki Yamane <henrich@debian.org> Tue, 09 Oct 2018 02:59:49 +0900
jruby-joni (2.1.23-1) unstable; urgency=medium
* New upstream release
* debian/copyright
- use https for upstream contact and source URL
-- Hideki Yamane <henrich@debian.org> Wed, 03 Oct 2018 06:36:47 +0900
jruby-joni (2.1.21-1) unstable; urgency=medium
......
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: joni
Upstream-Contact: JRuby Team (http://jruby.org)
Source: http://github.com/jruby/joni/
Upstream-Contact: JRuby Team (https://jruby.org)
Source: https://github.com/jruby/joni/
Files: *
Copyright: 2008-2018 Marcin Mielżyński
......
......@@ -4,7 +4,7 @@
<groupId>org.jruby.joni</groupId>
<artifactId>joni</artifactId>
<packaging>jar</packaging>
<version>2.1.23</version>
<version>2.1.24</version>
<name>Joni</name>
<description>
Java port of Oniguruma: http://www.geocities.jp/kosako3/oniguruma
......
......@@ -2369,7 +2369,7 @@ final class Analyser extends Parser {
regex.setOptimizeMapInfo(opt.map);
regex.setSubAnchor(opt.map.anchor);
} else {
regex.setExactInfo(opt.exb);
regex.setOptimizeExactInfo(opt.exb);
regex.setSubAnchor(opt.exb.anchor);
}
} else if (opt.map.value > 0) {
......
......@@ -45,6 +45,7 @@ public interface Config extends org.jcodings.Config {
final boolean USE_SUNDAY_QUICK_SEARCH = true;
final boolean USE_CEC = false;
final boolean USE_DYNAMIC_OPTION = false;
final boolean USE_BYTE_MAP = OptExactInfo.OPT_EXACT_MAXLEN <= CHAR_TABLE_SIZE;
final boolean USE_INT_MAP_BACKWARD = false;
final int NREGION = 10;
......
......@@ -292,7 +292,7 @@ public final class Regex {
byte[]buf = new byte[Config.ENC_GET_CASE_FOLD_CODES_MAX_NUM * Config.ENC_MBC_CASE_FOLD_MAXLEN];
final int ilen = USE_SUNDAY_QUICK_SEARCH ? len : len - 1;
if (len < Config.CHAR_TABLE_SIZE) {
if (Config.USE_BYTE_MAP || len < Config.CHAR_TABLE_SIZE) {
if (map == null) map = new byte[Config.CHAR_TABLE_SIZE]; // map/skip
for (int i = 0; i < Config.CHAR_TABLE_SIZE; i++) map[i] = (byte)(USE_SUNDAY_QUICK_SEARCH ? len + 1 : len);
......@@ -339,7 +339,7 @@ public final class Regex {
return clen;
}
void setExactInfo(OptExactInfo e) {
void setOptimizeExactInfo(OptExactInfo e) {
if (e.length == 0) return;
// shall we copy that ?
......@@ -350,11 +350,12 @@ public final class Regex {
if (e.ignoreCase > 0) {
if (e.length >= 3 || (e.length >= 2 && allowReverse)) {
if (!setupBMSkipMap(true)) {
forward = allowReverse ? Search.BM_IC_FORWARD : Search.BM_NOT_REV_IC_FORWARD;
} else {
forward = enc.toLowerCaseTable() != null ? Search.SLOW_IC_SB_FORWARD : Search.SLOW_IC_FORWARD;
}
forward = enc.toLowerCaseTable() != null ? Search.SLOW_IC_SB_FORWARD : Search.SLOW_IC_FORWARD;
// if (!setupBMSkipMap(true)) {
// forward = allowReverse ? Search.BM_IC_FORWARD : Search.BM_NOT_REV_IC_FORWARD;
// } else {
// forward = enc.toLowerCaseTable() != null ? Search.SLOW_IC_SB_FORWARD : Search.SLOW_IC_FORWARD;
// }
} else {
forward = enc.toLowerCaseTable() != null ? Search.SLOW_IC_SB_FORWARD : Search.SLOW_IC_FORWARD;
}
......
......@@ -324,7 +324,7 @@ final class Search {
}
if (end > textEnd) end = textEnd;
if (regex.intMap == null) {
if (Config.USE_BYTE_MAP || regex.intMap == null) {
while (s < end) {
int p = s;
int t = tail;
......@@ -433,7 +433,7 @@ final class Search {
}
if (end > textEnd) end = textEnd;
if (regex.intMap == null) {
if (Config.USE_BYTE_MAP || regex.intMap == null) {
while (s < end) {
int p = USE_SUNDAY_QUICK_SEARCH ? s - tlen1 : s - (targetEnd - targetP) + 1;
if (lowerCaseMatch(target, targetP, targetEnd, text, p, s + 1, enc, buf, regex.caseFoldFlag)) return p;
......@@ -474,7 +474,7 @@ final class Search {
if (end + tlen1 > textEnd) end = textEnd - tlen1;
int s = textP, p, se;
if (regex.intMap == null) {
if (Config.USE_BYTE_MAP || regex.intMap == null) {
while (s < end) {
p = se = s + tlen1;
int t = tail;
......@@ -531,7 +531,7 @@ final class Search {
if (end + tlen1 > textEnd) end = textEnd - tlen1;
int s = textP;
if (regex.intMap == null) {
if (Config.USE_BYTE_MAP || regex.intMap == null) {
while (s < end) {
int se = s + tlen1;
if (lowerCaseMatch(target, targetP, targetEnd, text, s, se + 1, enc, buf, regex.caseFoldFlag)) return s;
......
......@@ -245,7 +245,7 @@ public final class QuantifierNode extends StateNode {
int targetQNum = qnt.popularNum();
if (Config.USE_WARNING_REDUNDANT_NESTED_REPEAT_OPERATOR) {
if (!isByNumber() && !qnt.isByNumber() && env.syntax.warnReduntantNestedRepeat()) {
if (nestQNum >= 0 && targetQNum >= 0 && env.syntax.warnReduntantNestedRepeat()) {
switch(REDUCE_TABLE[targetQNum][nestQNum]) {
case ASIS:
break;
......
......@@ -346,5 +346,7 @@ public class TestU8 extends Test {
x2s("^.+$", "a\n", 0, 1);
x2s("^.+$", "\na\n", 1, 2);
ns("^.+$", "\n");
ns("💌", "aa");
}
}