Skip to content

Commit 6aee8bc

Browse files
committed
style fixes
1 parent 5628356 commit 6aee8bc

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@
154154
import com.oracle.truffle.api.TruffleLanguage.LanguageReference;
155155
import com.oracle.truffle.api.TruffleLogger;
156156
import com.oracle.truffle.api.dsl.Cached;
157-
import com.oracle.truffle.api.dsl.CachedLanguage;
158157
import com.oracle.truffle.api.dsl.Cached.Exclusive;
158+
import com.oracle.truffle.api.dsl.CachedLanguage;
159159
import com.oracle.truffle.api.dsl.Specialization;
160160
import com.oracle.truffle.api.interop.ArityException;
161161
import com.oracle.truffle.api.interop.InteropException;
@@ -367,7 +367,8 @@ Object execute(Object[] arguments,
367367
writeAttrNode.execute(module, fun.getName(), method);
368368
}
369369
} catch (UnsupportedMessageException | InvalidArrayIndexException e) {
370-
// should not happen since we check if 'legacyMethods' has array elements
370+
// should not happen since we check if 'legacyMethods' has array
371+
// elements
371372
throw CompilerDirectives.shouldNotReachHere();
372373
}
373374
}
@@ -688,7 +689,8 @@ Object execute(Object[] arguments,
688689
}
689690
return context.getNullHandle();
690691
} catch (PException e) {
691-
// This function has the same (odd) error behavior as PyDict_GetItem: If an error
692+
// This function has the same (odd) error behavior as PyDict_GetItem: If an
693+
// error
692694
// occurred, the error is cleared and NULL is returned.
693695
return context.getNullHandle();
694696
}
@@ -1493,7 +1495,8 @@ Object execute(Object[] arguments,
14931495
boolean mustRelease = gil.acquire();
14941496
try {
14951497
checkArity(arguments, 2);
1496-
// IMPORTANT: this is not stealing the reference. The CPython implementation actually
1498+
// IMPORTANT: this is not stealing the reference. The CPython implementation
1499+
// actually
14971500
// increases the reference count by 1.
14981501
Object resolvedPyObject = asPythonObjectNode.execute(resolveNativeReferenceNode.execute(resolveHandleNode.execute(arguments[1]), false));
14991502
return asHandleNode.execute(asContextNode.execute(arguments[0]), resolvedPyObject);

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/common/LocalsStorage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ static HashingStorage generic(LocalsStorage self, HashingStorage other,
328328
}
329329

330330
@ExportMessage
331-
public HashingStorage clear(@Exclusive @Cached GilNode gil) {
331+
public static HashingStorage clear(@Exclusive @Cached GilNode gil) {
332332
boolean mustRelease = gil.acquire();
333333
try {
334334
return EconomicMapStorage.create();

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ public static final class PythonThreadState {
135135
/* set to emulate Py_ReprEnter/Leave */
136136
HashSet<Object> reprObjectSet;
137137

138-
public PythonThreadState(@SuppressWarnings("unused") PythonContext context, Thread owner) {
138+
@SuppressWarnings("unused")
139+
public PythonThreadState(PythonContext context, Thread owner) {
139140
}
140141

141142
void shutdown() {

0 commit comments

Comments
 (0)