|
123 | 123 | import com.oracle.graal.python.builtins.objects.ints.IntBuiltinsClinicProviders.FormatNodeClinicProviderGen;
|
124 | 124 | import com.oracle.graal.python.builtins.objects.tuple.PTuple;
|
125 | 125 | import com.oracle.graal.python.builtins.objects.type.PythonBuiltinClass;
|
| 126 | +import com.oracle.graal.python.lib.PyLongCheckNode; |
126 | 127 | import com.oracle.graal.python.lib.PyNumberFloatNode;
|
127 | 128 | import com.oracle.graal.python.lib.PyObjectHashNode;
|
128 | 129 | import com.oracle.graal.python.nodes.ErrorMessages;
|
@@ -2648,8 +2649,13 @@ abstract static class RichCompareNode extends PythonTernaryBuiltinNode {
|
2648 | 2649 | @Specialization(guards = {"opCode == cachedOp.opCode"}, limit = "6")
|
2649 | 2650 | static Object doCached(Object left, Object right, @SuppressWarnings("unused") int opCode,
|
2650 | 2651 | @Bind("this") Node inliningTarget,
|
| 2652 | + @Cached PyLongCheckNode checkLeft, |
| 2653 | + @Cached PyLongCheckNode checkRight, |
2651 | 2654 | @SuppressWarnings("unused") @Cached("fromOpCode(opCode)") ComparisonOp cachedOp,
|
2652 | 2655 | @Cached RichCompareHelperNode cmpNode) {
|
| 2656 | + if (!checkLeft.execute(inliningTarget, left) || !checkRight.execute(inliningTarget, right)) { |
| 2657 | + return PNotImplemented.NOT_IMPLEMENTED; |
| 2658 | + } |
2653 | 2659 | return cmpNode.execute(inliningTarget, left, right, cachedOp);
|
2654 | 2660 | }
|
2655 | 2661 | }
|
|
0 commit comments