Skip to content

Commit 1a83bb1

Browse files
committed
Use empty storage for empty tuple
1 parent 6393980 commit 1a83bb1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/object/PythonObjectFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
import com.oracle.graal.python.runtime.sequence.storage.ByteSequenceStorage;
127127
import com.oracle.graal.python.runtime.sequence.storage.CharSequenceStorage;
128128
import com.oracle.graal.python.runtime.sequence.storage.DoubleSequenceStorage;
129+
import com.oracle.graal.python.runtime.sequence.storage.EmptySequenceStorage;
129130
import com.oracle.graal.python.runtime.sequence.storage.IntSequenceStorage;
130131
import com.oracle.graal.python.runtime.sequence.storage.LongSequenceStorage;
131132
import com.oracle.graal.python.runtime.sequence.storage.SequenceStorage;
@@ -287,7 +288,7 @@ public final PTuple createEmptyTuple() {
287288
}
288289

289290
public final PTuple createEmptyTuple(LazyPythonClass cls) {
290-
return trace(new PTuple(cls, new Object[0]));
291+
return trace(new PTuple(cls, EmptySequenceStorage.INSTANCE));
291292
}
292293

293294
public final PTuple createTuple(Object[] objects) {

0 commit comments

Comments
 (0)