Skip to content

Commit e247ebf

Browse files
committed
Fix method lookup in FormatProcessor
1 parent c97cccf commit e247ebf

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/call/special/LookupAndCallBinaryNode.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
import com.oracle.graal.python.builtins.objects.type.SpecialMethodSlot;
4747
import com.oracle.graal.python.nodes.PGuards;
4848
import com.oracle.graal.python.nodes.PNodeWithContext;
49-
import com.oracle.graal.python.nodes.object.GetClassNode;
5049
import com.oracle.graal.python.runtime.PythonOptions;
5150
import com.oracle.graal.python.util.Supplier;
5251
import com.oracle.truffle.api.CompilerDirectives;
@@ -124,10 +123,6 @@ public static LookupAndCallBinaryNode create(SpecialMethodSlot slot, SpecialMeth
124123
return LookupAndCallReversibleBinaryNodeGen.create(slot, rslot, null, alwaysCheckReverse, ignoreDescriptorException);
125124
}
126125

127-
protected static Object getMethod(Object receiver, TruffleString methodName) {
128-
return LookupSpecialMethodNode.Dynamic.executeUncached(null, GetClassNode.executeUncached(receiver), methodName, receiver);
129-
}
130-
131126
@ImportStatic(PGuards.class)
132127
@GenerateInline
133128
@GenerateCached(false)

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/call/special/LookupSpecialMethodNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ public abstract static class Dynamic extends Node {
8787

8888
public abstract Object execute(Frame frame, Node inliningTarget, Object type, TruffleString name, Object receiver);
8989

90-
public static Object executeUncached(Frame frame, Object type, TruffleString name, Object receiver) {
91-
return LookupSpecialMethodNodeGen.DynamicNodeGen.getUncached().execute(frame, null, type, name, receiver);
90+
public static Object executeUncached(Object type, TruffleString name, Object receiver) {
91+
return LookupSpecialMethodNodeGen.DynamicNodeGen.getUncached().execute(null, null, type, name, receiver);
9292
}
9393

9494
@Specialization

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/formatting/FormatProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
import com.oracle.graal.python.nodes.ErrorMessages;
3232
import com.oracle.graal.python.nodes.PGuards;
3333
import com.oracle.graal.python.nodes.PRaiseNode;
34-
import com.oracle.graal.python.nodes.attributes.LookupAttributeInMRONode;
3534
import com.oracle.graal.python.nodes.call.CallNode;
35+
import com.oracle.graal.python.nodes.call.special.LookupSpecialMethodNode;
3636
import com.oracle.graal.python.nodes.classes.IsSubtypeNodeGen;
3737
import com.oracle.graal.python.nodes.object.GetClassNode;
3838
import com.oracle.graal.python.nodes.util.CannotCastException;
@@ -94,7 +94,7 @@ <F extends InternalFormat.Formatter> F setupFormat(F f) {
9494
protected abstract boolean isMapping(Object obj);
9595

9696
static Object lookupAttribute(Object owner, TruffleString name) {
97-
return LookupAttributeInMRONode.Dynamic.getUncached().execute(GetClassNode.executeUncached(owner), name);
97+
return LookupSpecialMethodNode.Dynamic.executeUncached(GetClassNode.executeUncached(owner), name, owner);
9898
}
9999

100100
static Object call(Object callable, Object... args) {

0 commit comments

Comments
 (0)