Skip to content

Commit ba4723d

Browse files
committed
rename shortcut testing function
1 parent ad3e49c commit ba4723d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/common/SequenceStorageNodes.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1981,7 +1981,7 @@ private LenNode getLenNode() {
19811981
return lenNode;
19821982
}
19831983

1984-
private static final boolean shortCutFalse(int llen, int rlen, BinCmpOp op) {
1984+
private static final boolean testingEqualsWithDifferingLengths(int llen, int rlen, BinCmpOp op) {
19851985
// shortcut: if the lengths differ, the lists differ.
19861986
CompilerAsserts.compilationConstant(op);
19871987
if (op == Eq.INSTANCE) {
@@ -2002,7 +2002,7 @@ boolean doEmpty(SequenceStorage left, SequenceStorage right) {
20022002
boolean doBoolStorage(BoolSequenceStorage left, BoolSequenceStorage right) {
20032003
int llen = left.length();
20042004
int rlen = right.length();
2005-
if (shortCutFalse(llen, rlen, cmpOp)) {
2005+
if (testingEqualsWithDifferingLengths(llen, rlen, cmpOp)) {
20062006
return false;
20072007
}
20082008
for (int i = 0; i < Math.min(llen, rlen); i++) {
@@ -2019,7 +2019,7 @@ boolean doBoolStorage(BoolSequenceStorage left, BoolSequenceStorage right) {
20192019
boolean doByteStorage(ByteSequenceStorage left, ByteSequenceStorage right) {
20202020
int llen = left.length();
20212021
int rlen = right.length();
2022-
if (shortCutFalse(llen, rlen, cmpOp)) {
2022+
if (testingEqualsWithDifferingLengths(llen, rlen, cmpOp)) {
20232023
return false;
20242024
}
20252025
for (int i = 0; i < Math.min(llen, rlen); i++) {
@@ -2036,7 +2036,7 @@ boolean doByteStorage(ByteSequenceStorage left, ByteSequenceStorage right) {
20362036
boolean doIntStorage(IntSequenceStorage left, IntSequenceStorage right) {
20372037
int llen = left.length();
20382038
int rlen = right.length();
2039-
if (shortCutFalse(llen, rlen, cmpOp)) {
2039+
if (testingEqualsWithDifferingLengths(llen, rlen, cmpOp)) {
20402040
return false;
20412041
}
20422042
for (int i = 0; i < Math.min(llen, rlen); i++) {
@@ -2053,7 +2053,7 @@ boolean doIntStorage(IntSequenceStorage left, IntSequenceStorage right) {
20532053
boolean doLongStorage(LongSequenceStorage left, LongSequenceStorage right) {
20542054
int llen = left.length();
20552055
int rlen = right.length();
2056-
if (shortCutFalse(llen, rlen, cmpOp)) {
2056+
if (testingEqualsWithDifferingLengths(llen, rlen, cmpOp)) {
20572057
return false;
20582058
}
20592059
for (int i = 0; i < Math.min(llen, rlen); i++) {
@@ -2070,7 +2070,7 @@ boolean doLongStorage(LongSequenceStorage left, LongSequenceStorage right) {
20702070
boolean doDoubleStorage(DoubleSequenceStorage left, DoubleSequenceStorage right) {
20712071
int llen = left.length();
20722072
int rlen = right.length();
2073-
if (shortCutFalse(llen, rlen, cmpOp)) {
2073+
if (testingEqualsWithDifferingLengths(llen, rlen, cmpOp)) {
20742074
return false;
20752075
}
20762076
for (int i = 0; i < Math.min(llen, rlen); i++) {
@@ -2089,7 +2089,7 @@ boolean doGeneric(VirtualFrame frame, SequenceStorage left, SequenceStorage righ
20892089
@CachedLibrary(limit = "getCallSiteInlineCacheMaxDepth()") PythonObjectLibrary lib) {
20902090
int llen = getLenNode().execute(left);
20912091
int rlen = getLenNode().execute(right);
2092-
if (shortCutFalse(llen, rlen, cmpOp)) {
2092+
if (testingEqualsWithDifferingLengths(llen, rlen, cmpOp)) {
20932093
return false;
20942094
}
20952095
ThreadState state;

0 commit comments

Comments
 (0)