Skip to content

Commit f53e228

Browse files
committed
minor - adjusting dictXXXiterator class, enum and method names to the iterators correct class name
1 parent ef9afca commit f53e228

File tree

11 files changed

+37
-34
lines changed

11 files changed

+37
-34
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/PythonBuiltinClassType.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ public enum PythonBuiltinClassType implements LazyPythonClass {
7070
PComplex("complex", BuiltinNames.BUILTINS),
7171
PDict("dict", BuiltinNames.BUILTINS),
7272
PDictKeysView(BuiltinNames.DICT_KEYS),
73-
PDictItemsIterator(BuiltinNames.DICT_ITEMITERATOR),
73+
PDictItemIterator(BuiltinNames.DICT_ITEMITERATOR),
7474
PDictItemsView(BuiltinNames.DICT_ITEMS),
75-
PDictKeysIterator(BuiltinNames.DICT_KEYITERATOR),
76-
PDictValuesIterator(BuiltinNames.DICT_VALUEITERATOR),
75+
PDictKeyIterator(BuiltinNames.DICT_KEYITERATOR),
76+
PDictValueIterator(BuiltinNames.DICT_VALUEITERATOR),
7777
PDictValuesView(BuiltinNames.DICT_VALUES),
7878
PEllipsis("ellipsis"),
7979
PEnumerate("enumerate", BuiltinNames.BUILTINS),

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2686,7 +2686,7 @@ public Object dictKeys(Object args, Object kwargs) {
26862686
}
26872687
}
26882688

2689-
@Builtin(name = DICT_KEYITERATOR, takesVarArgs = true, takesVarKeywordArgs = true, constructsClass = PythonBuiltinClassType.PDictKeysIterator, isPublic = false)
2689+
@Builtin(name = DICT_KEYITERATOR, takesVarArgs = true, takesVarKeywordArgs = true, constructsClass = PythonBuiltinClassType.PDictKeyIterator, isPublic = false)
26902690
@GenerateNodeFactory
26912691
public abstract static class DictKeysIteratorTypeNode extends PythonBuiltinNode {
26922692
@SuppressWarnings("unused")
@@ -2706,7 +2706,7 @@ public Object dictKeys(Object args, Object kwargs) {
27062706
}
27072707
}
27082708

2709-
@Builtin(name = DICT_VALUEITERATOR, takesVarArgs = true, takesVarKeywordArgs = true, constructsClass = PythonBuiltinClassType.PDictValuesIterator, isPublic = false)
2709+
@Builtin(name = DICT_VALUEITERATOR, takesVarArgs = true, takesVarKeywordArgs = true, constructsClass = PythonBuiltinClassType.PDictValueIterator, isPublic = false)
27102710
@GenerateNodeFactory
27112711
public abstract static class DictValuesIteratorTypeNode extends PythonBuiltinNode {
27122712
@SuppressWarnings("unused")
@@ -2726,7 +2726,7 @@ public Object dictKeys(Object args, Object kwargs) {
27262726
}
27272727
}
27282728

2729-
@Builtin(name = DICT_ITEMITERATOR, takesVarArgs = true, takesVarKeywordArgs = true, constructsClass = PythonBuiltinClassType.PDictItemsIterator, isPublic = false)
2729+
@Builtin(name = DICT_ITEMITERATOR, takesVarArgs = true, takesVarKeywordArgs = true, constructsClass = PythonBuiltinClassType.PDictItemIterator, isPublic = false)
27302730
@GenerateNodeFactory
27312731
public abstract static class DictItemsIteratorTypeNode extends PythonBuiltinNode {
27322732
@SuppressWarnings("unused")

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/dict/DictBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ Object run(VirtualFrame frame, PDict self, Object key,
350350
public abstract static class IterNode extends PythonUnaryBuiltinNode {
351351
@Specialization
352352
Object run(PDict self) {
353-
return factory().createDictKeysIterator(self);
353+
return factory().createDictKeyIterator(self);
354354
}
355355
}
356356

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/dict/DictItemsIteratorBuiltins.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import com.oracle.graal.python.builtins.PythonBuiltinClassType;
3636
import com.oracle.graal.python.builtins.PythonBuiltins;
3737
import com.oracle.graal.python.builtins.objects.common.HashingStorage.DictEntry;
38-
import com.oracle.graal.python.builtins.objects.dict.PDictView.PDictItemsIterator;
38+
import com.oracle.graal.python.builtins.objects.dict.PDictView.PDictItemIterator;
3939
import com.oracle.graal.python.builtins.objects.object.PythonBuiltinObject;
4040
import com.oracle.graal.python.nodes.function.PythonBuiltinBaseNode;
4141
import com.oracle.graal.python.nodes.function.builtins.PythonUnaryBuiltinNode;
@@ -47,7 +47,7 @@
4747
import com.oracle.truffle.api.dsl.Specialization;
4848
import com.oracle.truffle.api.profiles.ConditionProfile;
4949

50-
@CoreFunctions(extendClasses = PythonBuiltinClassType.PDictItemsIterator)
50+
@CoreFunctions(extendClasses = PythonBuiltinClassType.PDictItemIterator)
5151
public final class DictItemsIteratorBuiltins extends PythonBuiltins {
5252

5353
@Override
@@ -59,7 +59,7 @@ protected List<? extends NodeFactory<? extends PythonBuiltinBaseNode>> getNodeFa
5959
@GenerateNodeFactory
6060
public abstract static class NextNode extends PythonUnaryBuiltinNode {
6161
@Specialization
62-
Object run(PDictItemsIterator self,
62+
Object run(PDictItemIterator self,
6363
@Cached("createBinaryProfile()") ConditionProfile profile) {
6464
if (profile.profile(hasNext(self))) {
6565
DictEntry value = next(self);
@@ -69,12 +69,12 @@ Object run(PDictItemsIterator self,
6969
}
7070

7171
@TruffleBoundary
72-
private static DictEntry next(PDictItemsIterator self) {
72+
private static DictEntry next(PDictItemIterator self) {
7373
return self.getIterator().next();
7474
}
7575

7676
@TruffleBoundary
77-
private static boolean hasNext(PDictItemsIterator self) {
77+
private static boolean hasNext(PDictItemIterator self) {
7878
return self.getIterator().hasNext();
7979
}
8080
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/dict/DictKeysIteratorBuiltins.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import com.oracle.graal.python.builtins.CoreFunctions;
3535
import com.oracle.graal.python.builtins.PythonBuiltinClassType;
3636
import com.oracle.graal.python.builtins.PythonBuiltins;
37-
import com.oracle.graal.python.builtins.objects.dict.PDictView.PDictKeysIterator;
37+
import com.oracle.graal.python.builtins.objects.dict.PDictView.PDictKeyIterator;
3838
import com.oracle.graal.python.builtins.objects.object.PythonBuiltinObject;
3939
import com.oracle.graal.python.nodes.function.PythonBuiltinBaseNode;
4040
import com.oracle.graal.python.nodes.function.builtins.PythonUnaryBuiltinNode;
@@ -45,7 +45,7 @@
4545
import com.oracle.truffle.api.dsl.Specialization;
4646
import com.oracle.truffle.api.profiles.ConditionProfile;
4747

48-
@CoreFunctions(extendClasses = PythonBuiltinClassType.PDictKeysIterator)
48+
@CoreFunctions(extendClasses = PythonBuiltinClassType.PDictKeyIterator)
4949
public final class DictKeysIteratorBuiltins extends PythonBuiltins {
5050

5151
@Override
@@ -57,7 +57,7 @@ protected List<? extends NodeFactory<? extends PythonBuiltinBaseNode>> getNodeFa
5757
@GenerateNodeFactory
5858
public abstract static class NextNode extends PythonUnaryBuiltinNode {
5959
@Specialization
60-
Object run(PDictKeysIterator self,
60+
Object run(PDictKeyIterator self,
6161
@Cached("createBinaryProfile()") ConditionProfile profile) {
6262
if (profile.profile(self.getIterator().hasNext())) {
6363
return self.getIterator().next();

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/dict/DictValuesBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public abstract static class IterNode extends PythonUnaryBuiltinNode {
7777
Object doPDictValuesView(PDictValuesView self,
7878
@Cached HashingCollectionNodes.GetDictStorageNode getStore,
7979
@CachedLibrary("getStore.execute(self.getWrappedDict())") HashingStorageLibrary lib) {
80-
return factory().createDictValuesIterator(lib.values(getStore.execute(self.getWrappedDict())).iterator());
80+
return factory().createDictValueIterator(lib.values(getStore.execute(self.getWrappedDict())).iterator());
8181
}
8282
}
8383

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/dict/DictValuesIteratorBuiltins.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import com.oracle.graal.python.builtins.CoreFunctions;
3535
import com.oracle.graal.python.builtins.PythonBuiltinClassType;
3636
import com.oracle.graal.python.builtins.PythonBuiltins;
37-
import com.oracle.graal.python.builtins.objects.dict.PDictView.PDictValuesIterator;
37+
import com.oracle.graal.python.builtins.objects.dict.PDictView.PDictValueIterator;
3838
import com.oracle.graal.python.builtins.objects.object.PythonBuiltinObject;
3939
import com.oracle.graal.python.nodes.function.PythonBuiltinBaseNode;
4040
import com.oracle.graal.python.nodes.function.builtins.PythonUnaryBuiltinNode;
@@ -45,7 +45,7 @@
4545
import com.oracle.truffle.api.dsl.Specialization;
4646
import com.oracle.truffle.api.profiles.ConditionProfile;
4747

48-
@CoreFunctions(extendClasses = PythonBuiltinClassType.PDictValuesIterator)
48+
@CoreFunctions(extendClasses = PythonBuiltinClassType.PDictValueIterator)
4949
public final class DictValuesIteratorBuiltins extends PythonBuiltins {
5050

5151
@Override
@@ -57,7 +57,7 @@ protected List<? extends NodeFactory<? extends PythonBuiltinBaseNode>> getNodeFa
5757
@GenerateNodeFactory
5858
public abstract static class NextNode extends PythonUnaryBuiltinNode {
5959
@Specialization
60-
Object run(PDictValuesIterator self,
60+
Object run(PDictValueIterator self,
6161
@Cached("createBinaryProfile()") ConditionProfile profile) {
6262
if (profile.profile(self.getIterator().hasNext())) {
6363
return self.getIterator().next();

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/dict/DictViewBuiltins.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,14 @@ Object len(PDictView self) {
120120
public abstract static class IterNode extends PythonUnaryBuiltinNode {
121121
@Specialization
122122
Object getKeysViewIter(PDictKeysView self) {
123-
return factory().createDictKeysIterator(self.getWrappedDict());
123+
return factory().createDictKeyIterator(self.getWrappedDict());
124124
}
125125

126126
@Specialization(limit = "getCallSiteInlineCacheMaxDepth()")
127127
Object getItemsViewIter(PDictItemsView self,
128128
@Cached HashingCollectionNodes.GetDictStorageNode getStore,
129129
@CachedLibrary("getStore.execute(self.getWrappedDict())") HashingStorageLibrary lib) {
130-
return factory().createDictItemsIterator(lib.entries(getStore.execute(self.getWrappedDict())).iterator());
130+
return factory().createDictItemIterator(lib.entries(getStore.execute(self.getWrappedDict())).iterator());
131131
}
132132
}
133133

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/dict/PDictView.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ public int size() {
7070
// the keys
7171
//
7272
// -----------------------------------------------------------------------------------------------------------------
73-
public static final class PDictKeysIterator extends PHashingStorageIterator<Object> {
74-
public PDictKeysIterator(Object clazz, DynamicObject storage, PHashingCollection dict) {
73+
public static final class PDictKeyIterator extends PHashingStorageIterator<Object> {
74+
public PDictKeyIterator(Object clazz, DynamicObject storage, PHashingCollection dict) {
7575
super(clazz, storage, dict.keys().iterator());
7676
}
7777
}
@@ -88,8 +88,8 @@ public PDictKeysView(Object clazz, DynamicObject storage, PHashingCollection dic
8888
// the values
8989
//
9090
// -----------------------------------------------------------------------------------------------------------------
91-
public static final class PDictValuesIterator extends PHashingStorageIterator<Object> {
92-
public PDictValuesIterator(Object clazz, DynamicObject storage, HashingStorageIterator<Object> iterator) {
91+
public static final class PDictValueIterator extends PHashingStorageIterator<Object> {
92+
public PDictValueIterator(Object clazz, DynamicObject storage, HashingStorageIterator<Object> iterator) {
9393
super(clazz, storage, iterator);
9494
}
9595
}
@@ -106,8 +106,8 @@ public PDictValuesView(Object clazz, DynamicObject storage, PHashingCollection d
106106
// the items
107107
//
108108
// -----------------------------------------------------------------------------------------------------------------
109-
public static final class PDictItemsIterator extends PHashingStorageIterator<DictEntry> {
110-
public PDictItemsIterator(Object clazz, DynamicObject storage, HashingStorageIterator<DictEntry> iterator) {
109+
public static final class PDictItemIterator extends PHashingStorageIterator<DictEntry> {
110+
public PDictItemIterator(Object clazz, DynamicObject storage, HashingStorageIterator<DictEntry> iterator) {
111111
super(clazz, storage, iterator);
112112
}
113113
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/mappingproxy/MappingproxyBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Object doPMappingproxy(PMappingproxy self, Object mapping) {
8888
public abstract static class IterNode extends PythonUnaryBuiltinNode {
8989
@Specialization
9090
Object run(PMappingproxy self) {
91-
return factory().createDictKeysIterator(self);
91+
return factory().createDictKeyIterator(self);
9292
}
9393
}
9494

0 commit comments

Comments
 (0)