FIR: Add missing iterator function to array types in IrBuiltInsOverFir
Fixes part of KT-57627
This commit is contained in:
committed by
Space Team
parent
c695da1bed
commit
37bbf447a3
@@ -206,10 +206,13 @@ class IrBuiltInsOverFir(
|
||||
IrConstructorCallImpl.Companion.fromSymbolOwner(intrinsicConst.defaultType, constructor)
|
||||
}
|
||||
|
||||
private val iterator by loadClass(StandardClassIds.Iterator)
|
||||
override val iteratorClass: IrClassSymbol get() = iterator.klass
|
||||
|
||||
private val array by createClass(kotlinIrPackage, IdSignatureValues.array) {
|
||||
configureSuperTypes()
|
||||
val typeParameter = addTypeParameter("T", anyNType)
|
||||
addArrayMembers(typeParameter.defaultType)
|
||||
addArrayMembers(typeParameter.defaultType, iteratorClass.typeWith(typeParameter.defaultType))
|
||||
finalizeClassDefinition()
|
||||
}
|
||||
override val arrayClass: IrClassSymbol get() = array.klass
|
||||
@@ -234,8 +237,6 @@ class IrBuiltInsOverFir(
|
||||
|
||||
private val iterable by loadClass(StandardClassIds.Iterable)
|
||||
override val iterableClass: IrClassSymbol get() = iterable.klass
|
||||
private val iterator by loadClass(StandardClassIds.Iterator)
|
||||
override val iteratorClass: IrClassSymbol get() = iterator.klass
|
||||
private val listIterator by loadClass(StandardClassIds.ListIterator)
|
||||
override val listIteratorClass: IrClassSymbol get() = listIterator.klass
|
||||
private val mutableCollection by loadClass(StandardClassIds.MutableCollection)
|
||||
@@ -323,14 +324,26 @@ class IrBuiltInsOverFir(
|
||||
else -> intType
|
||||
}
|
||||
|
||||
private val _booleanArray by createPrimitiveArrayClass(kotlinIrPackage, PrimitiveType.BOOLEAN)
|
||||
private val _charArray by createPrimitiveArrayClass(kotlinIrPackage, PrimitiveType.CHAR)
|
||||
private val _byteArray by createPrimitiveArrayClass(kotlinIrPackage, PrimitiveType.BYTE)
|
||||
private val _shortArray by createPrimitiveArrayClass(kotlinIrPackage, PrimitiveType.SHORT)
|
||||
private val _intArray by createPrimitiveArrayClass(kotlinIrPackage, PrimitiveType.INT)
|
||||
private val _longArray by createPrimitiveArrayClass(kotlinIrPackage, PrimitiveType.LONG)
|
||||
private val _floatArray by createPrimitiveArrayClass(kotlinIrPackage, PrimitiveType.FLOAT)
|
||||
private val _doubleArray by createPrimitiveArrayClass(kotlinIrPackage, PrimitiveType.DOUBLE)
|
||||
private fun primitiveIterator(primitiveType: PrimitiveType) =
|
||||
loadClass(ClassId(StandardClassIds.BASE_COLLECTIONS_PACKAGE, Name.identifier("${primitiveType.typeName}Iterator")))
|
||||
|
||||
private val booleanIterator by primitiveIterator(PrimitiveType.BOOLEAN)
|
||||
private val charIterator by primitiveIterator(PrimitiveType.CHAR)
|
||||
private val byteIterator by primitiveIterator(PrimitiveType.BYTE)
|
||||
private val shortIterator by primitiveIterator(PrimitiveType.SHORT)
|
||||
private val intIterator by primitiveIterator(PrimitiveType.INT)
|
||||
private val longIterator by primitiveIterator(PrimitiveType.LONG)
|
||||
private val floatIterator by primitiveIterator(PrimitiveType.FLOAT)
|
||||
private val doubleIterator by primitiveIterator(PrimitiveType.DOUBLE)
|
||||
|
||||
private val _booleanArray by createPrimitiveArrayClass(kotlinIrPackage, PrimitiveType.BOOLEAN, booleanIterator)
|
||||
private val _charArray by createPrimitiveArrayClass(kotlinIrPackage, PrimitiveType.CHAR, charIterator)
|
||||
private val _byteArray by createPrimitiveArrayClass(kotlinIrPackage, PrimitiveType.BYTE, byteIterator)
|
||||
private val _shortArray by createPrimitiveArrayClass(kotlinIrPackage, PrimitiveType.SHORT, shortIterator)
|
||||
private val _intArray by createPrimitiveArrayClass(kotlinIrPackage, PrimitiveType.INT, intIterator)
|
||||
private val _longArray by createPrimitiveArrayClass(kotlinIrPackage, PrimitiveType.LONG, longIterator)
|
||||
private val _floatArray by createPrimitiveArrayClass(kotlinIrPackage, PrimitiveType.FLOAT, floatIterator)
|
||||
private val _doubleArray by createPrimitiveArrayClass(kotlinIrPackage, PrimitiveType.DOUBLE, doubleIterator)
|
||||
|
||||
override val booleanArray: IrClassSymbol get() = _booleanArray.klass
|
||||
override val charArray: IrClassSymbol get() = _charArray.klass
|
||||
@@ -921,7 +934,7 @@ class IrBuiltInsOverFir(
|
||||
return components.symbolTable.declareSimpleFunction(signature, { IrSimpleFunctionPublicSymbolImpl(signature, null) }, ::makeWithSymbol)
|
||||
}
|
||||
|
||||
private fun IrClass.addArrayMembers(elementType: IrType) {
|
||||
private fun IrClass.addArrayMembers(elementType: IrType, iteratorType: IrType) {
|
||||
addConstructor {
|
||||
origin = object : IrDeclarationOriginImpl("BUILTIN_CLASS_CONSTRUCTOR") {}
|
||||
returnType = defaultType
|
||||
@@ -932,6 +945,7 @@ class IrBuiltInsOverFir(
|
||||
createMemberFunction(OperatorNameConventions.GET, elementType, "index" to intType, isOperator = true, isIntrinsicConst = false)
|
||||
createMemberFunction(OperatorNameConventions.SET, unitType, "index" to intType, "value" to elementType, isOperator = true, isIntrinsicConst = false)
|
||||
createProperty("size", intType)
|
||||
createMemberFunction(OperatorNameConventions.ITERATOR, iteratorType, isOperator = true)
|
||||
}
|
||||
|
||||
private fun IrClass.createProperty(
|
||||
@@ -1064,7 +1078,7 @@ class IrBuiltInsOverFir(
|
||||
private fun createPrimitiveArrayClass(
|
||||
parent: IrDeclarationParent,
|
||||
primitiveType: PrimitiveType,
|
||||
lazyContents: (IrClass.() -> Unit)? = null
|
||||
primitiveIterator: BuiltInClassValue
|
||||
) =
|
||||
createClass(
|
||||
parent,
|
||||
@@ -1072,8 +1086,8 @@ class IrBuiltInsOverFir(
|
||||
build = { modality = Modality.FINAL }
|
||||
) {
|
||||
configureSuperTypes()
|
||||
addArrayMembers(primitiveTypeToIrType[primitiveType]!!)
|
||||
lazyContents?.invoke(this)
|
||||
primitiveIterator.ensureLazyContentsCreated()
|
||||
addArrayMembers(primitiveTypeToIrType[primitiveType]!!, primitiveIterator.type)
|
||||
finalizeClassDefinition()
|
||||
}
|
||||
|
||||
|
||||
+6
@@ -3102,6 +3102,12 @@ public class FirLightTreeJvmIrTextTestGenerated extends AbstractFirLightTreeJvmI
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/stubs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("arraysFromBuiltins.kt")
|
||||
public void testArraysFromBuiltins() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/stubs/arraysFromBuiltins.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("builtinMap.kt")
|
||||
public void testBuiltinMap() throws Exception {
|
||||
|
||||
compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java
Generated
+6
@@ -3102,6 +3102,12 @@ public class FirPsiJvmIrTextTestGenerated extends AbstractFirPsiJvmIrTextTest {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/stubs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("arraysFromBuiltins.kt")
|
||||
public void testArraysFromBuiltins() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/stubs/arraysFromBuiltins.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("builtinMap.kt")
|
||||
public void testBuiltinMap() throws Exception {
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Array modality:FINAL visibility:public superTypes:[kotlin.Any; kotlin.Cloneable; java.io.Serializable]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:kotlin.Array<T of kotlin.Array>
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
|
||||
CONSTRUCTOR BUILTIN_CLASS_CONSTRUCTOR visibility:public <> (size:kotlin.Int) returnType:kotlin.Array [primary]
|
||||
VALUE_PARAMETER BUILTIN_CLASS_CONSTRUCTOR name:size index:0 type:kotlin.Int
|
||||
FUN BUILTIN_CLASS_METHOD name:get visibility:public modality:FINAL <> ($this:kotlin.Array, index:kotlin.Int) returnType:T of kotlin.Array [operator]
|
||||
$this: VALUE_PARAMETER name:$this type:kotlin.Array
|
||||
VALUE_PARAMETER BUILTIN_CLASS_METHOD name:index index:0 type:kotlin.Int
|
||||
FUN BUILTIN_CLASS_METHOD name:set visibility:public modality:FINAL <> ($this:kotlin.Array, index:kotlin.Int, value:T of kotlin.Array) returnType:kotlin.Unit [operator]
|
||||
$this: VALUE_PARAMETER name:$this type:kotlin.Array
|
||||
VALUE_PARAMETER BUILTIN_CLASS_METHOD name:index index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER BUILTIN_CLASS_METHOD name:value index:1 type:T of kotlin.Array
|
||||
PROPERTY name:size visibility:public modality:FINAL [val]
|
||||
FUN name:<get-size> visibility:public modality:FINAL <> ($this:kotlin.Array) returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY name:size visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:$this type:kotlin.Array
|
||||
FUN BUILTIN_CLASS_METHOD name:iterator visibility:public modality:FINAL <> ($this:kotlin.Array) returnType:kotlin.collections.Iterator<T of kotlin.Array> [operator]
|
||||
annotations:
|
||||
IntrinsicConstEvaluation
|
||||
$this: VALUE_PARAMETER name:$this type:kotlin.Array
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:$this type:kotlin.Any
|
||||
VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:$this type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:$this type:kotlin.Any
|
||||
@@ -0,0 +1,39 @@
|
||||
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Array modality:FINAL visibility:public superTypes:[kotlin.Any; kotlin.Cloneable; java.io.Serializable]
|
||||
$this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:<this> type:kotlin.Array<T of kotlin.Array>
|
||||
TYPE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
|
||||
CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public <> (size:kotlin.Int, init:kotlin.Function1<kotlin.Int, T of kotlin.Array>) returnType:kotlin.Array<T of kotlin.Array>
|
||||
VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:size index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:init index:1 type:kotlin.Function1<kotlin.Int, T of kotlin.Array>
|
||||
PROPERTY IR_EXTERNAL_DECLARATION_STUB name:size visibility:public modality:FINAL [val]
|
||||
FUN IR_EXTERNAL_DECLARATION_STUB name:<get-size> visibility:public modality:FINAL <> ($this:kotlin.Array<T of kotlin.Array>) returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY IR_EXTERNAL_DECLARATION_STUB name:size visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:<this> type:kotlin.Array<T of kotlin.Array>
|
||||
FUN IR_EXTERNAL_DECLARATION_STUB name:clone visibility:public modality:OPEN <> ($this:kotlin.Array<T of kotlin.Array>) returnType:kotlin.Array<T of kotlin.Array>
|
||||
overridden:
|
||||
protected open fun clone (): kotlin.Any declared in kotlin.Cloneable
|
||||
$this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:<this> type:kotlin.Array<T of kotlin.Array>
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Cloneable
|
||||
$this: VALUE_PARAMETER FAKE_OVERRIDE name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any?
|
||||
FUN IR_EXTERNAL_DECLARATION_STUB name:get visibility:public modality:FINAL <> ($this:kotlin.Array<T of kotlin.Array>, index:kotlin.Int) returnType:T of kotlin.Array [operator]
|
||||
$this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:<this> type:kotlin.Array<T of kotlin.Array>
|
||||
VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:index index:0 type:kotlin.Int
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.Cloneable
|
||||
$this: VALUE_PARAMETER FAKE_OVERRIDE name:<this> type:kotlin.Any
|
||||
FUN IR_EXTERNAL_DECLARATION_STUB name:iterator visibility:public modality:FINAL <> ($this:kotlin.Array<T of kotlin.Array>) returnType:kotlin.collections.Iterator<T of kotlin.Array> [operator]
|
||||
$this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:<this> type:kotlin.Array<T of kotlin.Array>
|
||||
FUN IR_EXTERNAL_DECLARATION_STUB name:set visibility:public modality:FINAL <> ($this:kotlin.Array<T of kotlin.Array>, index:kotlin.Int, value:T of kotlin.Array) returnType:kotlin.Unit [operator]
|
||||
$this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:<this> type:kotlin.Array<T of kotlin.Array>
|
||||
VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:index index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:value index:1 type:T of kotlin.Array
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
public open fun toString (): kotlin.String [fake_override] declared in kotlin.Cloneable
|
||||
$this: VALUE_PARAMETER FAKE_OVERRIDE name:<this> type:kotlin.Any
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:IntArray modality:FINAL visibility:public superTypes:[kotlin.Any; kotlin.Cloneable; java.io.Serializable]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:kotlin.IntArray
|
||||
CONSTRUCTOR BUILTIN_CLASS_CONSTRUCTOR visibility:public <> (size:kotlin.Int) returnType:kotlin.IntArray [primary]
|
||||
VALUE_PARAMETER BUILTIN_CLASS_CONSTRUCTOR name:size index:0 type:kotlin.Int
|
||||
FUN BUILTIN_CLASS_METHOD name:get visibility:public modality:FINAL <> ($this:kotlin.IntArray, index:kotlin.Int) returnType:kotlin.Int [operator]
|
||||
$this: VALUE_PARAMETER name:$this type:kotlin.IntArray
|
||||
VALUE_PARAMETER BUILTIN_CLASS_METHOD name:index index:0 type:kotlin.Int
|
||||
FUN BUILTIN_CLASS_METHOD name:set visibility:public modality:FINAL <> ($this:kotlin.IntArray, index:kotlin.Int, value:kotlin.Int) returnType:kotlin.Unit [operator]
|
||||
$this: VALUE_PARAMETER name:$this type:kotlin.IntArray
|
||||
VALUE_PARAMETER BUILTIN_CLASS_METHOD name:index index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER BUILTIN_CLASS_METHOD name:value index:1 type:kotlin.Int
|
||||
PROPERTY name:size visibility:public modality:FINAL [val]
|
||||
FUN name:<get-size> visibility:public modality:FINAL <> ($this:kotlin.IntArray) returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY name:size visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:$this type:kotlin.IntArray
|
||||
FUN BUILTIN_CLASS_METHOD name:iterator visibility:public modality:FINAL <> ($this:kotlin.IntArray) returnType:kotlin.collections.IntIterator [operator]
|
||||
annotations:
|
||||
IntrinsicConstEvaluation
|
||||
$this: VALUE_PARAMETER name:$this type:kotlin.IntArray
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:$this type:kotlin.Any
|
||||
VALUE_PARAMETER BUILTIN_CLASS_METHOD name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:$this type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:$this type:kotlin.Any
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:IntArray modality:FINAL visibility:public superTypes:[kotlin.Any; kotlin.Cloneable; java.io.Serializable]
|
||||
$this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:<this> type:kotlin.IntArray
|
||||
CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public <> (size:kotlin.Int, init:kotlin.Function1<kotlin.Int, kotlin.Int>) returnType:kotlin.IntArray
|
||||
VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:size index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:init index:1 type:kotlin.Function1<kotlin.Int, kotlin.Int>
|
||||
CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public <> (size:kotlin.Int) returnType:kotlin.IntArray [primary]
|
||||
VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:size index:0 type:kotlin.Int
|
||||
PROPERTY IR_EXTERNAL_DECLARATION_STUB name:size visibility:public modality:FINAL [val]
|
||||
FUN IR_EXTERNAL_DECLARATION_STUB name:<get-size> visibility:public modality:FINAL <> ($this:kotlin.IntArray) returnType:kotlin.Int
|
||||
correspondingProperty: PROPERTY IR_EXTERNAL_DECLARATION_STUB name:size visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:<this> type:kotlin.IntArray
|
||||
FUN IR_EXTERNAL_DECLARATION_STUB name:clone visibility:public modality:OPEN <> ($this:kotlin.IntArray) returnType:kotlin.IntArray
|
||||
overridden:
|
||||
protected open fun clone (): kotlin.Any declared in kotlin.Cloneable
|
||||
$this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:<this> type:kotlin.IntArray
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.Cloneable
|
||||
$this: VALUE_PARAMETER FAKE_OVERRIDE name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any?
|
||||
FUN IR_EXTERNAL_DECLARATION_STUB name:get visibility:public modality:FINAL <> ($this:kotlin.IntArray, index:kotlin.Int) returnType:kotlin.Int [operator]
|
||||
$this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:<this> type:kotlin.IntArray
|
||||
VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:index index:0 type:kotlin.Int
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.Cloneable
|
||||
$this: VALUE_PARAMETER FAKE_OVERRIDE name:<this> type:kotlin.Any
|
||||
FUN IR_EXTERNAL_DECLARATION_STUB name:iterator visibility:public modality:FINAL <> ($this:kotlin.IntArray) returnType:kotlin.collections.IntIterator [operator]
|
||||
$this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:<this> type:kotlin.IntArray
|
||||
FUN IR_EXTERNAL_DECLARATION_STUB name:set visibility:public modality:FINAL <> ($this:kotlin.IntArray, index:kotlin.Int, value:kotlin.Int) returnType:kotlin.Unit [operator]
|
||||
$this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:<this> type:kotlin.IntArray
|
||||
VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:index index:0 type:kotlin.Int
|
||||
VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:value index:1 type:kotlin.Int
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
public open fun toString (): kotlin.String [fake_override] declared in kotlin.Cloneable
|
||||
$this: VALUE_PARAMETER FAKE_OVERRIDE name:<this> type:kotlin.Any
|
||||
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:IntIterator modality:ABSTRACT visibility:public superTypes:[kotlin.collections.Iterator<kotlin.Int>]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:kotlin.collections.IntIterator
|
||||
CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public <> () returnType:kotlin.collections.IntIterator [primary]
|
||||
FUN IR_EXTERNAL_DECLARATION_STUB name:next visibility:public modality:FINAL <> ($this:kotlin.collections.IntIterator) returnType:kotlin.Int [operator]
|
||||
overridden:
|
||||
public abstract fun next (): T of kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterator
|
||||
$this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:<this> type:kotlin.collections.IntIterator
|
||||
FUN IR_EXTERNAL_DECLARATION_STUB name:nextInt visibility:public modality:ABSTRACT <> ($this:kotlin.collections.IntIterator) returnType:kotlin.Int
|
||||
$this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:<this> type:kotlin.collections.IntIterator
|
||||
FUN FAKE_OVERRIDE name:hasNext visibility:public modality:ABSTRACT <> ($this:kotlin.collections.IntIterator) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator
|
||||
$this: VALUE_PARAMETER FAKE_OVERRIDE name:<this> type:kotlin.collections.IntIterator
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.collections.IntIterator, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.Iterator
|
||||
$this: VALUE_PARAMETER FAKE_OVERRIDE name:<this> type:kotlin.collections.IntIterator
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.collections.IntIterator) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.collections.Iterator
|
||||
$this: VALUE_PARAMETER FAKE_OVERRIDE name:<this> type:kotlin.collections.IntIterator
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.collections.IntIterator) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String [fake_override] declared in kotlin.collections.Iterator
|
||||
$this: VALUE_PARAMETER FAKE_OVERRIDE name:<this> type:kotlin.collections.IntIterator
|
||||
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:IntIterator modality:ABSTRACT visibility:public superTypes:[kotlin.collections.Iterator<kotlin.Int>]
|
||||
$this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:<this> type:kotlin.collections.IntIterator
|
||||
CONSTRUCTOR IR_EXTERNAL_DECLARATION_STUB visibility:public <> () returnType:kotlin.collections.IntIterator [primary]
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.Iterator
|
||||
$this: VALUE_PARAMETER FAKE_OVERRIDE name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hasNext visibility:public modality:ABSTRACT <> ($this:kotlin.collections.Iterator<kotlin.Int>) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public abstract fun hasNext (): kotlin.Boolean [operator] declared in kotlin.collections.Iterator
|
||||
$this: VALUE_PARAMETER FAKE_OVERRIDE name:<this> type:kotlin.collections.Iterator<kotlin.Int>
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.collections.Iterator
|
||||
$this: VALUE_PARAMETER FAKE_OVERRIDE name:<this> type:kotlin.Any
|
||||
FUN IR_EXTERNAL_DECLARATION_STUB name:next visibility:public modality:FINAL <> ($this:kotlin.collections.IntIterator) returnType:kotlin.Int [operator]
|
||||
overridden:
|
||||
public abstract fun next (): T of kotlin.collections.Iterator [operator] declared in kotlin.collections.Iterator
|
||||
$this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:<this> type:kotlin.collections.IntIterator
|
||||
FUN IR_EXTERNAL_DECLARATION_STUB name:nextInt visibility:public modality:ABSTRACT <> ($this:kotlin.collections.IntIterator) returnType:kotlin.Int
|
||||
$this: VALUE_PARAMETER IR_EXTERNAL_DECLARATION_STUB name:<this> type:kotlin.collections.IntIterator
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String [fake_override] declared in kotlin.collections.Iterator
|
||||
$this: VALUE_PARAMETER FAKE_OVERRIDE name:<this> type:kotlin.Any
|
||||
@@ -0,0 +1,12 @@
|
||||
FILE fqName:<root> fileName:/arraysFromBuiltins.kt
|
||||
PROPERTY name:test visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:test type:kotlin.collections.IntIterator visibility:private [final,static]
|
||||
EXPRESSION_BODY
|
||||
CALL 'public final fun iterator (): kotlin.collections.IntIterator [operator] declared in kotlin.IntArray' type=kotlin.collections.IntIterator origin=null
|
||||
$this: CONSTRUCTOR_CALL 'public constructor <init> (size: kotlin.Int) [primary] declared in kotlin.IntArray' type=kotlin.IntArray origin=null
|
||||
size: CONST Int type=kotlin.Int value=1
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test> visibility:public modality:FINAL <> () returnType:kotlin.collections.IntIterator
|
||||
correspondingProperty: PROPERTY name:test visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-test> (): kotlin.collections.IntIterator declared in <root>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test type:kotlin.collections.IntIterator visibility:private [final,static]' type=kotlin.collections.IntIterator origin=null
|
||||
@@ -0,0 +1,7 @@
|
||||
// FIR_IDENTICAL
|
||||
// DUMP_EXTERNAL_CLASS: kotlin/Array
|
||||
// DUMP_EXTERNAL_CLASS: kotlin/IntArray
|
||||
// DUMP_EXTERNAL_CLASS: kotlin/collections/IntIterator
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
val test = IntArray(1).iterator()
|
||||
@@ -0,0 +1,3 @@
|
||||
val test: IntIterator
|
||||
field = IntArray(size = 1).iterator()
|
||||
get
|
||||
+6
@@ -3102,6 +3102,12 @@ public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText/stubs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("arraysFromBuiltins.kt")
|
||||
public void testArraysFromBuiltins() throws Exception {
|
||||
runTest("compiler/testData/ir/irText/stubs/arraysFromBuiltins.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("builtinMap.kt")
|
||||
public void testBuiltinMap() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user