Skip to content

Commit 2b5fb63

Browse files
committed
style
1 parent fef26dc commit 2b5fb63

File tree

8 files changed

+31
-31
lines changed

8 files changed

+31
-31
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1938,7 +1938,7 @@ abstract static class GlobalsNode extends PythonBuiltinNode {
19381938

19391939
@Specialization
19401940
public Object globals(VirtualFrame frame,
1941-
@CachedLibrary(limit = "1") PythonObjectLibrary lib) {
1941+
@CachedLibrary(limit = "1") PythonObjectLibrary lib) {
19421942
PFrame callerFrame = readCallerFrameNode.executeWith(frame, 0);
19431943
PythonObject globals = callerFrame.getGlobals();
19441944
if (condProfile.profile(globals instanceof PythonModule)) {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/function/AbstractFunctionBuiltins.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ Object getModule(PBuiltinFunction self, Object value) {
236236
abstract static class DictNode extends PythonBinaryBuiltinNode {
237237
@Specialization(limit = "1")
238238
PNone dict(PFunction self, PHashingCollection mapping,
239-
@CachedLibrary("self") PythonObjectLibrary lib) {
239+
@CachedLibrary("self") PythonObjectLibrary lib) {
240240
try {
241241
lib.setDict(self, mapping);
242242
} catch (UnsupportedMessageException e) {
@@ -248,7 +248,7 @@ PNone dict(PFunction self, PHashingCollection mapping,
248248

249249
@Specialization(guards = "isNoValue(mapping)", limit = "1")
250250
Object dict(PFunction self, @SuppressWarnings("unused") PNone mapping,
251-
@CachedLibrary("self") PythonObjectLibrary lib) {
251+
@CachedLibrary("self") PythonObjectLibrary lib) {
252252
PHashingCollection dict = lib.getDict(self);
253253
if (dict == null) {
254254
dict = factory().createDictFixedStorage(self);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ protected boolean isBuiltinObjectExact(PythonObject self) {
572572

573573
@Specialization(guards = {"!isBuiltinObjectExact(self)", "!isClass(self)", "!isExactObjectInstance(self)", "isNoValue(none)"}, limit = "1")
574574
Object dict(PythonObject self, @SuppressWarnings("unused") PNone none,
575-
@CachedLibrary("self") PythonObjectLibrary lib) {
575+
@CachedLibrary("self") PythonObjectLibrary lib) {
576576
PHashingCollection dict = lib.getDict(self);
577577
if (dict == null) {
578578
dict = factory().createDictFixedStorage(self);
@@ -588,7 +588,7 @@ Object dict(PythonObject self, @SuppressWarnings("unused") PNone none,
588588

589589
@Specialization(guards = {"!isBuiltinObjectExact(self)", "!isClass(self)", "!isExactObjectInstance(self)"}, limit = "1")
590590
Object dict(PythonObject self, PDict dict,
591-
@CachedLibrary("self") PythonObjectLibrary lib) {
591+
@CachedLibrary("self") PythonObjectLibrary lib) {
592592
try {
593593
lib.setDict(self, dict);
594594
} catch (UnsupportedMessageException e) {

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public static Assumption getSingleContextAssumption() {
9595

9696
@Specialization(assumptions = "storingClassesInShapes")
9797
public static void setSingle(PythonObject self, PythonAbstractClass cls,
98-
@SuppressWarnings("unused") @Cached(value = "getSingleContextAssumption()", allowUncached = true) Assumption storingClassesInShapes) {
98+
@SuppressWarnings("unused") @Cached(value = "getSingleContextAssumption()", allowUncached = true) Assumption storingClassesInShapes) {
9999
self.storedPythonClass = cls;
100100
PythonObjectLayoutImpl.INSTANCE.setLazyPythonClass(self.storage, cls);
101101
}
@@ -177,17 +177,17 @@ public String toString() {
177177
public abstract static class HasDict {
178178
@Specialization(guards = {"receiver.getStorage().getShape() == cachedShape", "prop == null"}, assumptions = "layoutAssumption", limit = "1")
179179
public static boolean hasNoDict(PythonObject receiver,
180-
@Exclusive @Cached("receiver.getStorage().getShape()") Shape cachedShape,
181-
@Exclusive @Cached("cachedShape.getValidAssumption()") Assumption layoutAssumption,
182-
@Exclusive @Cached("cachedShape.getProperty(HAS_DICT)") Property prop) {
180+
@Exclusive @Cached("receiver.getStorage().getShape()") Shape cachedShape,
181+
@Exclusive @Cached("cachedShape.getValidAssumption()") Assumption layoutAssumption,
182+
@Exclusive @Cached("cachedShape.getProperty(HAS_DICT)") Property prop) {
183183
return false;
184184
}
185185

186186
@Specialization(guards = {"receiver.getStorage().getShape() == cachedShape", "prop != null"}, assumptions = "layoutAssumption", limit = "1")
187187
public static boolean hasDict(PythonObject receiver,
188-
@Exclusive @Cached("receiver.getStorage().getShape()") Shape cachedShape,
189-
@Exclusive @Cached("cachedShape.getValidAssumption()") Assumption layoutAssumption,
190-
@Exclusive @Cached("cachedShape.getProperty(HAS_DICT)") Property prop) {
188+
@Exclusive @Cached("receiver.getStorage().getShape()") Shape cachedShape,
189+
@Exclusive @Cached("cachedShape.getValidAssumption()") Assumption layoutAssumption,
190+
@Exclusive @Cached("cachedShape.getProperty(HAS_DICT)") Property prop) {
191191
return true;
192192
}
193193

@@ -203,9 +203,9 @@ public static boolean mayHaveDict(PythonObject receiver) {
203203
public abstract static class GetDict {
204204
@Specialization(guards = {"receiver.getStorage().getShape() == cachedShape", "prop == null"}, assumptions = "layoutAssumption", limit = "1")
205205
public static PHashingCollection getNoDict(PythonObject receiver,
206-
@Exclusive @Cached("receiver.getStorage().getShape()") Shape cachedShape,
207-
@Exclusive @Cached("cachedShape.getValidAssumption()") Assumption layoutAssumption,
208-
@Exclusive @Cached("cachedShape.getProperty(HAS_DICT)") Property prop) {
206+
@Exclusive @Cached("receiver.getStorage().getShape()") Shape cachedShape,
207+
@Exclusive @Cached("cachedShape.getValidAssumption()") Assumption layoutAssumption,
208+
@Exclusive @Cached("cachedShape.getProperty(HAS_DICT)") Property prop) {
209209
return null;
210210
}
211211

@@ -217,7 +217,7 @@ public static PHashingCollection getDict(PythonObject receiver) {
217217

218218
@ExportMessage
219219
public final void setDict(PHashingCollection dict,
220-
@Cached WriteAttributeToDynamicObjectNode writeNode) {
220+
@Cached WriteAttributeToDynamicObjectNode writeNode) {
221221
writeNode.execute(storage, HAS_DICT, true);
222222
this.dict = dict;
223223
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ Object base(LazyPythonClass self,
484484
abstract static class DictNode extends PythonUnaryBuiltinNode {
485485
@Specialization(limit = "1")
486486
Object doManaged(PythonManagedClass self,
487-
@CachedLibrary("self") PythonObjectLibrary lib) {
487+
@CachedLibrary("self") PythonObjectLibrary lib) {
488488
PHashingCollection dict = lib.getDict(self);
489489
if (dict == null) {
490490
dict = factory().createMappingproxy(self);

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/attributes/ReadAttributeFromObjectNode.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public static ReadAttributeFromObjectNode getUncachedForceType() {
9797
"!lib.hasDict(object) || isHiddenKey(key)"
9898
}, limit = "1")
9999
protected Object readFromDynamicStorage(PythonObject object, Object key,
100-
@SuppressWarnings("unused") @CachedLibrary("object") PythonObjectLibrary lib,
100+
@SuppressWarnings("unused") @CachedLibrary("object") PythonObjectLibrary lib,
101101
@Cached("create()") ReadAttributeFromDynamicObjectNode readAttributeFromDynamicObjectNode) {
102102
return readAttributeFromDynamicObjectNode.execute(object.getStorage(), key);
103103
}
@@ -121,7 +121,7 @@ private static Object readDirectlyFromBuiltinDict(PHashingCollection dict, Strin
121121
"hasBuiltinDict(cachedObject, lib, isBuiltinDict, isBuiltinMappingproxy)",
122122
}, assumptions = "singleContextAssumption", limit = "1")
123123
protected Object readFromBuiltinModuleDict(@SuppressWarnings("unused") PythonModule object, String key,
124-
@SuppressWarnings("unused") @CachedLibrary("object") PythonObjectLibrary lib,
124+
@SuppressWarnings("unused") @CachedLibrary("object") PythonObjectLibrary lib,
125125
@SuppressWarnings("unused") @Cached("object") PythonModule cachedObject,
126126
@SuppressWarnings("unused") @Cached("lib.getDict(cachedObject)") PHashingCollection cachedDict,
127127
@SuppressWarnings("unused") @Cached("singleContextAssumption()") Assumption singleContextAssumption,
@@ -135,7 +135,7 @@ protected Object readFromBuiltinModuleDict(@SuppressWarnings("unused") PythonMod
135135
// read from a builtin dict
136136
@Specialization(guards = {"!isHiddenKey(key)", "hasBuiltinDict(object, lib, isBuiltinDict, isBuiltinMappingproxy)"}, limit = "1")
137137
protected Object readFromBuiltinDict(PythonObject object, String key,
138-
@CachedLibrary("object") PythonObjectLibrary lib,
138+
@CachedLibrary("object") PythonObjectLibrary lib,
139139
@Cached HashingCollectionNodes.GetDictStorageNode getDictStorage,
140140
@SuppressWarnings("unused") @Cached IsBuiltinClassProfile isBuiltinDict,
141141
@SuppressWarnings("unused") @Cached IsBuiltinClassProfile isBuiltinMappingproxy,
@@ -147,9 +147,9 @@ protected Object readFromBuiltinDict(PythonObject object, String key,
147147
@Specialization(guards = {
148148
"!isHiddenKey(key)",
149149
"lib.hasDict(object)"
150-
}, replaces = {"readFromBuiltinDict", "readFromBuiltinModuleDict"}, limit = "1")
150+
}, replaces = {"readFromBuiltinDict", "readFromBuiltinModuleDict"}, limit = "1")
151151
protected Object readFromDict(PythonObject object, Object key,
152-
@CachedLibrary("object") PythonObjectLibrary lib,
152+
@CachedLibrary("object") PythonObjectLibrary lib,
153153
@Cached HashingCollectionNodes.GetDictStorageNode getDictStorage,
154154
@Cached("create()") HashingStorageNodes.GetItemInteropNode getItemNode) {
155155
Object value = getItemNode.passState().execute(getDictStorage.execute(lib.getDict(object)), key);

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/attributes/WriteAttributeToObjectNode.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ private static void handlePythonClass(ConditionProfile isClassProfile, PythonObj
108108
@Specialization(guards = {
109109
"isAttrWritable(exactBuiltinInstanceProfile, object, key)",
110110
"isHiddenKey(key) || !lib.hasDict(object)"
111-
}, limit = "1")
111+
}, limit = "1")
112112
protected boolean writeToDynamicStorage(PythonObject object, Object key, Object value,
113-
@CachedLibrary("object") @SuppressWarnings("unused") PythonObjectLibrary lib,
113+
@CachedLibrary("object") @SuppressWarnings("unused") PythonObjectLibrary lib,
114114
@Cached("create()") WriteAttributeToDynamicObjectNode writeAttributeToDynamicObjectNode,
115115
@Exclusive @Cached("createBinaryProfile()") ConditionProfile isClassProfile,
116116
@Exclusive @Cached @SuppressWarnings("unused") IsBuiltinClassProfile exactBuiltinInstanceProfile) {
@@ -122,9 +122,9 @@ protected boolean writeToDynamicStorage(PythonObject object, Object key, Object
122122
@Specialization(guards = {
123123
"!isHiddenKey(key)",
124124
"lib.hasDict(object)"
125-
}, limit = "1")
125+
}, limit = "1")
126126
protected boolean writeToDict(PythonObject object, Object key, Object value,
127-
@CachedLibrary("object") PythonObjectLibrary lib,
127+
@CachedLibrary("object") PythonObjectLibrary lib,
128128
@Cached BranchProfile updateStorage,
129129
@Cached HashingCollectionNodes.GetDictStorageNode getDictStorage,
130130
@Cached HashingStorageNodes.SetItemNode setItemNode,
@@ -151,7 +151,7 @@ private static boolean writeNativeGeneric(PythonAbstractNativeObject object, Obj
151151

152152
@Specialization(guards = "isErrorCase(exactBuiltinInstanceProfile, lib, object, key)")
153153
protected static boolean doError(Object object, Object key, @SuppressWarnings("unused") Object value,
154-
@CachedLibrary(limit = "1") @SuppressWarnings("unused") PythonObjectLibrary lib,
154+
@CachedLibrary(limit = "1") @SuppressWarnings("unused") PythonObjectLibrary lib,
155155
@Exclusive @Cached @SuppressWarnings("unused") IsBuiltinClassProfile exactBuiltinInstanceProfile,
156156
@Exclusive @Cached PRaiseNode raiseNode) {
157157
throw raiseNode.raise(PythonBuiltinClassType.AttributeError, "'%p' object has no attribute '%s'", object, key);
@@ -188,9 +188,9 @@ protected abstract static class WriteAttributeToObjectNotTypeUncachedNode extend
188188
@Specialization(guards = {
189189
"!isHiddenKey(key)",
190190
"lib.hasDict(object)"
191-
}, replaces = {"writeToDict"}, limit = "1")
191+
}, replaces = {"writeToDict"}, limit = "1")
192192
protected boolean writeToDictUncached(PythonObject object, Object key, Object value,
193-
@CachedLibrary("object") PythonObjectLibrary lib,
193+
@CachedLibrary("object") PythonObjectLibrary lib,
194194
@Cached LookupInheritedAttributeNode.Dynamic getSetItem,
195195
@Cached CallNode callSetItem,
196196
@Cached PRaiseNode raiseNode,

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/object/GetDictNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ Object dict(PDict self) {
6868

6969
@Specialization(limit = "1")
7070
Object dict(PythonModule self,
71-
@CachedLibrary("self") PythonObjectLibrary lib,
72-
@Cached PythonObjectFactory factory) {
71+
@CachedLibrary("self") PythonObjectLibrary lib,
72+
@Cached PythonObjectFactory factory) {
7373
PHashingCollection dict = lib.getDict(self);
7474
if (dict == null) {
7575
dict = factory.createDictFixedStorage(self);

0 commit comments

Comments
 (0)