Skip to content

Commit 43c2f3e

Browse files
committed
Fix style and compilation errors in tests.
1 parent 6daa642 commit 43c2f3e

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

graalpython/com.oracle.graal.python.test/src/com/oracle/graal/python/test/grammar/TestParserTranslator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public TestParserTranslator() {
133133
private static class JUnitRootNode extends PRootNode {
134134
private final BranchProfile profile = BranchProfile.create();
135135
@Child private ExpressionNode body;
136+
@Child private CalleeContext calleeContext = CalleeContext.create();
136137

137138
public JUnitRootNode(PythonLanguage language, ExpressionNode body) {
138139
super(language);
@@ -145,7 +146,7 @@ public Object execute(VirtualFrame frame) {
145146
try {
146147
return body.execute(frame);
147148
} finally {
148-
CalleeContext.exit(frame, this);
149+
calleeContext.exit(frame, this);
149150
}
150151
}
151152

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/range/RangeBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ boolean containsFallback(Object self, Object other) {
177177
abstract static class IterNode extends PythonUnaryBuiltinNode {
178178
@Specialization
179179
PIntegerIterator iter(PRange self,
180-
@Cached("createBinaryProfile()") ConditionProfile stepPositiveProfile) {
180+
@Cached("createBinaryProfile()") ConditionProfile stepPositiveProfile) {
181181
return factory().createRangeIterator(self.getStart(), self.getStop(), self.getStep(), stepPositiveProfile);
182182
}
183183
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/PRaiseNode.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,16 @@ public static PException raise(Node raisingNode, PBaseException exc) {
9898
}
9999

100100
@Specialization(guards = {"isNoValue(cause)", "isNoValue(format)", "arguments.length == 0", "exceptionType == cachedType"}, limit = "8")
101-
PException doPythonBuiltinTypeCached(@SuppressWarnings("unused") PythonBuiltinClassType exceptionType, @SuppressWarnings("unused") PNone cause, @SuppressWarnings("unused") PNone format, @SuppressWarnings("unused") Object[] arguments,
101+
PException doPythonBuiltinTypeCached(@SuppressWarnings("unused") PythonBuiltinClassType exceptionType, @SuppressWarnings("unused") PNone cause, @SuppressWarnings("unused") PNone format,
102+
@SuppressWarnings("unused") Object[] arguments,
102103
@Cached("exceptionType") PythonBuiltinClassType cachedType,
103104
@Cached PythonObjectFactory factory) {
104105
throw raise(factory.createBaseException(cachedType));
105106
}
106107

107108
@Specialization(guards = {"isNoValue(cause)", "isNoValue(format)", "arguments.length == 0"}, replaces = "doPythonBuiltinTypeCached")
108-
PException doPythonBuiltinType(PythonBuiltinClassType exceptionType, @SuppressWarnings("unused") PNone cause, @SuppressWarnings("unused") PNone format, @SuppressWarnings("unused") Object[] arguments,
109+
PException doPythonBuiltinType(PythonBuiltinClassType exceptionType, @SuppressWarnings("unused") PNone cause, @SuppressWarnings("unused") PNone format,
110+
@SuppressWarnings("unused") Object[] arguments,
109111
@Shared("factory") @Cached PythonObjectFactory factory) {
110112
throw raise(factory.createBaseException(exceptionType));
111113
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/call/PythonCallNode.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ private static class PythonCallQuaternary extends ExpressionNode {
167167

168168
@Override
169169
public Object execute(VirtualFrame frame) {
170-
return callQuaternary.execute(frame, getCallable.execute(frame), argumentNodes[0].execute(frame), argumentNodes[1].execute(frame), argumentNodes[2].execute(frame), argumentNodes[3].execute(frame));
170+
return callQuaternary.execute(frame, getCallable.execute(frame), argumentNodes[0].execute(frame), argumentNodes[1].execute(frame), argumentNodes[2].execute(frame),
171+
argumentNodes[3].execute(frame));
171172
}
172173
}
173174

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ Object callSelfMethod(VirtualFrame frame, @SuppressWarnings("unused") PBuiltinMe
136136
return builtinNode.execute(frame, func.getSelf(), arg1, arg2, arg3);
137137
}
138138

139-
140139
@Specialization
141140
Object call(VirtualFrame frame, Object func, Object arg1, Object arg2, Object arg3,
142141
@Cached("create()") CallNode callNode) {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/frame/MaterializeFrameNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ protected static PFrame getPFrame(Frame frame) {
217217
* variables and need to be refreshed.</li>
218218
* <li>The locals object is a {@code dict} with a storage <b>different</b> to
219219
* {@code LocalsStorage}. This may happen if someone retrieves the locals and manually assigns
220-
* to the dict. Then the storage changes. In this case we must also refresh the frame
221-
* values.</li>
220+
* to the dict. Then the storage changes. In this case we must also refresh the frame values.
221+
* </li>
222222
* <li>The locals object is some arbitrary custom mapping object (excluding the above 2 cases).
223223
* In this case, all code was already working on the custom object and we don't need to do
224224
* anything.</li>

0 commit comments

Comments
 (0)