Skip to content

Commit c29c2d4

Browse files
committed
fast path for PInt in PyNumberIndexNode
1 parent d852dbe commit c29c2d4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/lib/PyNumberIndexNode.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ static long doLong(long object) {
9595
return object;
9696
}
9797

98+
@Specialization
99+
static PInt doPInt(PInt object) {
100+
return object;
101+
}
102+
98103
@Specialization(rewriteOn = UnexpectedResultException.class)
99104
int doCallIndexInt(VirtualFrame frame, PythonAbstractObject object,
100105
@Shared("callIndex") @Cached CallIndexNode callIndex,

0 commit comments

Comments
 (0)