Skip to content

Commit 2914cd5

Browse files
committed
Fix style
1 parent ae56d7c commit 2914cd5

File tree

6 files changed

+22
-17
lines changed

6 files changed

+22
-17
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/bz2/BZ2CompressorBuiltins.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ PBytes doNativeBytes(BZ2Object.BZ2Compressor self, PBytesLike data,
140140

141141
@Specialization(guards = {"!self.isFlushed()"})
142142
PBytes doNativeObject(VirtualFrame frame, BZ2Object.BZ2Compressor self, Object data,
143-
@Cached BytesNodes.ToBytesNode toBytes,
144-
@Shared("c") @Cached Bz2Nodes.Bz2NativeCompress compress) {
143+
@Cached BytesNodes.ToBytesNode toBytes,
144+
@Shared("c") @Cached Bz2Nodes.Bz2NativeCompress compress) {
145145
byte[] bytes = toBytes.execute(frame, data);
146146
int len = bytes.length;
147147
return factory().createBytes(compress.compress(self, PythonContext.get(this), bytes, len));

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/bz2/BZ2DecompressorBuiltins.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ PBytes doNativeBytes(BZ2Object.BZ2Decompressor self, PBytesLike data, int maxLen
124124

125125
@Specialization(guards = {"!self.isEOF()"})
126126
PBytes doNativeObject(VirtualFrame frame, BZ2Object.BZ2Decompressor self, Object data, int maxLength,
127-
@Cached BytesNodes.ToBytesNode toBytes,
128-
@Shared("d") @Cached Bz2Nodes.Bz2NativeDecompress decompress) {
127+
@Cached BytesNodes.ToBytesNode toBytes,
128+
@Shared("d") @Cached Bz2Nodes.Bz2NativeDecompress decompress) {
129129
synchronized (self) {
130130
byte[] bytes = toBytes.execute(frame, data);
131131
int len = bytes.length;

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/zlib/ZlibCompressBuiltins.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ PBytes doNativeBytes(ZLibCompObject.NativeZlibCompObject self, PBytesLike data,
107107

108108
@Specialization(guards = {"self.isInitialized()", "!isBytes(data)"})
109109
PBytes doNativeObject(VirtualFrame frame, ZLibCompObject.NativeZlibCompObject self, Object data,
110-
@Shared("bb") @Cached BytesNodes.ToBytesNode toBytes,
111-
@Shared("co") @Cached ZlibNodes.ZlibNativeCompressObj compressObj) {
110+
@Shared("bb") @Cached BytesNodes.ToBytesNode toBytes,
111+
@Shared("co") @Cached ZlibNodes.ZlibNativeCompressObj compressObj) {
112112
synchronized (self) {
113113
assert self.isInitialized();
114114
byte[] bytes = toBytes.execute(frame, data);

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/buffer/BufferAcquireGenerateUncachedNode.java

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
import com.oracle.graal.python.PythonLanguage;
4444
import com.oracle.graal.python.nodes.IndirectCallNode;
4545
import com.oracle.graal.python.nodes.PNodeWithContext;
46-
import com.oracle.graal.python.nodes.PNodeWithIndirectCall;
4746
import com.oracle.graal.python.nodes.PNodeWithRaiseAndIndirectCall;
4847
import com.oracle.graal.python.runtime.PythonContext;
4948
import com.oracle.truffle.api.Assumption;
@@ -57,16 +56,21 @@
5756
/**
5857
* Helper node for using {@link PythonBufferAcquireLibrary} in a node annotated with
5958
* {@link com.oracle.truffle.api.dsl.GenerateUncached}.<br/>
60-
* In order to correctly use {@link PythonBufferAcquireLibrary}, one needs to setup an indirect
59+
* In order to correctly use {@link PythonBufferAcquireLibrary}, one needs to se tup an indirect
6160
* call. Following methods of the library already do that but the caller needs to provide
6261
* appropriate nodes.
6362
* <ul>
64-
* <li>{@link PythonBufferAcquireLibrary#acquireReadonly(Object, VirtualFrame, PNodeWithRaiseAndIndirectCall)}</li>
65-
* <li>{@link PythonBufferAcquireLibrary#acquireReadonly(Object, VirtualFrame, PythonContext, PythonLanguage, IndirectCallNode)}
63+
* <li>
64+
* {@link PythonBufferAcquireLibrary#acquireReadonly(Object, VirtualFrame, PNodeWithRaiseAndIndirectCall)}
6665
* </li>
67-
* <li>{@link PythonBufferAcquireLibrary#acquireWritable(Object, VirtualFrame, PNodeWithIndirectCall)}
66+
* <li>
67+
* {@link PythonBufferAcquireLibrary#acquireReadonly(Object, VirtualFrame, PythonContext, PythonLanguage, IndirectCallNode)}
6868
* </li>
69-
* <li>{@link PythonBufferAcquireLibrary#acquireWritable(Object, VirtualFrame, PythonContext, PythonLanguage, IndirectCallNode)}
69+
* <li>
70+
* {@link PythonBufferAcquireLibrary#acquireWritable(Object, VirtualFrame, PNodeWithRaiseAndIndirectCall)}
71+
* </li>
72+
* <li>
73+
* {@link PythonBufferAcquireLibrary#acquireWritable(Object, VirtualFrame, PythonContext, PythonLanguage, IndirectCallNode)}
7074
* </li>
7175
* </ul>
7276
* However, if the caller is a node with annotation

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/buffer/PythonBufferAcquireLibrary.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ public boolean hasBuffer(@SuppressWarnings("unused") Object receiver) {
102102
* <b>IMPORTANT:</b> This method may only be used in the context of an indirect call (see
103103
* {@link IndirectCallContext}). If a frame is available, prefer using convenience methods
104104
* {@link #acquireReadonly(Object, VirtualFrame, PNodeWithRaiseAndIndirectCall)} or
105-
* {@link #acquireReadonly(Object, VirtualFrame, PythonContext, PythonLanguage, IndirectCallNode)}.
105+
* {@link #acquireReadonly(Object, VirtualFrame, PythonContext, PythonLanguage, IndirectCallNode)}
106+
* .
106107
* </p>
107108
*/
108109
public final Object acquireReadonly(Object receiver) {
@@ -143,8 +144,8 @@ public final Object acquireReadonly(Object receiver, VirtualFrame frame, PythonC
143144
* Acquire a buffer object meant for writing. Equivalent of CPython's {@code PyObject_GetBuffer}
144145
* with flag {@code PyBUF_WRITABLE}. For equivalents of clinic and {@code PyArg_Parse*}
145146
* converters, see
146-
* {@link #acquireWritableWithTypeError(Object, String, VirtualFrame, PNodeWithRaiseAndIndirectCall)}.Will
147-
* raise exception if the acquisition fails. Must call
147+
* {@link #acquireWritableWithTypeError(Object, String, VirtualFrame, PNodeWithRaiseAndIndirectCall)}
148+
* . Will raise exception if the acquisition fails. Must call
148149
* {@link PythonBufferAccessLibrary#release(Object)} on the returned object after the access is
149150
* finished. When intrinsifying CPython {PyObject_GetBuffer} calls, pay attention to what it
150151
* does to the exception. More often than not, it replaces the exception raised here with
@@ -153,7 +154,8 @@ public final Object acquireReadonly(Object receiver, VirtualFrame frame, PythonC
153154
* <b>IMPORTANT:</b> This method may only be used in the context of an indirect call (see
154155
* {@link IndirectCallContext}). If a frame is available, prefer using convenience methods
155156
* {@link #acquireWritable(Object, VirtualFrame, PNodeWithRaiseAndIndirectCall)} or
156-
* {@link #acquireWritable(Object, VirtualFrame, PythonContext, PythonLanguage, IndirectCallNode)}.
157+
* {@link #acquireWritable(Object, VirtualFrame, PythonContext, PythonLanguage, IndirectCallNode)}
158+
* .
157159
* </p>
158160
*/
159161
public final Object acquireWritable(Object receiver) {

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
import com.oracle.graal.python.builtins.objects.mmap.PMMap;
5757
import com.oracle.graal.python.builtins.objects.type.TypeBuiltins;
5858
import com.oracle.graal.python.nodes.ErrorMessages;
59-
import com.oracle.graal.python.nodes.PNodeWithRaise;
6059
import com.oracle.graal.python.nodes.PNodeWithRaiseAndIndirectCall;
6160
import com.oracle.graal.python.nodes.attributes.ReadAttributeFromObjectNode;
6261
import com.oracle.graal.python.nodes.call.CallNode;

0 commit comments

Comments
 (0)