Skip to content

Commit 831d643

Browse files
committed
Rename ListStorageType to StorageType
1 parent e2cb219 commit 831d643

19 files changed

+91
-94
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/cjkcodecs/MultibyteCodecUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2023, 2024, 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/modules/io/BufferedReaderMixinBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2024, 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/modules/io/BytesIOBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2024, 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/modules/io/IncrementalNewlineDecoderBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2024, 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/modules/io/RawIOBaseBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2024, 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/capi/transitions/CApiTransitions.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
import com.oracle.graal.python.runtime.PythonContext;
9595
import com.oracle.graal.python.runtime.sequence.storage.NativeSequenceStorage;
9696
import com.oracle.graal.python.runtime.sequence.storage.SequenceStorage;
97-
import com.oracle.graal.python.runtime.sequence.storage.SequenceStorage.ListStorageType;
97+
import com.oracle.graal.python.runtime.sequence.storage.SequenceStorage.StorageType;
9898
import com.oracle.graal.python.util.OverflowException;
9999
import com.oracle.graal.python.util.PythonUtils;
100100
import com.oracle.truffle.api.CompilerAsserts;
@@ -300,7 +300,7 @@ public String toString() {
300300
}
301301

302302
public static final class NativeStorageReference extends IdReference<NativeSequenceStorage> {
303-
private final ListStorageType type;
303+
private final SequenceStorage.StorageType type;
304304
private Object ptr;
305305
private int size;
306306

@@ -444,7 +444,7 @@ private static void processNativeObjectReference(NativeObjectReference reference
444444
* storage, then they will be freed by calling the element object's destructor.
445445
*/
446446
private static void processNativeStorageReference(NativeStorageReference reference) {
447-
if (reference.type == ListStorageType.Generic) {
447+
if (reference.type == StorageType.Generic) {
448448
PCallCapiFunction.callUncached(NativeCAPISymbol.FUN_PY_TRUFFLE_OBJECT_ARRAY_RELEASE, reference.ptr, reference.size);
449449
}
450450
freeNativeStorage(reference);

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

Lines changed: 55 additions & 58 deletions
Large diffs are not rendered by default.

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/bytecode/SequenceFromStackNode.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2022, 2024, 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
@@ -70,7 +70,7 @@
7070

7171
abstract class SequenceFromStackNode extends PNodeWithContext {
7272
@CompilationFinal protected final int length;
73-
@CompilationFinal protected SequenceStorage.ListStorageType type = SequenceStorage.ListStorageType.Uninitialized;
73+
@CompilationFinal protected SequenceStorage.StorageType type = SequenceStorage.StorageType.Uninitialized;
7474

7575
SequenceFromStackNode(int length) {
7676
this.length = length;
@@ -82,7 +82,7 @@ protected SequenceStorage createSequenceStorageForDirect(VirtualFrame frame, int
8282
CompilerAsserts.partialEvaluationConstant(stop);
8383

8484
SequenceStorage storage;
85-
if (type == SequenceStorage.ListStorageType.Uninitialized) {
85+
if (type == SequenceStorage.StorageType.Uninitialized) {
8686
CompilerDirectives.transferToInterpreterAndInvalidate();
8787
try {
8888
Object[] elements = new Object[length];
@@ -95,7 +95,7 @@ protected SequenceStorage createSequenceStorageForDirect(VirtualFrame frame, int
9595
} catch (Throwable t) {
9696
// we do not want to repeatedly deopt if a value execution
9797
// always raises, for example
98-
type = SequenceStorage.ListStorageType.Generic;
98+
type = SequenceStorage.StorageType.Generic;
9999
throw t;
100100
}
101101
} else {
@@ -188,7 +188,7 @@ protected SequenceStorage createSequenceStorageForDirect(VirtualFrame frame, int
188188
}
189189

190190
private SequenceStorage genericFallback(VirtualFrame frame, Object array, int start, int stop, int count, Object result) {
191-
type = SequenceStorage.ListStorageType.Generic;
191+
type = SequenceStorage.StorageType.Generic;
192192
Object[] elements = new Object[getCapacityEstimate()];
193193
int j = 0;
194194
for (; j < count; j++) {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/sequence/storage/BoolSequenceStorage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public void setInternalArrayObject(Object arrayObject) {
187187
}
188188

189189
@Override
190-
public ListStorageType getElementType() {
191-
return ListStorageType.Boolean;
190+
public StorageType getElementType() {
191+
return StorageType.Boolean;
192192
}
193193
}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/sequence/storage/ByteSequenceStorage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ public void setInternalArrayObject(Object arrayObject) {
220220
}
221221

222222
@Override
223-
public ListStorageType getElementType() {
224-
return ListStorageType.Byte;
223+
public StorageType getElementType() {
224+
return StorageType.Byte;
225225
}
226226

227227
@ExportMessage

0 commit comments

Comments
 (0)