Skip to content

Commit 9e3f268

Browse files
committed
Fix style.
1 parent 8daf0b2 commit 9e3f268

File tree

7 files changed

+14
-12
lines changed

7 files changed

+14
-12
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/PythonCextBuiltins.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ Object op5(VirtualFrame frame, Object a, Object b, @SuppressWarnings("unused") i
594594
abstract static class PyObject_Setattr extends PythonTernaryBuiltinNode {
595595
@Specialization
596596
Object doBuiltinClass(PythonBuiltinClass object, String key, Object value,
597-
@Exclusive @Cached("createForceType()") WriteAttributeToObjectNode writeAttrNode) {
597+
@Exclusive @Cached("createForceType()") WriteAttributeToObjectNode writeAttrNode) {
598598
writeAttrNode.execute(object, key, value);
599599
return PNone.NONE;
600600
}
@@ -608,7 +608,7 @@ Object doNativeClass(PythonNativeClass object, String key, Object value,
608608

609609
@Specialization(guards = {"!isPythonBuiltinClass(object)"})
610610
Object doObject(PythonObject object, String key, Object value,
611-
@Exclusive @Cached WriteAttributeToDynamicObjectNode writeAttrToDynamicObjectNode) {
611+
@Exclusive @Cached WriteAttributeToDynamicObjectNode writeAttrToDynamicObjectNode) {
612612
writeAttrToDynamicObjectNode.execute(object.getStorage(), key, value);
613613
return PNone.NONE;
614614
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
import static com.oracle.graal.python.builtins.objects.cext.NativeCAPISymbols.FUN_PTR_COMPARE;
4646
import static com.oracle.graal.python.builtins.objects.cext.NativeCAPISymbols.FUN_PY_FLOAT_AS_DOUBLE;
4747
import static com.oracle.graal.python.builtins.objects.cext.NativeCAPISymbols.FUN_PY_TRUFFLE_BYTE_ARRAY_TO_NATIVE;
48-
import static com.oracle.graal.python.builtins.objects.cext.NativeCAPISymbols.FUN_PY_TRUFFLE_CSTR_TO_STRING;
4948
import static com.oracle.graal.python.builtins.objects.cext.NativeCAPISymbols.FUN_PY_TRUFFLE_STRING_TO_CSTR;
5049
import static com.oracle.graal.python.builtins.objects.cext.NativeCAPISymbols.FUN_WHCAR_SIZE;
5150
import static com.oracle.graal.python.nodes.SpecialMethodNames.__FLOAT__;

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/str/NativeCharSequence.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public boolean isMaterialized() {
7777

7878
@Override
7979
public String materialize() {
80-
if(!isMaterialized()) {
80+
if (!isMaterialized()) {
8181
materialized = (String) PCallCapiFunction.getUncached().call(NativeCAPISymbols.FUN_PY_TRUFFLE_CSTR_TO_STRING, ptr);
8282
}
8383
return materialized;
@@ -86,7 +86,7 @@ public String materialize() {
8686
@Override
8787
public String toString() {
8888
CompilerAsserts.neverPartOfCompilation();
89-
if(isMaterialized()) {
89+
if (isMaterialized()) {
9090
return materialized;
9191
}
9292
return Objects.toString(ptr);

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/str/PCharSequence.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,6 @@
4343
public interface PCharSequence extends CharSequence {
4444

4545
boolean isMaterialized();
46+
4647
String materialize();
4748
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/str/PString.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ public PString(LazyPythonClass clazz, CharSequence value) {
4444
}
4545

4646
public String getValue() {
47-
if(value instanceof PCharSequence) {
48-
PCharSequence s = (PCharSequence)value;
49-
if(!s.isMaterialized()) {
47+
if (value instanceof PCharSequence) {
48+
PCharSequence s = (PCharSequence) value;
49+
if (!s.isMaterialized()) {
5050
return s.materialize();
5151
}
5252
return s.toString();

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/type/LazyPythonClass.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
public interface LazyPythonClass extends TruffleObject {
4646

4747
/**
48-
* Returns the name of the class for debugging purposes. This method must assume that no context is available.
48+
* Returns the name of the class for debugging purposes. This method must assume that no context
49+
* is available.
4950
*/
5051
String getName();
5152
}

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,13 @@ private <T extends PythonBuiltinBaseNode> T getBuiltin(PBuiltinFunction func, Cl
8989

9090
private boolean callerExceedsMaxSize() {
9191
CompilerAsserts.neverPartOfCompilation();
92-
if(!maxSizeExceeded) {
92+
if (!maxSizeExceeded) {
9393
int n = NodeUtil.countNodes(getRootNode());
94-
// nb: option 'BuiltinsInliningMaxCallerSize' is defined as a compatible option, i.e., ASTs
94+
// nb: option 'BuiltinsInliningMaxCallerSize' is defined as a compatible option, i.e.,
95+
// ASTs
9596
// will only we shared between contexts that have the same value for this option.
9697
int maxSize = PythonOptions.getOption(lookupContextReference(PythonLanguage.class).get(), PythonOptions.BuiltinsInliningMaxCallerSize);
97-
if(n >= maxSize) {
98+
if (n >= maxSize) {
9899
maxSizeExceeded = true;
99100
return true;
100101
}

0 commit comments

Comments
 (0)