|
160 | 160 | import com.oracle.graal.python.nodes.SpecialMethodNames;
|
161 | 161 | import com.oracle.graal.python.nodes.attributes.GetAttributeNode;
|
162 | 162 | import com.oracle.graal.python.nodes.attributes.GetAttributeNode.GetAnyAttributeNode;
|
163 |
| -import com.oracle.graal.python.nodes.attributes.LookupAttributeInMRONode; |
164 | 163 | import com.oracle.graal.python.nodes.attributes.LookupInheritedAttributeNode;
|
165 | 164 | import com.oracle.graal.python.nodes.attributes.ReadAttributeFromObjectNode;
|
166 | 165 | import com.oracle.graal.python.nodes.attributes.SetAttributeNode;
|
|
169 | 168 | import com.oracle.graal.python.nodes.call.special.CallUnaryMethodNode;
|
170 | 169 | import com.oracle.graal.python.nodes.call.special.LookupAndCallTernaryNode;
|
171 | 170 | import com.oracle.graal.python.nodes.call.special.LookupAndCallUnaryNode;
|
| 171 | +import com.oracle.graal.python.nodes.call.special.LookupSpecialMethodNode; |
172 | 172 | import com.oracle.graal.python.nodes.classes.IsSubtypeNode;
|
173 | 173 | import com.oracle.graal.python.nodes.control.GetIteratorExpressionNode.GetIteratorNode;
|
174 | 174 | import com.oracle.graal.python.nodes.control.GetNextNode;
|
@@ -857,16 +857,16 @@ public PythonObject reversed(Object cls, String value) {
|
857 | 857 | @Specialization(guards = {"!isString(sequence)", "!isPRange(sequence)"}, limit = "3")
|
858 | 858 | public Object reversed(VirtualFrame frame, Object cls, Object sequence,
|
859 | 859 | @CachedLibrary("sequence") PythonObjectLibrary lib,
|
860 |
| - @Cached("create(__REVERSED__)") LookupAttributeInMRONode reversedNode, |
| 860 | + @Cached("create(__REVERSED__)") LookupSpecialMethodNode reversedNode, |
861 | 861 | @Cached("create()") CallUnaryMethodNode callReversedNode,
|
862 | 862 | @Cached("create(__LEN__)") LookupAndCallUnaryNode lenNode,
|
863 |
| - @Cached("create(__GETITEM__)") LookupAttributeInMRONode getItemNode, |
| 863 | + @Cached("create(__GETITEM__)") LookupSpecialMethodNode getItemNode, |
864 | 864 | @Cached("createBinaryProfile()") ConditionProfile noReversedProfile,
|
865 | 865 | @Cached("createBinaryProfile()") ConditionProfile noGetItemProfile) {
|
866 | 866 | Object sequenceKlass = lib.getLazyPythonClass(sequence);
|
867 |
| - Object reversed = reversedNode.execute(sequenceKlass); |
| 867 | + Object reversed = reversedNode.execute(frame, sequenceKlass, sequence); |
868 | 868 | if (noReversedProfile.profile(reversed == PNone.NO_VALUE)) {
|
869 |
| - Object getItem = getItemNode.execute(sequenceKlass); |
| 869 | + Object getItem = getItemNode.execute(frame, sequenceKlass, sequence); |
870 | 870 | if (noGetItemProfile.profile(getItem == PNone.NO_VALUE)) {
|
871 | 871 | throw raise(TypeError, ErrorMessages.OBJ_ISNT_REVERSIBLE, sequence);
|
872 | 872 | } else {
|
|
0 commit comments