Skip to content

Commit 7fb7230

Browse files
committed
style fix
1 parent df164b2 commit 7fb7230

File tree

5 files changed

+28
-32
lines changed

5 files changed

+28
-32
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/CExtNodes.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2281,7 +2281,8 @@ void doWithoutFrame(@SuppressWarnings("unused") Frame frame, PException e,
22812281
PFrame.Reference ref = context.peekTopFrameInfo();
22822282
if (flag[0] == null) {
22832283
CompilerDirectives.transferToInterpreterAndInvalidate();
2284-
// executed the first time, don't pollute the profile, we'll mark the caller to pass the info on the next call
2284+
// executed the first time, don't pollute the profile, we'll mark the caller to pass
2285+
// the info on the next call
22852286
flag[0] = ConditionProfile.createBinaryProfile();
22862287
if (ref == null) {
22872288
ref = PArguments.getCurrentFrameInfo(ReadCallerFrameNode.getCallerFrame(null, FrameInstance.FrameAccess.READ_ONLY, true, 0));

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ default void setCalleeNeedsExceptionState() {
6666
}
6767

6868
/**
69-
* Finds the parent of {@code callNode} that is an {@link IndirectCallNode}
70-
* and marks it so it will pass the state via the context the next time.
69+
* Finds the parent of {@code callNode} that is an {@link IndirectCallNode} and marks it so it
70+
* will pass the state via the context the next time.
7171
*
7272
* @return {@code true} if the marking was successful, {@code false} otherwise
7373
*/

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

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ private PFrame.Reference walkLevels(VirtualFrame frame, PFrame.Reference startFr
140140
/**
141141
* Walk up the stack to find the {@code startFrame} and from then ({@code
142142
* level} + 1)-times (counting only non-internal Python frames if {@code
143-
* skipInternal} is true). If {@code startFrame} is {@code null}, return the
144-
* currently top Python frame.
143+
* skipInternal} is true). If {@code startFrame} is {@code null}, return the currently top
144+
* Python frame.
145145
*
146-
* @param startFrame - the frame to start counting from or {@code null} to return the top frame
147-
* @param frameAccess - the desired {@link FrameInstance} access kind
146+
* @param startFrame - the frame to start counting from or {@code null} to return the top frame
147+
* @param frameAccess - the desired {@link FrameInstance} access kind
148148
* @param skipInternal - declares if Python internal frames should be skipped or counted
149-
* @param level - the stack depth to go to. Ignored if {@code startFrame} is {@code null}
149+
* @param level - the stack depth to go to. Ignored if {@code startFrame} is {@code null}
150150
*/
151151
public static Frame getCallerFrame(PFrame.Reference startFrame, FrameInstance.FrameAccess frameAccess, boolean skipInternal, int level) {
152152
CompilerDirectives.transferToInterpreterAndInvalidate();
@@ -155,19 +155,17 @@ public static Frame getCallerFrame(PFrame.Reference startFrame, FrameInstance.Fr
155155
int i = -1;
156156

157157
/**
158-
* We may find the Python frame at the level we desire, but the
159-
* {@link PRootNode} associated with it may have been called from a
160-
* different language, and thus not a Python {@link
161-
* IndirectCallNode}. That means that we cannot immediately return
162-
* when we find the correct level frame, but instead we need to
163-
* remember the frame in {@code outputFrame} and then keep going
164-
* until we find the previous Python caller on the stack (or
165-
* not). That last Python caller before the Python frame we need
166-
* must push the info.
158+
* We may find the Python frame at the level we desire, but the {@link PRootNode}
159+
* associated with it may have been called from a different language, and thus not a
160+
* Python {@link IndirectCallNode}. That means that we cannot immediately return when we
161+
* find the correct level frame, but instead we need to remember the frame in
162+
* {@code outputFrame} and then keep going until we find the previous Python caller on
163+
* the stack (or not). That last Python caller before the Python frame we need must push
164+
* the info.
167165
*
168-
* This can easily be seen when this is used to {@link
169-
* PythonContext#peekTopFrameInfo()}, because in that case, that
170-
* info must be set by the caller that is somewhere up the stack.
166+
* This can easily be seen when this is used to {@link PythonContext#peekTopFrameInfo()}
167+
* , because in that case, that info must be set by the caller that is somewhere up the
168+
* stack.
171169
*
172170
* <pre>
173171
* ================

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/function/FunctionDefinitionNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ public Object execute(VirtualFrame frame) {
150150
}
151151

152152
PFunction func = withDocString(frame, factory().createFunction(functionName, enclosingClassName, code, PArguments.getGlobals(frame),
153-
defaultValues, kwDefaultValues, closure, writeNameNode,
154-
codeStableAssumption, defaultsStableAssumption));
153+
defaultValues, kwDefaultValues, closure, writeNameNode,
154+
codeStableAssumption, defaultsStableAssumption));
155155

156156
// Processing annotated arguments.
157157
// The __annotations__ dictionary is created even there are is not any annotated arg.

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/ExecutionContext.java

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ public static Object enter(VirtualFrame frame, PythonContext context, IndirectCa
330330
if (callNode.calleeNeedsCallerFrame()) {
331331
PFrame.Reference prev = context.popTopFrameInfo();
332332
assert prev == null : "trying to call from Python to a foreign function, but we didn't clear the topframeref. " +
333-
"This indicates that a call into Python code happened without a proper enter through ForeignToPythonCallContext";
333+
"This indicates that a call into Python code happened without a proper enter through ForeignToPythonCallContext";
334334
info = PArguments.getCurrentFrameInfo(frame);
335335
info.setCallNode((Node) callNode);
336336
context.setTopFrameInfo(info);
@@ -350,8 +350,7 @@ public static Object enter(VirtualFrame frame, PythonContext context, IndirectCa
350350
}
351351

352352
/**
353-
* Cleanup after a call without frame. For more details, see
354-
* {@link #enter}.
353+
* Cleanup after a call without frame. For more details, see {@link #enter}.
355354
*/
356355
public static void exit(VirtualFrame frame, PythonContext context, Object savedState) {
357356
if (frame == null || context == null || savedState == null) {
@@ -370,11 +369,10 @@ public static void exit(VirtualFrame frame, PythonContext context, Object savedS
370369
public abstract static class ForeignCallContext {
371370

372371
/**
373-
* Prepare a call from a Python frame to foreign callable. This will
374-
* also call {@link IndirectCallContext#enter} to transfer the state to
375-
* the context. In addition, this will acquire the interop lock from the
376-
* {@link PythonContext} to ensure exclusive execution to prevent
377-
* unsynchronized global state modification (which is in particular a
372+
* Prepare a call from a Python frame to foreign callable. This will also call
373+
* {@link IndirectCallContext#enter} to transfer the state to the context. In addition, this
374+
* will acquire the interop lock from the {@link PythonContext} to ensure exclusive
375+
* execution to prevent unsynchronized global state modification (which is in particular a
378376
* problem when calling native code).
379377
*
380378
* <pre>
@@ -411,8 +409,7 @@ public static Object enter(VirtualFrame frame, PythonContext context, IndirectCa
411409
}
412410

413411
/**
414-
* Cleanup after an interop call. For more details, see
415-
* {@link #enter}.
412+
* Cleanup after an interop call. For more details, see {@link #enter}.
416413
*/
417414
public static void exit(VirtualFrame frame, PythonContext context, Object savedState) {
418415
if (context != null) {

0 commit comments

Comments
 (0)