|
377 | 377 | import com.oracle.truffle.api.TruffleLogger;
|
378 | 378 | import com.oracle.truffle.api.dsl.Bind;
|
379 | 379 | import com.oracle.truffle.api.dsl.Cached;
|
| 380 | +import com.oracle.truffle.api.dsl.Cached.Exclusive; |
380 | 381 | import com.oracle.truffle.api.dsl.Cached.Shared;
|
381 | 382 | import com.oracle.truffle.api.dsl.GenerateCached;
|
382 | 383 | import com.oracle.truffle.api.dsl.GenerateUncached;
|
@@ -1212,9 +1213,16 @@ static PInt doByte(GraalHPyContext hpyContext, byte value) {
|
1212 | 1213 | public abstract static class GraalHPyLongFromInt32 extends HPyBinaryContextFunction {
|
1213 | 1214 |
|
1214 | 1215 | @Specialization
|
1215 |
| - static Object doGeneric(@SuppressWarnings("unused") Object hpyContext, long value, |
| 1216 | + static Object doInt(@SuppressWarnings("unused") Object hpyContext, int value, |
1216 | 1217 | @Bind("this") Node inliningTarget,
|
1217 |
| - @Cached HPyLongFromLong fromLongNode) { |
| 1218 | + @Exclusive @Cached HPyLongFromLong fromLongNode) { |
| 1219 | + return fromLongNode.execute(inliningTarget, value, true); |
| 1220 | + } |
| 1221 | + |
| 1222 | + @Specialization |
| 1223 | + static Object doLong(@SuppressWarnings("unused") Object hpyContext, long value, |
| 1224 | + @Bind("this") Node inliningTarget, |
| 1225 | + @Exclusive @Cached HPyLongFromLong fromLongNode) { |
1218 | 1226 | return fromLongNode.execute(inliningTarget, value, true);
|
1219 | 1227 | }
|
1220 | 1228 | }
|
|
0 commit comments