Skip to content

Commit 78f381a

Browse files
committed
Directly use 'length' of MRO array.
1 parent 7d01470 commit 78f381a

File tree

1 file changed

+2
-2
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/classes

1 file changed

+2
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/classes/IsSubtypeNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public static IsSubtypeNode create() {
7777
@Specialization(guards = { //
7878
"derived == cachedDerived", //
7979
"cls == cachedCls", //
80-
"mro.length() < 32" //
80+
"mro.getInternalClassArray().length < 32" //
8181
}, //
8282
limit = "getVariableArgumentInlineCacheLimit()", //
8383
assumptions = "mro.getLookupStableAssumption()")
@@ -96,7 +96,7 @@ boolean isSubtypeOfConstantType(@SuppressWarnings("unused") PythonAbstractClass
9696

9797
@Specialization(guards = { //
9898
"derived == cachedDerived", //
99-
"mro.length() < 32" //
99+
"mro.getInternalClassArray().length < 32" //
100100
}, //
101101
limit = "getVariableArgumentInlineCacheLimit()", //
102102
replaces = "isSubtypeOfConstantType", //

0 commit comments

Comments
 (0)