Skip to content

Commit efe6737

Browse files
committed
fix style
1 parent 36bbdc4 commit efe6737

File tree

9 files changed

+34
-29
lines changed

9 files changed

+34
-29
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/memoryview/PMemoryView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/object/DefaultPythonStringExports.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/object/PythonObjectLibrary.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@
6060
import com.oracle.truffle.api.library.Library;
6161
import com.oracle.truffle.api.library.LibraryFactory;
6262

63+
/**
64+
* The standard Python object library. This implements a general-purpose Python object interface.
65+
* The equivalent in CPython would be {@code abstract.[ch]}, in PyPy it is the {@code StdObjSpace}.
66+
* Most generic operations available on Python objects should eventually be available through this
67+
* library.
68+
*/
6369
@GenerateLibrary
6470
@DefaultExport(DefaultPythonBooleanExports.class)
6571
@DefaultExport(DefaultPythonIntegerExports.class)
@@ -315,16 +321,15 @@ public boolean isSequence(Object receiver) {
315321
return false;
316322
}
317323

318-
319324
/**
320325
* Implements the logic from {@code PyObject_Size} (to which {@code
321326
* PySequence_Length} is an alias). The logic which is to try a) {@code
322-
* sq_length} and b) {@code mp_length}. Each of these can also be reached
323-
* via {@code PySequence_Length} or {@code PyMapping_Length}, respectively.
327+
* sq_length} and b) {@code mp_length}. Each of these can also be reached via
328+
* {@code PySequence_Length} or {@code PyMapping_Length}, respectively.
324329
*
325-
* The implementation for {@code slot_sq_length} is to call {@code __len__}
326-
* and then to convert it to an index and a size, making sure it's
327-
* >=0. {@code slot_mp_length} is just an alias for that slot.
330+
* The implementation for {@code slot_sq_length} is to call {@code __len__} and then to convert
331+
* it to an index and a size, making sure it's >=0. {@code slot_mp_length} is just an alias for
332+
* that slot.
328333
*/
329334
public int lengthWithState(Object receiver, ThreadState state) {
330335
if (state == null) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2019, Oracle and/or its affiliates.
2+
* Copyright (c) 2017, 2020, Oracle and/or its affiliates.
33
* Copyright (c) 2013, Regents of the University of California
44
*
55
* All rights reserved.
@@ -109,8 +109,8 @@ static boolean isBuiltin(PString self, IsBuiltinClassProfile p) {
109109
}
110110

111111
@Specialization(guards = {
112-
"isString(self.getCharSequence())",
113-
"isBuiltin(self, profile) || hasBuiltinLen(self, lookupSelf, lookupString)"
112+
"isString(self.getCharSequence())",
113+
"isBuiltin(self, profile) || hasBuiltinLen(self, lookupSelf, lookupString)"
114114
}, limit = "1")
115115
static int string(PString self, @SuppressWarnings("unused") ThreadState state,
116116
@SuppressWarnings("unused") @Shared("builtinProfile") @Cached IsBuiltinClassProfile profile,
@@ -120,8 +120,8 @@ static int string(PString self, @SuppressWarnings("unused") ThreadState state,
120120
}
121121

122122
@Specialization(guards = {
123-
"isLazyString(self.getCharSequence())",
124-
"isBuiltin(self, profile) || hasBuiltinLen(self, lookupSelf, lookupString)"
123+
"isLazyString(self.getCharSequence())",
124+
"isBuiltin(self, profile) || hasBuiltinLen(self, lookupSelf, lookupString)"
125125
}, limit = "1")
126126
static int lazyString(PString self, @SuppressWarnings("unused") ThreadState state,
127127
@SuppressWarnings("unused") @Shared("builtinProfile") @Cached IsBuiltinClassProfile profile,
@@ -131,8 +131,8 @@ static int lazyString(PString self, @SuppressWarnings("unused") ThreadState stat
131131
}
132132

133133
@Specialization(guards = {
134-
"isNativeString(self.getCharSequence())", "isMaterialized(self.getCharSequence())",
135-
"isBuiltin(self, profile) || hasBuiltinLen(self, lookupSelf, lookupString)"
134+
"isNativeString(self.getCharSequence())", "isMaterialized(self.getCharSequence())",
135+
"isBuiltin(self, profile) || hasBuiltinLen(self, lookupSelf, lookupString)"
136136
}, limit = "1")
137137
static int nativeString(PString self, @SuppressWarnings("unused") ThreadState state,
138138
@SuppressWarnings("unused") @Shared("builtinProfile") @Cached IsBuiltinClassProfile profile,
@@ -142,8 +142,8 @@ static int nativeString(PString self, @SuppressWarnings("unused") ThreadState st
142142
}
143143

144144
@Specialization(guards = {
145-
"isNativeString(self.getCharSequence())", "!isMaterialized(self.getCharSequence())",
146-
"isBuiltin(self, profile) || hasBuiltinLen(self, lookupSelf, lookupString)"
145+
"isNativeString(self.getCharSequence())", "!isMaterialized(self.getCharSequence())",
146+
"isBuiltin(self, profile) || hasBuiltinLen(self, lookupSelf, lookupString)"
147147
}, replaces = "nativeString", limit = "1")
148148
static int nativeStringMat(PString self, @SuppressWarnings("unused") ThreadState state,
149149
@SuppressWarnings("unused") @Shared("builtinProfile") @Cached IsBuiltinClassProfile profile,
@@ -157,13 +157,13 @@ static int nativeStringMat(PString self, @SuppressWarnings("unused") ThreadState
157157

158158
@Specialization(replaces = {"string", "lazyString", "nativeString", "nativeStringMat"})
159159
static int subclassedString(PString self, ThreadState state,
160-
@Exclusive @Cached("createBinaryProfile()") ConditionProfile gotState,
161-
@Exclusive @Cached("createBinaryProfile()") ConditionProfile hasLen,
162-
@Exclusive @Cached("createBinaryProfile()") ConditionProfile ltZero,
163-
@Exclusive @Cached LookupInheritedAttributeNode.Dynamic getLenNode,
164-
@Exclusive @Cached CallNode callNode,
165-
@Exclusive @Cached PRaiseNode raiseNode,
166-
@Exclusive @CachedLibrary(limit = "1") PythonObjectLibrary lib) {
160+
@Exclusive @Cached("createBinaryProfile()") ConditionProfile gotState,
161+
@Exclusive @Cached("createBinaryProfile()") ConditionProfile hasLen,
162+
@Exclusive @Cached("createBinaryProfile()") ConditionProfile ltZero,
163+
@Exclusive @Cached LookupInheritedAttributeNode.Dynamic getLenNode,
164+
@Exclusive @Cached CallNode callNode,
165+
@Exclusive @Cached PRaiseNode raiseNode,
166+
@Exclusive @CachedLibrary(limit = "1") PythonObjectLibrary lib) {
167167
// call the generic implementation in the superclass
168168
return self.lengthWithState(state, gotState, hasLen, ltZero, getLenNode, callNode, raiseNode, lib);
169169
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/statement/ImportStarNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2019, Oracle and/or its affiliates.
2+
* Copyright (c) 2017, 2020, Oracle and/or its affiliates.
33
* Copyright (c) 2013, Regents of the University of California
44
*
55
* All rights reserved.

0 commit comments

Comments
 (0)