37 import jdk.nashorn.internal.runtime.regexp.joni.constants.EncloseType; |
37 import jdk.nashorn.internal.runtime.regexp.joni.constants.EncloseType; |
38 import jdk.nashorn.internal.runtime.regexp.joni.constants.NodeType; |
38 import jdk.nashorn.internal.runtime.regexp.joni.constants.NodeType; |
39 import jdk.nashorn.internal.runtime.regexp.joni.constants.OPCode; |
39 import jdk.nashorn.internal.runtime.regexp.joni.constants.OPCode; |
40 import jdk.nashorn.internal.runtime.regexp.joni.constants.OPSize; |
40 import jdk.nashorn.internal.runtime.regexp.joni.constants.OPSize; |
41 import jdk.nashorn.internal.runtime.regexp.joni.constants.TargetInfo; |
41 import jdk.nashorn.internal.runtime.regexp.joni.constants.TargetInfo; |
42 import jdk.nashorn.internal.runtime.regexp.joni.encoding.CharacterType; |
|
43 |
42 |
44 final class ArrayCompiler extends Compiler { |
43 final class ArrayCompiler extends Compiler { |
45 private int[] code; |
44 private int[] code; |
46 private int codeLength; |
45 private int codeLength; |
47 |
46 |
343 addMemNum(numRepeat); /* OP_REPEAT ID */ |
342 addMemNum(numRepeat); /* OP_REPEAT ID */ |
344 } |
343 } |
345 |
344 |
346 private static final int QUANTIFIER_EXPAND_LIMIT_SIZE = 50; // was 50 |
345 private static final int QUANTIFIER_EXPAND_LIMIT_SIZE = 50; // was 50 |
347 |
346 |
|
347 @SuppressWarnings("unused") |
348 private static boolean cknOn(int ckn) { |
348 private static boolean cknOn(int ckn) { |
349 return ckn > 0; |
349 return ckn > 0; |
350 } |
350 } |
351 |
351 |
352 private int compileNonCECLengthQuantifierNode(QuantifierNode qn) { |
352 private int compileNonCECLengthQuantifierNode(QuantifierNode qn) { |
877 case OPCode.RETURN: // it will appear only with CALL though |
877 case OPCode.RETURN: // it will appear only with CALL though |
878 regex.stackNeeded = true; |
878 regex.stackNeeded = true; |
879 } |
879 } |
880 } |
880 } |
881 |
881 |
|
882 @SuppressWarnings("unused") |
882 private void addStateCheckNum(int num) { |
883 private void addStateCheckNum(int num) { |
883 addInt(num); |
884 addInt(num); |
884 } |
885 } |
885 |
886 |
886 private void addRelAddr(int addr) { |
887 private void addRelAddr(int addr) { |
887 addInt(addr); |
888 addInt(addr); |
888 } |
889 } |
889 |
890 |
|
891 @SuppressWarnings("unused") |
890 private void addAbsAddr(int addr) { |
892 private void addAbsAddr(int addr) { |
891 addInt(addr); |
893 addInt(addr); |
892 } |
894 } |
893 |
895 |
894 private void addLength(int length) { |
896 private void addLength(int length) { |