Skip to content

Commit 957403d

Browse files
committed
Fix style
1 parent 0309773 commit 957403d

File tree

3 files changed

+43
-44
lines changed

3 files changed

+43
-44
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/lib/PyObjectGetMethod.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,21 @@ static Object getGenericAttr(Frame frame, Object receiver, String name,
101101

102102
@Specialization(guards = {"isObjectGetAttribute(lazyClass)", "name == cachedName"}, limit = "1")
103103
static Object getFixedAttr(VirtualFrame frame, Object receiver, @SuppressWarnings("unused") String name,
104-
@SuppressWarnings("unused") @Shared("getClassNode") @Cached GetClassNode getClass,
105-
@Bind("getClass.execute(receiver)") Object lazyClass,
106-
@SuppressWarnings("unused") @Cached("name") String cachedName,
107-
@Cached("create(name)") LookupAttributeInMRONode lookupNode,
108-
@Shared("getDescrClass") @Cached GetClassNode getDescrClass,
109-
@Shared("lookupGet") @Cached(parameters = "Get") LookupCallableSlotInMRONode lookupGet,
110-
@Shared("lookupSet") @Cached(parameters = "Set") LookupCallableSlotInMRONode lookupSet,
111-
@Shared("callGet") @Cached CallTernaryMethodNode callGet,
112-
@Shared("readAttr") @Cached ReadAttributeFromObjectNode readAttr,
113-
@Shared("raiseNode") @Cached PRaiseNode raiseNode,
114-
@Cached BranchProfile hasDescr,
115-
@Cached BranchProfile returnDataDescr,
116-
@Cached BranchProfile returnAttr,
117-
@Cached BranchProfile returnUnboundMethod,
118-
@Cached BranchProfile returnBoundDescr) {
104+
@SuppressWarnings("unused") @Shared("getClassNode") @Cached GetClassNode getClass,
105+
@Bind("getClass.execute(receiver)") Object lazyClass,
106+
@SuppressWarnings("unused") @Cached("name") String cachedName,
107+
@Cached("create(name)") LookupAttributeInMRONode lookupNode,
108+
@Shared("getDescrClass") @Cached GetClassNode getDescrClass,
109+
@Shared("lookupGet") @Cached(parameters = "Get") LookupCallableSlotInMRONode lookupGet,
110+
@Shared("lookupSet") @Cached(parameters = "Set") LookupCallableSlotInMRONode lookupSet,
111+
@Shared("callGet") @Cached CallTernaryMethodNode callGet,
112+
@Shared("readAttr") @Cached ReadAttributeFromObjectNode readAttr,
113+
@Shared("raiseNode") @Cached PRaiseNode raiseNode,
114+
@Cached BranchProfile hasDescr,
115+
@Cached BranchProfile returnDataDescr,
116+
@Cached BranchProfile returnAttr,
117+
@Cached BranchProfile returnUnboundMethod,
118+
@Cached BranchProfile returnBoundDescr) {
119119
boolean methodFound = false;
120120
Object descr = lookupNode.execute(lazyClass);
121121
Object getMethod = PNone.NO_VALUE;

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

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ public final Object executeObject(Object callable, Object arg1, Object arg2) {
9090

9191
@Specialization(guards = "cachedInfo == info", limit = "getCallSiteInlineCacheMaxDepth()")
9292
static Object callBinarySpecialMethodSlotInlined(VirtualFrame frame, @SuppressWarnings("unused") BinaryBuiltinDescriptor info, Object arg1, Object arg2,
93-
@SuppressWarnings("unused") @Cached("info") BinaryBuiltinDescriptor cachedInfo,
94-
@Cached("cachedInfo.createNode()") PythonBinaryBuiltinNode node) {
93+
@SuppressWarnings("unused") @Cached("info") BinaryBuiltinDescriptor cachedInfo,
94+
@Cached("cachedInfo.createNode()") PythonBinaryBuiltinNode node) {
9595
if (cachedInfo.isReverseOperation()) {
9696
return node.execute(frame, arg2, arg1);
9797
} else {
@@ -134,10 +134,10 @@ Object callSpecialMethodSlotCallTarget(VirtualFrame frame, BuiltinMethodDescript
134134
@Specialization(guards = {"func == cachedFunc", "builtinNode != null",
135135
"frame != null || unusedFrame"}, limit = "getCallSiteInlineCacheMaxDepth()", assumptions = "singleContextAssumption()")
136136
static Object callObjectSingleContext(VirtualFrame frame, @SuppressWarnings("unused") PBuiltinFunction func, Object arg1, Object arg2,
137-
@SuppressWarnings("unused") @Cached("func") PBuiltinFunction cachedFunc,
138-
@SuppressWarnings("unused") @Cached("isForReverseBinaryOperation(func.getCallTarget())") boolean isReverse,
139-
@Cached("getBinary(frame, func)") PythonBinaryBuiltinNode builtinNode,
140-
@SuppressWarnings("unused") @Cached("frameIsUnused(builtinNode)") boolean unusedFrame) {
137+
@SuppressWarnings("unused") @Cached("func") PBuiltinFunction cachedFunc,
138+
@SuppressWarnings("unused") @Cached("isForReverseBinaryOperation(func.getCallTarget())") boolean isReverse,
139+
@Cached("getBinary(frame, func)") PythonBinaryBuiltinNode builtinNode,
140+
@SuppressWarnings("unused") @Cached("frameIsUnused(builtinNode)") boolean unusedFrame) {
141141
if (isReverse) {
142142
return builtinNode.execute(frame, arg2, arg1);
143143
} else {
@@ -147,10 +147,10 @@ static Object callObjectSingleContext(VirtualFrame frame, @SuppressWarnings("unu
147147

148148
@Specialization(guards = {"func.getCallTarget() == ct", "builtinNode != null", "frame != null || unusedFrame"}, limit = "getCallSiteInlineCacheMaxDepth()")
149149
static Object callObject(VirtualFrame frame, @SuppressWarnings("unused") PBuiltinFunction func, Object arg1, Object arg2,
150-
@SuppressWarnings("unused") @Cached("func.getCallTarget()") RootCallTarget ct,
151-
@SuppressWarnings("unused") @Cached("isForReverseBinaryOperation(func.getCallTarget())") boolean isReverse,
152-
@Cached("getBinary(frame, func)") PythonBinaryBuiltinNode builtinNode,
153-
@SuppressWarnings("unused") @Cached("frameIsUnused(builtinNode)") boolean unusedFrame) {
150+
@SuppressWarnings("unused") @Cached("func.getCallTarget()") RootCallTarget ct,
151+
@SuppressWarnings("unused") @Cached("isForReverseBinaryOperation(func.getCallTarget())") boolean isReverse,
152+
@Cached("getBinary(frame, func)") PythonBinaryBuiltinNode builtinNode,
153+
@SuppressWarnings("unused") @Cached("frameIsUnused(builtinNode)") boolean unusedFrame) {
154154
if (isReverse) {
155155
return builtinNode.execute(frame, arg2, arg1);
156156
} else {
@@ -161,40 +161,40 @@ static Object callObject(VirtualFrame frame, @SuppressWarnings("unused") PBuilti
161161
@Specialization(guards = {"func == cachedFunc", "builtinNode != null", "!takesSelfArg",
162162
"frame != null || unusedFrame"}, limit = "getCallSiteInlineCacheMaxDepth()", assumptions = "singleContextAssumption()")
163163
static Object callMethodSingleContext(VirtualFrame frame, @SuppressWarnings("unused") PBuiltinMethod func, Object arg1, Object arg2,
164-
@SuppressWarnings("unused") @Cached("func") PBuiltinMethod cachedFunc,
165-
@SuppressWarnings("unused") @Cached("takesSelfArg(func)") boolean takesSelfArg,
166-
@Cached("getBinary(frame, func.getFunction())") PythonBinaryBuiltinNode builtinNode,
167-
@SuppressWarnings("unused") @Cached("frameIsUnused(builtinNode)") boolean unusedFrame) {
164+
@SuppressWarnings("unused") @Cached("func") PBuiltinMethod cachedFunc,
165+
@SuppressWarnings("unused") @Cached("takesSelfArg(func)") boolean takesSelfArg,
166+
@Cached("getBinary(frame, func.getFunction())") PythonBinaryBuiltinNode builtinNode,
167+
@SuppressWarnings("unused") @Cached("frameIsUnused(builtinNode)") boolean unusedFrame) {
168168
return builtinNode.execute(frame, arg1, arg2);
169169
}
170170

171171
@Specialization(guards = {"func == cachedFunc", "builtinNode != null", "takesSelfArg",
172172
"frame != null || unusedFrame"}, limit = "getCallSiteInlineCacheMaxDepth()", assumptions = "singleContextAssumption()")
173173
static Object callSelfMethodSingleContext(VirtualFrame frame, @SuppressWarnings("unused") PBuiltinMethod func, Object arg1, Object arg2,
174-
@SuppressWarnings("unused") @Cached(value = "func", weak = true) PBuiltinMethod cachedFunc,
175-
@SuppressWarnings("unused") @Cached("takesSelfArg(func)") boolean takesSelfArg,
176-
@Cached("getTernary(frame, func.getFunction())") PythonTernaryBuiltinNode builtinNode,
177-
@SuppressWarnings("unused") @Cached("frameIsUnused(builtinNode)") boolean unusedFrame) {
174+
@SuppressWarnings("unused") @Cached(value = "func", weak = true) PBuiltinMethod cachedFunc,
175+
@SuppressWarnings("unused") @Cached("takesSelfArg(func)") boolean takesSelfArg,
176+
@Cached("getTernary(frame, func.getFunction())") PythonTernaryBuiltinNode builtinNode,
177+
@SuppressWarnings("unused") @Cached("frameIsUnused(builtinNode)") boolean unusedFrame) {
178178
return builtinNode.execute(frame, func.getSelf(), arg1, arg2);
179179
}
180180

181181
@Specialization(guards = {"builtinNode != null", "getCallTarget(func, getCt) == ct", "!takesSelfArg", "frame != null || unusedFrame"}, limit = "getCallSiteInlineCacheMaxDepth()")
182182
static Object callMethod(VirtualFrame frame, @SuppressWarnings("unused") PBuiltinMethod func, Object arg1, Object arg2,
183-
@SuppressWarnings("unused") @Cached GetCallTargetNode getCt,
184-
@SuppressWarnings("unused") @Cached("getCallTarget(func, getCt)") RootCallTarget ct,
185-
@SuppressWarnings("unused") @Cached("takesSelfArg(func)") boolean takesSelfArg,
186-
@Cached("getBinary(frame, func.getFunction())") PythonBinaryBuiltinNode builtinNode,
187-
@SuppressWarnings("unused") @Cached("frameIsUnused(builtinNode)") boolean unusedFrame) {
183+
@SuppressWarnings("unused") @Cached GetCallTargetNode getCt,
184+
@SuppressWarnings("unused") @Cached("getCallTarget(func, getCt)") RootCallTarget ct,
185+
@SuppressWarnings("unused") @Cached("takesSelfArg(func)") boolean takesSelfArg,
186+
@Cached("getBinary(frame, func.getFunction())") PythonBinaryBuiltinNode builtinNode,
187+
@SuppressWarnings("unused") @Cached("frameIsUnused(builtinNode)") boolean unusedFrame) {
188188
return builtinNode.execute(frame, arg1, arg2);
189189
}
190190

191191
@Specialization(guards = {"builtinNode != null", "getCallTarget(func, getCt) == ct", "takesSelfArg", "frame != null || unusedFrame"}, limit = "getCallSiteInlineCacheMaxDepth()")
192192
static Object callSelfMethod(VirtualFrame frame, @SuppressWarnings("unused") PBuiltinMethod func, Object arg1, Object arg2,
193-
@SuppressWarnings("unused") @Cached GetCallTargetNode getCt,
194-
@SuppressWarnings("unused") @Cached("getCallTarget(func, getCt)") RootCallTarget ct,
195-
@SuppressWarnings("unused") @Cached("takesSelfArg(func)") boolean takesSelfArg,
196-
@Cached("getTernary(frame, func.getFunction())") PythonTernaryBuiltinNode builtinNode,
197-
@SuppressWarnings("unused") @Cached("frameIsUnused(builtinNode)") boolean unusedFrame) {
193+
@SuppressWarnings("unused") @Cached GetCallTargetNode getCt,
194+
@SuppressWarnings("unused") @Cached("getCallTarget(func, getCt)") RootCallTarget ct,
195+
@SuppressWarnings("unused") @Cached("takesSelfArg(func)") boolean takesSelfArg,
196+
@Cached("getTernary(frame, func.getFunction())") PythonTernaryBuiltinNode builtinNode,
197+
@SuppressWarnings("unused") @Cached("frameIsUnused(builtinNode)") boolean unusedFrame) {
198198
return builtinNode.execute(frame, func.getSelf(), arg1, arg2);
199199
}
200200

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
import com.oracle.graal.python.nodes.function.builtins.PythonTernaryBuiltinNode;
5959
import com.oracle.graal.python.nodes.function.builtins.PythonUnaryBuiltinNode;
6060
import com.oracle.graal.python.util.PythonUtils;
61-
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
6261
import com.oracle.truffle.api.RootCallTarget;
6362
import com.oracle.truffle.api.dsl.Cached;
6463
import com.oracle.truffle.api.dsl.GenerateUncached;

0 commit comments

Comments
 (0)