Skip to content

Commit 3b082a5

Browse files
committed
add missing specializations
1 parent 7143c7b commit 3b082a5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/util/CastToJavaDoubleNode.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,16 @@ static double doBoolean(boolean x) {
8686
return x ? 1.0 : 0.0;
8787
}
8888

89+
@Specialization
90+
static double toInt(int x) {
91+
return x;
92+
}
93+
94+
@Specialization
95+
static double toLong(long x) {
96+
return x;
97+
}
98+
8999
@Specialization
90100
static double toPInt(PInt x,
91101
@Cached PRaiseNode raise) {

0 commit comments

Comments
 (0)