Skip to content

Commit 97544c4

Browse files
committed
CallQuaternaryMethodNode uses PythonLanguage#isSingleContext
1 parent 258a927 commit 97544c4

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,24 +63,26 @@ public static CallQuaternaryMethodNode create() {
6363

6464
public abstract Object execute(Frame frame, Object callable, Object arg1, Object arg2, Object arg3, Object arg4);
6565

66-
@Specialization(guards = {"func == cachedFunc", "builtinNode != null", "frame != null || unusedFrame"}, limit = "getCallSiteInlineCacheMaxDepth()", assumptions = "singleContextAssumption()")
66+
@Specialization(guards = {"isSingleContext()", "func == cachedFunc", "builtinNode != null", "frame != null || unusedFrame"}, //
67+
limit = "getCallSiteInlineCacheMaxDepth()")
6768
Object callSingle(VirtualFrame frame, @SuppressWarnings("unused") PBuiltinFunction func, Object arg1, Object arg2, Object arg3, Object arg4,
6869
@SuppressWarnings("unused") @Cached("func") PBuiltinFunction cachedFunc,
6970
@Cached("getQuaternary(frame, func)") PythonQuaternaryBuiltinNode builtinNode,
7071
@SuppressWarnings("unused") @Cached("frameIsUnused(builtinNode)") boolean unusedFrame) {
7172
return builtinNode.execute(frame, arg1, arg2, arg3, arg4);
7273
}
7374

74-
@Specialization(guards = {"func.getCallTarget() == ct", "builtinNode != null", "frame != null || unusedFrame"}, limit = "getCallSiteInlineCacheMaxDepth()")
75+
@Specialization(guards = {"func.getCallTarget() == ct", "builtinNode != null", "frame != null || unusedFrame"}, //
76+
limit = "getCallSiteInlineCacheMaxDepth()")
7577
Object call(VirtualFrame frame, @SuppressWarnings("unused") PBuiltinFunction func, Object arg1, Object arg2, Object arg3, Object arg4,
7678
@SuppressWarnings("unused") @Cached("func.getCallTarget()") RootCallTarget ct,
7779
@Cached("getQuaternary(frame, func)") PythonQuaternaryBuiltinNode builtinNode,
7880
@SuppressWarnings("unused") @Cached("frameIsUnused(builtinNode)") boolean unusedFrame) {
7981
return builtinNode.execute(frame, arg1, arg2, arg3, arg4);
8082
}
8183

82-
@Specialization(guards = {"func == cachedFunc", "builtinNode != null", "!takesSelfArg",
83-
"frame != null || unusedFrame"}, limit = "getCallSiteInlineCacheMaxDepth()", assumptions = "singleContextAssumption()")
84+
@Specialization(guards = {"isSingleContext()", "func == cachedFunc", "builtinNode != null", "!takesSelfArg",
85+
"frame != null || unusedFrame"}, limit = "getCallSiteInlineCacheMaxDepth()")
8486
Object callMethodSingle(VirtualFrame frame, @SuppressWarnings("unused") PBuiltinMethod func, Object arg1, Object arg2, Object arg3, Object arg4,
8587
@SuppressWarnings("unused") @Cached(value = "func", weak = true) PBuiltinMethod cachedFunc,
8688
@SuppressWarnings("unused") @Cached("takesSelfArg(func)") boolean takesSelfArg,
@@ -89,7 +91,8 @@ Object callMethodSingle(VirtualFrame frame, @SuppressWarnings("unused") PBuiltin
8991
return builtinNode.execute(frame, arg1, arg2, arg3, arg4);
9092
}
9193

92-
@Specialization(guards = {"builtinNode != null", "getCallTarget(func, getCt) == ct", "!takesSelfArg", "frame != null || unusedFrame"}, limit = "getCallSiteInlineCacheMaxDepth()")
94+
@Specialization(guards = {"builtinNode != null", "getCallTarget(func, getCt) == ct", "!takesSelfArg",
95+
"frame != null || unusedFrame"}, limit = "getCallSiteInlineCacheMaxDepth()")
9396
Object callMethod(VirtualFrame frame, @SuppressWarnings("unused") PBuiltinMethod func, Object arg1, Object arg2, Object arg3, Object arg4,
9497
@SuppressWarnings("unused") @Cached GetCallTargetNode getCt,
9598
@SuppressWarnings("unused") @Cached("getCallTarget(func, getCt)") RootCallTarget ct,

0 commit comments

Comments
 (0)