diff --git a/build-common/test/org/jetbrains/kotlin/serialization/jvm/DebugJvmPackageTable.java b/build-common/test/org/jetbrains/kotlin/serialization/jvm/DebugJvmPackageTable.java
index 0da1e91bbca..15992f048c0 100644
--- a/build-common/test/org/jetbrains/kotlin/serialization/jvm/DebugJvmPackageTable.java
+++ b/build-common/test/org/jetbrains/kotlin/serialization/jvm/DebugJvmPackageTable.java
@@ -1314,7 +1314,8 @@ public final class DebugJvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
org.jetbrains.kotlin.protobuf.ProtocolStringList
@@ -1323,7 +1324,8 @@ public final class DebugJvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
int getClassNameCount();
@@ -1331,7 +1333,8 @@ public final class DebugJvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
java.lang.String getClassName(int index);
@@ -1339,11 +1342,78 @@ public final class DebugJvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
org.jetbrains.kotlin.protobuf.ByteString
getClassNameBytes(int index);
+
+ /**
+ * repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + java.util.List
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + int getMultifileFacadeIdCount(); + /** + *
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + int getMultifileFacadeId(int index); + + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + org.jetbrains.kotlin.protobuf.ProtocolStringList + getMultifileFacadeNameList(); + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + int getMultifileFacadeNameCount(); + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + java.lang.String getMultifileFacadeName(int index); + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + org.jetbrains.kotlin.protobuf.ByteString + getMultifileFacadeNameBytes(int index); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.PackageParts} @@ -1412,6 +1482,36 @@ public final class DebugJvmPackageTable { className_.add(bs); break; } + case 24: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + multifileFacadeId_ = new java.util.ArrayList
repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public org.jetbrains.kotlin.protobuf.ProtocolStringList
@@ -1514,7 +1621,8 @@ public final class DebugJvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public int getClassNameCount() {
@@ -1524,7 +1632,8 @@ public final class DebugJvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public java.lang.String getClassName(int index) {
@@ -1534,7 +1643,8 @@ public final class DebugJvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public org.jetbrains.kotlin.protobuf.ByteString
@@ -1542,9 +1652,97 @@ public final class DebugJvmPackageTable {
return className_.getByteString(index);
}
+ public static final int MULTIFILE_FACADE_ID_FIELD_NUMBER = 3;
+ private java.util.Listrepeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public java.util.List
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public int getMultifileFacadeIdCount() { + return multifileFacadeId_.size(); + } + /** + *
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public int getMultifileFacadeId(int index) { + return multifileFacadeId_.get(index); + } + private int multifileFacadeIdMemoizedSerializedSize = -1; + + public static final int MULTIFILE_FACADE_NAME_FIELD_NUMBER = 4; + private org.jetbrains.kotlin.protobuf.LazyStringList multifileFacadeName_; + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public org.jetbrains.kotlin.protobuf.ProtocolStringList + getMultifileFacadeNameList() { + return multifileFacadeName_; + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public int getMultifileFacadeNameCount() { + return multifileFacadeName_.size(); + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public java.lang.String getMultifileFacadeName(int index) { + return multifileFacadeName_.get(index); + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public org.jetbrains.kotlin.protobuf.ByteString + getMultifileFacadeNameBytes(int index) { + return multifileFacadeName_.getByteString(index); + } + private void initFields() { packageFqName_ = ""; className_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + multifileFacadeId_ = java.util.Collections.emptyList(); + multifileFacadeName_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -1569,6 +1767,16 @@ public final class DebugJvmPackageTable { for (int i = 0; i < className_.size(); i++) { output.writeBytes(2, className_.getByteString(i)); } + if (getMultifileFacadeIdList().size() > 0) { + output.writeRawVarint32(26); + output.writeRawVarint32(multifileFacadeIdMemoizedSerializedSize); + } + for (int i = 0; i < multifileFacadeId_.size(); i++) { + output.writeInt32NoTag(multifileFacadeId_.get(i)); + } + for (int i = 0; i < multifileFacadeName_.size(); i++) { + output.writeBytes(4, multifileFacadeName_.getByteString(i)); + } getUnknownFields().writeTo(output); } @@ -1591,6 +1799,29 @@ public final class DebugJvmPackageTable { size += dataSize; size += 1 * getClassNameList().size(); } + { + int dataSize = 0; + for (int i = 0; i < multifileFacadeId_.size(); i++) { + dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeInt32SizeNoTag(multifileFacadeId_.get(i)); + } + size += dataSize; + if (!getMultifileFacadeIdList().isEmpty()) { + size += 1; + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + multifileFacadeIdMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < multifileFacadeName_.size(); i++) { + dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeBytesSizeNoTag(multifileFacadeName_.getByteString(i)); + } + size += dataSize; + size += 1 * getMultifileFacadeNameList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -1712,6 +1943,10 @@ public final class DebugJvmPackageTable { bitField0_ = (bitField0_ & ~0x00000001); className_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); + multifileFacadeId_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + multifileFacadeName_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -1749,6 +1984,16 @@ public final class DebugJvmPackageTable { bitField0_ = (bitField0_ & ~0x00000002); } result.className_ = className_; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + multifileFacadeId_ = java.util.Collections.unmodifiableList(multifileFacadeId_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.multifileFacadeId_ = multifileFacadeId_; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + multifileFacadeName_ = multifileFacadeName_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.multifileFacadeName_ = multifileFacadeName_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -1780,6 +2025,26 @@ public final class DebugJvmPackageTable { } onChanged(); } + if (!other.multifileFacadeId_.isEmpty()) { + if (multifileFacadeId_.isEmpty()) { + multifileFacadeId_ = other.multifileFacadeId_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureMultifileFacadeIdIsMutable(); + multifileFacadeId_.addAll(other.multifileFacadeId_); + } + onChanged(); + } + if (!other.multifileFacadeName_.isEmpty()) { + if (multifileFacadeName_.isEmpty()) { + multifileFacadeName_ = other.multifileFacadeName_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureMultifileFacadeNameIsMutable(); + multifileFacadeName_.addAll(other.multifileFacadeName_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -1898,7 +2163,8 @@ public final class DebugJvmPackageTable { *
repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public org.jetbrains.kotlin.protobuf.ProtocolStringList
@@ -1909,7 +2175,8 @@ public final class DebugJvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public int getClassNameCount() {
@@ -1919,7 +2186,8 @@ public final class DebugJvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public java.lang.String getClassName(int index) {
@@ -1929,7 +2197,8 @@ public final class DebugJvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public org.jetbrains.kotlin.protobuf.ByteString
@@ -1940,7 +2209,8 @@ public final class DebugJvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public Builder setClassName(
@@ -1957,7 +2227,8 @@ public final class DebugJvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public Builder addClassName(
@@ -1974,7 +2245,8 @@ public final class DebugJvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public Builder addAllClassName(
@@ -1989,7 +2261,8 @@ public final class DebugJvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public Builder clearClassName() {
@@ -2002,7 +2275,8 @@ public final class DebugJvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public Builder addClassNameBytes(
@@ -2016,6 +2290,243 @@ public final class DebugJvmPackageTable {
return this;
}
+ private java.util.Listrepeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public java.util.List
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public int getMultifileFacadeIdCount() { + return multifileFacadeId_.size(); + } + /** + *
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public int getMultifileFacadeId(int index) { + return multifileFacadeId_.get(index); + } + /** + *
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public Builder setMultifileFacadeId( + int index, int value) { + ensureMultifileFacadeIdIsMutable(); + multifileFacadeId_.set(index, value); + onChanged(); + return this; + } + /** + *
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public Builder addMultifileFacadeId(int value) { + ensureMultifileFacadeIdIsMutable(); + multifileFacadeId_.add(value); + onChanged(); + return this; + } + /** + *
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public Builder addAllMultifileFacadeId( + java.lang.Iterable extends java.lang.Integer> values) { + ensureMultifileFacadeIdIsMutable(); + org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( + values, multifileFacadeId_); + onChanged(); + return this; + } + /** + *
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public Builder clearMultifileFacadeId() { + multifileFacadeId_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + private org.jetbrains.kotlin.protobuf.LazyStringList multifileFacadeName_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + private void ensureMultifileFacadeNameIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + multifileFacadeName_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList(multifileFacadeName_); + bitField0_ |= 0x00000008; + } + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public org.jetbrains.kotlin.protobuf.ProtocolStringList + getMultifileFacadeNameList() { + return multifileFacadeName_.getUnmodifiableView(); + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public int getMultifileFacadeNameCount() { + return multifileFacadeName_.size(); + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public java.lang.String getMultifileFacadeName(int index) { + return multifileFacadeName_.get(index); + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public org.jetbrains.kotlin.protobuf.ByteString + getMultifileFacadeNameBytes(int index) { + return multifileFacadeName_.getByteString(index); + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public Builder setMultifileFacadeName( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMultifileFacadeNameIsMutable(); + multifileFacadeName_.set(index, value); + onChanged(); + return this; + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public Builder addMultifileFacadeName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMultifileFacadeNameIsMutable(); + multifileFacadeName_.add(value); + onChanged(); + return this; + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public Builder addAllMultifileFacadeName( + java.lang.Iterable
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public Builder clearMultifileFacadeName() { + multifileFacadeName_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public Builder addMultifileFacadeNameBytes( + org.jetbrains.kotlin.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMultifileFacadeNameIsMutable(); + multifileFacadeName_.add(value); + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.jvm.PackageParts) } @@ -2052,9 +2563,11 @@ public final class DebugJvmPackageTable { "\022K\n\rpackage_parts\030\001 \003(\01324.org.jetbrains." + "kotlin.serialization.jvm.PackageParts\022L\n" + "\016metadata_parts\030\002 \003(\01324.org.jetbrains.ko" + - "tlin.serialization.jvm.PackageParts\";\n\014P" + + "tlin.serialization.jvm.PackageParts\"{\n\014P" + "ackageParts\022\027\n\017package_fq_name\030\001 \002(\t\022\022\n\n" + - "class_name\030\002 \003(\tB\026B\024DebugJvmPackageTable" + "class_name\030\002 \003(\t\022\037\n\023multifile_facade_id\030" + + "\003 \003(\005B\002\020\001\022\035\n\025multifile_facade_name\030\004 \003(\t", + "B\026B\024DebugJvmPackageTable" }; org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -2079,7 +2592,7 @@ public final class DebugJvmPackageTable { internal_static_org_jetbrains_kotlin_serialization_jvm_PackageParts_fieldAccessorTable = new org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_org_jetbrains_kotlin_serialization_jvm_PackageParts_descriptor, - new java.lang.String[] { "PackageFqName", "ClassName", }); + new java.lang.String[] { "PackageFqName", "ClassName", "MultifileFacadeId", "MultifileFacadeName", }); } // @@protoc_insertion_point(outer_class_scope) diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/ClassFileFactory.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/ClassFileFactory.java index 669f8bf658b..5baf69f40c8 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/ClassFileFactory.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/ClassFileFactory.java @@ -185,13 +185,13 @@ public class ClassFileFactory implements OutputFileCollection { final String packageFqNameAsString = packageFqName.asString(); return new PackagePartRegistry() { @Override - public void addPart(@NotNull String partShortName) { + public void addPart(@NotNull String partShortName, @Nullable String facadeShortName) { PackageParts packageParts = partsGroupedByPackage.get(packageFqNameAsString); if (packageParts == null) { packageParts = new PackageParts(packageFqNameAsString); partsGroupedByPackage.put(packageFqNameAsString, packageParts); } - packageParts.addPart(partShortName); + packageParts.addPart(partShortName, facadeShortName); } }; } diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/MultifileClassCodegen.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/MultifileClassCodegen.kt index 20ccd27cacf..42b9adfdd34 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/MultifileClassCodegen.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/MultifileClassCodegen.kt @@ -215,14 +215,13 @@ class MultifileClassCodegenImpl( if (!state.generateDeclaredClassFilter.shouldGeneratePackagePart(file) || !file.hasDeclarationsForPartClass()) return - val partInternalName = partType.internalName - packagePartRegistry.addPart(partInternalName.substring(partInternalName.lastIndexOf('/') + 1)) + packagePartRegistry.addPart(partType.internalName.substringAfterLast('/'), facadeClassType.internalName.substringAfterLast('/')) val builder = state.factory.newVisitor(MultifileClassPart(file, packageFragment), partType, file) MultifileClassPartCodegen( builder, file, packageFragment, - getSuperClassForPart(partInternalName), + getSuperClassForPart(partType.internalName), shouldGeneratePartHierarchy, partContext, state ).generate() diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/PackageCodegenImpl.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/PackageCodegenImpl.java index af4cb608f40..7b1cd9836fe 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/PackageCodegenImpl.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/PackageCodegenImpl.java @@ -20,6 +20,7 @@ import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.progress.ProcessCanceledException; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.util.SmartList; +import kotlin.text.StringsKt; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.kotlin.codegen.context.PackageContext; @@ -125,7 +126,7 @@ public class PackageCodegenImpl implements PackageCodegen { if (!generatePackagePart || !state.getGenerateDeclaredClassFilter().shouldGeneratePackagePart(file)) return; String name = fileClassType.getInternalName(); - packagePartRegistry.addPart(name.substring(name.lastIndexOf('/') + 1)); + packagePartRegistry.addPart(StringsKt.substringAfterLast(name, '/', name), null); ClassBuilder builder = state.getFactory().newVisitor(JvmDeclarationOriginKt.PackagePart(file, packageFragment), fileClassType, file); diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/PackagePartRegistry.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/PackagePartRegistry.kt index 0b157191270..453fa63bafe 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/PackagePartRegistry.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/PackagePartRegistry.kt @@ -17,5 +17,5 @@ package org.jetbrains.kotlin.codegen interface PackagePartRegistry { - fun addPart(partShortName: String) + fun addPart(partShortName: String, facadeShortName: String?) } diff --git a/core/descriptor.loader.java/src/jvm_package_table.proto b/core/descriptor.loader.java/src/jvm_package_table.proto index 6c4f5dacefc..59f6c358d30 100644 --- a/core/descriptor.loader.java/src/jvm_package_table.proto +++ b/core/descriptor.loader.java/src/jvm_package_table.proto @@ -30,6 +30,15 @@ message PackageTable { message PackageParts { required string package_fq_name = 1; - // Short names of files, without extension, present in this package + // Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here + // (multi-file facades are not present in this list, they are defined below) repeated string class_name = 2; + + // For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + // or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + // (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + repeated int32 multifile_facade_id = 3 [packed=true]; + + // Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + repeated string multifile_facade_name = 4; } diff --git a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/ModuleMapping.kt b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/ModuleMapping.kt index aa9e4797d9e..4b556cf6b68 100644 --- a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/ModuleMapping.kt +++ b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/ModuleMapping.kt @@ -19,6 +19,7 @@ package org.jetbrains.kotlin.load.kotlin import org.jetbrains.kotlin.serialization.jvm.JvmPackageTable import java.io.ByteArrayInputStream import java.io.DataInputStream +import kotlin.comparisons.nullsLast class ModuleMapping private constructor(val packageFqName2Parts: Map
repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
org.jetbrains.kotlin.protobuf.ProtocolStringList
@@ -914,7 +915,8 @@ public final class JvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
int getClassNameCount();
@@ -922,7 +924,8 @@ public final class JvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
java.lang.String getClassName(int index);
@@ -930,11 +933,78 @@ public final class JvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
org.jetbrains.kotlin.protobuf.ByteString
getClassNameBytes(int index);
+
+ /**
+ * repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + java.util.List
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + int getMultifileFacadeIdCount(); + /** + *
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + int getMultifileFacadeId(int index); + + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + org.jetbrains.kotlin.protobuf.ProtocolStringList + getMultifileFacadeNameList(); + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + int getMultifileFacadeNameCount(); + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + java.lang.String getMultifileFacadeName(int index); + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + org.jetbrains.kotlin.protobuf.ByteString + getMultifileFacadeNameBytes(int index); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.PackageParts} @@ -1001,6 +1071,36 @@ public final class JvmPackageTable { className_.add(bs); break; } + case 24: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + multifileFacadeId_ = new java.util.ArrayList
repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public org.jetbrains.kotlin.protobuf.ProtocolStringList
@@ -1097,7 +1204,8 @@ public final class JvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public int getClassNameCount() {
@@ -1107,7 +1215,8 @@ public final class JvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public java.lang.String getClassName(int index) {
@@ -1117,7 +1226,8 @@ public final class JvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public org.jetbrains.kotlin.protobuf.ByteString
@@ -1125,9 +1235,97 @@ public final class JvmPackageTable {
return className_.getByteString(index);
}
+ public static final int MULTIFILE_FACADE_ID_FIELD_NUMBER = 3;
+ private java.util.Listrepeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public java.util.List
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public int getMultifileFacadeIdCount() { + return multifileFacadeId_.size(); + } + /** + *
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public int getMultifileFacadeId(int index) { + return multifileFacadeId_.get(index); + } + private int multifileFacadeIdMemoizedSerializedSize = -1; + + public static final int MULTIFILE_FACADE_NAME_FIELD_NUMBER = 4; + private org.jetbrains.kotlin.protobuf.LazyStringList multifileFacadeName_; + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public org.jetbrains.kotlin.protobuf.ProtocolStringList + getMultifileFacadeNameList() { + return multifileFacadeName_; + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public int getMultifileFacadeNameCount() { + return multifileFacadeName_.size(); + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public java.lang.String getMultifileFacadeName(int index) { + return multifileFacadeName_.get(index); + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public org.jetbrains.kotlin.protobuf.ByteString + getMultifileFacadeNameBytes(int index) { + return multifileFacadeName_.getByteString(index); + } + private void initFields() { packageFqName_ = ""; className_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + multifileFacadeId_ = java.util.Collections.emptyList(); + multifileFacadeName_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -1152,6 +1350,16 @@ public final class JvmPackageTable { for (int i = 0; i < className_.size(); i++) { output.writeBytes(2, className_.getByteString(i)); } + if (getMultifileFacadeIdList().size() > 0) { + output.writeRawVarint32(26); + output.writeRawVarint32(multifileFacadeIdMemoizedSerializedSize); + } + for (int i = 0; i < multifileFacadeId_.size(); i++) { + output.writeInt32NoTag(multifileFacadeId_.get(i)); + } + for (int i = 0; i < multifileFacadeName_.size(); i++) { + output.writeBytes(4, multifileFacadeName_.getByteString(i)); + } output.writeRawBytes(unknownFields); } @@ -1174,6 +1382,29 @@ public final class JvmPackageTable { size += dataSize; size += 1 * getClassNameList().size(); } + { + int dataSize = 0; + for (int i = 0; i < multifileFacadeId_.size(); i++) { + dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeInt32SizeNoTag(multifileFacadeId_.get(i)); + } + size += dataSize; + if (!getMultifileFacadeIdList().isEmpty()) { + size += 1; + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + multifileFacadeIdMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < multifileFacadeName_.size(); i++) { + dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeBytesSizeNoTag(multifileFacadeName_.getByteString(i)); + } + size += dataSize; + size += 1 * getMultifileFacadeNameList().size(); + } size += unknownFields.size(); memoizedSerializedSize = size; return size; @@ -1272,6 +1503,10 @@ public final class JvmPackageTable { bitField0_ = (bitField0_ & ~0x00000001); className_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); + multifileFacadeId_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + multifileFacadeName_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -1304,6 +1539,16 @@ public final class JvmPackageTable { bitField0_ = (bitField0_ & ~0x00000002); } result.className_ = className_; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + multifileFacadeId_ = java.util.Collections.unmodifiableList(multifileFacadeId_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.multifileFacadeId_ = multifileFacadeId_; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + multifileFacadeName_ = multifileFacadeName_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.multifileFacadeName_ = multifileFacadeName_; result.bitField0_ = to_bitField0_; return result; } @@ -1324,6 +1569,26 @@ public final class JvmPackageTable { className_.addAll(other.className_); } + } + if (!other.multifileFacadeId_.isEmpty()) { + if (multifileFacadeId_.isEmpty()) { + multifileFacadeId_ = other.multifileFacadeId_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureMultifileFacadeIdIsMutable(); + multifileFacadeId_.addAll(other.multifileFacadeId_); + } + + } + if (!other.multifileFacadeName_.isEmpty()) { + if (multifileFacadeName_.isEmpty()) { + multifileFacadeName_ = other.multifileFacadeName_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureMultifileFacadeNameIsMutable(); + multifileFacadeName_.addAll(other.multifileFacadeName_); + } + } setUnknownFields( getUnknownFields().concat(other.unknownFields)); @@ -1444,7 +1709,8 @@ public final class JvmPackageTable { *
repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public org.jetbrains.kotlin.protobuf.ProtocolStringList
@@ -1455,7 +1721,8 @@ public final class JvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public int getClassNameCount() {
@@ -1465,7 +1732,8 @@ public final class JvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public java.lang.String getClassName(int index) {
@@ -1475,7 +1743,8 @@ public final class JvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public org.jetbrains.kotlin.protobuf.ByteString
@@ -1486,7 +1755,8 @@ public final class JvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public Builder setClassName(
@@ -1503,7 +1773,8 @@ public final class JvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public Builder addClassName(
@@ -1520,7 +1791,8 @@ public final class JvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public Builder addAllClassName(
@@ -1535,7 +1807,8 @@ public final class JvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public Builder clearClassName() {
@@ -1548,7 +1821,8 @@ public final class JvmPackageTable {
* repeated string class_name = 2;
*
*
- * Short names of files, without extension, present in this package
+ * Short names of files, without extension, present in this package. Only single file facades and multi-file _parts_ are listed here
+ * (multi-file facades are not present in this list, they are defined below)
*
*/
public Builder addClassNameBytes(
@@ -1562,6 +1836,243 @@ public final class JvmPackageTable {
return this;
}
+ private java.util.Listrepeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public java.util.List
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public int getMultifileFacadeIdCount() { + return multifileFacadeId_.size(); + } + /** + *
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public int getMultifileFacadeId(int index) { + return multifileFacadeId_.get(index); + } + /** + *
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public Builder setMultifileFacadeId( + int index, int value) { + ensureMultifileFacadeIdIsMutable(); + multifileFacadeId_.set(index, value); + + return this; + } + /** + *
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public Builder addMultifileFacadeId(int value) { + ensureMultifileFacadeIdIsMutable(); + multifileFacadeId_.add(value); + + return this; + } + /** + *
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public Builder addAllMultifileFacadeId( + java.lang.Iterable extends java.lang.Integer> values) { + ensureMultifileFacadeIdIsMutable(); + org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( + values, multifileFacadeId_); + + return this; + } + /** + *
repeated int32 multifile_facade_id = 3 [packed = true];
+ *
+ * + * For each class name listed above, index of the name of the corresponding multi-file facade class in multifile_facade_name + 1, + * or 0 if the class is not a multi-file part. If there's no value in this list at some index, the value is assumed to be 0. + * (e.g. if there are no multi-file classes in the module, this list is not going to exist at all) + *+ */ + public Builder clearMultifileFacadeId() { + multifileFacadeId_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + + return this; + } + + private org.jetbrains.kotlin.protobuf.LazyStringList multifileFacadeName_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + private void ensureMultifileFacadeNameIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + multifileFacadeName_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList(multifileFacadeName_); + bitField0_ |= 0x00000008; + } + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public org.jetbrains.kotlin.protobuf.ProtocolStringList + getMultifileFacadeNameList() { + return multifileFacadeName_.getUnmodifiableView(); + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public int getMultifileFacadeNameCount() { + return multifileFacadeName_.size(); + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public java.lang.String getMultifileFacadeName(int index) { + return multifileFacadeName_.get(index); + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public org.jetbrains.kotlin.protobuf.ByteString + getMultifileFacadeNameBytes(int index) { + return multifileFacadeName_.getByteString(index); + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public Builder setMultifileFacadeName( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMultifileFacadeNameIsMutable(); + multifileFacadeName_.set(index, value); + + return this; + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public Builder addMultifileFacadeName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMultifileFacadeNameIsMutable(); + multifileFacadeName_.add(value); + + return this; + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public Builder addAllMultifileFacadeName( + java.lang.Iterable
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public Builder clearMultifileFacadeName() { + multifileFacadeName_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + + return this; + } + /** + *
repeated string multifile_facade_name = 4;
+ *
+ * + * Short names of multi-file facades, used in multifile_facade_id to store the part -> facade mapping. + *+ */ + public Builder addMultifileFacadeNameBytes( + org.jetbrains.kotlin.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureMultifileFacadeNameIsMutable(); + multifileFacadeName_.add(value); + + return this; + } + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.jvm.PackageParts) } diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/vfilefinder/moduleMappingIndexes.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/vfilefinder/moduleMappingIndexes.kt index fdc93c93ded..1cd4e225b23 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/vfilefinder/moduleMappingIndexes.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/vfilefinder/moduleMappingIndexes.kt @@ -42,13 +42,18 @@ object KotlinModuleMappingIndex : FileBasedIndexExtension