diff --git a/build-common/src/org/jetbrains/kotlin/incremental/ProtoCompareGenerated.kt b/build-common/src/org/jetbrains/kotlin/incremental/ProtoCompareGenerated.kt
index f420965fab2..90221df2c88 100644
--- a/build-common/src/org/jetbrains/kotlin/incremental/ProtoCompareGenerated.kt
+++ b/build-common/src/org/jetbrains/kotlin/incremental/ProtoCompareGenerated.kt
@@ -201,6 +201,11 @@ open class ProtoCompareGenerated(
if (!checkEquals(oldTypeTable.getType(old.inlineClassUnderlyingTypeId), newTypeTable.getType(new.inlineClassUnderlyingTypeId))) return false
}
+ if (old.hasMultiFieldValueClassRepresentation() != new.hasMultiFieldValueClassRepresentation()) return false
+ if (old.hasMultiFieldValueClassRepresentation()) {
+ if (!checkEquals(old.multiFieldValueClassRepresentation, new.multiFieldValueClassRepresentation)) return false
+ }
+
if (!checkEqualsClassVersionRequirement(old, new)) return false
if (old.hasVersionRequirementTable() != new.hasVersionRequirementTable()) return false
@@ -290,6 +295,7 @@ open class ProtoCompareGenerated(
INLINE_CLASS_UNDERLYING_PROPERTY_NAME,
INLINE_CLASS_UNDERLYING_TYPE,
INLINE_CLASS_UNDERLYING_TYPE_ID,
+ MULTI_FIELD_VALUE_CLASS_REPRESENTATION,
VERSION_REQUIREMENT_LIST,
VERSION_REQUIREMENT_TABLE,
JVM_EXT_CLASS_MODULE_NAME,
@@ -357,6 +363,11 @@ open class ProtoCompareGenerated(
if (!checkEquals(oldTypeTable.getType(old.inlineClassUnderlyingTypeId), newTypeTable.getType(new.inlineClassUnderlyingTypeId))) result.add(ProtoBufClassKind.INLINE_CLASS_UNDERLYING_TYPE_ID)
}
+ if (old.hasMultiFieldValueClassRepresentation() != new.hasMultiFieldValueClassRepresentation()) result.add(ProtoBufClassKind.MULTI_FIELD_VALUE_CLASS_REPRESENTATION)
+ if (old.hasMultiFieldValueClassRepresentation()) {
+ if (!checkEquals(old.multiFieldValueClassRepresentation, new.multiFieldValueClassRepresentation)) result.add(ProtoBufClassKind.MULTI_FIELD_VALUE_CLASS_REPRESENTATION)
+ }
+
if (!checkEqualsClassVersionRequirement(old, new)) result.add(ProtoBufClassKind.VERSION_REQUIREMENT_LIST)
if (old.hasVersionRequirementTable() != new.hasVersionRequirementTable()) result.add(ProtoBufClassKind.VERSION_REQUIREMENT_TABLE)
@@ -1015,6 +1026,12 @@ open class ProtoCompareGenerated(
return true
}
+ open fun checkEquals(old: ProtoBuf.Class.MultiFieldValueClassRepresentation, new: ProtoBuf.Class.MultiFieldValueClassRepresentation): Boolean {
+ if (!checkEqualsClassMultiFieldValueClassRepresentationProperty(old, new)) return false
+
+ return true
+ }
+
open fun checkEquals(old: ProtoBuf.Annotation, new: ProtoBuf.Annotation): Boolean {
if (!checkClassIdEquals(old.id, new.id)) return false
@@ -1239,6 +1256,22 @@ open class ProtoCompareGenerated(
return true
}
+ open fun checkEquals(old: ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty, new: ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty): Boolean {
+ if (old.name != new.name) return false
+
+ if (old.hasType() != new.hasType()) return false
+ if (old.hasType()) {
+ if (!checkEquals(old.type, new.type)) return false
+ }
+
+ if (old.hasTypeId() != new.hasTypeId()) return false
+ if (old.hasTypeId()) {
+ if (old.typeId != new.typeId) return false
+ }
+
+ return true
+ }
+
open fun checkEquals(old: ProtoBuf.Annotation.Argument, new: ProtoBuf.Annotation.Argument): Boolean {
if (!checkStringEquals(old.nameId, new.nameId)) return false
@@ -1655,6 +1688,16 @@ open class ProtoCompareGenerated(
return true
}
+ open fun checkEqualsClassMultiFieldValueClassRepresentationProperty(old: ProtoBuf.Class.MultiFieldValueClassRepresentation, new: ProtoBuf.Class.MultiFieldValueClassRepresentation): Boolean {
+ if (old.propertyCount != new.propertyCount) return false
+
+ for(i in 0..old.propertyCount - 1) {
+ if (!checkEquals(old.getProperty(i), new.getProperty(i))) return false
+ }
+
+ return true
+ }
+
open fun checkEqualsAnnotationArgument(old: ProtoBuf.Annotation, new: ProtoBuf.Annotation): Boolean {
if (old.argumentCount != new.argumentCount) return false
@@ -1864,6 +1907,10 @@ fun ProtoBuf.Class.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) ->
hashCode = 31 * hashCode + typeById(inlineClassUnderlyingTypeId).hashCode(stringIndexes, fqNameIndexes, typeById)
}
+ if (hasMultiFieldValueClassRepresentation()) {
+ hashCode = 31 * hashCode + multiFieldValueClassRepresentation.hashCode(stringIndexes, fqNameIndexes, typeById)
+ }
+
for(i in 0..versionRequirementCount - 1) {
hashCode = 31 * hashCode + getVersionRequirement(i)
}
@@ -2365,6 +2412,16 @@ fun ProtoBuf.EnumEntry.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int
return hashCode
}
+fun ProtoBuf.Class.MultiFieldValueClassRepresentation.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int, typeById: (Int) -> ProtoBuf.Type): Int {
+ var hashCode = 1
+
+ for(i in 0..propertyCount - 1) {
+ hashCode = 31 * hashCode + getProperty(i).hashCode(stringIndexes, fqNameIndexes, typeById)
+ }
+
+ return hashCode
+}
+
fun ProtoBuf.Annotation.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int, typeById: (Int) -> ProtoBuf.Type): Int {
var hashCode = 1
@@ -2565,6 +2622,22 @@ fun ProtoBuf.Type.Argument.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes:
return hashCode
}
+fun ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int, typeById: (Int) -> ProtoBuf.Type): Int {
+ var hashCode = 1
+
+ hashCode = 31 * hashCode + name
+
+ if (hasType()) {
+ hashCode = 31 * hashCode + type.hashCode(stringIndexes, fqNameIndexes, typeById)
+ }
+
+ if (hasTypeId()) {
+ hashCode = 31 * hashCode + typeId
+ }
+
+ return hashCode
+}
+
fun ProtoBuf.Annotation.Argument.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int, typeById: (Int) -> ProtoBuf.Type): Int {
var hashCode = 1
diff --git a/build-common/src/org/jetbrains/kotlin/incremental/protoDifferenceUtils.kt b/build-common/src/org/jetbrains/kotlin/incremental/protoDifferenceUtils.kt
index 7c47c57762f..0ac11e26578 100644
--- a/build-common/src/org/jetbrains/kotlin/incremental/protoDifferenceUtils.kt
+++ b/build-common/src/org/jetbrains/kotlin/incremental/protoDifferenceUtils.kt
@@ -29,7 +29,6 @@ import org.jetbrains.kotlin.protobuf.MessageLite
import org.jetbrains.kotlin.serialization.deserialization.ProtoEnumFlags
import org.jetbrains.kotlin.serialization.deserialization.descriptorVisibility
import org.jetbrains.kotlin.serialization.deserialization.getClassId
-import java.util.*
data class Difference(
val isClassAffected: Boolean = false,
@@ -292,7 +291,8 @@ class DifferenceCalculatorForClass(
}
ProtoBufClassKind.INLINE_CLASS_UNDERLYING_PROPERTY_NAME,
ProtoBufClassKind.INLINE_CLASS_UNDERLYING_TYPE,
- ProtoBufClassKind.INLINE_CLASS_UNDERLYING_TYPE_ID -> {
+ ProtoBufClassKind.INLINE_CLASS_UNDERLYING_TYPE_ID,
+ ProtoBufClassKind.MULTI_FIELD_VALUE_CLASS_REPRESENTATION -> {
isClassAffected = true
}
ProtoBufClassKind.CONTEXT_RECEIVER_TYPE_LIST,
diff --git a/build-common/test/org/jetbrains/kotlin/metadata/DebugProtoBuf.java b/build-common/test/org/jetbrains/kotlin/metadata/DebugProtoBuf.java
index 4cac9413506..b4521733772 100644
--- a/build-common/test/org/jetbrains/kotlin/metadata/DebugProtoBuf.java
+++ b/build-common/test/org/jetbrains/kotlin/metadata/DebugProtoBuf.java
@@ -10423,6 +10423,19 @@ public final class DebugProtoBuf {
*/
int getInlineClassUnderlyingTypeId();
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ boolean hasMultiFieldValueClassRepresentation();
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation getMultiFieldValueClassRepresentation();
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentationOrBuilder getMultiFieldValueClassRepresentationOrBuilder();
+
/**
* optional .org.jetbrains.kotlin.metadata.TypeTable type_table = 30;
*/
@@ -10713,9 +10726,22 @@ public final class DebugProtoBuf {
input.popLimit(limit);
break;
}
+ case 178: {
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000040) == 0x00000040)) {
+ subBuilder = multiFieldValueClassRepresentation_.toBuilder();
+ }
+ multiFieldValueClassRepresentation_ = input.readMessage(org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(multiFieldValueClassRepresentation_);
+ multiFieldValueClassRepresentation_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000040;
+ break;
+ }
case 242: {
org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeTable.Builder subBuilder = null;
- if (((bitField0_ & 0x00000040) == 0x00000040)) {
+ if (((bitField0_ & 0x00000080) == 0x00000080)) {
subBuilder = typeTable_.toBuilder();
}
typeTable_ = input.readMessage(org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeTable.PARSER, extensionRegistry);
@@ -10723,13 +10749,13 @@ public final class DebugProtoBuf {
subBuilder.mergeFrom(typeTable_);
typeTable_ = subBuilder.buildPartial();
}
- bitField0_ |= 0x00000040;
+ bitField0_ |= 0x00000080;
break;
}
case 248: {
- if (!((mutable_bitField0_ & 0x00080000) == 0x00080000)) {
+ if (!((mutable_bitField0_ & 0x00100000) == 0x00100000)) {
versionRequirement_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00080000;
+ mutable_bitField0_ |= 0x00100000;
}
versionRequirement_.add(input.readInt32());
break;
@@ -10737,9 +10763,9 @@ public final class DebugProtoBuf {
case 250: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00080000) == 0x00080000) && input.getBytesUntilLimit() > 0) {
+ if (!((mutable_bitField0_ & 0x00100000) == 0x00100000) && input.getBytesUntilLimit() > 0) {
versionRequirement_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00080000;
+ mutable_bitField0_ |= 0x00100000;
}
while (input.getBytesUntilLimit() > 0) {
versionRequirement_.add(input.readInt32());
@@ -10749,7 +10775,7 @@ public final class DebugProtoBuf {
}
case 258: {
org.jetbrains.kotlin.metadata.DebugProtoBuf.VersionRequirementTable.Builder subBuilder = null;
- if (((bitField0_ & 0x00000080) == 0x00000080)) {
+ if (((bitField0_ & 0x00000100) == 0x00000100)) {
subBuilder = versionRequirementTable_.toBuilder();
}
versionRequirementTable_ = input.readMessage(org.jetbrains.kotlin.metadata.DebugProtoBuf.VersionRequirementTable.PARSER, extensionRegistry);
@@ -10757,7 +10783,7 @@ public final class DebugProtoBuf {
subBuilder.mergeFrom(versionRequirementTable_);
versionRequirementTable_ = subBuilder.buildPartial();
}
- bitField0_ |= 0x00000080;
+ bitField0_ |= 0x00000100;
break;
}
}
@@ -10804,7 +10830,7 @@ public final class DebugProtoBuf {
if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
contextReceiverTypeId_ = java.util.Collections.unmodifiableList(contextReceiverTypeId_);
}
- if (((mutable_bitField0_ & 0x00080000) == 0x00080000)) {
+ if (((mutable_bitField0_ & 0x00100000) == 0x00100000)) {
versionRequirement_ = java.util.Collections.unmodifiableList(versionRequirement_);
}
this.unknownFields = unknownFields.build();
@@ -10973,6 +10999,1378 @@ public final class DebugProtoBuf {
// @@protoc_insertion_point(enum_scope:org.jetbrains.kotlin.metadata.Class.Kind)
}
+ public interface MultiFieldValueClassRepresentationOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation)
+ org.jetbrains.kotlin.protobuf.MessageOrBuilder {
+
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ java.util.List
+ getPropertyList();
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty getProperty(int index);
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ int getPropertyCount();
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ java.util.List extends org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassPropertyOrBuilder>
+ getPropertyOrBuilderList();
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassPropertyOrBuilder getPropertyOrBuilder(
+ int index);
+ }
+ /**
+ * Protobuf type {@code org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation}
+ */
+ public static final class MultiFieldValueClassRepresentation extends
+ org.jetbrains.kotlin.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation)
+ MultiFieldValueClassRepresentationOrBuilder {
+ // Use MultiFieldValueClassRepresentation.newBuilder() to construct.
+ private MultiFieldValueClassRepresentation(org.jetbrains.kotlin.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private MultiFieldValueClassRepresentation(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final MultiFieldValueClassRepresentation defaultInstance;
+ public static MultiFieldValueClassRepresentation getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public MultiFieldValueClassRepresentation getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final org.jetbrains.kotlin.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final org.jetbrains.kotlin.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private MultiFieldValueClassRepresentation(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ org.jetbrains.kotlin.protobuf.UnknownFieldSet.Builder unknownFields =
+ org.jetbrains.kotlin.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+ property_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ property_.add(input.readMessage(org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.PARSER, extensionRegistry));
+ break;
+ }
+ }
+ }
+ } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+ property_ = java.util.Collections.unmodifiableList(property_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.jetbrains.kotlin.metadata.DebugProtoBuf.internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_descriptor;
+ }
+
+ protected org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.jetbrains.kotlin.metadata.DebugProtoBuf.internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.class, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.Builder.class);
+ }
+
+ public static org.jetbrains.kotlin.protobuf.Parser PARSER =
+ new org.jetbrains.kotlin.protobuf.AbstractParser() {
+ public MultiFieldValueClassRepresentation parsePartialFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return new MultiFieldValueClassRepresentation(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public org.jetbrains.kotlin.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ public interface MultiFieldValueClassPropertyOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty)
+ org.jetbrains.kotlin.protobuf.MessageOrBuilder {
+
+ /**
+ * required int32 name = 1;
+ */
+ boolean hasName();
+ /**
+ * required int32 name = 1;
+ */
+ int getName();
+
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ boolean hasType();
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Type getType();
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeOrBuilder getTypeOrBuilder();
+
+ /**
+ * optional int32 type_id = 3;
+ */
+ boolean hasTypeId();
+ /**
+ * optional int32 type_id = 3;
+ */
+ int getTypeId();
+ }
+ /**
+ * Protobuf type {@code org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty}
+ */
+ public static final class MultiFieldValueClassProperty extends
+ org.jetbrains.kotlin.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty)
+ MultiFieldValueClassPropertyOrBuilder {
+ // Use MultiFieldValueClassProperty.newBuilder() to construct.
+ private MultiFieldValueClassProperty(org.jetbrains.kotlin.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private MultiFieldValueClassProperty(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+ private static final MultiFieldValueClassProperty defaultInstance;
+ public static MultiFieldValueClassProperty getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public MultiFieldValueClassProperty getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final org.jetbrains.kotlin.protobuf.UnknownFieldSet unknownFields;
+ @java.lang.Override
+ public final org.jetbrains.kotlin.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private MultiFieldValueClassProperty(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ org.jetbrains.kotlin.protobuf.UnknownFieldSet.Builder unknownFields =
+ org.jetbrains.kotlin.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ bitField0_ |= 0x00000001;
+ name_ = input.readInt32();
+ break;
+ }
+ case 18: {
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Type.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ subBuilder = type_.toBuilder();
+ }
+ type_ = input.readMessage(org.jetbrains.kotlin.metadata.DebugProtoBuf.Type.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(type_);
+ type_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000002;
+ break;
+ }
+ case 24: {
+ bitField0_ |= 0x00000004;
+ typeId_ = input.readInt32();
+ break;
+ }
+ }
+ }
+ } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.jetbrains.kotlin.metadata.DebugProtoBuf.internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_MultiFieldValueClassProperty_descriptor;
+ }
+
+ protected org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.jetbrains.kotlin.metadata.DebugProtoBuf.internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_MultiFieldValueClassProperty_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.class, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.Builder.class);
+ }
+
+ public static org.jetbrains.kotlin.protobuf.Parser PARSER =
+ new org.jetbrains.kotlin.protobuf.AbstractParser() {
+ public MultiFieldValueClassProperty parsePartialFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return new MultiFieldValueClassProperty(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public org.jetbrains.kotlin.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ private int bitField0_;
+ public static final int NAME_FIELD_NUMBER = 1;
+ private int name_;
+ /**
+ * required int32 name = 1;
+ */
+ public boolean hasName() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required int32 name = 1;
+ */
+ public int getName() {
+ return name_;
+ }
+
+ public static final int TYPE_FIELD_NUMBER = 2;
+ private org.jetbrains.kotlin.metadata.DebugProtoBuf.Type type_;
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Type getType() {
+ return type_;
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeOrBuilder getTypeOrBuilder() {
+ return type_;
+ }
+
+ public static final int TYPE_ID_FIELD_NUMBER = 3;
+ private int typeId_;
+ /**
+ * optional int32 type_id = 3;
+ */
+ public boolean hasTypeId() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional int32 type_id = 3;
+ */
+ public int getTypeId() {
+ return typeId_;
+ }
+
+ private void initFields() {
+ name_ = 0;
+ type_ = org.jetbrains.kotlin.metadata.DebugProtoBuf.Type.getDefaultInstance();
+ typeId_ = 0;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasName()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (hasType()) {
+ if (!getType().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeInt32(1, name_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeMessage(2, type_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ output.writeInt32(3, typeId_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += org.jetbrains.kotlin.protobuf.CodedOutputStream
+ .computeInt32Size(1, name_);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += org.jetbrains.kotlin.protobuf.CodedOutputStream
+ .computeMessageSize(2, type_);
+ }
+ if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ size += org.jetbrains.kotlin.protobuf.CodedOutputStream
+ .computeInt32Size(3, typeId_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ protected java.lang.Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseFrom(
+ org.jetbrains.kotlin.protobuf.ByteString data)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseFrom(
+ org.jetbrains.kotlin.protobuf.ByteString data,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseFrom(byte[] data)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseFrom(
+ byte[] data,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseFrom(
+ java.io.InputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseDelimitedFrom(
+ java.io.InputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ org.jetbrains.kotlin.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty}
+ */
+ public static final class Builder extends
+ org.jetbrains.kotlin.protobuf.GeneratedMessage.Builder implements
+ // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty)
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassPropertyOrBuilder {
+ public static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.jetbrains.kotlin.metadata.DebugProtoBuf.internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_MultiFieldValueClassProperty_descriptor;
+ }
+
+ protected org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.jetbrains.kotlin.metadata.DebugProtoBuf.internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_MultiFieldValueClassProperty_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.class, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.Builder.class);
+ }
+
+ // Construct using org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ org.jetbrains.kotlin.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (org.jetbrains.kotlin.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ getTypeFieldBuilder();
+ }
+ }
+ private static Builder create() {
+ return new Builder();
+ }
+
+ public Builder clear() {
+ super.clear();
+ name_ = 0;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ if (typeBuilder_ == null) {
+ type_ = org.jetbrains.kotlin.metadata.DebugProtoBuf.Type.getDefaultInstance();
+ } else {
+ typeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000002);
+ typeId_ = 0;
+ bitField0_ = (bitField0_ & ~0x00000004);
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public org.jetbrains.kotlin.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.jetbrains.kotlin.metadata.DebugProtoBuf.internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_MultiFieldValueClassProperty_descriptor;
+ }
+
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty getDefaultInstanceForType() {
+ return org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.getDefaultInstance();
+ }
+
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty build() {
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty buildPartial() {
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty result = new org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.name_ = name_;
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ if (typeBuilder_ == null) {
+ result.type_ = type_;
+ } else {
+ result.type_ = typeBuilder_.build();
+ }
+ if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
+ to_bitField0_ |= 0x00000004;
+ }
+ result.typeId_ = typeId_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(org.jetbrains.kotlin.protobuf.Message other) {
+ if (other instanceof org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty) {
+ return mergeFrom((org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty other) {
+ if (other == org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.getDefaultInstance()) return this;
+ if (other.hasName()) {
+ setName(other.getName());
+ }
+ if (other.hasType()) {
+ mergeType(other.getType());
+ }
+ if (other.hasTypeId()) {
+ setTypeId(other.getTypeId());
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasName()) {
+
+ return false;
+ }
+ if (hasType()) {
+ if (!getType().isInitialized()) {
+
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public Builder mergeFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private int name_ ;
+ /**
+ * required int32 name = 1;
+ */
+ public boolean hasName() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required int32 name = 1;
+ */
+ public int getName() {
+ return name_;
+ }
+ /**
+ * required int32 name = 1;
+ */
+ public Builder setName(int value) {
+ bitField0_ |= 0x00000001;
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * required int32 name = 1;
+ */
+ public Builder clearName() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ name_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private org.jetbrains.kotlin.metadata.DebugProtoBuf.Type type_ = org.jetbrains.kotlin.metadata.DebugProtoBuf.Type.getDefaultInstance();
+ private org.jetbrains.kotlin.protobuf.SingleFieldBuilder<
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Type, org.jetbrains.kotlin.metadata.DebugProtoBuf.Type.Builder, org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeOrBuilder> typeBuilder_;
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Type getType() {
+ if (typeBuilder_ == null) {
+ return type_;
+ } else {
+ return typeBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ public Builder setType(org.jetbrains.kotlin.metadata.DebugProtoBuf.Type value) {
+ if (typeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ type_ = value;
+ onChanged();
+ } else {
+ typeBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ public Builder setType(
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Type.Builder builderForValue) {
+ if (typeBuilder_ == null) {
+ type_ = builderForValue.build();
+ onChanged();
+ } else {
+ typeBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ public Builder mergeType(org.jetbrains.kotlin.metadata.DebugProtoBuf.Type value) {
+ if (typeBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) == 0x00000002) &&
+ type_ != org.jetbrains.kotlin.metadata.DebugProtoBuf.Type.getDefaultInstance()) {
+ type_ =
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Type.newBuilder(type_).mergeFrom(value).buildPartial();
+ } else {
+ type_ = value;
+ }
+ onChanged();
+ } else {
+ typeBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000002;
+ return this;
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ public Builder clearType() {
+ if (typeBuilder_ == null) {
+ type_ = org.jetbrains.kotlin.metadata.DebugProtoBuf.Type.getDefaultInstance();
+ onChanged();
+ } else {
+ typeBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Type.Builder getTypeBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getTypeFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeOrBuilder getTypeOrBuilder() {
+ if (typeBuilder_ != null) {
+ return typeBuilder_.getMessageOrBuilder();
+ } else {
+ return type_;
+ }
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ private org.jetbrains.kotlin.protobuf.SingleFieldBuilder<
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Type, org.jetbrains.kotlin.metadata.DebugProtoBuf.Type.Builder, org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeOrBuilder>
+ getTypeFieldBuilder() {
+ if (typeBuilder_ == null) {
+ typeBuilder_ = new org.jetbrains.kotlin.protobuf.SingleFieldBuilder<
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Type, org.jetbrains.kotlin.metadata.DebugProtoBuf.Type.Builder, org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeOrBuilder>(
+ getType(),
+ getParentForChildren(),
+ isClean());
+ type_ = null;
+ }
+ return typeBuilder_;
+ }
+
+ private int typeId_ ;
+ /**
+ * optional int32 type_id = 3;
+ */
+ public boolean hasTypeId() {
+ return ((bitField0_ & 0x00000004) == 0x00000004);
+ }
+ /**
+ * optional int32 type_id = 3;
+ */
+ public int getTypeId() {
+ return typeId_;
+ }
+ /**
+ * optional int32 type_id = 3;
+ */
+ public Builder setTypeId(int value) {
+ bitField0_ |= 0x00000004;
+ typeId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * optional int32 type_id = 3;
+ */
+ public Builder clearTypeId() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ typeId_ = 0;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty)
+ }
+
+ static {
+ defaultInstance = new MultiFieldValueClassProperty(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty)
+ }
+
+ public static final int PROPERTY_FIELD_NUMBER = 1;
+ private java.util.List property_;
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public java.util.List getPropertyList() {
+ return property_;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public java.util.List extends org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassPropertyOrBuilder>
+ getPropertyOrBuilderList() {
+ return property_;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public int getPropertyCount() {
+ return property_.size();
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty getProperty(int index) {
+ return property_.get(index);
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassPropertyOrBuilder getPropertyOrBuilder(
+ int index) {
+ return property_.get(index);
+ }
+
+ private void initFields() {
+ property_ = java.util.Collections.emptyList();
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ for (int i = 0; i < getPropertyCount(); i++) {
+ if (!getProperty(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ for (int i = 0; i < property_.size(); i++) {
+ output.writeMessage(1, property_.get(i));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < property_.size(); i++) {
+ size += org.jetbrains.kotlin.protobuf.CodedOutputStream
+ .computeMessageSize(1, property_.get(i));
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ protected java.lang.Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation parseFrom(
+ org.jetbrains.kotlin.protobuf.ByteString data)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation parseFrom(
+ org.jetbrains.kotlin.protobuf.ByteString data,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation parseFrom(byte[] data)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation parseFrom(
+ byte[] data,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation parseFrom(
+ java.io.InputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation parseDelimitedFrom(
+ java.io.InputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation parseFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation parseFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ org.jetbrains.kotlin.protobuf.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation}
+ */
+ public static final class Builder extends
+ org.jetbrains.kotlin.protobuf.GeneratedMessage.Builder implements
+ // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation)
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentationOrBuilder {
+ public static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.jetbrains.kotlin.metadata.DebugProtoBuf.internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_descriptor;
+ }
+
+ protected org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.jetbrains.kotlin.metadata.DebugProtoBuf.internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.class, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.Builder.class);
+ }
+
+ // Construct using org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ org.jetbrains.kotlin.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (org.jetbrains.kotlin.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ getPropertyFieldBuilder();
+ }
+ }
+ private static Builder create() {
+ return new Builder();
+ }
+
+ public Builder clear() {
+ super.clear();
+ if (propertyBuilder_ == null) {
+ property_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ propertyBuilder_.clear();
+ }
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public org.jetbrains.kotlin.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.jetbrains.kotlin.metadata.DebugProtoBuf.internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_descriptor;
+ }
+
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation getDefaultInstanceForType() {
+ return org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.getDefaultInstance();
+ }
+
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation build() {
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation buildPartial() {
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation result = new org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation(this);
+ int from_bitField0_ = bitField0_;
+ if (propertyBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ property_ = java.util.Collections.unmodifiableList(property_);
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.property_ = property_;
+ } else {
+ result.property_ = propertyBuilder_.build();
+ }
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(org.jetbrains.kotlin.protobuf.Message other) {
+ if (other instanceof org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation) {
+ return mergeFrom((org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation other) {
+ if (other == org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.getDefaultInstance()) return this;
+ if (propertyBuilder_ == null) {
+ if (!other.property_.isEmpty()) {
+ if (property_.isEmpty()) {
+ property_ = other.property_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensurePropertyIsMutable();
+ property_.addAll(other.property_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.property_.isEmpty()) {
+ if (propertyBuilder_.isEmpty()) {
+ propertyBuilder_.dispose();
+ propertyBuilder_ = null;
+ property_ = other.property_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ propertyBuilder_ =
+ org.jetbrains.kotlin.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
+ getPropertyFieldBuilder() : null;
+ } else {
+ propertyBuilder_.addAllMessages(other.property_);
+ }
+ }
+ }
+ this.mergeUnknownFields(other.getUnknownFields());
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ for (int i = 0; i < getPropertyCount(); i++) {
+ if (!getProperty(i).isInitialized()) {
+
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public Builder mergeFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private java.util.List property_ =
+ java.util.Collections.emptyList();
+ private void ensurePropertyIsMutable() {
+ if (!((bitField0_ & 0x00000001) == 0x00000001)) {
+ property_ = new java.util.ArrayList(property_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+
+ private org.jetbrains.kotlin.protobuf.RepeatedFieldBuilder<
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.Builder, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassPropertyOrBuilder> propertyBuilder_;
+
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public java.util.List getPropertyList() {
+ if (propertyBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(property_);
+ } else {
+ return propertyBuilder_.getMessageList();
+ }
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public int getPropertyCount() {
+ if (propertyBuilder_ == null) {
+ return property_.size();
+ } else {
+ return propertyBuilder_.getCount();
+ }
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty getProperty(int index) {
+ if (propertyBuilder_ == null) {
+ return property_.get(index);
+ } else {
+ return propertyBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public Builder setProperty(
+ int index, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty value) {
+ if (propertyBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePropertyIsMutable();
+ property_.set(index, value);
+ onChanged();
+ } else {
+ propertyBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public Builder setProperty(
+ int index, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.Builder builderForValue) {
+ if (propertyBuilder_ == null) {
+ ensurePropertyIsMutable();
+ property_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ propertyBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public Builder addProperty(org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty value) {
+ if (propertyBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePropertyIsMutable();
+ property_.add(value);
+ onChanged();
+ } else {
+ propertyBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public Builder addProperty(
+ int index, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty value) {
+ if (propertyBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePropertyIsMutable();
+ property_.add(index, value);
+ onChanged();
+ } else {
+ propertyBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public Builder addProperty(
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.Builder builderForValue) {
+ if (propertyBuilder_ == null) {
+ ensurePropertyIsMutable();
+ property_.add(builderForValue.build());
+ onChanged();
+ } else {
+ propertyBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public Builder addProperty(
+ int index, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.Builder builderForValue) {
+ if (propertyBuilder_ == null) {
+ ensurePropertyIsMutable();
+ property_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ propertyBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public Builder addAllProperty(
+ java.lang.Iterable extends org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty> values) {
+ if (propertyBuilder_ == null) {
+ ensurePropertyIsMutable();
+ org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
+ values, property_);
+ onChanged();
+ } else {
+ propertyBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public Builder clearProperty() {
+ if (propertyBuilder_ == null) {
+ property_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ propertyBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public Builder removeProperty(int index) {
+ if (propertyBuilder_ == null) {
+ ensurePropertyIsMutable();
+ property_.remove(index);
+ onChanged();
+ } else {
+ propertyBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.Builder getPropertyBuilder(
+ int index) {
+ return getPropertyFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassPropertyOrBuilder getPropertyOrBuilder(
+ int index) {
+ if (propertyBuilder_ == null) {
+ return property_.get(index); } else {
+ return propertyBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public java.util.List extends org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassPropertyOrBuilder>
+ getPropertyOrBuilderList() {
+ if (propertyBuilder_ != null) {
+ return propertyBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(property_);
+ }
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.Builder addPropertyBuilder() {
+ return getPropertyFieldBuilder().addBuilder(
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.getDefaultInstance());
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.Builder addPropertyBuilder(
+ int index) {
+ return getPropertyFieldBuilder().addBuilder(
+ index, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.getDefaultInstance());
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public java.util.List
+ getPropertyBuilderList() {
+ return getPropertyFieldBuilder().getBuilderList();
+ }
+ private org.jetbrains.kotlin.protobuf.RepeatedFieldBuilder<
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.Builder, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassPropertyOrBuilder>
+ getPropertyFieldBuilder() {
+ if (propertyBuilder_ == null) {
+ propertyBuilder_ = new org.jetbrains.kotlin.protobuf.RepeatedFieldBuilder<
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.Builder, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassPropertyOrBuilder>(
+ property_,
+ ((bitField0_ & 0x00000001) == 0x00000001),
+ getParentForChildren(),
+ isClean());
+ property_ = null;
+ }
+ return propertyBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation)
+ }
+
+ static {
+ defaultInstance = new MultiFieldValueClassRepresentation(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation)
+ }
+
private int bitField0_;
public static final int FLAGS_FIELD_NUMBER = 1;
private int flags_;
@@ -11468,13 +12866,34 @@ public final class DebugProtoBuf {
return inlineClassUnderlyingTypeId_;
}
+ public static final int MULTI_FIELD_VALUE_CLASS_REPRESENTATION_FIELD_NUMBER = 22;
+ private org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation multiFieldValueClassRepresentation_;
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ public boolean hasMultiFieldValueClassRepresentation() {
+ return ((bitField0_ & 0x00000040) == 0x00000040);
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation getMultiFieldValueClassRepresentation() {
+ return multiFieldValueClassRepresentation_;
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentationOrBuilder getMultiFieldValueClassRepresentationOrBuilder() {
+ return multiFieldValueClassRepresentation_;
+ }
+
public static final int TYPE_TABLE_FIELD_NUMBER = 30;
private org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeTable typeTable_;
/**
* optional .org.jetbrains.kotlin.metadata.TypeTable type_table = 30;
*/
public boolean hasTypeTable() {
- return ((bitField0_ & 0x00000040) == 0x00000040);
+ return ((bitField0_ & 0x00000080) == 0x00000080);
}
/**
* optional .org.jetbrains.kotlin.metadata.TypeTable type_table = 30;
@@ -11529,7 +12948,7 @@ public final class DebugProtoBuf {
* optional .org.jetbrains.kotlin.metadata.VersionRequirementTable version_requirement_table = 32;
*/
public boolean hasVersionRequirementTable() {
- return ((bitField0_ & 0x00000080) == 0x00000080);
+ return ((bitField0_ & 0x00000100) == 0x00000100);
}
/**
* optional .org.jetbrains.kotlin.metadata.VersionRequirementTable version_requirement_table = 32;
@@ -11563,6 +12982,7 @@ public final class DebugProtoBuf {
inlineClassUnderlyingPropertyName_ = 0;
inlineClassUnderlyingType_ = org.jetbrains.kotlin.metadata.DebugProtoBuf.Type.getDefaultInstance();
inlineClassUnderlyingTypeId_ = 0;
+ multiFieldValueClassRepresentation_ = org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.getDefaultInstance();
typeTable_ = org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeTable.getDefaultInstance();
versionRequirement_ = java.util.Collections.emptyList();
versionRequirementTable_ = org.jetbrains.kotlin.metadata.DebugProtoBuf.VersionRequirementTable.getDefaultInstance();
@@ -11631,6 +13051,12 @@ public final class DebugProtoBuf {
return false;
}
}
+ if (hasMultiFieldValueClassRepresentation()) {
+ if (!getMultiFieldValueClassRepresentation().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
if (hasTypeTable()) {
if (!getTypeTable().isInitialized()) {
memoizedIsInitialized = 0;
@@ -11722,12 +13148,15 @@ public final class DebugProtoBuf {
output.writeInt32NoTag(contextReceiverTypeId_.get(i));
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
+ output.writeMessage(22, multiFieldValueClassRepresentation_);
+ }
+ if (((bitField0_ & 0x00000080) == 0x00000080)) {
output.writeMessage(30, typeTable_);
}
for (int i = 0; i < versionRequirement_.size(); i++) {
output.writeInt32(31, versionRequirement_.get(i));
}
- if (((bitField0_ & 0x00000080) == 0x00000080)) {
+ if (((bitField0_ & 0x00000100) == 0x00000100)) {
output.writeMessage(32, versionRequirementTable_);
}
extensionWriter.writeUntil(19000, output);
@@ -11853,6 +13282,10 @@ public final class DebugProtoBuf {
contextReceiverTypeIdMemoizedSerializedSize = dataSize;
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
+ size += org.jetbrains.kotlin.protobuf.CodedOutputStream
+ .computeMessageSize(22, multiFieldValueClassRepresentation_);
+ }
+ if (((bitField0_ & 0x00000080) == 0x00000080)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(30, typeTable_);
}
@@ -11865,7 +13298,7 @@ public final class DebugProtoBuf {
size += dataSize;
size += 2 * getVersionRequirementList().size();
}
- if (((bitField0_ & 0x00000080) == 0x00000080)) {
+ if (((bitField0_ & 0x00000100) == 0x00000100)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(32, versionRequirementTable_);
}
@@ -11989,6 +13422,7 @@ public final class DebugProtoBuf {
getTypeAliasFieldBuilder();
getEnumEntryFieldBuilder();
getInlineClassUnderlyingTypeFieldBuilder();
+ getMultiFieldValueClassRepresentationFieldBuilder();
getTypeTableFieldBuilder();
getVersionRequirementTableFieldBuilder();
}
@@ -12071,20 +13505,26 @@ public final class DebugProtoBuf {
bitField0_ = (bitField0_ & ~0x00010000);
inlineClassUnderlyingTypeId_ = 0;
bitField0_ = (bitField0_ & ~0x00020000);
+ if (multiFieldValueClassRepresentationBuilder_ == null) {
+ multiFieldValueClassRepresentation_ = org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.getDefaultInstance();
+ } else {
+ multiFieldValueClassRepresentationBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00040000);
if (typeTableBuilder_ == null) {
typeTable_ = org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeTable.getDefaultInstance();
} else {
typeTableBuilder_.clear();
}
- bitField0_ = (bitField0_ & ~0x00040000);
- versionRequirement_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00080000);
+ versionRequirement_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00100000);
if (versionRequirementTableBuilder_ == null) {
versionRequirementTable_ = org.jetbrains.kotlin.metadata.DebugProtoBuf.VersionRequirementTable.getDefaultInstance();
} else {
versionRequirementTableBuilder_.clear();
}
- bitField0_ = (bitField0_ & ~0x00100000);
+ bitField0_ = (bitField0_ & ~0x00200000);
return this;
}
@@ -12236,18 +13676,26 @@ public final class DebugProtoBuf {
if (((from_bitField0_ & 0x00040000) == 0x00040000)) {
to_bitField0_ |= 0x00000040;
}
+ if (multiFieldValueClassRepresentationBuilder_ == null) {
+ result.multiFieldValueClassRepresentation_ = multiFieldValueClassRepresentation_;
+ } else {
+ result.multiFieldValueClassRepresentation_ = multiFieldValueClassRepresentationBuilder_.build();
+ }
+ if (((from_bitField0_ & 0x00080000) == 0x00080000)) {
+ to_bitField0_ |= 0x00000080;
+ }
if (typeTableBuilder_ == null) {
result.typeTable_ = typeTable_;
} else {
result.typeTable_ = typeTableBuilder_.build();
}
- if (((bitField0_ & 0x00080000) == 0x00080000)) {
+ if (((bitField0_ & 0x00100000) == 0x00100000)) {
versionRequirement_ = java.util.Collections.unmodifiableList(versionRequirement_);
- bitField0_ = (bitField0_ & ~0x00080000);
+ bitField0_ = (bitField0_ & ~0x00100000);
}
result.versionRequirement_ = versionRequirement_;
- if (((from_bitField0_ & 0x00100000) == 0x00100000)) {
- to_bitField0_ |= 0x00000080;
+ if (((from_bitField0_ & 0x00200000) == 0x00200000)) {
+ to_bitField0_ |= 0x00000100;
}
if (versionRequirementTableBuilder_ == null) {
result.versionRequirementTable_ = versionRequirementTable_;
@@ -12536,13 +13984,16 @@ public final class DebugProtoBuf {
if (other.hasInlineClassUnderlyingTypeId()) {
setInlineClassUnderlyingTypeId(other.getInlineClassUnderlyingTypeId());
}
+ if (other.hasMultiFieldValueClassRepresentation()) {
+ mergeMultiFieldValueClassRepresentation(other.getMultiFieldValueClassRepresentation());
+ }
if (other.hasTypeTable()) {
mergeTypeTable(other.getTypeTable());
}
if (!other.versionRequirement_.isEmpty()) {
if (versionRequirement_.isEmpty()) {
versionRequirement_ = other.versionRequirement_;
- bitField0_ = (bitField0_ & ~0x00080000);
+ bitField0_ = (bitField0_ & ~0x00100000);
} else {
ensureVersionRequirementIsMutable();
versionRequirement_.addAll(other.versionRequirement_);
@@ -12616,6 +14067,12 @@ public final class DebugProtoBuf {
return false;
}
}
+ if (hasMultiFieldValueClassRepresentation()) {
+ if (!getMultiFieldValueClassRepresentation().isInitialized()) {
+
+ return false;
+ }
+ }
if (hasTypeTable()) {
if (!getTypeTable().isInitialized()) {
@@ -15160,6 +16617,122 @@ public final class DebugProtoBuf {
return this;
}
+ private org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation multiFieldValueClassRepresentation_ = org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.getDefaultInstance();
+ private org.jetbrains.kotlin.protobuf.SingleFieldBuilder<
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.Builder, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentationOrBuilder> multiFieldValueClassRepresentationBuilder_;
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ public boolean hasMultiFieldValueClassRepresentation() {
+ return ((bitField0_ & 0x00040000) == 0x00040000);
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation getMultiFieldValueClassRepresentation() {
+ if (multiFieldValueClassRepresentationBuilder_ == null) {
+ return multiFieldValueClassRepresentation_;
+ } else {
+ return multiFieldValueClassRepresentationBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ public Builder setMultiFieldValueClassRepresentation(org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation value) {
+ if (multiFieldValueClassRepresentationBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ multiFieldValueClassRepresentation_ = value;
+ onChanged();
+ } else {
+ multiFieldValueClassRepresentationBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00040000;
+ return this;
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ public Builder setMultiFieldValueClassRepresentation(
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.Builder builderForValue) {
+ if (multiFieldValueClassRepresentationBuilder_ == null) {
+ multiFieldValueClassRepresentation_ = builderForValue.build();
+ onChanged();
+ } else {
+ multiFieldValueClassRepresentationBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00040000;
+ return this;
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ public Builder mergeMultiFieldValueClassRepresentation(org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation value) {
+ if (multiFieldValueClassRepresentationBuilder_ == null) {
+ if (((bitField0_ & 0x00040000) == 0x00040000) &&
+ multiFieldValueClassRepresentation_ != org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.getDefaultInstance()) {
+ multiFieldValueClassRepresentation_ =
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.newBuilder(multiFieldValueClassRepresentation_).mergeFrom(value).buildPartial();
+ } else {
+ multiFieldValueClassRepresentation_ = value;
+ }
+ onChanged();
+ } else {
+ multiFieldValueClassRepresentationBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00040000;
+ return this;
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ public Builder clearMultiFieldValueClassRepresentation() {
+ if (multiFieldValueClassRepresentationBuilder_ == null) {
+ multiFieldValueClassRepresentation_ = org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.getDefaultInstance();
+ onChanged();
+ } else {
+ multiFieldValueClassRepresentationBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00040000);
+ return this;
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.Builder getMultiFieldValueClassRepresentationBuilder() {
+ bitField0_ |= 0x00040000;
+ onChanged();
+ return getMultiFieldValueClassRepresentationFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ public org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentationOrBuilder getMultiFieldValueClassRepresentationOrBuilder() {
+ if (multiFieldValueClassRepresentationBuilder_ != null) {
+ return multiFieldValueClassRepresentationBuilder_.getMessageOrBuilder();
+ } else {
+ return multiFieldValueClassRepresentation_;
+ }
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ private org.jetbrains.kotlin.protobuf.SingleFieldBuilder<
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.Builder, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentationOrBuilder>
+ getMultiFieldValueClassRepresentationFieldBuilder() {
+ if (multiFieldValueClassRepresentationBuilder_ == null) {
+ multiFieldValueClassRepresentationBuilder_ = new org.jetbrains.kotlin.protobuf.SingleFieldBuilder<
+ org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentation.Builder, org.jetbrains.kotlin.metadata.DebugProtoBuf.Class.MultiFieldValueClassRepresentationOrBuilder>(
+ getMultiFieldValueClassRepresentation(),
+ getParentForChildren(),
+ isClean());
+ multiFieldValueClassRepresentation_ = null;
+ }
+ return multiFieldValueClassRepresentationBuilder_;
+ }
+
private org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeTable typeTable_ = org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeTable.getDefaultInstance();
private org.jetbrains.kotlin.protobuf.SingleFieldBuilder<
org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeTable, org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeTable.Builder, org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeTableOrBuilder> typeTableBuilder_;
@@ -15167,7 +16740,7 @@ public final class DebugProtoBuf {
* optional .org.jetbrains.kotlin.metadata.TypeTable type_table = 30;
*/
public boolean hasTypeTable() {
- return ((bitField0_ & 0x00040000) == 0x00040000);
+ return ((bitField0_ & 0x00080000) == 0x00080000);
}
/**
* optional .org.jetbrains.kotlin.metadata.TypeTable type_table = 30;
@@ -15192,7 +16765,7 @@ public final class DebugProtoBuf {
} else {
typeTableBuilder_.setMessage(value);
}
- bitField0_ |= 0x00040000;
+ bitField0_ |= 0x00080000;
return this;
}
/**
@@ -15206,7 +16779,7 @@ public final class DebugProtoBuf {
} else {
typeTableBuilder_.setMessage(builderForValue.build());
}
- bitField0_ |= 0x00040000;
+ bitField0_ |= 0x00080000;
return this;
}
/**
@@ -15214,7 +16787,7 @@ public final class DebugProtoBuf {
*/
public Builder mergeTypeTable(org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeTable value) {
if (typeTableBuilder_ == null) {
- if (((bitField0_ & 0x00040000) == 0x00040000) &&
+ if (((bitField0_ & 0x00080000) == 0x00080000) &&
typeTable_ != org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeTable.getDefaultInstance()) {
typeTable_ =
org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeTable.newBuilder(typeTable_).mergeFrom(value).buildPartial();
@@ -15225,7 +16798,7 @@ public final class DebugProtoBuf {
} else {
typeTableBuilder_.mergeFrom(value);
}
- bitField0_ |= 0x00040000;
+ bitField0_ |= 0x00080000;
return this;
}
/**
@@ -15238,14 +16811,14 @@ public final class DebugProtoBuf {
} else {
typeTableBuilder_.clear();
}
- bitField0_ = (bitField0_ & ~0x00040000);
+ bitField0_ = (bitField0_ & ~0x00080000);
return this;
}
/**
* optional .org.jetbrains.kotlin.metadata.TypeTable type_table = 30;
*/
public org.jetbrains.kotlin.metadata.DebugProtoBuf.TypeTable.Builder getTypeTableBuilder() {
- bitField0_ |= 0x00040000;
+ bitField0_ |= 0x00080000;
onChanged();
return getTypeTableFieldBuilder().getBuilder();
}
@@ -15278,9 +16851,9 @@ public final class DebugProtoBuf {
private java.util.List versionRequirement_ = java.util.Collections.emptyList();
private void ensureVersionRequirementIsMutable() {
- if (!((bitField0_ & 0x00080000) == 0x00080000)) {
+ if (!((bitField0_ & 0x00100000) == 0x00100000)) {
versionRequirement_ = new java.util.ArrayList(versionRequirement_);
- bitField0_ |= 0x00080000;
+ bitField0_ |= 0x00100000;
}
}
/**
@@ -15365,7 +16938,7 @@ public final class DebugProtoBuf {
*/
public Builder clearVersionRequirement() {
versionRequirement_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00080000);
+ bitField0_ = (bitField0_ & ~0x00100000);
onChanged();
return this;
}
@@ -15377,7 +16950,7 @@ public final class DebugProtoBuf {
* optional .org.jetbrains.kotlin.metadata.VersionRequirementTable version_requirement_table = 32;
*/
public boolean hasVersionRequirementTable() {
- return ((bitField0_ & 0x00100000) == 0x00100000);
+ return ((bitField0_ & 0x00200000) == 0x00200000);
}
/**
* optional .org.jetbrains.kotlin.metadata.VersionRequirementTable version_requirement_table = 32;
@@ -15402,7 +16975,7 @@ public final class DebugProtoBuf {
} else {
versionRequirementTableBuilder_.setMessage(value);
}
- bitField0_ |= 0x00100000;
+ bitField0_ |= 0x00200000;
return this;
}
/**
@@ -15416,7 +16989,7 @@ public final class DebugProtoBuf {
} else {
versionRequirementTableBuilder_.setMessage(builderForValue.build());
}
- bitField0_ |= 0x00100000;
+ bitField0_ |= 0x00200000;
return this;
}
/**
@@ -15424,7 +16997,7 @@ public final class DebugProtoBuf {
*/
public Builder mergeVersionRequirementTable(org.jetbrains.kotlin.metadata.DebugProtoBuf.VersionRequirementTable value) {
if (versionRequirementTableBuilder_ == null) {
- if (((bitField0_ & 0x00100000) == 0x00100000) &&
+ if (((bitField0_ & 0x00200000) == 0x00200000) &&
versionRequirementTable_ != org.jetbrains.kotlin.metadata.DebugProtoBuf.VersionRequirementTable.getDefaultInstance()) {
versionRequirementTable_ =
org.jetbrains.kotlin.metadata.DebugProtoBuf.VersionRequirementTable.newBuilder(versionRequirementTable_).mergeFrom(value).buildPartial();
@@ -15435,7 +17008,7 @@ public final class DebugProtoBuf {
} else {
versionRequirementTableBuilder_.mergeFrom(value);
}
- bitField0_ |= 0x00100000;
+ bitField0_ |= 0x00200000;
return this;
}
/**
@@ -15448,14 +17021,14 @@ public final class DebugProtoBuf {
} else {
versionRequirementTableBuilder_.clear();
}
- bitField0_ = (bitField0_ & ~0x00100000);
+ bitField0_ = (bitField0_ & ~0x00200000);
return this;
}
/**
* optional .org.jetbrains.kotlin.metadata.VersionRequirementTable version_requirement_table = 32;
*/
public org.jetbrains.kotlin.metadata.DebugProtoBuf.VersionRequirementTable.Builder getVersionRequirementTableBuilder() {
- bitField0_ |= 0x00100000;
+ bitField0_ |= 0x00200000;
onChanged();
return getVersionRequirementTableFieldBuilder().getBuilder();
}
@@ -36221,6 +37794,16 @@ public final class DebugProtoBuf {
private static
org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_org_jetbrains_kotlin_metadata_Class_fieldAccessorTable;
+ private static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor
+ internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_descriptor;
+ private static
+ org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_fieldAccessorTable;
+ private static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor
+ internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_MultiFieldValueClassProperty_descriptor;
+ private static
+ org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_MultiFieldValueClassProperty_fieldAccessorTable;
private static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor
internal_static_org_jetbrains_kotlin_metadata_Package_descriptor;
private static
@@ -36358,7 +37941,7 @@ public final class DebugProtoBuf {
"Variance:\003INV\0228\n\013upper_bound\030\005 \003(\0132#.org" +
".jetbrains.kotlin.metadata.Type\022\036\n\016upper" +
"_bound_id\030\006 \003(\005B\006\020\001\240\265\030\001\"$\n\010Variance\022\006\n\002I" +
- "N\020\000\022\007\n\003OUT\020\001\022\007\n\003INV\020\002*\005\010d\020\350\007\"\305\t\n\005Class\022\020" +
+ "N\020\000\022\007\n\003OUT\020\001\022\007\n\003INV\020\002*\005\010d\020\350\007\"\317\014\n\005Class\022\020" +
"\n\005flags\030\001 \001(\005:\0016\022\025\n\007fq_name\030\003 \002(\005B\004\220\265\030\001\022",
"#\n\025companion_object_name\030\004 \001(\005B\004\210\265\030\001\022D\n\016" +
"type_parameter\030\005 \003(\0132,.org.jetbrains.kot" +
@@ -36381,128 +37964,138 @@ public final class DebugProtoBuf {
"y_name\030\021 \001(\005B\004\210\265\030\001\022I\n\034inline_class_under" +
"lying_type\030\022 \001(\0132#.org.jetbrains.kotlin.",
"metadata.Type\022-\n\037inline_class_underlying" +
- "_type_id\030\023 \001(\005B\004\240\265\030\001\022<\n\ntype_table\030\036 \001(\013" +
- "2(.org.jetbrains.kotlin.metadata.TypeTab" +
- "le\022\033\n\023version_requirement\030\037 \003(\005\022Y\n\031versi" +
- "on_requirement_table\030 \001(\01326.org.jetbrai" +
- "ns.kotlin.metadata.VersionRequirementTab" +
- "le\"x\n\004Kind\022\t\n\005CLASS\020\000\022\r\n\tINTERFACE\020\001\022\016\n\n" +
- "ENUM_CLASS\020\002\022\016\n\nENUM_ENTRY\020\003\022\024\n\020ANNOTATI" +
- "ON_CLASS\020\004\022\n\n\006OBJECT\020\005\022\024\n\020COMPANION_OBJE" +
- "CT\020\006*\006\010d\020\270\224\001\"\335\002\n\007Package\0229\n\010function\030\003 \003",
- "(\0132\'.org.jetbrains.kotlin.metadata.Funct" +
- "ion\0229\n\010property\030\004 \003(\0132\'.org.jetbrains.ko" +
- "tlin.metadata.Property\022<\n\ntype_alias\030\005 \003" +
- "(\0132(.org.jetbrains.kotlin.metadata.TypeA" +
- "lias\022<\n\ntype_table\030\036 \001(\0132(.org.jetbrains" +
- ".kotlin.metadata.TypeTable\022Y\n\031version_re" +
- "quirement_table\030 \001(\01326.org.jetbrains.ko" +
- "tlin.metadata.VersionRequirementTable*\005\010" +
- "d\020\310\001\"`\n\tTypeTable\0221\n\004type\030\001 \003(\0132#.org.je" +
- "tbrains.kotlin.metadata.Type\022\032\n\016first_nu",
- "llable\030\002 \001(\005:\002-1:\004\240\273\030\001\"\214\001\n\013Constructor\022\020" +
- "\n\005flags\030\001 \001(\005:\0016\022F\n\017value_parameter\030\002 \003(" +
- "\0132-.org.jetbrains.kotlin.metadata.ValueP" +
- "arameter\022\033\n\023version_requirement\030\037 \003(\005*\006\010" +
- "d\020\270\224\001\"\224\005\n\010Function\022\020\n\005flags\030\t \001(\005:\0016\022\024\n\t" +
- "old_flags\030\001 \001(\005:\0016\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\0228" +
- "\n\013return_type\030\003 \001(\0132#.org.jetbrains.kotl" +
- "in.metadata.Type\022\034\n\016return_type_id\030\007 \001(\005" +
- "B\004\240\265\030\001\022D\n\016type_parameter\030\004 \003(\0132,.org.jet" +
- "brains.kotlin.metadata.TypeParameter\022:\n\r",
- "receiver_type\030\005 \001(\0132#.org.jetbrains.kotl" +
- "in.metadata.Type\022\036\n\020receiver_type_id\030\010 \001" +
- "(\005B\004\240\265\030\001\022B\n\025context_receiver_type\030\n \003(\0132" +
- "#.org.jetbrains.kotlin.metadata.Type\022(\n\030" +
- "context_receiver_type_id\030\013 \003(\005B\006\020\001\240\265\030\001\022F" +
- "\n\017value_parameter\030\006 \003(\0132-.org.jetbrains." +
- "kotlin.metadata.ValueParameter\022<\n\ntype_t" +
- "able\030\036 \001(\0132(.org.jetbrains.kotlin.metada" +
- "ta.TypeTable\022\033\n\023version_requirement\030\037 \003(" +
- "\005\0229\n\010contract\030 \001(\0132\'.org.jetbrains.kotl",
- "in.metadata.Contract*\006\010d\020\270\224\001\"\323\004\n\010Propert" +
- "y\022\022\n\005flags\030\013 \001(\005:\003518\022\027\n\told_flags\030\001 \001(\005" +
- ":\0042054\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\0228\n\013return_typ" +
- "e\030\003 \001(\0132#.org.jetbrains.kotlin.metadata." +
- "Type\022\034\n\016return_type_id\030\t \001(\005B\004\240\265\030\001\022D\n\016ty" +
- "pe_parameter\030\004 \003(\0132,.org.jetbrains.kotli" +
- "n.metadata.TypeParameter\022:\n\rreceiver_typ" +
- "e\030\005 \001(\0132#.org.jetbrains.kotlin.metadata." +
- "Type\022\036\n\020receiver_type_id\030\n \001(\005B\004\240\265\030\001\022B\n\025" +
- "context_receiver_type\030\014 \003(\0132#.org.jetbra",
- "ins.kotlin.metadata.Type\022(\n\030context_rece" +
- "iver_type_id\030\r \003(\005B\006\020\001\240\265\030\001\022M\n\026setter_val" +
- "ue_parameter\030\006 \001(\0132-.org.jetbrains.kotli" +
- "n.metadata.ValueParameter\022\024\n\014getter_flag" +
- "s\030\007 \001(\005\022\024\n\014setter_flags\030\010 \001(\005\022\033\n\023version" +
- "_requirement\030\037 \003(\005*\006\010d\020\270\224\001\"\357\001\n\016ValuePara" +
- "meter\022\020\n\005flags\030\001 \001(\005:\0010\022\022\n\004name\030\002 \002(\005B\004\210" +
- "\265\030\001\0221\n\004type\030\003 \001(\0132#.org.jetbrains.kotlin" +
- ".metadata.Type\022\025\n\007type_id\030\005 \001(\005B\004\240\265\030\001\022@\n" +
- "\023vararg_element_type\030\004 \001(\0132#.org.jetbrai",
- "ns.kotlin.metadata.Type\022$\n\026vararg_elemen" +
- "t_type_id\030\006 \001(\005B\004\240\265\030\001*\005\010d\020\310\001\"\226\003\n\tTypeAli" +
- "as\022\020\n\005flags\030\001 \001(\005:\0016\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001" +
- "\022D\n\016type_parameter\030\003 \003(\0132,.org.jetbrains" +
- ".kotlin.metadata.TypeParameter\022<\n\017underl" +
- "ying_type\030\004 \001(\0132#.org.jetbrains.kotlin.m" +
- "etadata.Type\022 \n\022underlying_type_id\030\005 \001(\005" +
- "B\004\240\265\030\001\022:\n\rexpanded_type\030\006 \001(\0132#.org.jetb" +
- "rains.kotlin.metadata.Type\022\036\n\020expanded_t" +
- "ype_id\030\007 \001(\005B\004\240\265\030\001\022=\n\nannotation\030\010 \003(\0132)",
- ".org.jetbrains.kotlin.metadata.Annotatio" +
- "n\022\033\n\023version_requirement\030\037 \003(\005*\005\010d\020\310\001\"&\n" +
- "\tEnumEntry\022\022\n\004name\030\001 \001(\005B\004\210\265\030\001*\005\010d\020\310\001\"\225\003" +
- "\n\022VersionRequirement\022\017\n\007version\030\001 \001(\005\022\024\n" +
- "\014version_full\030\002 \001(\005\022M\n\005level\030\003 \001(\01627.org" +
- ".jetbrains.kotlin.metadata.VersionRequir" +
- "ement.Level:\005ERROR\022\022\n\nerror_code\030\004 \001(\005\022\025" +
- "\n\007message\030\005 \001(\005B\004\230\265\030\001\022e\n\014version_kind\030\006 " +
- "\001(\0162=.org.jetbrains.kotlin.metadata.Vers" +
- "ionRequirement.VersionKind:\020LANGUAGE_VER",
- "SION\"+\n\005Level\022\013\n\007WARNING\020\000\022\t\n\005ERROR\020\001\022\n\n" +
- "\006HIDDEN\020\002\"J\n\013VersionKind\022\024\n\020LANGUAGE_VER" +
- "SION\020\000\022\024\n\020COMPILER_VERSION\020\001\022\017\n\013API_VERS" +
- "ION\020\002\"a\n\027VersionRequirementTable\022F\n\013requ" +
- "irement\030\001 \003(\01321.org.jetbrains.kotlin.met" +
- "adata.VersionRequirement\"\217\002\n\017PackageFrag" +
- "ment\022;\n\007strings\030\001 \001(\0132*.org.jetbrains.ko" +
- "tlin.metadata.StringTable\022J\n\017qualified_n" +
- "ames\030\002 \001(\01321.org.jetbrains.kotlin.metada" +
- "ta.QualifiedNameTable\0227\n\007package\030\003 \001(\0132&",
- ".org.jetbrains.kotlin.metadata.Package\0223" +
- "\n\005class\030\004 \003(\0132$.org.jetbrains.kotlin.met" +
- "adata.Class*\005\010d\020\310\001\"A\n\010Contract\0225\n\006effect" +
- "\030\001 \003(\0132%.org.jetbrains.kotlin.metadata.E" +
- "ffect\"\306\003\n\006Effect\022E\n\013effect_type\030\001 \001(\01620." +
- "org.jetbrains.kotlin.metadata.Effect.Eff" +
- "ectType\022N\n\033effect_constructor_argument\030\002" +
- " \003(\0132).org.jetbrains.kotlin.metadata.Exp" +
- "ression\022S\n conclusion_of_conditional_eff" +
- "ect\030\003 \001(\0132).org.jetbrains.kotlin.metadat",
- "a.Expression\022B\n\004kind\030\004 \001(\01624.org.jetbrai" +
- "ns.kotlin.metadata.Effect.InvocationKind" +
- "\"C\n\nEffectType\022\024\n\020RETURNS_CONSTANT\020\000\022\t\n\005" +
- "CALLS\020\001\022\024\n\020RETURNS_NOT_NULL\020\002\"G\n\016Invocat" +
- "ionKind\022\020\n\014AT_MOST_ONCE\020\000\022\020\n\014EXACTLY_ONC" +
- "E\020\001\022\021\n\rAT_LEAST_ONCE\020\002\"\245\003\n\nExpression\022\020\n" +
- "\005flags\030\001 \001(\005:\0010\022!\n\031value_parameter_refer" +
- "ence\030\002 \001(\005\022O\n\016constant_value\030\003 \001(\01627.org" +
- ".jetbrains.kotlin.metadata.Expression.Co" +
- "nstantValue\022=\n\020is_instance_type\030\004 \001(\0132#.",
- "org.jetbrains.kotlin.metadata.Type\022!\n\023is" +
- "_instance_type_id\030\005 \001(\005B\004\240\265\030\001\022?\n\014and_arg" +
- "ument\030\006 \003(\0132).org.jetbrains.kotlin.metad" +
- "ata.Expression\022>\n\013or_argument\030\007 \003(\0132).or" +
- "g.jetbrains.kotlin.metadata.Expression\"." +
- "\n\rConstantValue\022\010\n\004TRUE\020\000\022\t\n\005FALSE\020\001\022\010\n\004" +
- "NULL\020\002*9\n\010Modality\022\t\n\005FINAL\020\000\022\010\n\004OPEN\020\001\022" +
- "\014\n\010ABSTRACT\020\002\022\n\n\006SEALED\020\003*b\n\nVisibility\022" +
- "\014\n\010INTERNAL\020\000\022\013\n\007PRIVATE\020\001\022\r\n\tPROTECTED\020" +
- "\002\022\n\n\006PUBLIC\020\003\022\023\n\017PRIVATE_TO_THIS\020\004\022\t\n\005LO",
- "CAL\020\005*Q\n\nMemberKind\022\017\n\013DECLARATION\020\000\022\021\n\r" +
- "FAKE_OVERRIDE\020\001\022\016\n\nDELEGATION\020\002\022\017\n\013SYNTH" +
- "ESIZED\020\003B\017B\rDebugProtoBuf"
+ "_type_id\030\023 \001(\005B\004\240\265\030\001\022w\n&multi_field_valu" +
+ "e_class_representation\030\026 \001(\0132G.org.jetbr" +
+ "ains.kotlin.metadata.Class.MultiFieldVal" +
+ "ueClassRepresentation\022<\n\ntype_table\030\036 \001(" +
+ "\0132(.org.jetbrains.kotlin.metadata.TypeTa" +
+ "ble\022\033\n\023version_requirement\030\037 \003(\005\022Y\n\031vers" +
+ "ion_requirement_table\030 \001(\01326.org.jetbra" +
+ "ins.kotlin.metadata.VersionRequirementTa" +
+ "ble\032\216\002\n\"MultiFieldValueClassRepresentati",
+ "on\022v\n\010property\030\001 \003(\0132d.org.jetbrains.kot" +
+ "lin.metadata.Class.MultiFieldValueClassR" +
+ "epresentation.MultiFieldValueClassProper" +
+ "ty\032p\n\034MultiFieldValueClassProperty\022\014\n\004na" +
+ "me\030\001 \002(\005\0221\n\004type\030\002 \001(\0132#.org.jetbrains.k" +
+ "otlin.metadata.Type\022\017\n\007type_id\030\003 \001(\005\"x\n\004" +
+ "Kind\022\t\n\005CLASS\020\000\022\r\n\tINTERFACE\020\001\022\016\n\nENUM_C" +
+ "LASS\020\002\022\016\n\nENUM_ENTRY\020\003\022\024\n\020ANNOTATION_CLA" +
+ "SS\020\004\022\n\n\006OBJECT\020\005\022\024\n\020COMPANION_OBJECT\020\006*\006" +
+ "\010d\020\270\224\001\"\335\002\n\007Package\0229\n\010function\030\003 \003(\0132\'.o",
+ "rg.jetbrains.kotlin.metadata.Function\0229\n" +
+ "\010property\030\004 \003(\0132\'.org.jetbrains.kotlin.m" +
+ "etadata.Property\022<\n\ntype_alias\030\005 \003(\0132(.o" +
+ "rg.jetbrains.kotlin.metadata.TypeAlias\022<" +
+ "\n\ntype_table\030\036 \001(\0132(.org.jetbrains.kotli" +
+ "n.metadata.TypeTable\022Y\n\031version_requirem" +
+ "ent_table\030 \001(\01326.org.jetbrains.kotlin.m" +
+ "etadata.VersionRequirementTable*\005\010d\020\310\001\"`" +
+ "\n\tTypeTable\0221\n\004type\030\001 \003(\0132#.org.jetbrain" +
+ "s.kotlin.metadata.Type\022\032\n\016first_nullable",
+ "\030\002 \001(\005:\002-1:\004\240\273\030\001\"\214\001\n\013Constructor\022\020\n\005flag" +
+ "s\030\001 \001(\005:\0016\022F\n\017value_parameter\030\002 \003(\0132-.or" +
+ "g.jetbrains.kotlin.metadata.ValueParamet" +
+ "er\022\033\n\023version_requirement\030\037 \003(\005*\006\010d\020\270\224\001\"" +
+ "\224\005\n\010Function\022\020\n\005flags\030\t \001(\005:\0016\022\024\n\told_fl" +
+ "ags\030\001 \001(\005:\0016\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\0228\n\013retu" +
+ "rn_type\030\003 \001(\0132#.org.jetbrains.kotlin.met" +
+ "adata.Type\022\034\n\016return_type_id\030\007 \001(\005B\004\240\265\030\001" +
+ "\022D\n\016type_parameter\030\004 \003(\0132,.org.jetbrains" +
+ ".kotlin.metadata.TypeParameter\022:\n\rreceiv",
+ "er_type\030\005 \001(\0132#.org.jetbrains.kotlin.met" +
+ "adata.Type\022\036\n\020receiver_type_id\030\010 \001(\005B\004\240\265" +
+ "\030\001\022B\n\025context_receiver_type\030\n \003(\0132#.org." +
+ "jetbrains.kotlin.metadata.Type\022(\n\030contex" +
+ "t_receiver_type_id\030\013 \003(\005B\006\020\001\240\265\030\001\022F\n\017valu" +
+ "e_parameter\030\006 \003(\0132-.org.jetbrains.kotlin" +
+ ".metadata.ValueParameter\022<\n\ntype_table\030\036" +
+ " \001(\0132(.org.jetbrains.kotlin.metadata.Typ" +
+ "eTable\022\033\n\023version_requirement\030\037 \003(\005\0229\n\010c" +
+ "ontract\030 \001(\0132\'.org.jetbrains.kotlin.met",
+ "adata.Contract*\006\010d\020\270\224\001\"\323\004\n\010Property\022\022\n\005f" +
+ "lags\030\013 \001(\005:\003518\022\027\n\told_flags\030\001 \001(\005:\0042054" +
+ "\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\0228\n\013return_type\030\003 \001(" +
+ "\0132#.org.jetbrains.kotlin.metadata.Type\022\034" +
+ "\n\016return_type_id\030\t \001(\005B\004\240\265\030\001\022D\n\016type_par" +
+ "ameter\030\004 \003(\0132,.org.jetbrains.kotlin.meta" +
+ "data.TypeParameter\022:\n\rreceiver_type\030\005 \001(" +
+ "\0132#.org.jetbrains.kotlin.metadata.Type\022\036" +
+ "\n\020receiver_type_id\030\n \001(\005B\004\240\265\030\001\022B\n\025contex" +
+ "t_receiver_type\030\014 \003(\0132#.org.jetbrains.ko",
+ "tlin.metadata.Type\022(\n\030context_receiver_t" +
+ "ype_id\030\r \003(\005B\006\020\001\240\265\030\001\022M\n\026setter_value_par" +
+ "ameter\030\006 \001(\0132-.org.jetbrains.kotlin.meta" +
+ "data.ValueParameter\022\024\n\014getter_flags\030\007 \001(" +
+ "\005\022\024\n\014setter_flags\030\010 \001(\005\022\033\n\023version_requi" +
+ "rement\030\037 \003(\005*\006\010d\020\270\224\001\"\357\001\n\016ValueParameter\022" +
+ "\020\n\005flags\030\001 \001(\005:\0010\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\0221\n" +
+ "\004type\030\003 \001(\0132#.org.jetbrains.kotlin.metad" +
+ "ata.Type\022\025\n\007type_id\030\005 \001(\005B\004\240\265\030\001\022@\n\023varar" +
+ "g_element_type\030\004 \001(\0132#.org.jetbrains.kot",
+ "lin.metadata.Type\022$\n\026vararg_element_type" +
+ "_id\030\006 \001(\005B\004\240\265\030\001*\005\010d\020\310\001\"\226\003\n\tTypeAlias\022\020\n\005" +
+ "flags\030\001 \001(\005:\0016\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\022D\n\016ty" +
+ "pe_parameter\030\003 \003(\0132,.org.jetbrains.kotli" +
+ "n.metadata.TypeParameter\022<\n\017underlying_t" +
+ "ype\030\004 \001(\0132#.org.jetbrains.kotlin.metadat" +
+ "a.Type\022 \n\022underlying_type_id\030\005 \001(\005B\004\240\265\030\001" +
+ "\022:\n\rexpanded_type\030\006 \001(\0132#.org.jetbrains." +
+ "kotlin.metadata.Type\022\036\n\020expanded_type_id" +
+ "\030\007 \001(\005B\004\240\265\030\001\022=\n\nannotation\030\010 \003(\0132).org.j",
+ "etbrains.kotlin.metadata.Annotation\022\033\n\023v" +
+ "ersion_requirement\030\037 \003(\005*\005\010d\020\310\001\"&\n\tEnumE" +
+ "ntry\022\022\n\004name\030\001 \001(\005B\004\210\265\030\001*\005\010d\020\310\001\"\225\003\n\022Vers" +
+ "ionRequirement\022\017\n\007version\030\001 \001(\005\022\024\n\014versi" +
+ "on_full\030\002 \001(\005\022M\n\005level\030\003 \001(\01627.org.jetbr" +
+ "ains.kotlin.metadata.VersionRequirement." +
+ "Level:\005ERROR\022\022\n\nerror_code\030\004 \001(\005\022\025\n\007mess" +
+ "age\030\005 \001(\005B\004\230\265\030\001\022e\n\014version_kind\030\006 \001(\0162=." +
+ "org.jetbrains.kotlin.metadata.VersionReq" +
+ "uirement.VersionKind:\020LANGUAGE_VERSION\"+",
+ "\n\005Level\022\013\n\007WARNING\020\000\022\t\n\005ERROR\020\001\022\n\n\006HIDDE" +
+ "N\020\002\"J\n\013VersionKind\022\024\n\020LANGUAGE_VERSION\020\000" +
+ "\022\024\n\020COMPILER_VERSION\020\001\022\017\n\013API_VERSION\020\002\"" +
+ "a\n\027VersionRequirementTable\022F\n\013requiremen" +
+ "t\030\001 \003(\01321.org.jetbrains.kotlin.metadata." +
+ "VersionRequirement\"\217\002\n\017PackageFragment\022;" +
+ "\n\007strings\030\001 \001(\0132*.org.jetbrains.kotlin.m" +
+ "etadata.StringTable\022J\n\017qualified_names\030\002" +
+ " \001(\01321.org.jetbrains.kotlin.metadata.Qua" +
+ "lifiedNameTable\0227\n\007package\030\003 \001(\0132&.org.j",
+ "etbrains.kotlin.metadata.Package\0223\n\005clas" +
+ "s\030\004 \003(\0132$.org.jetbrains.kotlin.metadata." +
+ "Class*\005\010d\020\310\001\"A\n\010Contract\0225\n\006effect\030\001 \003(\013" +
+ "2%.org.jetbrains.kotlin.metadata.Effect\"" +
+ "\306\003\n\006Effect\022E\n\013effect_type\030\001 \001(\01620.org.je" +
+ "tbrains.kotlin.metadata.Effect.EffectTyp" +
+ "e\022N\n\033effect_constructor_argument\030\002 \003(\0132)" +
+ ".org.jetbrains.kotlin.metadata.Expressio" +
+ "n\022S\n conclusion_of_conditional_effect\030\003 " +
+ "\001(\0132).org.jetbrains.kotlin.metadata.Expr",
+ "ession\022B\n\004kind\030\004 \001(\01624.org.jetbrains.kot" +
+ "lin.metadata.Effect.InvocationKind\"C\n\nEf" +
+ "fectType\022\024\n\020RETURNS_CONSTANT\020\000\022\t\n\005CALLS\020" +
+ "\001\022\024\n\020RETURNS_NOT_NULL\020\002\"G\n\016InvocationKin" +
+ "d\022\020\n\014AT_MOST_ONCE\020\000\022\020\n\014EXACTLY_ONCE\020\001\022\021\n" +
+ "\rAT_LEAST_ONCE\020\002\"\245\003\n\nExpression\022\020\n\005flags" +
+ "\030\001 \001(\005:\0010\022!\n\031value_parameter_reference\030\002" +
+ " \001(\005\022O\n\016constant_value\030\003 \001(\01627.org.jetbr" +
+ "ains.kotlin.metadata.Expression.Constant" +
+ "Value\022=\n\020is_instance_type\030\004 \001(\0132#.org.je",
+ "tbrains.kotlin.metadata.Type\022!\n\023is_insta" +
+ "nce_type_id\030\005 \001(\005B\004\240\265\030\001\022?\n\014and_argument\030" +
+ "\006 \003(\0132).org.jetbrains.kotlin.metadata.Ex" +
+ "pression\022>\n\013or_argument\030\007 \003(\0132).org.jetb" +
+ "rains.kotlin.metadata.Expression\".\n\rCons" +
+ "tantValue\022\010\n\004TRUE\020\000\022\t\n\005FALSE\020\001\022\010\n\004NULL\020\002" +
+ "*9\n\010Modality\022\t\n\005FINAL\020\000\022\010\n\004OPEN\020\001\022\014\n\010ABS" +
+ "TRACT\020\002\022\n\n\006SEALED\020\003*b\n\nVisibility\022\014\n\010INT" +
+ "ERNAL\020\000\022\013\n\007PRIVATE\020\001\022\r\n\tPROTECTED\020\002\022\n\n\006P" +
+ "UBLIC\020\003\022\023\n\017PRIVATE_TO_THIS\020\004\022\t\n\005LOCAL\020\005*",
+ "Q\n\nMemberKind\022\017\n\013DECLARATION\020\000\022\021\n\rFAKE_O" +
+ "VERRIDE\020\001\022\016\n\nDELEGATION\020\002\022\017\n\013SYNTHESIZED" +
+ "\020\003B\017B\rDebugProtoBuf"
};
org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
@@ -36576,7 +38169,19 @@ public final class DebugProtoBuf {
internal_static_org_jetbrains_kotlin_metadata_Class_fieldAccessorTable = new
org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_org_jetbrains_kotlin_metadata_Class_descriptor,
- new java.lang.String[] { "Flags", "FqName", "CompanionObjectName", "TypeParameter", "Supertype", "SupertypeId", "NestedClassName", "ContextReceiverType", "ContextReceiverTypeId", "Constructor", "Function", "Property", "TypeAlias", "EnumEntry", "SealedSubclassFqName", "InlineClassUnderlyingPropertyName", "InlineClassUnderlyingType", "InlineClassUnderlyingTypeId", "TypeTable", "VersionRequirement", "VersionRequirementTable", });
+ new java.lang.String[] { "Flags", "FqName", "CompanionObjectName", "TypeParameter", "Supertype", "SupertypeId", "NestedClassName", "ContextReceiverType", "ContextReceiverTypeId", "Constructor", "Function", "Property", "TypeAlias", "EnumEntry", "SealedSubclassFqName", "InlineClassUnderlyingPropertyName", "InlineClassUnderlyingType", "InlineClassUnderlyingTypeId", "MultiFieldValueClassRepresentation", "TypeTable", "VersionRequirement", "VersionRequirementTable", });
+ internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_descriptor =
+ internal_static_org_jetbrains_kotlin_metadata_Class_descriptor.getNestedTypes().get(0);
+ internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_fieldAccessorTable = new
+ org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_descriptor,
+ new java.lang.String[] { "Property", });
+ internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_MultiFieldValueClassProperty_descriptor =
+ internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_descriptor.getNestedTypes().get(0);
+ internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_MultiFieldValueClassProperty_fieldAccessorTable = new
+ org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_org_jetbrains_kotlin_metadata_Class_MultiFieldValueClassRepresentation_MultiFieldValueClassProperty_descriptor,
+ new java.lang.String[] { "Name", "Type", "TypeId", });
internal_static_org_jetbrains_kotlin_metadata_Package_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_org_jetbrains_kotlin_metadata_Package_fieldAccessorTable = new
diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt
index 39fa5087689..d7e05597bdf 100644
--- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt
+++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt
@@ -9,10 +9,7 @@ import com.intellij.psi.PsiCompiledElement
import org.jetbrains.kotlin.KtFakeSourceElementKind
import org.jetbrains.kotlin.KtNodeTypes
import org.jetbrains.kotlin.KtSourceElement
-import org.jetbrains.kotlin.descriptors.ClassKind
-import org.jetbrains.kotlin.descriptors.InlineClassRepresentation
-import org.jetbrains.kotlin.descriptors.Modality
-import org.jetbrains.kotlin.descriptors.Visibilities
+import org.jetbrains.kotlin.descriptors.*
import org.jetbrains.kotlin.fir.*
import org.jetbrains.kotlin.fir.backend.generators.FakeOverrideGenerator
import org.jetbrains.kotlin.fir.builder.buildPackageDirective
@@ -71,6 +68,7 @@ import org.jetbrains.kotlin.resolve.calls.util.isSingleUnderscore
import org.jetbrains.kotlin.types.ConstantValueKind
import org.jetbrains.kotlin.types.Variance
import org.jetbrains.kotlin.util.OperatorNameConventions
+import org.jetbrains.kotlin.utils.addToStdlib.safeAs
internal fun FirElement.convertWithOffsets(
f: (startOffset: Int, endOffset: Int) -> T
@@ -196,7 +194,15 @@ fun FirReference.toSymbolForCall(
): IrSymbol? {
return when (this) {
is FirResolvedNamedReference ->
- resolvedSymbol.toSymbolForCall(dispatchReceiver, session, classifierStorage, declarationStorage, preferGetter, explicitReceiver, isDelegate)
+ resolvedSymbol.toSymbolForCall(
+ dispatchReceiver,
+ session,
+ classifierStorage,
+ declarationStorage,
+ preferGetter,
+ explicitReceiver,
+ isDelegate
+ )
is FirErrorNamedReference ->
candidateSymbol?.toSymbolForCall(
dispatchReceiver,
@@ -648,6 +654,16 @@ fun Fir2IrComponents.computeInlineClassRepresentation(klass: FirRegularClass): I
)
}
+// TODO: implement multiFieldValueClassRepresentation in FirRegularClass instead.
+fun Fir2IrComponents.computeMultiFieldValueClassRepresentation(klass: FirRegularClass): MultiFieldValueClassRepresentation? {
+ val parameters = klass.getMultiFieldValueClassUnderlyingParameters(session) ?: return null
+ return MultiFieldValueClassRepresentation(parameters.map {
+ val type = it.returnTypeRef.toIrType(typeConverter).safeAs()
+ ?: error("Value class underlying type is not a simple type: ${klass.render()}")
+ it.name to type
+ })
+}
+
fun FirRegularClass.getIrSymbolsForSealedSubclasses(components: Fir2IrComponents): List {
val session = components.session
val symbolProvider = session.symbolProvider
diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyClass.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyClass.kt
index 4d3292f30b7..19b91986d21 100644
--- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyClass.kt
+++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/lazy/Fir2IrLazyClass.kt
@@ -139,6 +139,11 @@ class Fir2IrLazyClass(
set(_) {
error("Mutating Fir2Ir lazy elements is not possible")
}
+ override var multiFieldValueClassRepresentation: MultiFieldValueClassRepresentation?
+ get() = computeMultiFieldValueClassRepresentation(fir)
+ set(_) {
+ error("Mutating Fir2Ir lazy elements is not possible")
+ }
private val fakeOverridesByName = mutableMapOf>()
diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java
index a22f0462613..f95975bc59d 100644
--- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java
+++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java
@@ -48207,6 +48207,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/valueClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
+ @Test
+ @TestMetadata("classFlattening.kt")
+ public void testClassFlattening() throws Exception {
+ runTest("compiler/testData/codegen/box/valueClasses/classFlattening.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
+ }
+
@Test
@TestMetadata("equality.kt")
public void testEquality() throws Exception {
diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/declarations/InlineClassesUtils.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/declarations/InlineClassesUtils.kt
index 05d4cc74732..1a87b85f3e0 100644
--- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/declarations/InlineClassesUtils.kt
+++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/declarations/InlineClassesUtils.kt
@@ -38,3 +38,6 @@ internal fun ConeKotlinType.unsubstitutedUnderlyingTypeForInlineClass(session: F
// TODO: implement inlineClassRepresentation in FirRegularClass instead.
fun FirRegularClass.getInlineClassUnderlyingParameter(session: FirSession): FirValueParameter? =
if (isInline) primaryConstructorIfAny(session)?.fir?.valueParameters?.singleOrNull() else null
+
+fun FirRegularClass.getMultiFieldValueClassUnderlyingParameters(session: FirSession): List? =
+ if (isInline) primaryConstructorIfAny(session)?.fir?.valueParameters?.takeIf { it.size > 1 } else null
diff --git a/compiler/frontend/src/org/jetbrains/kotlin/psi/synthetics/SyntheticClassOrObjectDescriptor.kt b/compiler/frontend/src/org/jetbrains/kotlin/psi/synthetics/SyntheticClassOrObjectDescriptor.kt
index 9225f59e26b..ac01b918ef4 100644
--- a/compiler/frontend/src/org/jetbrains/kotlin/psi/synthetics/SyntheticClassOrObjectDescriptor.kt
+++ b/compiler/frontend/src/org/jetbrains/kotlin/psi/synthetics/SyntheticClassOrObjectDescriptor.kt
@@ -95,6 +95,7 @@ class SyntheticClassOrObjectDescriptor(
override fun getUnsubstitutedMemberScope(kotlinTypeRefiner: KotlinTypeRefiner) = unsubstitutedMemberScope
override fun getSealedSubclasses() = emptyList()
override fun getInlineClassRepresentation(): InlineClassRepresentation? = null
+ override fun getMultiFieldValueClassRepresentation(): MultiFieldValueClassRepresentation? = null
init {
assert(modality != Modality.SEALED) { "Implement getSealedSubclasses() for this class: ${this::class.java}" }
diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/LazyClassDescriptor.java b/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/LazyClassDescriptor.java
index bc3d59698d1..e4cfdd86893 100644
--- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/LazyClassDescriptor.java
+++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/LazyClassDescriptor.java
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.resolve.lazy.descriptors;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiNameIdentifierOwner;
+import kotlin.Pair;
import kotlin.annotations.jvm.ReadOnly;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function1;
@@ -48,6 +49,7 @@ import org.jetbrains.kotlin.storage.NullableLazyValue;
import org.jetbrains.kotlin.storage.StorageManager;
import org.jetbrains.kotlin.types.*;
import org.jetbrains.kotlin.types.checker.KotlinTypeRefiner;
+import org.jetbrains.kotlin.types.checker.SimpleClassicTypeSystemContext;
import java.util.*;
import java.util.stream.Collectors;
@@ -646,6 +648,28 @@ public class LazyClassDescriptor extends ClassDescriptorBase implements ClassDes
);
}
+ @Nullable
+ @Override
+ public MultiFieldValueClassRepresentation getMultiFieldValueClassRepresentation() {
+ if (!InlineClassesUtilsKt.isValueClass(this) || InlineClassesUtilsKt.isInlineClass(this)) {
+ return null;
+ }
+
+ ClassConstructorDescriptor constructor = getUnsubstitutedPrimaryConstructor();
+ // Don't crash on invalid code. It is IC, not MFVC.
+ if (constructor == null) {
+ return null;
+ }
+ List parameters = constructor.getValueParameters();
+ if (parameters.size() <= 1) {
+ return null;
+ }
+ List> properties = parameters.stream()
+ .map(parameter -> new Pair<>(parameter.getName(), (SimpleType) parameter.getType()))
+ .collect(Collectors.toList());
+ return new MultiFieldValueClassRepresentation<>(properties);
+ }
+
@Override
public String toString() {
// not using DescriptorRenderer to preserve laziness
diff --git a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/JvmInlineClassLowering.kt b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/JvmInlineClassLowering.kt
index 12ccc5ebaaf..982f3192105 100644
--- a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/JvmInlineClassLowering.kt
+++ b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/JvmInlineClassLowering.kt
@@ -5,8 +5,6 @@
package org.jetbrains.kotlin.backend.jvm.lower
-import org.jetbrains.kotlin.backend.common.FileLoweringPass
-import org.jetbrains.kotlin.backend.common.IrElementTransformerVoidWithContext
import org.jetbrains.kotlin.backend.common.ir.copyParameterDeclarationsFrom
import org.jetbrains.kotlin.backend.common.ir.passTypeArgumentsFrom
import org.jetbrains.kotlin.backend.common.lower.createIrBuilder
@@ -28,15 +26,16 @@ import org.jetbrains.kotlin.ir.builders.declarations.buildFun
import org.jetbrains.kotlin.ir.declarations.*
import org.jetbrains.kotlin.ir.expressions.*
import org.jetbrains.kotlin.ir.expressions.impl.*
-import org.jetbrains.kotlin.ir.symbols.IrValueSymbol
import org.jetbrains.kotlin.ir.transformStatement
-import org.jetbrains.kotlin.ir.types.*
+import org.jetbrains.kotlin.ir.types.IrType
+import org.jetbrains.kotlin.ir.types.classOrNull
+import org.jetbrains.kotlin.ir.types.isNullable
+import org.jetbrains.kotlin.ir.types.makeNotNull
import org.jetbrains.kotlin.ir.util.*
import org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid
import org.jetbrains.kotlin.load.java.JvmAbi
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.resolve.JVM_INLINE_ANNOTATION_FQ_NAME
-import org.jetbrains.kotlin.utils.addToStdlib.safeAs
val jvmInlineClassPhase = makeIrFilePhase(
::JvmInlineClassLowering,
@@ -57,96 +56,24 @@ val jvmInlineClassPhase = makeIrFilePhase(
* We do not unfold inline class types here. Instead, the type mapper will lower inline class
* types to the types of their underlying field.
*/
-private class JvmInlineClassLowering(private val context: JvmBackendContext) : FileLoweringPass, IrElementTransformerVoidWithContext() {
- private val valueMap = mutableMapOf()
+private class JvmInlineClassLowering(context: JvmBackendContext) : JvmValueClassAbstractLowering(context) {
+ override val replacements: MemoizedValueClassAbstractReplacements
+ get() = context.inlineClassReplacements
- private fun addBindingsFor(original: IrFunction, replacement: IrFunction) {
- for ((param, newParam) in original.explicitParameters.zip(replacement.explicitParameters)) {
- valueMap[param.symbol] = newParam
- }
- }
+ override fun IrClass.isSpecificLoweringLogicApplicable(): Boolean = isSingleFieldValueClass
- override fun lower(irFile: IrFile) {
- irFile.transformChildrenVoid()
- }
+ override fun IrFunction.isSpecificFieldGetter(): Boolean = isInlineClassFieldGetter
- override fun visitClassNew(declaration: IrClass): IrStatement {
- // The arguments to the primary constructor are in scope in the initializers of IrFields.
- declaration.primaryConstructor?.let {
- context.inlineClassReplacements.getReplacementFunction(it)?.let { replacement -> addBindingsFor(it, replacement) }
- }
-
- declaration.transformDeclarationsFlat { memberDeclaration ->
- if (memberDeclaration is IrFunction) {
- withinScope(memberDeclaration) {
- transformFunctionFlat(memberDeclaration)
- }
- } else {
- memberDeclaration.accept(this, null)
- null
- }
- }
-
- if (declaration.isSingleFieldValueClass) {
- val irConstructor = declaration.primaryConstructor!!
- // The field getter is used by reflection and cannot be removed here unless it is internal.
- declaration.declarations.removeIf {
- it == irConstructor || (it is IrFunction && it.isInlineClassFieldGetter && !it.visibility.isPublicAPI)
- }
- buildPrimaryInlineClassConstructor(declaration, irConstructor)
- buildBoxFunction(declaration)
- buildUnboxFunction(declaration)
- buildSpecializedEqualsMethod(declaration)
- addJvmInlineAnnotation(declaration)
- }
-
- return declaration
- }
-
- private fun addJvmInlineAnnotation(declaration: IrClass) {
- if (declaration.hasAnnotation(JVM_INLINE_ANNOTATION_FQ_NAME)) return
+ override fun addJvmInlineAnnotation(valueClass: IrClass) {
+ if (valueClass.hasAnnotation(JVM_INLINE_ANNOTATION_FQ_NAME)) return
val constructor = context.ir.symbols.jvmInlineAnnotation.constructors.first()
- declaration.annotations = declaration.annotations + IrConstructorCallImpl.fromSymbolOwner(
+ valueClass.annotations = valueClass.annotations + IrConstructorCallImpl.fromSymbolOwner(
constructor.owner.returnType,
constructor
)
}
- private fun transformFunctionFlat(function: IrFunction): List? {
- if (function is IrConstructor && function.isPrimary && function.constructedClass.isSingleFieldValueClass)
- return null
-
- val replacement = context.inlineClassReplacements.getReplacementFunction(function)
- if (replacement == null) {
- function.transformChildrenVoid()
- return null
- }
-
- if (function is IrSimpleFunction && function.overriddenSymbols.any { it.owner.parentAsClass.isFun }) {
- // If fun interface methods are already mangled, do not mangle them twice.
- val suffix = function.hashSuffix()
- if (suffix != null && function.name.asString().endsWith(suffix)) {
- function.transformChildrenVoid()
- return null
- }
- }
-
- addBindingsFor(function, replacement)
- return when (function) {
- is IrSimpleFunction -> transformSimpleFunctionFlat(function, replacement)
- is IrConstructor -> transformConstructorFlat(function, replacement)
- else -> throw IllegalStateException()
- }
- }
-
- private fun IrFunction.hashSuffix(): String? =
- InlineClassAbi.hashSuffix(
- this,
- context.state.functionsWithInlineClassReturnTypesMangled,
- context.state.useOldManglingSchemeForFunctionsWithInlineClassesInSignatures
- )
-
- private fun transformSimpleFunctionFlat(function: IrSimpleFunction, replacement: IrSimpleFunction): List {
+ override fun transformSimpleFunctionFlat(function: IrSimpleFunction, replacement: IrSimpleFunction): List {
replacement.valueParameters.forEach {
it.transformChildrenVoid()
it.defaultValue?.patchDeclarationParents(replacement)
@@ -182,11 +109,11 @@ private class JvmInlineClassLowering(private val context: JvmBackendContext) : F
bridgeFunction.overriddenSymbols = replacement.overriddenSymbols
// Replace the function body with a wrapper
- if (!bridgeFunction.isFakeOverride || !bridgeFunction.parentAsClass.isSingleFieldValueClass) {
- createBridgeBody(bridgeFunction, replacement)
- } else {
+ if (bridgeFunction.isFakeOverride && bridgeFunction.parentAsClass.isSingleFieldValueClass) {
// Fake overrides redirect from the replacement to the original function, which is in turn replaced during interfacePhase.
createBridgeBody(replacement, bridgeFunction)
+ } else {
+ createBridgeBody(bridgeFunction, replacement)
}
return listOf(replacement, bridgeFunction)
@@ -227,7 +154,8 @@ private class JvmInlineClassLowering(private val context: JvmBackendContext) : F
// Secondary constructors for boxed types get translated to static functions returning
// unboxed arguments. We remove the original constructor.
- private fun transformConstructorFlat(constructor: IrConstructor, replacement: IrSimpleFunction): List {
+ // Primary constructors' case is handled at the start of transformFunctionFlat
+ override fun transformConstructorFlat(constructor: IrConstructor, replacement: IrSimpleFunction): List {
replacement.valueParameters.forEach { it.transformChildrenVoid() }
replacement.body = context.createIrBuilder(replacement.symbol, replacement.startOffset, replacement.endOffset).irBlockBody(
replacement
@@ -469,40 +397,6 @@ private class JvmInlineClassLowering(private val context: JvmBackendContext) : F
return super.visitGetField(expression)
}
- override fun visitReturn(expression: IrReturn): IrExpression {
- expression.returnTargetSymbol.owner.safeAs()?.let { target ->
- val suffix = target.hashSuffix()
- if (suffix != null && target.name.asString().endsWith(suffix))
- return super.visitReturn(expression)
-
- context.inlineClassReplacements.getReplacementFunction(target)?.let {
- return context.createIrBuilder(it.symbol, expression.startOffset, expression.endOffset).irReturn(
- expression.value.transform(this, null)
- )
- }
- }
- return super.visitReturn(expression)
- }
-
- private fun visitStatementContainer(container: IrStatementContainer) {
- container.statements.transformFlat { statement ->
- if (statement is IrFunction)
- transformFunctionFlat(statement)
- else
- listOf(statement.transformStatement(this))
- }
- }
-
- override fun visitContainerExpression(expression: IrContainerExpression): IrExpression {
- visitStatementContainer(expression)
- return expression
- }
-
- override fun visitBlockBody(body: IrBlockBody): IrBody {
- visitStatementContainer(body)
- return body
- }
-
override fun visitGetValue(expression: IrGetValue): IrExpression {
valueMap[expression.symbol]?.let {
return IrGetValueImpl(
@@ -525,16 +419,9 @@ private class JvmInlineClassLowering(private val context: JvmBackendContext) : F
return super.visitSetValue(expression)
}
- // Anonymous initializers in inline classes are processed when building the primary constructor.
- override fun visitAnonymousInitializerNew(declaration: IrAnonymousInitializer): IrStatement {
- if (declaration.parent.safeAs()?.isSingleFieldValueClass == true)
- return declaration
- return super.visitAnonymousInitializerNew(declaration)
- }
-
- private fun buildPrimaryInlineClassConstructor(irClass: IrClass, irConstructor: IrConstructor) {
+ override fun buildPrimaryValueClassConstructor(valueClass: IrClass, irConstructor: IrConstructor) {
// Add the default primary constructor
- irClass.addConstructor {
+ valueClass.addConstructor {
updateFrom(irConstructor)
visibility = DescriptorVisibilities.PRIVATE
origin = JvmLoweredDeclarationOrigin.SYNTHETIC_INLINE_CLASS_MEMBER
@@ -547,8 +434,8 @@ private class JvmInlineClassLowering(private val context: JvmBackendContext) : F
body = context.createIrBuilder(this.symbol).irBlockBody(this) {
+irDelegatingConstructorCall(context.irBuiltIns.anyClass.owner.constructors.single())
+irSetField(
- irGet(irClass.thisReceiver!!),
- getInlineClassBackingField(irClass),
+ irGet(valueClass.thisReceiver!!),
+ getInlineClassBackingField(valueClass),
irGet(this@apply.valueParameters[0])
)
}
@@ -558,13 +445,13 @@ private class JvmInlineClassLowering(private val context: JvmBackendContext) : F
// null-checks, default arguments, and anonymous initializers.
val function = context.inlineClassReplacements.getReplacementFunction(irConstructor)!!
- val initBlocks = irClass.declarations.filterIsInstance()
+ val initBlocks = valueClass.declarations.filterIsInstance()
function.valueParameters.forEach { it.transformChildrenVoid() }
function.body = context.createIrBuilder(function.symbol).irBlockBody {
val argument = function.valueParameters[0]
val thisValue = irTemporary(coerceInlineClasses(irGet(argument), argument.type, function.returnType, skipCast = true))
- valueMap[irClass.thisReceiver!!.symbol] = thisValue
+ valueMap[valueClass.thisReceiver!!.symbol] = thisValue
for (initBlock in initBlocks) {
for (stmt in initBlock.body.statements) {
+stmt.transformStatement(this@JvmInlineClassLowering).patchDeclarationParents(function)
@@ -573,21 +460,25 @@ private class JvmInlineClassLowering(private val context: JvmBackendContext) : F
+irReturn(irGet(thisValue))
}
- irClass.declarations.removeAll(initBlocks)
- irClass.declarations += function
+ valueClass.declarations.removeAll(initBlocks)
+ valueClass.declarations += function
}
- private fun buildBoxFunction(irClass: IrClass) {
- val function = context.inlineClassReplacements.getBoxFunction(irClass)
+ override fun buildBoxFunction(valueClass: IrClass) {
+ val function = context.inlineClassReplacements.getBoxFunction(valueClass)
with(context.createIrBuilder(function.symbol)) {
function.body = irExprBody(
- irCall(irClass.primaryConstructor!!.symbol).apply {
+ irCall(valueClass.primaryConstructor!!.symbol).apply {
passTypeArgumentsFrom(function)
putValueArgument(0, irGet(function.valueParameters[0]))
}
)
}
- irClass.declarations += function
+ valueClass.declarations += function
+ }
+
+ override fun buildUnboxFunctions(valueClass: IrClass) {
+ buildUnboxFunction(valueClass)
}
private fun buildUnboxFunction(irClass: IrClass) {
@@ -602,13 +493,13 @@ private class JvmInlineClassLowering(private val context: JvmBackendContext) : F
irClass.declarations += function
}
- private fun buildSpecializedEqualsMethod(irClass: IrClass) {
- val function = context.inlineClassReplacements.getSpecializedEqualsMethod(irClass, context.irBuiltIns)
+ override fun buildSpecializedEqualsMethod(valueClass: IrClass) {
+ val function = context.inlineClassReplacements.getSpecializedEqualsMethod(valueClass, context.irBuiltIns)
val left = function.valueParameters[0]
val right = function.valueParameters[1]
val type = left.type.unboxInlineClass()
- function.body = context.createIrBuilder(irClass.symbol).run {
+ function.body = context.createIrBuilder(valueClass.symbol).run {
irExprBody(
irEquals(
coerceInlineClasses(irGet(left), left.type, type),
@@ -617,6 +508,6 @@ private class JvmInlineClassLowering(private val context: JvmBackendContext) : F
)
}
- irClass.declarations += function
+ valueClass.declarations += function
}
}
diff --git a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/JvmInlineMultiFieldValueClassLowering.kt b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/JvmInlineMultiFieldValueClassLowering.kt
new file mode 100644
index 00000000000..edf9629998d
--- /dev/null
+++ b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/JvmInlineMultiFieldValueClassLowering.kt
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package org.jetbrains.kotlin.backend.jvm.lower
+
+import org.jetbrains.kotlin.backend.jvm.JvmBackendContext
+import org.jetbrains.kotlin.backend.jvm.MemoizedValueClassAbstractReplacements
+import org.jetbrains.kotlin.backend.jvm.isMultiFieldValueClassFieldGetter
+import org.jetbrains.kotlin.ir.declarations.*
+import org.jetbrains.kotlin.ir.expressions.*
+
+private class JvmInlineMultiFieldValueClassLowering(context: JvmBackendContext) : JvmValueClassAbstractLowering(context) {
+ override val replacements: MemoizedValueClassAbstractReplacements
+ get() = context.multiFieldValueClassReplacements
+
+ override fun IrClass.isSpecificLoweringLogicApplicable(): Boolean = isMultiFieldValueClass
+
+ override fun IrFunction.isSpecificFieldGetter(): Boolean = isMultiFieldValueClassFieldGetter
+
+ override fun transformSimpleFunctionFlat(function: IrSimpleFunction, replacement: IrSimpleFunction): List {
+ TODO()
+ }
+
+ override fun buildPrimaryValueClassConstructor(valueClass: IrClass, irConstructor: IrConstructor) {
+ TODO("Not yet implemented")
+ }
+
+ override fun buildBoxFunction(valueClass: IrClass) {
+ TODO("Not yet implemented")
+ }
+
+ override fun buildUnboxFunctions(valueClass: IrClass) {
+ TODO("Not yet implemented")
+ }
+
+ override fun buildSpecializedEqualsMethod(valueClass: IrClass) {
+ TODO("Not yet implemented")
+ }
+
+ override fun addJvmInlineAnnotation(valueClass: IrClass) = Unit
+
+ @Suppress("UNUSED_PARAMETER")
+ override fun transformConstructorFlat(constructor: IrConstructor, replacement: IrSimpleFunction): List {
+ TODO()
+ }
+
+ override fun visitFunctionReference(expression: IrFunctionReference): IrExpression {
+ // todo implement
+ return super.visitFunctionReference(expression)
+ }
+
+ override fun visitFunctionAccess(expression: IrFunctionAccessExpression): IrExpression {
+ // todo implement
+ return super.visitFunctionAccess(expression)
+ }
+
+ override fun visitCall(expression: IrCall): IrExpression {
+ // todo implement
+ return super.visitCall(expression)
+ }
+
+ override fun visitGetField(expression: IrGetField): IrExpression {
+ // todo implement
+ return super.visitGetField(expression)
+ }
+
+ override fun visitGetValue(expression: IrGetValue): IrExpression {
+ // todo implement
+ return super.visitGetValue(expression)
+ }
+
+ override fun visitSetValue(expression: IrSetValue): IrExpression {
+ // todo implement
+ return super.visitSetValue(expression)
+ }
+}
\ No newline at end of file
diff --git a/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/JvmValueClassAbstractLowering.kt b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/JvmValueClassAbstractLowering.kt
new file mode 100644
index 00000000000..ea1909a4384
--- /dev/null
+++ b/compiler/ir/backend.jvm/lower/src/org/jetbrains/kotlin/backend/jvm/lower/JvmValueClassAbstractLowering.kt
@@ -0,0 +1,173 @@
+/*
+ * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package org.jetbrains.kotlin.backend.jvm.lower
+
+import org.jetbrains.kotlin.backend.common.FileLoweringPass
+import org.jetbrains.kotlin.backend.common.IrElementTransformerVoidWithContext
+import org.jetbrains.kotlin.backend.common.lower.createIrBuilder
+import org.jetbrains.kotlin.backend.jvm.InlineClassAbi
+import org.jetbrains.kotlin.backend.jvm.JvmBackendContext
+import org.jetbrains.kotlin.backend.jvm.MemoizedValueClassAbstractReplacements
+import org.jetbrains.kotlin.ir.IrStatement
+import org.jetbrains.kotlin.ir.builders.irReturn
+import org.jetbrains.kotlin.ir.declarations.*
+import org.jetbrains.kotlin.ir.expressions.*
+import org.jetbrains.kotlin.ir.symbols.IrValueSymbol
+import org.jetbrains.kotlin.ir.transformStatement
+import org.jetbrains.kotlin.ir.util.*
+import org.jetbrains.kotlin.utils.addToStdlib.safeAs
+
+internal abstract class JvmValueClassAbstractLowering(val context: JvmBackendContext) : FileLoweringPass,
+ IrElementTransformerVoidWithContext() {
+ abstract val replacements: MemoizedValueClassAbstractReplacements
+
+ protected val valueMap = mutableMapOf()
+
+ private fun addBindingsFor(original: IrFunction, replacement: IrFunction) {
+ for ((param, newParam) in original.explicitParameters.zip(replacement.explicitParameters)) {
+ valueMap[param.symbol] = newParam
+ }
+ }
+
+ final override fun lower(irFile: IrFile) {
+ irFile.transformChildrenVoid()
+ }
+
+ abstract fun IrClass.isSpecificLoweringLogicApplicable(): Boolean
+
+ abstract fun IrFunction.isSpecificFieldGetter(): Boolean
+
+ final override fun visitClassNew(declaration: IrClass): IrStatement {
+ // The arguments to the primary constructor are in scope in the initializers of IrFields.
+ declaration.primaryConstructor?.let {
+ replacements.getReplacementFunction(it)?.let { replacement -> addBindingsFor(it, replacement) }
+ }
+
+ declaration.transformDeclarationsFlat { memberDeclaration ->
+ if (memberDeclaration is IrFunction) {
+ withinScope(memberDeclaration) {
+ transformFunctionFlat(memberDeclaration)
+ }
+ } else {
+ memberDeclaration.accept(this, null)
+ null
+ }
+ }
+
+ if (declaration.isSpecificLoweringLogicApplicable()) {
+ val irConstructor = declaration.primaryConstructor!!
+ // The field getter is used by reflection and cannot be removed here unless it is internal.
+ declaration.declarations.removeIf {
+ it == irConstructor || (it is IrFunction && it.isSpecificFieldGetter() && !it.visibility.isPublicAPI)
+ }
+ buildPrimaryValueClassConstructor(declaration, irConstructor)
+ buildBoxFunction(declaration)
+ buildUnboxFunctions(declaration)
+ buildSpecializedEqualsMethod(declaration)
+ addJvmInlineAnnotation(declaration)
+ }
+
+ return declaration
+ }
+
+ protected fun transformFunctionFlat(function: IrFunction): List? {
+ if (function is IrConstructor && function.isPrimary && function.constructedClass.isSpecificLoweringLogicApplicable()) {
+ return null
+ }
+
+ val replacement = replacements.getReplacementFunction(function)
+ if (replacement == null) {
+ function.transformChildrenVoid()
+ return null
+ }
+
+ if (function is IrSimpleFunction && function.overriddenSymbols.any { it.owner.parentAsClass.isFun }) {
+ // If fun interface methods are already mangled, do not mangle them twice.
+ val suffix = function.hashSuffix()
+ if (suffix != null && function.name.asString().endsWith(suffix)) {
+ function.transformChildrenVoid()
+ return null
+ }
+ }
+
+ addBindingsFor(function, replacement)
+ return when (function) {
+ is IrSimpleFunction -> transformSimpleFunctionFlat(function, replacement)
+ is IrConstructor -> transformConstructorFlat(function, replacement)
+ else -> throw IllegalStateException()
+ }
+ }
+
+ private fun IrFunction.hashSuffix(): String? = InlineClassAbi.hashSuffix(
+ this,
+ context.state.functionsWithInlineClassReturnTypesMangled,
+ context.state.useOldManglingSchemeForFunctionsWithInlineClassesInSignatures
+ )
+
+ protected abstract fun transformConstructorFlat(constructor: IrConstructor, replacement: IrSimpleFunction): List
+
+ protected abstract fun transformSimpleFunctionFlat(function: IrSimpleFunction, replacement: IrSimpleFunction): List
+
+ protected abstract fun buildPrimaryValueClassConstructor(valueClass: IrClass, irConstructor: IrConstructor)
+
+ protected abstract fun buildBoxFunction(valueClass: IrClass)
+
+ protected abstract fun buildUnboxFunctions(valueClass: IrClass)
+
+ protected abstract fun buildSpecializedEqualsMethod(valueClass: IrClass) // todo hashCode
+
+ protected abstract fun addJvmInlineAnnotation(valueClass: IrClass)
+
+// abstract override fun visitFunctionReference(expression: IrFunctionReference): IrExpression
+
+// abstract override fun visitFunctionAccess(expression: IrFunctionAccessExpression): IrExpression
+
+// abstract override fun visitCall(expression: IrCall): IrExpression
+
+// abstract override fun visitGetField(expression: IrGetField): IrExpression
+
+ final override fun visitReturn(expression: IrReturn): IrExpression {
+ expression.returnTargetSymbol.owner.safeAs()?.let { target ->
+ val suffix = target.hashSuffix()
+ if (suffix != null && target.name.asString().endsWith(suffix))
+ return super.visitReturn(expression)
+
+ replacements.getReplacementFunction(target)?.let {
+ return context.createIrBuilder(it.symbol, expression.startOffset, expression.endOffset).irReturn(
+ expression.value.transform(this, null)
+ )
+ }
+ }
+ return super.visitReturn(expression)
+ }
+
+ private fun visitStatementContainer(container: IrStatementContainer) {
+ container.statements.transformFlat { statement ->
+ if (statement is IrFunction)
+ transformFunctionFlat(statement)
+ else
+ listOf(statement.transformStatement(this))
+ }
+ }
+
+ final override fun visitContainerExpression(expression: IrContainerExpression): IrExpression {
+ visitStatementContainer(expression)
+ return expression
+ }
+
+ final override fun visitBlockBody(body: IrBlockBody): IrBody {
+ visitStatementContainer(body)
+ return body
+ }
+
+ // Anonymous initializers in inline classes are processed when building the primary constructor.
+ final override fun visitAnonymousInitializerNew(declaration: IrAnonymousInitializer): IrStatement =
+ if (declaration.parent.safeAs()?.isSpecificLoweringLogicApplicable() == true)
+ declaration
+ else
+ super.visitAnonymousInitializerNew(declaration)
+
+}
\ No newline at end of file
diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/InlineClassAbi.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/InlineClassAbi.kt
index 6a251ee3959..3f4c48ab267 100644
--- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/InlineClassAbi.kt
+++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/InlineClassAbi.kt
@@ -147,3 +147,11 @@ val IrClass.inlineClassFieldName: Name
val IrFunction.isInlineClassFieldGetter: Boolean
get() = (parent as? IrClass)?.isSingleFieldValueClass == true && this is IrSimpleFunction && extensionReceiverParameter == null &&
correspondingPropertySymbol?.let { it.owner.getter == this && it.owner.name == parentAsClass.inlineClassFieldName } == true
+
+val IrFunction.isMultiFieldValueClassFieldGetter: Boolean
+ get() = (parent as? IrClass)?.isMultiFieldValueClass == true && this is IrSimpleFunction && extensionReceiverParameter == null &&
+ correspondingPropertySymbol?.let {
+ val multiFieldValueClassRepresentation = parentAsClass.multiFieldValueClassRepresentation
+ ?: error("Multi-field value class must have multiFieldValueClassRepresentation: ${parentAsClass.render()}")
+ it.owner.getter == this && multiFieldValueClassRepresentation.containsPropertyWithName(it.owner.name)
+ } == true
diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmBackendContext.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmBackendContext.kt
index 1ea37715893..d4a3b0b8586 100644
--- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmBackendContext.kt
+++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmBackendContext.kt
@@ -129,6 +129,9 @@ class JvmBackendContext(
val inlineClassReplacements = MemoizedInlineClassReplacements(state.functionsWithInlineClassReturnTypesMangled, irFactory, this)
+ val multiFieldValueClassReplacements =
+ MemoizedMultiFieldValueClassReplacements(state.functionsWithInlineClassReturnTypesMangled, irFactory, this)
+
val continuationClassesVarsCountByType: MutableMap> = hashMapOf()
val inlineMethodGenerationLock = Any()
diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/MemoizedInlineClassReplacements.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/MemoizedInlineClassReplacements.kt
index a57edfa4c8a..acafe19a24f 100644
--- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/MemoizedInlineClassReplacements.kt
+++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/MemoizedInlineClassReplacements.kt
@@ -34,9 +34,9 @@ import java.util.concurrent.ConcurrentHashMap
*/
class MemoizedInlineClassReplacements(
private val mangleReturnTypes: Boolean,
- private val irFactory: IrFactory,
- private val context: JvmBackendContext
-) {
+ irFactory: IrFactory,
+ context: JvmBackendContext
+) : MemoizedValueClassAbstractReplacements(irFactory, context) {
private val storageManager = LockBasedStorageManager("inline-class-replacements")
private val propertyMap = ConcurrentHashMap()
@@ -46,7 +46,7 @@ class MemoizedInlineClassReplacements(
/**
* Get a replacement for a function or a constructor.
*/
- val getReplacementFunction: (IrFunction) -> IrSimpleFunction? =
+ override val getReplacementFunction: (IrFunction) -> IrSimpleFunction? =
storageManager.createMemoizedFunctionWithNullableValues {
when {
// Don't mangle anonymous or synthetic functions, except for generated SAM wrapper methods
diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/MemoizedMultiFieldValueClassReplacements.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/MemoizedMultiFieldValueClassReplacements.kt
new file mode 100644
index 00000000000..a3f9472e1f7
--- /dev/null
+++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/MemoizedMultiFieldValueClassReplacements.kt
@@ -0,0 +1,302 @@
+/*
+ * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package org.jetbrains.kotlin.backend.jvm
+
+import org.jetbrains.kotlin.backend.common.ir.copyTo
+import org.jetbrains.kotlin.backend.common.ir.copyTypeParameters
+import org.jetbrains.kotlin.backend.jvm.ir.*
+import org.jetbrains.kotlin.descriptors.DescriptorVisibilities
+import org.jetbrains.kotlin.descriptors.Modality
+import org.jetbrains.kotlin.ir.builders.declarations.buildFun
+import org.jetbrains.kotlin.ir.builders.declarations.buildProperty
+import org.jetbrains.kotlin.ir.declarations.*
+import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol
+import org.jetbrains.kotlin.ir.types.isInt
+import org.jetbrains.kotlin.ir.util.*
+import org.jetbrains.kotlin.name.Name
+import org.jetbrains.kotlin.storage.LockBasedStorageManager
+import org.jetbrains.kotlin.utils.addToStdlib.safeAs
+import java.util.concurrent.ConcurrentHashMap
+
+/**
+ * Keeps track of replacement functions and multi-field value class box/unbox functions.
+ */
+class MemoizedMultiFieldValueClassReplacements(
+ private val mangleReturnTypes: Boolean, // todo always false
+ irFactory: IrFactory,
+ context: JvmBackendContext
+) : MemoizedValueClassAbstractReplacements(irFactory, context) { // There is only sample logic yet
+ private val storageManager = LockBasedStorageManager("multi-field-value-class-replacements")
+ private val propertyMap = ConcurrentHashMap()
+
+ val originalFunctionForStaticReplacement: MutableMap = ConcurrentHashMap()
+ internal val originalFunctionForMethodReplacement: MutableMap = ConcurrentHashMap()
+
+ /**
+ * Get a replacement for a function or a constructor.
+ */
+ override val getReplacementFunction: (IrFunction) -> IrSimpleFunction? = storageManager.createMemoizedFunctionWithNullableValues {
+ when {
+ // Don't mangle anonymous or synthetic functions, except for generated SAM wrapper methods
+ (it.isLocal && it is IrSimpleFunction && it.overriddenSymbols.isEmpty()) ||
+ (it.origin == IrDeclarationOrigin.DELEGATED_PROPERTY_ACCESSOR && it.visibility == DescriptorVisibilities.LOCAL) ||
+ it.isStaticInlineClassReplacement ||
+ it.origin.isSynthetic && it.origin != IrDeclarationOrigin.SYNTHETIC_GENERATED_SAM_IMPLEMENTATION ->
+ null
+
+ it.isMultiFieldValueClassFieldGetter ->
+ if (it.hasMangledReturnType)
+ createMethodReplacement(it)
+ else
+ null
+
+ // Mangle all functions in the body of an inline class
+ it.parent.safeAs()?.isMultiFieldValueClass == true ->
+ when {
+ it.isRemoveAtSpecialBuiltinStub() ->
+ null
+ it.isInlineClassMemberFakeOverriddenFromJvmDefaultInterfaceMethod() ||
+ it.origin == IrDeclarationOrigin.IR_BUILTINS_STUB ->
+ createMethodReplacement(it)
+ else ->
+ createStaticReplacement(it)
+ }
+
+ // Otherwise, mangle functions with mangled parameters, ignoring constructors
+ it is IrSimpleFunction && !it.isFromJava() && (it.hasMangledParameters || mangleReturnTypes && it.hasMangledReturnType) ->
+ createMethodReplacement(it)
+
+ else ->
+ null
+ }
+ }
+
+ private fun IrFunction.isRemoveAtSpecialBuiltinStub() =
+ origin == IrDeclarationOrigin.IR_BUILTINS_STUB &&
+ name.asString() == "remove" &&
+ valueParameters.size == 1 &&
+ valueParameters[0].type.isInt()
+
+ private fun IrFunction.isInlineClassMemberFakeOverriddenFromJvmDefaultInterfaceMethod(): Boolean {
+ if (this !is IrSimpleFunction) return false
+ if (!this.isFakeOverride) return false
+ val parentClass = parentClassOrNull ?: return false
+ if (!parentClass.isMultiFieldValueClass) return false
+
+ val overridden = resolveFakeOverride() ?: return false
+ if (!overridden.parentAsClass.isJvmInterface) return false
+ if (overridden.modality == Modality.ABSTRACT) return false
+
+ // We have a non-abstract interface member.
+ // It is a JVM default interface method if one of the following conditions are true:
+ // - it is a Java method,
+ // - it is a Kotlin function compiled to JVM default interface method.
+ return overridden.isFromJava() || overridden.isCompiledToJvmDefault(context.state.jvmDefaultMode)
+ }
+
+// /**
+// * Get the box function for an inline class. Concretely, this is a synthetic
+// * static function named "box-impl" which takes an unboxed value and returns
+// * a boxed value.
+// */
+// val getBoxFunction: (IrClass) -> IrSimpleFunction =
+// storageManager.createMemoizedFunction { irClass ->
+// require(irClass.isSingleFieldValueClass)
+// irFactory.buildFun {
+// name = Name.identifier(KotlinTypeMapper.BOX_JVM_METHOD_NAME)
+// origin = JvmLoweredDeclarationOrigin.SYNTHETIC_INLINE_CLASS_MEMBER
+// returnType = irClass.defaultType
+// }.apply {
+// parent = irClass
+// copyTypeParametersFrom(irClass)
+// addValueParameter {
+// name = InlineClassDescriptorResolver.BOXING_VALUE_PARAMETER_NAME
+// type = irClass.inlineClassRepresentation!!.underlyingType
+// }
+// }
+// }
+//
+// /**
+// * Get the unbox function for an inline class. Concretely, this is a synthetic
+// * member function named "unbox-impl" which returns an unboxed result.
+// */
+// val getUnboxFunction: (IrClass) -> IrSimpleFunction =
+// storageManager.createMemoizedFunction { irClass ->
+// require(irClass.isSingleFieldValueClass)
+// irFactory.buildFun {
+// name = Name.identifier(KotlinTypeMapper.UNBOX_JVM_METHOD_NAME)
+// origin = JvmLoweredDeclarationOrigin.SYNTHETIC_INLINE_CLASS_MEMBER
+// returnType = irClass.inlineClassRepresentation!!.underlyingType
+// }.apply {
+// parent = irClass
+// createDispatchReceiverParameter()
+// }
+// }
+//
+// private val specializedEqualsCache = storageManager.createCacheWithNotNullValues()
+// fun getSpecializedEqualsMethod(irClass: IrClass, irBuiltIns: IrBuiltIns): IrSimpleFunction {
+// require(irClass.isSingleFieldValueClass)
+// return specializedEqualsCache.computeIfAbsent(irClass) {
+// irFactory.buildFun {
+// name = InlineClassDescriptorResolver.SPECIALIZED_EQUALS_NAME
+// // TODO: Revisit this once we allow user defined equals methods in inline classes.
+// origin = JvmLoweredDeclarationOrigin.INLINE_CLASS_GENERATED_IMPL_METHOD
+// returnType = irBuiltIns.booleanType
+// }.apply {
+// parent = irClass
+// // We ignore type arguments here, since there is no good way to go from type arguments to types in the IR anyway.
+// val typeArgument =
+// IrSimpleTypeImpl(null, irClass.symbol, false, List(irClass.typeParameters.size) { IrStarProjectionImpl }, listOf())
+// addValueParameter {
+// name = InlineClassDescriptorResolver.SPECIALIZED_EQUALS_FIRST_PARAMETER_NAME
+// type = typeArgument
+// }
+// addValueParameter {
+// name = InlineClassDescriptorResolver.SPECIALIZED_EQUALS_SECOND_PARAMETER_NAME
+// type = typeArgument
+// }
+// }
+// }
+// }
+
+ private fun createMethodReplacement(function: IrFunction): IrSimpleFunction =
+ buildReplacement(function, function.origin) {
+ originalFunctionForMethodReplacement[this] = function
+ dispatchReceiverParameter = function.dispatchReceiverParameter?.copyTo(this, index = -1)
+ extensionReceiverParameter = function.extensionReceiverParameter?.copyTo(
+ // The function's name will be mangled, so preserve the old receiver name.
+ this, index = -1, name = Name.identifier(function.extensionReceiverName(context.state))
+ )
+ contextReceiverParametersCount = function.contextReceiverParametersCount
+ valueParameters = function.valueParameters.mapIndexed { index, parameter ->
+ parameter.copyTo(this, index = index, defaultValue = null).also {
+ // Assuming that constructors and non-override functions are always replaced with the unboxed
+ // equivalent, deep-copying the value here is unnecessary. See `JvmInlineClassLowering`.
+ it.defaultValue = parameter.defaultValue?.patchDeclarationParents(this)
+ }
+ }
+ }
+
+ private fun createStaticReplacement(function: IrFunction): IrSimpleFunction =
+ buildReplacement(function, JvmLoweredDeclarationOrigin.STATIC_INLINE_CLASS_REPLACEMENT, noFakeOverride = true) {
+ originalFunctionForStaticReplacement[this] = function
+
+ val newValueParameters = mutableListOf()
+ if (function.dispatchReceiverParameter != null) {
+ // FAKE_OVERRIDEs have broken dispatch receivers
+ newValueParameters += function.parentAsClass.thisReceiver!!.copyTo(
+ this, index = newValueParameters.size, name = Name.identifier("arg${newValueParameters.size}"),
+ type = function.parentAsClass.defaultType, origin = IrDeclarationOrigin.MOVED_DISPATCH_RECEIVER
+ )
+ }
+ if (function.contextReceiverParametersCount != 0) {
+ function.valueParameters.take(function.contextReceiverParametersCount).forEachIndexed { i, contextReceiver ->
+ newValueParameters += contextReceiver.copyTo(
+ this, index = newValueParameters.size, name = Name.identifier("contextReceiver$i"),
+ origin = IrDeclarationOrigin.MOVED_CONTEXT_RECEIVER
+ )
+ }
+ }
+ function.extensionReceiverParameter?.let {
+ newValueParameters += it.copyTo(
+ this, index = newValueParameters.size, name = Name.identifier(function.extensionReceiverName(context.state)),
+ origin = IrDeclarationOrigin.MOVED_EXTENSION_RECEIVER
+ )
+ }
+ for (parameter in function.valueParameters.drop(function.contextReceiverParametersCount)) {
+ newValueParameters += parameter.copyTo(this, index = newValueParameters.size, defaultValue = null).also {
+ // See comment next to a similar line above.
+ it.defaultValue = parameter.defaultValue?.patchDeclarationParents(this)
+ }
+ }
+ valueParameters = newValueParameters
+ }
+
+ private fun buildReplacement(
+ function: IrFunction,
+ replacementOrigin: IrDeclarationOrigin,
+ noFakeOverride: Boolean = false,
+ body: IrFunction.() -> Unit
+ ): IrSimpleFunction {
+ val useOldManglingScheme = context.state.useOldManglingSchemeForFunctionsWithInlineClassesInSignatures
+ val replacement = buildReplacementInner(function, replacementOrigin, noFakeOverride, useOldManglingScheme, body)
+ // When using the new mangling scheme we might run into dependencies using the old scheme
+ // for which we will fall back to the old mangling scheme as well.
+ if (
+ !useOldManglingScheme &&
+ replacement.name.asString().contains("-") &&
+ function.parentClassId?.let { classFileContainsMethod(it, replacement, context) } == false
+ ) {
+ return buildReplacementInner(function, replacementOrigin, noFakeOverride, true, body)
+ }
+ return replacement
+ }
+
+ private fun buildReplacementInner(
+ function: IrFunction,
+ replacementOrigin: IrDeclarationOrigin,
+ noFakeOverride: Boolean,
+ useOldManglingScheme: Boolean,
+ body: IrFunction.() -> Unit,
+ ): IrSimpleFunction = irFactory.buildFun {
+ updateFrom(function)
+ if (function is IrConstructor) {
+ // The [updateFrom] call will set the modality to FINAL for constructors, while the JVM backend would use OPEN here.
+ modality = Modality.OPEN
+ }
+ origin = when {
+ function.origin == IrDeclarationOrigin.GENERATED_SINGLE_FIELD_VALUE_CLASS_MEMBER ->
+ JvmLoweredDeclarationOrigin.INLINE_CLASS_GENERATED_IMPL_METHOD
+ function is IrConstructor && function.constructedClass.isSingleFieldValueClass ->
+ JvmLoweredDeclarationOrigin.STATIC_INLINE_CLASS_CONSTRUCTOR
+ else ->
+ replacementOrigin
+ }
+ if (noFakeOverride) {
+ isFakeOverride = false
+ }
+ name = InlineClassAbi.mangledNameFor(function, mangleReturnTypes, useOldManglingScheme)
+ returnType = function.returnType
+ }.apply {
+ parent = function.parent
+ annotations = function.annotations
+ copyTypeParameters(function.allTypeParameters)
+ if (function.metadata != null) {
+ metadata = function.metadata
+ function.metadata = null
+ }
+ copyAttributes(function as? IrAttributeContainer)
+
+ if (function is IrSimpleFunction) {
+ val propertySymbol = function.correspondingPropertySymbol
+ if (propertySymbol != null) {
+ val property = propertyMap.getOrPut(propertySymbol) {
+ irFactory.buildProperty {
+ name = propertySymbol.owner.name
+ updateFrom(propertySymbol.owner)
+ }.apply {
+ parent = propertySymbol.owner.parent
+ copyAttributes(propertySymbol.owner)
+ annotations = propertySymbol.owner.annotations
+ backingField = propertySymbol.owner.backingField
+ }
+ }
+ correspondingPropertySymbol = property.symbol
+ when (function) {
+ propertySymbol.owner.getter -> property.getter = this
+ propertySymbol.owner.setter -> property.setter = this
+ else -> error("Orphaned property getter/setter: ${function.render()}")
+ }
+ }
+
+ overriddenSymbols = function.overriddenSymbols.map {
+ getReplacementFunction(it.owner)?.symbol ?: it
+ }
+ }
+
+ body()
+ }
+}
diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/MemoizedValueClassAbstractReplacements.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/MemoizedValueClassAbstractReplacements.kt
new file mode 100644
index 00000000000..8ddb711a38d
--- /dev/null
+++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/MemoizedValueClassAbstractReplacements.kt
@@ -0,0 +1,17 @@
+/*
+ * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package org.jetbrains.kotlin.backend.jvm
+
+import org.jetbrains.kotlin.ir.declarations.IrFactory
+import org.jetbrains.kotlin.ir.declarations.IrFunction
+import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction
+
+abstract class MemoizedValueClassAbstractReplacements(protected val irFactory: IrFactory, protected val context: JvmBackendContext) {
+ /**
+ * Get a replacement for a function or a constructor.
+ */
+ abstract val getReplacementFunction: (IrFunction) -> IrSimpleFunction?
+}
\ No newline at end of file
diff --git a/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrClassImpl.kt b/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrClassImpl.kt
index 970d4ae9b5f..485d0dc5f94 100644
--- a/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrClassImpl.kt
+++ b/compiler/ir/ir.tree.impl/src/org/jetbrains/kotlin/ir/declarations/impl/IrClassImpl.kt
@@ -65,6 +65,8 @@ open class IrClassImpl(
override var inlineClassRepresentation: InlineClassRepresentation? = null
+ override var multiFieldValueClassRepresentation: MultiFieldValueClassRepresentation? = null
+
override var metadata: MetadataSource? = null
override var attributeOwnerId: IrAttributeContainer = this
diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrClass.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrClass.kt
index 65cd9d2142d..da2cc53122b 100644
--- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrClass.kt
+++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrClass.kt
@@ -40,6 +40,8 @@ abstract class IrClass :
abstract var inlineClassRepresentation: InlineClassRepresentation?
+ abstract var multiFieldValueClassRepresentation: MultiFieldValueClassRepresentation?
+
abstract var sealedSubclasses: List
override fun accept(visitor: IrElementVisitor, data: D): R =
diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyClass.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyClass.kt
index c1678a9da38..609b4818c63 100644
--- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyClass.kt
+++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyClass.kt
@@ -17,6 +17,7 @@ import org.jetbrains.kotlin.metadata.ProtoBuf
import org.jetbrains.kotlin.metadata.deserialization.NameResolver
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedClassDescriptor
+import org.jetbrains.kotlin.types.SimpleType
class IrLazyClass(
override val startOffset: Int,
@@ -101,9 +102,14 @@ class IrLazyClass(
}
override var inlineClassRepresentation: InlineClassRepresentation? by lazyVar(stubGenerator.lock) {
- descriptor.inlineClassRepresentation?.mapUnderlyingType {
- it.toIrType() as? IrSimpleType ?: error("Inline class underlying type is not a simple type: ${render()}")
- }
+ descriptor.inlineClassRepresentation?.mapUnderlyingType(::simplyTypeToIrOrThrow)
+ }
+
+ private fun simplyTypeToIrOrThrow(it: SimpleType) =
+ it.toIrType() as? IrSimpleType ?: error("Inline class underlying type is not a simple type: ${render()}")
+
+ override var multiFieldValueClassRepresentation: MultiFieldValueClassRepresentation? by lazyVar(stubGenerator.lock) {
+ descriptor.multiFieldValueClassRepresentation?.mapUnderlyingType(::simplyTypeToIrOrThrow)
}
override var attributeOwnerId: IrAttributeContainer = this
diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBasedDescriptors.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBasedDescriptors.kt
index 9debc9f49d7..cb89348f9f7 100644
--- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBasedDescriptors.kt
+++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBasedDescriptors.kt
@@ -629,6 +629,9 @@ open class IrBasedClassDescriptor(owner: IrClass) : ClassDescriptor, IrBasedDecl
override fun getInlineClassRepresentation(): InlineClassRepresentation? =
owner.inlineClassRepresentation?.mapUnderlyingType { it.toIrBasedKotlinType() as SimpleType }
+ override fun getMultiFieldValueClassRepresentation(): MultiFieldValueClassRepresentation? =
+ owner.multiFieldValueClassRepresentation?.mapUnderlyingType { it.toIrBasedKotlinType() as SimpleType }
+
override fun getOriginal() = this
override fun isExpect() = owner.isExpect
@@ -759,6 +762,8 @@ open class IrBasedEnumEntryDescriptor(owner: IrEnumEntry) : ClassDescriptor, IrB
override fun getInlineClassRepresentation(): InlineClassRepresentation? = TODO("not implemented")
+ override fun getMultiFieldValueClassRepresentation(): MultiFieldValueClassRepresentation? = TODO("not implemented")
+
override fun getOriginal() = this
override fun isExpect() = false
diff --git a/compiler/testData/codegen/box/valueClasses/classFlattening.kt b/compiler/testData/codegen/box/valueClasses/classFlattening.kt
new file mode 100644
index 00000000000..7ab9d6f0c39
--- /dev/null
+++ b/compiler/testData/codegen/box/valueClasses/classFlattening.kt
@@ -0,0 +1,21 @@
+// WITH_STDLIB
+// TARGET_BACKEND: JVM_IR
+// WORKS_WHEN_VALUE_CLASS
+// LANGUAGE: +ValueClasses
+
+@JvmInline
+value class IC(val x: UInt)
+
+fun ic(x: IC) = x.x
+
+@JvmInline
+value class SimpleMFVC(val x: UInt, val y: IC, val z: String)
+
+fun smfvc(ic: IC, x: SimpleMFVC, ic1: UInt) = ic(ic) + x.x + ic(x.y) + ic1
+
+@JvmInline
+value class GreaterMFVC(val x: SimpleMFVC, val y: IC, val z: SimpleMFVC)
+
+fun gmfvc(ic: IC, x: GreaterMFVC, ic1: UInt) = smfvc(ic, x.x, 0U) + ic(x.y) + smfvc(IC(0U), x.z, ic1)
+
+fun box() = "todo"
\ No newline at end of file
diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java
index dddd79d355b..030127f48c3 100644
--- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java
+++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java
@@ -48207,6 +48207,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/valueClasses"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
+ @Test
+ @TestMetadata("classFlattening.kt")
+ public void testClassFlattening() throws Exception {
+ runTest("compiler/testData/codegen/box/valueClasses/classFlattening.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
+ }
+
@Test
@TestMetadata("equality.kt")
public void testEquality() throws Exception {
diff --git a/core/compiler.common/src/org/jetbrains/kotlin/descriptors/MultiFieldValueClassRepresentation.kt b/core/compiler.common/src/org/jetbrains/kotlin/descriptors/MultiFieldValueClassRepresentation.kt
new file mode 100644
index 00000000000..e7e39aea770
--- /dev/null
+++ b/core/compiler.common/src/org/jetbrains/kotlin/descriptors/MultiFieldValueClassRepresentation.kt
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
+ * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
+ */
+
+package org.jetbrains.kotlin.descriptors
+
+import org.jetbrains.kotlin.name.Name
+import org.jetbrains.kotlin.types.model.SimpleTypeMarker
+
+class MultiFieldValueClassRepresentation(
+ val underlyingPropertyNamesToTypes: List>
+) {
+ init {
+ require(underlyingPropertyNamesToTypes.size > 1) { "MultiFieldValueClassRepresentation has at least 2 properties" }
+ }
+
+ private val map = underlyingPropertyNamesToTypes.toMap().also {
+ require(it.size == underlyingPropertyNamesToTypes.size) { "Some properties have the same names" }
+ }
+
+ fun containsPropertyWithName(name: Name): Boolean = name in map
+ fun propertyTypeByName(name: Name): Type? = map[name]
+
+ inline fun mapUnderlyingType(transform: (Type) -> Other): MultiFieldValueClassRepresentation =
+ MultiFieldValueClassRepresentation(underlyingPropertyNamesToTypes.map { (key, value) -> key to transform(value) })
+}
\ No newline at end of file
diff --git a/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassDescriptor.kt b/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassDescriptor.kt
index e2dfaef725e..9c8ac1560b8 100644
--- a/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassDescriptor.kt
+++ b/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassDescriptor.kt
@@ -9,7 +9,6 @@ import org.jetbrains.kotlin.builtins.KotlinBuiltIns
import org.jetbrains.kotlin.builtins.StandardNames
import org.jetbrains.kotlin.builtins.jvm.createMappedTypeParametersSubstitution
import org.jetbrains.kotlin.descriptors.*
-import org.jetbrains.kotlin.descriptors.annotations.Annotations
import org.jetbrains.kotlin.descriptors.impl.ClassDescriptorBase
import org.jetbrains.kotlin.incremental.components.NoLookupLocation
import org.jetbrains.kotlin.load.java.FakePureImplementationsProvider
@@ -40,7 +39,6 @@ import org.jetbrains.kotlin.types.*
import org.jetbrains.kotlin.types.checker.KotlinTypeRefiner
import org.jetbrains.kotlin.utils.addIfNotNull
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
-import java.util.*
class LazyJavaClassDescriptor(
val outerContext: LazyJavaResolverContext,
@@ -200,6 +198,8 @@ class LazyJavaClassDescriptor(
override fun getInlineClassRepresentation(): InlineClassRepresentation? = null
+ override fun getMultiFieldValueClassRepresentation(): MultiFieldValueClassRepresentation? = null
+
override fun toString() = "Lazy Java class ${this.fqNameUnsafe}"
private inner class LazyJavaClassTypeConstructor : AbstractClassTypeConstructor(c.storageManager) {
diff --git a/core/descriptors/src/org/jetbrains/kotlin/builtins/functions/FunctionClassDescriptor.kt b/core/descriptors/src/org/jetbrains/kotlin/builtins/functions/FunctionClassDescriptor.kt
index df4fcc57f38..ba5226590bc 100644
--- a/core/descriptors/src/org/jetbrains/kotlin/builtins/functions/FunctionClassDescriptor.kt
+++ b/core/descriptors/src/org/jetbrains/kotlin/builtins/functions/FunctionClassDescriptor.kt
@@ -88,6 +88,7 @@ class FunctionClassDescriptor(
override fun getSource(): SourceElement = SourceElement.NO_SOURCE
override fun getSealedSubclasses() = emptyList()
override fun getInlineClassRepresentation(): InlineClassRepresentation? = null
+ override fun getMultiFieldValueClassRepresentation(): MultiFieldValueClassRepresentation? = null
override fun getDeclaredTypeParameters() = parameters
diff --git a/core/descriptors/src/org/jetbrains/kotlin/descriptors/ClassDescriptor.java b/core/descriptors/src/org/jetbrains/kotlin/descriptors/ClassDescriptor.java
index 223856ea27c..1026e5cc91a 100644
--- a/core/descriptors/src/org/jetbrains/kotlin/descriptors/ClassDescriptor.java
+++ b/core/descriptors/src/org/jetbrains/kotlin/descriptors/ClassDescriptor.java
@@ -104,6 +104,9 @@ public interface ClassDescriptor extends ClassifierDescriptorWithTypeParameters,
@Nullable
InlineClassRepresentation getInlineClassRepresentation();
+ @Nullable
+ MultiFieldValueClassRepresentation getMultiFieldValueClassRepresentation();
+
@NotNull
@Override
ClassDescriptor getOriginal();
diff --git a/core/descriptors/src/org/jetbrains/kotlin/descriptors/NotFoundClasses.kt b/core/descriptors/src/org/jetbrains/kotlin/descriptors/NotFoundClasses.kt
index 3bccebad2d5..adcd56a2cca 100644
--- a/core/descriptors/src/org/jetbrains/kotlin/descriptors/NotFoundClasses.kt
+++ b/core/descriptors/src/org/jetbrains/kotlin/descriptors/NotFoundClasses.kt
@@ -85,6 +85,7 @@ class NotFoundClasses(private val storageManager: StorageManager, private val mo
override fun getCompanionObjectDescriptor(): ClassDescriptor? = null
override fun getSealedSubclasses(): Collection = emptyList()
override fun getInlineClassRepresentation(): InlineClassRepresentation? = null
+ override fun getMultiFieldValueClassRepresentation(): MultiFieldValueClassRepresentation? = null
override fun toString() = "class $name (not found)"
}
diff --git a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/ClassDescriptorImpl.java b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/ClassDescriptorImpl.java
index e0abf5dace8..a0f92660ba7 100644
--- a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/ClassDescriptorImpl.java
+++ b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/ClassDescriptorImpl.java
@@ -181,4 +181,10 @@ public class ClassDescriptorImpl extends ClassDescriptorBase {
public InlineClassRepresentation getInlineClassRepresentation() {
return null;
}
+
+ @Nullable
+ @Override
+ public MultiFieldValueClassRepresentation getMultiFieldValueClassRepresentation() {
+ return null;
+ }
}
diff --git a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/EnumEntrySyntheticClassDescriptor.java b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/EnumEntrySyntheticClassDescriptor.java
index aa56db0ccb3..b8b5389a675 100644
--- a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/EnumEntrySyntheticClassDescriptor.java
+++ b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/EnumEntrySyntheticClassDescriptor.java
@@ -199,6 +199,12 @@ public class EnumEntrySyntheticClassDescriptor extends ClassDescriptorBase {
return null;
}
+ @Nullable
+ @Override
+ public MultiFieldValueClassRepresentation getMultiFieldValueClassRepresentation() {
+ return null;
+ }
+
private class EnumEntryScope extends MemberScopeImpl {
private final MemoizedFunctionToNotNull> functions;
private final MemoizedFunctionToNotNull> properties;
diff --git a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/LazySubstitutingClassDescriptor.java b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/LazySubstitutingClassDescriptor.java
index a0c0dd84d25..6537667083d 100644
--- a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/LazySubstitutingClassDescriptor.java
+++ b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/LazySubstitutingClassDescriptor.java
@@ -5,6 +5,7 @@
package org.jetbrains.kotlin.descriptors.impl;
+import kotlin.Pair;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function1;
import org.jetbrains.annotations.NotNull;
@@ -328,10 +329,27 @@ public class LazySubstitutingClassDescriptor extends ModuleAwareClassDescriptor
//noinspection ConstantConditions
return representation == null ? null : new InlineClassRepresentation(
representation.getUnderlyingPropertyName(),
- substituteSimpleType(getInlineClassRepresentation().getUnderlyingType())
+ substituteSimpleType(representation.getUnderlyingType())
);
}
+ @Nullable
+ @Override
+ public MultiFieldValueClassRepresentation getMultiFieldValueClassRepresentation() {
+ MultiFieldValueClassRepresentation representation = original.getMultiFieldValueClassRepresentation();
+ if (representation == null) {
+ return null;
+ }
+ List> underlyingList = new ArrayList>(representation.getUnderlyingPropertyNamesToTypes());
+ for (int i = 0; i < underlyingList.size(); i++) {
+ Pair pair = underlyingList.get(i);
+ Name name = pair.getFirst();
+ SimpleType simpleType = pair.getSecond();
+ underlyingList.set(i, new Pair(name, substituteSimpleType(simpleType)));
+ }
+ return new MultiFieldValueClassRepresentation(underlyingList);
+ }
+
@Nullable
@Override
public SimpleType getDefaultFunctionTypeForSamInterface() {
diff --git a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/MutableClassDescriptor.java b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/MutableClassDescriptor.java
index 487321378e6..0bd7fea7667 100644
--- a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/MutableClassDescriptor.java
+++ b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/MutableClassDescriptor.java
@@ -195,6 +195,12 @@ public class MutableClassDescriptor extends ClassDescriptorBase {
return null;
}
+ @Nullable
+ @Override
+ public MultiFieldValueClassRepresentation getMultiFieldValueClassRepresentation() {
+ return null;
+ }
+
@Override
public String toString() {
return DeclarationDescriptorImpl.toString(this);
diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedClassDescriptor.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedClassDescriptor.kt
index 061e02e1e27..5c2170db18a 100644
--- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedClassDescriptor.kt
+++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedClassDescriptor.kt
@@ -53,7 +53,12 @@ class DeserializedClassDescriptor(
private val typeConstructor = DeserializedClassTypeConstructor()
private val memberScopeHolder =
- ScopesHolderForClass.create(this, c.storageManager, c.components.kotlinTypeChecker.kotlinTypeRefiner, this::DeserializedClassMemberScope)
+ ScopesHolderForClass.create(
+ this,
+ c.storageManager,
+ c.components.kotlinTypeChecker.kotlinTypeRefiner,
+ this::DeserializedClassMemberScope
+ )
private val memberScope get() = memberScopeHolder.getScope(c.components.kotlinTypeChecker.kotlinTypeRefiner)
private val enumEntries = if (kind == ClassKind.ENUM_CLASS) EnumEntryClassDescriptors() else null
@@ -64,6 +69,8 @@ class DeserializedClassDescriptor(
private val companionObjectDescriptor = c.storageManager.createNullableLazyValue { computeCompanionObjectDescriptor() }
private val sealedSubclasses = c.storageManager.createLazyValue { computeSubclassesForSealedClass() }
private val inlineClassRepresentation = c.storageManager.createNullableLazyValue { computeInlineClassRepresentation() }
+ private val multiFieldValueClassRepresentation =
+ c.storageManager.createNullableLazyValue { computeMultiFieldValueClassRepresentation() }
internal val thisAsProtoContainer: ProtoContainer.Class = ProtoContainer.Class(
classProto, c.nameResolver, c.typeTable, sourceElement,
@@ -176,9 +183,11 @@ class DeserializedClassDescriptor(
override fun getSealedSubclasses() = sealedSubclasses()
override fun getInlineClassRepresentation(): InlineClassRepresentation? = inlineClassRepresentation()
+ override fun getMultiFieldValueClassRepresentation(): MultiFieldValueClassRepresentation? =
+ multiFieldValueClassRepresentation()
private fun computeInlineClassRepresentation(): InlineClassRepresentation? {
- if (!isInlineOrValueClass()) return null
+ if (!isInlineClass()) return null
val propertyName = when {
classProto.hasInlineClassUnderlyingPropertyName() ->
@@ -193,17 +202,35 @@ class DeserializedClassDescriptor(
}
val type = classProto.inlineClassUnderlyingType(c.typeTable)?.let(c.typeDeserializer::simpleType)
- ?: run {
- val underlyingProperty =
- memberScope.getContributedVariables(propertyName, NoLookupLocation.FROM_DESERIALIZATION)
- .singleOrNull { it.extensionReceiverParameter == null }
- ?: error("Inline class has no underlying property: $this")
- underlyingProperty.type as SimpleType
- }
+ ?: getPropertyTypeFromContributedVariables(propertyName)
return InlineClassRepresentation(propertyName, type)
}
+ private fun getPropertyTypeFromContributedVariables(propertyName: Name): SimpleType {
+ val underlyingProperty = memberScope.getContributedVariables(propertyName, NoLookupLocation.FROM_DESERIALIZATION)
+ .singleOrNull { it.extensionReceiverParameter == null } ?: error("Value class has no underlying property: $this")
+ return underlyingProperty.type as SimpleType
+ }
+
+ private fun computeMultiFieldValueClassRepresentation(): MultiFieldValueClassRepresentation? {
+ if (!isValueClass() || isInlineClass()) return null
+ val representation = classProto.multiFieldValueClassRepresentation
+ ?: error("No multiFieldValueClassRepresentation for multi-field value class: $this")
+ val propertyList = representation.propertyList.map { valueClassProperty ->
+ val name: Name = c.nameResolver.getName(valueClassProperty.name)
+ val protoType: ProtoBuf.Type = when {
+ valueClassProperty.hasType() -> valueClassProperty.type
+ valueClassProperty.hasTypeId() -> c.typeTable[valueClassProperty.typeId]
+ else -> error("Unlike inline classes before 1.5.0, multi-field value classes always have intermediate representation")
+ }
+ name to c.typeDeserializer.simpleType(protoType)
+ }
+ require(propertyList.size > 1)
+ require(propertyList.distinctBy { (name, _) -> name }.size == propertyList.size)
+ return MultiFieldValueClassRepresentation(propertyList)
+ }
+
override fun toString() =
"deserialized ${if (isExpect) "expect " else ""}class $name" // not using descriptor renderer to preserve laziness
@@ -256,7 +283,7 @@ class DeserializedClassDescriptor(
private inner class DeserializedClassMemberScope(private val kotlinTypeRefiner: KotlinTypeRefiner) : DeserializedMemberScope(
c, classProto.functionList, classProto.propertyList, classProto.typeAliasList,
- classProto.nestedClassNameList.map(c.nameResolver::getName).let { { it } } // workaround KT-13454
+ classProto.nestedClassNameList.map(c.nameResolver::getName).let { list -> { list } } // workaround KT-13454
) {
private val classDescriptor: DeserializedClassDescriptor get() = this@DeserializedClassDescriptor
diff --git a/core/metadata.jvm/src/org/jetbrains/kotlin/metadata/jvm/deserialization/JvmMetadataVersion.kt b/core/metadata.jvm/src/org/jetbrains/kotlin/metadata/jvm/deserialization/JvmMetadataVersion.kt
index 8d4ed112f7c..050c034f60f 100644
--- a/core/metadata.jvm/src/org/jetbrains/kotlin/metadata/jvm/deserialization/JvmMetadataVersion.kt
+++ b/core/metadata.jvm/src/org/jetbrains/kotlin/metadata/jvm/deserialization/JvmMetadataVersion.kt
@@ -26,7 +26,7 @@ class JvmMetadataVersion(versionArray: IntArray, val isStrictSemantics: Boolean)
companion object {
@JvmField
- val INSTANCE = JvmMetadataVersion(1, 7, 0)
+ val INSTANCE = JvmMetadataVersion(1, 7, 1)
@JvmField
val INVALID_VERSION = JvmMetadataVersion()
diff --git a/core/metadata/src/metadata.proto b/core/metadata/src/metadata.proto
index 259613578b2..5cd0aee00c8 100644
--- a/core/metadata/src/metadata.proto
+++ b/core/metadata/src/metadata.proto
@@ -242,6 +242,19 @@ message Class {
optional Type inline_class_underlying_type = 18;
optional int32 inline_class_underlying_type_id = 19 [(type_id_in_table) = true];
+ message MultiFieldValueClassRepresentation {
+ message MultiFieldValueClassProperty {
+ required int32 name = 1;
+ oneof type_representation {
+ Type type = 2;
+ int32 type_id = 3;
+ }
+ }
+ repeated MultiFieldValueClassProperty property = 1;
+ }
+
+ optional MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+
optional TypeTable type_table = 30;
// Index into the VersionRequirementTable
diff --git a/core/metadata/src/org/jetbrains/kotlin/metadata/ProtoBuf.java b/core/metadata/src/org/jetbrains/kotlin/metadata/ProtoBuf.java
index 06157a6ce26..22ab7a37a23 100644
--- a/core/metadata/src/org/jetbrains/kotlin/metadata/ProtoBuf.java
+++ b/core/metadata/src/org/jetbrains/kotlin/metadata/ProtoBuf.java
@@ -8512,6 +8512,15 @@ public final class ProtoBuf {
*/
int getInlineClassUnderlyingTypeId();
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ boolean hasMultiFieldValueClassRepresentation();
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation getMultiFieldValueClassRepresentation();
+
/**
* optional .org.jetbrains.kotlin.metadata.TypeTable type_table = 30;
*/
@@ -8792,9 +8801,22 @@ public final class ProtoBuf {
input.popLimit(limit);
break;
}
+ case 178: {
+ org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000040) == 0x00000040)) {
+ subBuilder = multiFieldValueClassRepresentation_.toBuilder();
+ }
+ multiFieldValueClassRepresentation_ = input.readMessage(org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(multiFieldValueClassRepresentation_);
+ multiFieldValueClassRepresentation_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000040;
+ break;
+ }
case 242: {
org.jetbrains.kotlin.metadata.ProtoBuf.TypeTable.Builder subBuilder = null;
- if (((bitField0_ & 0x00000040) == 0x00000040)) {
+ if (((bitField0_ & 0x00000080) == 0x00000080)) {
subBuilder = typeTable_.toBuilder();
}
typeTable_ = input.readMessage(org.jetbrains.kotlin.metadata.ProtoBuf.TypeTable.PARSER, extensionRegistry);
@@ -8802,13 +8824,13 @@ public final class ProtoBuf {
subBuilder.mergeFrom(typeTable_);
typeTable_ = subBuilder.buildPartial();
}
- bitField0_ |= 0x00000040;
+ bitField0_ |= 0x00000080;
break;
}
case 248: {
- if (!((mutable_bitField0_ & 0x00080000) == 0x00080000)) {
+ if (!((mutable_bitField0_ & 0x00100000) == 0x00100000)) {
versionRequirement_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00080000;
+ mutable_bitField0_ |= 0x00100000;
}
versionRequirement_.add(input.readInt32());
break;
@@ -8816,9 +8838,9 @@ public final class ProtoBuf {
case 250: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00080000) == 0x00080000) && input.getBytesUntilLimit() > 0) {
+ if (!((mutable_bitField0_ & 0x00100000) == 0x00100000) && input.getBytesUntilLimit() > 0) {
versionRequirement_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00080000;
+ mutable_bitField0_ |= 0x00100000;
}
while (input.getBytesUntilLimit() > 0) {
versionRequirement_.add(input.readInt32());
@@ -8828,7 +8850,7 @@ public final class ProtoBuf {
}
case 258: {
org.jetbrains.kotlin.metadata.ProtoBuf.VersionRequirementTable.Builder subBuilder = null;
- if (((bitField0_ & 0x00000080) == 0x00000080)) {
+ if (((bitField0_ & 0x00000100) == 0x00000100)) {
subBuilder = versionRequirementTable_.toBuilder();
}
versionRequirementTable_ = input.readMessage(org.jetbrains.kotlin.metadata.ProtoBuf.VersionRequirementTable.PARSER, extensionRegistry);
@@ -8836,7 +8858,7 @@ public final class ProtoBuf {
subBuilder.mergeFrom(versionRequirementTable_);
versionRequirementTable_ = subBuilder.buildPartial();
}
- bitField0_ |= 0x00000080;
+ bitField0_ |= 0x00000100;
break;
}
}
@@ -8883,7 +8905,7 @@ public final class ProtoBuf {
if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
contextReceiverTypeId_ = java.util.Collections.unmodifiableList(contextReceiverTypeId_);
}
- if (((mutable_bitField0_ & 0x00080000) == 0x00080000)) {
+ if (((mutable_bitField0_ & 0x00100000) == 0x00100000)) {
versionRequirement_ = java.util.Collections.unmodifiableList(versionRequirement_);
}
try {
@@ -9020,6 +9042,1124 @@ public final class ProtoBuf {
// @@protoc_insertion_point(enum_scope:org.jetbrains.kotlin.metadata.Class.Kind)
}
+ public interface MultiFieldValueClassRepresentationOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation)
+ org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
+
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ java.util.List
+ getPropertyList();
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty getProperty(int index);
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ int getPropertyCount();
+ }
+ /**
+ * Protobuf type {@code org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation}
+ */
+ public static final class MultiFieldValueClassRepresentation extends
+ org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements
+ // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation)
+ MultiFieldValueClassRepresentationOrBuilder {
+ // Use MultiFieldValueClassRepresentation.newBuilder() to construct.
+ private MultiFieldValueClassRepresentation(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private MultiFieldValueClassRepresentation(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;}
+
+ private static final MultiFieldValueClassRepresentation defaultInstance;
+ public static MultiFieldValueClassRepresentation getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public MultiFieldValueClassRepresentation getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final org.jetbrains.kotlin.protobuf.ByteString unknownFields;
+ private MultiFieldValueClassRepresentation(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ org.jetbrains.kotlin.protobuf.ByteString.Output unknownFieldsOutput =
+ org.jetbrains.kotlin.protobuf.ByteString.newOutput();
+ org.jetbrains.kotlin.protobuf.CodedOutputStream unknownFieldsCodedOutput =
+ org.jetbrains.kotlin.protobuf.CodedOutputStream.newInstance(
+ unknownFieldsOutput, 1);
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFieldsCodedOutput,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+ property_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ property_.add(input.readMessage(org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.PARSER, extensionRegistry));
+ break;
+ }
+ }
+ }
+ } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+ property_ = java.util.Collections.unmodifiableList(property_);
+ }
+ try {
+ unknownFieldsCodedOutput.flush();
+ } catch (java.io.IOException e) {
+ // Should not happen
+ } finally {
+ unknownFields = unknownFieldsOutput.toByteString();
+ }
+ makeExtensionsImmutable();
+ }
+ }
+ public static org.jetbrains.kotlin.protobuf.Parser PARSER =
+ new org.jetbrains.kotlin.protobuf.AbstractParser() {
+ public MultiFieldValueClassRepresentation parsePartialFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return new MultiFieldValueClassRepresentation(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public org.jetbrains.kotlin.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ public interface MultiFieldValueClassPropertyOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty)
+ org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
+
+ /**
+ * required int32 name = 1;
+ */
+ boolean hasName();
+ /**
+ * required int32 name = 1;
+ */
+ int getName();
+
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ boolean hasType();
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ org.jetbrains.kotlin.metadata.ProtoBuf.Type getType();
+
+ /**
+ * optional int32 type_id = 3;
+ */
+ boolean hasTypeId();
+ /**
+ * optional int32 type_id = 3;
+ */
+ int getTypeId();
+ }
+ /**
+ * Protobuf type {@code org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty}
+ */
+ public static final class MultiFieldValueClassProperty extends
+ org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements
+ // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty)
+ MultiFieldValueClassPropertyOrBuilder {
+ // Use MultiFieldValueClassProperty.newBuilder() to construct.
+ private MultiFieldValueClassProperty(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) {
+ super(builder);
+ this.unknownFields = builder.getUnknownFields();
+ }
+ private MultiFieldValueClassProperty(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;}
+
+ private static final MultiFieldValueClassProperty defaultInstance;
+ public static MultiFieldValueClassProperty getDefaultInstance() {
+ return defaultInstance;
+ }
+
+ public MultiFieldValueClassProperty getDefaultInstanceForType() {
+ return defaultInstance;
+ }
+
+ private final org.jetbrains.kotlin.protobuf.ByteString unknownFields;
+ private MultiFieldValueClassProperty(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ initFields();
+ int mutable_bitField0_ = 0;
+ org.jetbrains.kotlin.protobuf.ByteString.Output unknownFieldsOutput =
+ org.jetbrains.kotlin.protobuf.ByteString.newOutput();
+ org.jetbrains.kotlin.protobuf.CodedOutputStream unknownFieldsCodedOutput =
+ org.jetbrains.kotlin.protobuf.CodedOutputStream.newInstance(
+ unknownFieldsOutput, 1);
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFieldsCodedOutput,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ bitField0_ |= 0x00000001;
+ name_ = input.readInt32();
+ break;
+ }
+ case 18: {
+ org.jetbrains.kotlin.metadata.ProtoBuf.Type.Builder subBuilder = null;
+ if (typeRepresentationCase_ == 2) {
+ subBuilder = ((org.jetbrains.kotlin.metadata.ProtoBuf.Type) typeRepresentation_).toBuilder();
+ }
+ typeRepresentation_ = input.readMessage(org.jetbrains.kotlin.metadata.ProtoBuf.Type.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom((org.jetbrains.kotlin.metadata.ProtoBuf.Type) typeRepresentation_);
+ typeRepresentation_ = subBuilder.buildPartial();
+ }
+ typeRepresentationCase_ = 2;
+ break;
+ }
+ case 24: {
+ typeRepresentationCase_ = 3;
+ typeRepresentation_ = input.readInt32();
+ break;
+ }
+ }
+ }
+ } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this);
+ } finally {
+ try {
+ unknownFieldsCodedOutput.flush();
+ } catch (java.io.IOException e) {
+ // Should not happen
+ } finally {
+ unknownFields = unknownFieldsOutput.toByteString();
+ }
+ makeExtensionsImmutable();
+ }
+ }
+ public static org.jetbrains.kotlin.protobuf.Parser PARSER =
+ new org.jetbrains.kotlin.protobuf.AbstractParser() {
+ public MultiFieldValueClassProperty parsePartialFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return new MultiFieldValueClassProperty(input, extensionRegistry);
+ }
+ };
+
+ @java.lang.Override
+ public org.jetbrains.kotlin.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ private int bitField0_;
+ private int typeRepresentationCase_ = 0;
+ private java.lang.Object typeRepresentation_;
+ public enum TypeRepresentationCase
+ implements org.jetbrains.kotlin.protobuf.Internal.EnumLite {
+ TYPE(2),
+ TYPE_ID(3),
+ TYPEREPRESENTATION_NOT_SET(0);
+ private int value = 0;
+ private TypeRepresentationCase(int value) {
+ this.value = value;
+ }
+ public static TypeRepresentationCase valueOf(int value) {
+ switch (value) {
+ case 2: return TYPE;
+ case 3: return TYPE_ID;
+ case 0: return TYPEREPRESENTATION_NOT_SET;
+ default: throw new java.lang.IllegalArgumentException(
+ "Value is undefined for this oneof enum.");
+ }
+ }
+ public int getNumber() {
+ return this.value;
+ }
+ };
+
+ public TypeRepresentationCase
+ getTypeRepresentationCase() {
+ return TypeRepresentationCase.valueOf(
+ typeRepresentationCase_);
+ }
+
+ public static final int NAME_FIELD_NUMBER = 1;
+ private int name_;
+ /**
+ * required int32 name = 1;
+ */
+ public boolean hasName() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required int32 name = 1;
+ */
+ public int getName() {
+ return name_;
+ }
+
+ public static final int TYPE_FIELD_NUMBER = 2;
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ public boolean hasType() {
+ return typeRepresentationCase_ == 2;
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ public org.jetbrains.kotlin.metadata.ProtoBuf.Type getType() {
+ if (typeRepresentationCase_ == 2) {
+ return (org.jetbrains.kotlin.metadata.ProtoBuf.Type) typeRepresentation_;
+ }
+ return org.jetbrains.kotlin.metadata.ProtoBuf.Type.getDefaultInstance();
+ }
+
+ public static final int TYPE_ID_FIELD_NUMBER = 3;
+ /**
+ * optional int32 type_id = 3;
+ */
+ public boolean hasTypeId() {
+ return typeRepresentationCase_ == 3;
+ }
+ /**
+ * optional int32 type_id = 3;
+ */
+ public int getTypeId() {
+ if (typeRepresentationCase_ == 3) {
+ return (java.lang.Integer) typeRepresentation_;
+ }
+ return 0;
+ }
+
+ private void initFields() {
+ name_ = 0;
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasName()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ if (hasType()) {
+ if (!getType().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeInt32(1, name_);
+ }
+ if (typeRepresentationCase_ == 2) {
+ output.writeMessage(2, (org.jetbrains.kotlin.metadata.ProtoBuf.Type) typeRepresentation_);
+ }
+ if (typeRepresentationCase_ == 3) {
+ output.writeInt32(
+ 3, (int)((java.lang.Integer) typeRepresentation_));
+ }
+ output.writeRawBytes(unknownFields);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += org.jetbrains.kotlin.protobuf.CodedOutputStream
+ .computeInt32Size(1, name_);
+ }
+ if (typeRepresentationCase_ == 2) {
+ size += org.jetbrains.kotlin.protobuf.CodedOutputStream
+ .computeMessageSize(2, (org.jetbrains.kotlin.metadata.ProtoBuf.Type) typeRepresentation_);
+ }
+ if (typeRepresentationCase_ == 3) {
+ size += org.jetbrains.kotlin.protobuf.CodedOutputStream
+ .computeInt32Size(
+ 3, (int)((java.lang.Integer) typeRepresentation_));
+ }
+ size += unknownFields.size();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ protected java.lang.Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseFrom(
+ org.jetbrains.kotlin.protobuf.ByteString data)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseFrom(
+ org.jetbrains.kotlin.protobuf.ByteString data,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseFrom(byte[] data)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseFrom(
+ byte[] data,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseFrom(
+ java.io.InputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseDelimitedFrom(
+ java.io.InputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parseFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ /**
+ * Protobuf type {@code org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty}
+ */
+ public static final class Builder extends
+ org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder<
+ org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty, Builder>
+ implements
+ // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty)
+ org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassPropertyOrBuilder {
+ // Construct using org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ }
+ private static Builder create() {
+ return new Builder();
+ }
+
+ public Builder clear() {
+ super.clear();
+ name_ = 0;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ typeRepresentationCase_ = 0;
+ typeRepresentation_ = null;
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty getDefaultInstanceForType() {
+ return org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.getDefaultInstance();
+ }
+
+ public org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty build() {
+ org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty buildPartial() {
+ org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty result = new org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.name_ = name_;
+ if (typeRepresentationCase_ == 2) {
+ result.typeRepresentation_ = typeRepresentation_;
+ }
+ if (typeRepresentationCase_ == 3) {
+ result.typeRepresentation_ = typeRepresentation_;
+ }
+ result.bitField0_ = to_bitField0_;
+ result.typeRepresentationCase_ = typeRepresentationCase_;
+ return result;
+ }
+
+ public Builder mergeFrom(org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty other) {
+ if (other == org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.getDefaultInstance()) return this;
+ if (other.hasName()) {
+ setName(other.getName());
+ }
+ switch (other.getTypeRepresentationCase()) {
+ case TYPE: {
+ mergeType(other.getType());
+ break;
+ }
+ case TYPE_ID: {
+ setTypeId(other.getTypeId());
+ break;
+ }
+ case TYPEREPRESENTATION_NOT_SET: {
+ break;
+ }
+ }
+ setUnknownFields(
+ getUnknownFields().concat(other.unknownFields));
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasName()) {
+
+ return false;
+ }
+ if (hasType()) {
+ if (!getType().isInitialized()) {
+
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public Builder mergeFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int typeRepresentationCase_ = 0;
+ private java.lang.Object typeRepresentation_;
+ public TypeRepresentationCase
+ getTypeRepresentationCase() {
+ return TypeRepresentationCase.valueOf(
+ typeRepresentationCase_);
+ }
+
+ public Builder clearTypeRepresentation() {
+ typeRepresentationCase_ = 0;
+ typeRepresentation_ = null;
+ return this;
+ }
+
+ private int bitField0_;
+
+ private int name_ ;
+ /**
+ * required int32 name = 1;
+ */
+ public boolean hasName() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required int32 name = 1;
+ */
+ public int getName() {
+ return name_;
+ }
+ /**
+ * required int32 name = 1;
+ */
+ public Builder setName(int value) {
+ bitField0_ |= 0x00000001;
+ name_ = value;
+
+ return this;
+ }
+ /**
+ * required int32 name = 1;
+ */
+ public Builder clearName() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ name_ = 0;
+
+ return this;
+ }
+
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ public boolean hasType() {
+ return typeRepresentationCase_ == 2;
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ public org.jetbrains.kotlin.metadata.ProtoBuf.Type getType() {
+ if (typeRepresentationCase_ == 2) {
+ return (org.jetbrains.kotlin.metadata.ProtoBuf.Type) typeRepresentation_;
+ }
+ return org.jetbrains.kotlin.metadata.ProtoBuf.Type.getDefaultInstance();
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ public Builder setType(org.jetbrains.kotlin.metadata.ProtoBuf.Type value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ typeRepresentation_ = value;
+
+ typeRepresentationCase_ = 2;
+ return this;
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ public Builder setType(
+ org.jetbrains.kotlin.metadata.ProtoBuf.Type.Builder builderForValue) {
+ typeRepresentation_ = builderForValue.build();
+
+ typeRepresentationCase_ = 2;
+ return this;
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ public Builder mergeType(org.jetbrains.kotlin.metadata.ProtoBuf.Type value) {
+ if (typeRepresentationCase_ == 2 &&
+ typeRepresentation_ != org.jetbrains.kotlin.metadata.ProtoBuf.Type.getDefaultInstance()) {
+ typeRepresentation_ = org.jetbrains.kotlin.metadata.ProtoBuf.Type.newBuilder((org.jetbrains.kotlin.metadata.ProtoBuf.Type) typeRepresentation_)
+ .mergeFrom(value).buildPartial();
+ } else {
+ typeRepresentation_ = value;
+ }
+
+ typeRepresentationCase_ = 2;
+ return this;
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Type type = 2;
+ */
+ public Builder clearType() {
+ if (typeRepresentationCase_ == 2) {
+ typeRepresentationCase_ = 0;
+ typeRepresentation_ = null;
+
+ }
+ return this;
+ }
+
+ /**
+ * optional int32 type_id = 3;
+ */
+ public boolean hasTypeId() {
+ return typeRepresentationCase_ == 3;
+ }
+ /**
+ * optional int32 type_id = 3;
+ */
+ public int getTypeId() {
+ if (typeRepresentationCase_ == 3) {
+ return (java.lang.Integer) typeRepresentation_;
+ }
+ return 0;
+ }
+ /**
+ * optional int32 type_id = 3;
+ */
+ public Builder setTypeId(int value) {
+ typeRepresentationCase_ = 3;
+ typeRepresentation_ = value;
+
+ return this;
+ }
+ /**
+ * optional int32 type_id = 3;
+ */
+ public Builder clearTypeId() {
+ if (typeRepresentationCase_ == 3) {
+ typeRepresentationCase_ = 0;
+ typeRepresentation_ = null;
+
+ }
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty)
+ }
+
+ static {
+ defaultInstance = new MultiFieldValueClassProperty(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty)
+ }
+
+ public static final int PROPERTY_FIELD_NUMBER = 1;
+ private java.util.List property_;
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public java.util.List getPropertyList() {
+ return property_;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public java.util.List extends org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassPropertyOrBuilder>
+ getPropertyOrBuilderList() {
+ return property_;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public int getPropertyCount() {
+ return property_.size();
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty getProperty(int index) {
+ return property_.get(index);
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassPropertyOrBuilder getPropertyOrBuilder(
+ int index) {
+ return property_.get(index);
+ }
+
+ private void initFields() {
+ property_ = java.util.Collections.emptyList();
+ }
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ for (int i = 0; i < getPropertyCount(); i++) {
+ if (!getProperty(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ for (int i = 0; i < property_.size(); i++) {
+ output.writeMessage(1, property_.get(i));
+ }
+ output.writeRawBytes(unknownFields);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < property_.size(); i++) {
+ size += org.jetbrains.kotlin.protobuf.CodedOutputStream
+ .computeMessageSize(1, property_.get(i));
+ }
+ size += unknownFields.size();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ protected java.lang.Object writeReplace()
+ throws java.io.ObjectStreamException {
+ return super.writeReplace();
+ }
+
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation parseFrom(
+ org.jetbrains.kotlin.protobuf.ByteString data)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation parseFrom(
+ org.jetbrains.kotlin.protobuf.ByteString data,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation parseFrom(byte[] data)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation parseFrom(
+ byte[] data,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation parseFrom(
+ java.io.InputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation parseDelimitedFrom(
+ java.io.InputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation parseFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation parseFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public static Builder newBuilder() { return Builder.create(); }
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder(org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation prototype) {
+ return newBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() { return newBuilder(this); }
+
+ /**
+ * Protobuf type {@code org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation}
+ */
+ public static final class Builder extends
+ org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder<
+ org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation, Builder>
+ implements
+ // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation)
+ org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentationOrBuilder {
+ // Construct using org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ }
+ private static Builder create() {
+ return new Builder();
+ }
+
+ public Builder clear() {
+ super.clear();
+ property_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ return this;
+ }
+
+ public Builder clone() {
+ return create().mergeFrom(buildPartial());
+ }
+
+ public org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation getDefaultInstanceForType() {
+ return org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.getDefaultInstance();
+ }
+
+ public org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation build() {
+ org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation buildPartial() {
+ org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation result = new org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation(this);
+ int from_bitField0_ = bitField0_;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ property_ = java.util.Collections.unmodifiableList(property_);
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.property_ = property_;
+ return result;
+ }
+
+ public Builder mergeFrom(org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation other) {
+ if (other == org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.getDefaultInstance()) return this;
+ if (!other.property_.isEmpty()) {
+ if (property_.isEmpty()) {
+ property_ = other.property_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensurePropertyIsMutable();
+ property_.addAll(other.property_);
+ }
+
+ }
+ setUnknownFields(
+ getUnknownFields().concat(other.unknownFields));
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ for (int i = 0; i < getPropertyCount(); i++) {
+ if (!getProperty(i).isInitialized()) {
+
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public Builder mergeFrom(
+ org.jetbrains.kotlin.protobuf.CodedInputStream input,
+ org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private java.util.List property_ =
+ java.util.Collections.emptyList();
+ private void ensurePropertyIsMutable() {
+ if (!((bitField0_ & 0x00000001) == 0x00000001)) {
+ property_ = new java.util.ArrayList(property_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public java.util.List getPropertyList() {
+ return java.util.Collections.unmodifiableList(property_);
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public int getPropertyCount() {
+ return property_.size();
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty getProperty(int index) {
+ return property_.get(index);
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public Builder setProperty(
+ int index, org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePropertyIsMutable();
+ property_.set(index, value);
+
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public Builder setProperty(
+ int index, org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.Builder builderForValue) {
+ ensurePropertyIsMutable();
+ property_.set(index, builderForValue.build());
+
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public Builder addProperty(org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePropertyIsMutable();
+ property_.add(value);
+
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public Builder addProperty(
+ int index, org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePropertyIsMutable();
+ property_.add(index, value);
+
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public Builder addProperty(
+ org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.Builder builderForValue) {
+ ensurePropertyIsMutable();
+ property_.add(builderForValue.build());
+
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public Builder addProperty(
+ int index, org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty.Builder builderForValue) {
+ ensurePropertyIsMutable();
+ property_.add(index, builderForValue.build());
+
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public Builder addAllProperty(
+ java.lang.Iterable extends org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty> values) {
+ ensurePropertyIsMutable();
+ org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
+ values, property_);
+
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public Builder clearProperty() {
+ property_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+
+ return this;
+ }
+ /**
+ * repeated .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation.MultiFieldValueClassProperty property = 1;
+ */
+ public Builder removeProperty(int index) {
+ ensurePropertyIsMutable();
+ property_.remove(index);
+
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation)
+ }
+
+ static {
+ defaultInstance = new MultiFieldValueClassRepresentation(true);
+ defaultInstance.initFields();
+ }
+
+ // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation)
+ }
+
private int bitField0_;
public static final int FLAGS_FIELD_NUMBER = 1;
private int flags_;
@@ -9509,13 +10649,28 @@ public final class ProtoBuf {
return inlineClassUnderlyingTypeId_;
}
+ public static final int MULTI_FIELD_VALUE_CLASS_REPRESENTATION_FIELD_NUMBER = 22;
+ private org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation multiFieldValueClassRepresentation_;
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ public boolean hasMultiFieldValueClassRepresentation() {
+ return ((bitField0_ & 0x00000040) == 0x00000040);
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ public org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation getMultiFieldValueClassRepresentation() {
+ return multiFieldValueClassRepresentation_;
+ }
+
public static final int TYPE_TABLE_FIELD_NUMBER = 30;
private org.jetbrains.kotlin.metadata.ProtoBuf.TypeTable typeTable_;
/**
* optional .org.jetbrains.kotlin.metadata.TypeTable type_table = 30;
*/
public boolean hasTypeTable() {
- return ((bitField0_ & 0x00000040) == 0x00000040);
+ return ((bitField0_ & 0x00000080) == 0x00000080);
}
/**
* optional .org.jetbrains.kotlin.metadata.TypeTable type_table = 30;
@@ -9564,7 +10719,7 @@ public final class ProtoBuf {
* optional .org.jetbrains.kotlin.metadata.VersionRequirementTable version_requirement_table = 32;
*/
public boolean hasVersionRequirementTable() {
- return ((bitField0_ & 0x00000080) == 0x00000080);
+ return ((bitField0_ & 0x00000100) == 0x00000100);
}
/**
* optional .org.jetbrains.kotlin.metadata.VersionRequirementTable version_requirement_table = 32;
@@ -9592,6 +10747,7 @@ public final class ProtoBuf {
inlineClassUnderlyingPropertyName_ = 0;
inlineClassUnderlyingType_ = org.jetbrains.kotlin.metadata.ProtoBuf.Type.getDefaultInstance();
inlineClassUnderlyingTypeId_ = 0;
+ multiFieldValueClassRepresentation_ = org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.getDefaultInstance();
typeTable_ = org.jetbrains.kotlin.metadata.ProtoBuf.TypeTable.getDefaultInstance();
versionRequirement_ = java.util.Collections.emptyList();
versionRequirementTable_ = org.jetbrains.kotlin.metadata.ProtoBuf.VersionRequirementTable.getDefaultInstance();
@@ -9660,6 +10816,12 @@ public final class ProtoBuf {
return false;
}
}
+ if (hasMultiFieldValueClassRepresentation()) {
+ if (!getMultiFieldValueClassRepresentation().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
if (hasTypeTable()) {
if (!getTypeTable().isInitialized()) {
memoizedIsInitialized = 0;
@@ -9751,12 +10913,15 @@ public final class ProtoBuf {
output.writeInt32NoTag(contextReceiverTypeId_.get(i));
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
+ output.writeMessage(22, multiFieldValueClassRepresentation_);
+ }
+ if (((bitField0_ & 0x00000080) == 0x00000080)) {
output.writeMessage(30, typeTable_);
}
for (int i = 0; i < versionRequirement_.size(); i++) {
output.writeInt32(31, versionRequirement_.get(i));
}
- if (((bitField0_ & 0x00000080) == 0x00000080)) {
+ if (((bitField0_ & 0x00000100) == 0x00000100)) {
output.writeMessage(32, versionRequirementTable_);
}
extensionWriter.writeUntil(19000, output);
@@ -9882,6 +11047,10 @@ public final class ProtoBuf {
contextReceiverTypeIdMemoizedSerializedSize = dataSize;
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
+ size += org.jetbrains.kotlin.protobuf.CodedOutputStream
+ .computeMessageSize(22, multiFieldValueClassRepresentation_);
+ }
+ if (((bitField0_ & 0x00000080) == 0x00000080)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(30, typeTable_);
}
@@ -9894,7 +11063,7 @@ public final class ProtoBuf {
size += dataSize;
size += 2 * getVersionRequirementList().size();
}
- if (((bitField0_ & 0x00000080) == 0x00000080)) {
+ if (((bitField0_ & 0x00000100) == 0x00000100)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(32, versionRequirementTable_);
}
@@ -10028,12 +11197,14 @@ public final class ProtoBuf {
bitField0_ = (bitField0_ & ~0x00010000);
inlineClassUnderlyingTypeId_ = 0;
bitField0_ = (bitField0_ & ~0x00020000);
- typeTable_ = org.jetbrains.kotlin.metadata.ProtoBuf.TypeTable.getDefaultInstance();
+ multiFieldValueClassRepresentation_ = org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.getDefaultInstance();
bitField0_ = (bitField0_ & ~0x00040000);
- versionRequirement_ = java.util.Collections.emptyList();
+ typeTable_ = org.jetbrains.kotlin.metadata.ProtoBuf.TypeTable.getDefaultInstance();
bitField0_ = (bitField0_ & ~0x00080000);
- versionRequirementTable_ = org.jetbrains.kotlin.metadata.ProtoBuf.VersionRequirementTable.getDefaultInstance();
+ versionRequirement_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00100000);
+ versionRequirementTable_ = org.jetbrains.kotlin.metadata.ProtoBuf.VersionRequirementTable.getDefaultInstance();
+ bitField0_ = (bitField0_ & ~0x00200000);
return this;
}
@@ -10144,14 +11315,18 @@ public final class ProtoBuf {
if (((from_bitField0_ & 0x00040000) == 0x00040000)) {
to_bitField0_ |= 0x00000040;
}
+ result.multiFieldValueClassRepresentation_ = multiFieldValueClassRepresentation_;
+ if (((from_bitField0_ & 0x00080000) == 0x00080000)) {
+ to_bitField0_ |= 0x00000080;
+ }
result.typeTable_ = typeTable_;
- if (((bitField0_ & 0x00080000) == 0x00080000)) {
+ if (((bitField0_ & 0x00100000) == 0x00100000)) {
versionRequirement_ = java.util.Collections.unmodifiableList(versionRequirement_);
- bitField0_ = (bitField0_ & ~0x00080000);
+ bitField0_ = (bitField0_ & ~0x00100000);
}
result.versionRequirement_ = versionRequirement_;
- if (((from_bitField0_ & 0x00100000) == 0x00100000)) {
- to_bitField0_ |= 0x00000080;
+ if (((from_bitField0_ & 0x00200000) == 0x00200000)) {
+ to_bitField0_ |= 0x00000100;
}
result.versionRequirementTable_ = versionRequirementTable_;
result.bitField0_ = to_bitField0_;
@@ -10298,13 +11473,16 @@ public final class ProtoBuf {
if (other.hasInlineClassUnderlyingTypeId()) {
setInlineClassUnderlyingTypeId(other.getInlineClassUnderlyingTypeId());
}
+ if (other.hasMultiFieldValueClassRepresentation()) {
+ mergeMultiFieldValueClassRepresentation(other.getMultiFieldValueClassRepresentation());
+ }
if (other.hasTypeTable()) {
mergeTypeTable(other.getTypeTable());
}
if (!other.versionRequirement_.isEmpty()) {
if (versionRequirement_.isEmpty()) {
versionRequirement_ = other.versionRequirement_;
- bitField0_ = (bitField0_ & ~0x00080000);
+ bitField0_ = (bitField0_ & ~0x00100000);
} else {
ensureVersionRequirementIsMutable();
versionRequirement_.addAll(other.versionRequirement_);
@@ -10379,6 +11557,12 @@ public final class ProtoBuf {
return false;
}
}
+ if (hasMultiFieldValueClassRepresentation()) {
+ if (!getMultiFieldValueClassRepresentation().isInitialized()) {
+
+ return false;
+ }
+ }
if (hasTypeTable()) {
if (!getTypeTable().isInitialized()) {
@@ -11947,12 +13131,72 @@ public final class ProtoBuf {
return this;
}
+ private org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation multiFieldValueClassRepresentation_ = org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.getDefaultInstance();
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ public boolean hasMultiFieldValueClassRepresentation() {
+ return ((bitField0_ & 0x00040000) == 0x00040000);
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ public org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation getMultiFieldValueClassRepresentation() {
+ return multiFieldValueClassRepresentation_;
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ public Builder setMultiFieldValueClassRepresentation(org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ multiFieldValueClassRepresentation_ = value;
+
+ bitField0_ |= 0x00040000;
+ return this;
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ public Builder setMultiFieldValueClassRepresentation(
+ org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.Builder builderForValue) {
+ multiFieldValueClassRepresentation_ = builderForValue.build();
+
+ bitField0_ |= 0x00040000;
+ return this;
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ public Builder mergeMultiFieldValueClassRepresentation(org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation value) {
+ if (((bitField0_ & 0x00040000) == 0x00040000) &&
+ multiFieldValueClassRepresentation_ != org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.getDefaultInstance()) {
+ multiFieldValueClassRepresentation_ =
+ org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.newBuilder(multiFieldValueClassRepresentation_).mergeFrom(value).buildPartial();
+ } else {
+ multiFieldValueClassRepresentation_ = value;
+ }
+
+ bitField0_ |= 0x00040000;
+ return this;
+ }
+ /**
+ * optional .org.jetbrains.kotlin.metadata.Class.MultiFieldValueClassRepresentation multi_field_value_class_representation = 22;
+ */
+ public Builder clearMultiFieldValueClassRepresentation() {
+ multiFieldValueClassRepresentation_ = org.jetbrains.kotlin.metadata.ProtoBuf.Class.MultiFieldValueClassRepresentation.getDefaultInstance();
+
+ bitField0_ = (bitField0_ & ~0x00040000);
+ return this;
+ }
+
private org.jetbrains.kotlin.metadata.ProtoBuf.TypeTable typeTable_ = org.jetbrains.kotlin.metadata.ProtoBuf.TypeTable.getDefaultInstance();
/**
* optional .org.jetbrains.kotlin.metadata.TypeTable type_table = 30;
*/
public boolean hasTypeTable() {
- return ((bitField0_ & 0x00040000) == 0x00040000);
+ return ((bitField0_ & 0x00080000) == 0x00080000);
}
/**
* optional .org.jetbrains.kotlin.metadata.TypeTable type_table = 30;
@@ -11969,7 +13213,7 @@ public final class ProtoBuf {
}
typeTable_ = value;
- bitField0_ |= 0x00040000;
+ bitField0_ |= 0x00080000;
return this;
}
/**
@@ -11979,14 +13223,14 @@ public final class ProtoBuf {
org.jetbrains.kotlin.metadata.ProtoBuf.TypeTable.Builder builderForValue) {
typeTable_ = builderForValue.build();
- bitField0_ |= 0x00040000;
+ bitField0_ |= 0x00080000;
return this;
}
/**
* optional .org.jetbrains.kotlin.metadata.TypeTable type_table = 30;
*/
public Builder mergeTypeTable(org.jetbrains.kotlin.metadata.ProtoBuf.TypeTable value) {
- if (((bitField0_ & 0x00040000) == 0x00040000) &&
+ if (((bitField0_ & 0x00080000) == 0x00080000) &&
typeTable_ != org.jetbrains.kotlin.metadata.ProtoBuf.TypeTable.getDefaultInstance()) {
typeTable_ =
org.jetbrains.kotlin.metadata.ProtoBuf.TypeTable.newBuilder(typeTable_).mergeFrom(value).buildPartial();
@@ -11994,7 +13238,7 @@ public final class ProtoBuf {
typeTable_ = value;
}
- bitField0_ |= 0x00040000;
+ bitField0_ |= 0x00080000;
return this;
}
/**
@@ -12003,15 +13247,15 @@ public final class ProtoBuf {
public Builder clearTypeTable() {
typeTable_ = org.jetbrains.kotlin.metadata.ProtoBuf.TypeTable.getDefaultInstance();
- bitField0_ = (bitField0_ & ~0x00040000);
+ bitField0_ = (bitField0_ & ~0x00080000);
return this;
}
private java.util.List versionRequirement_ = java.util.Collections.emptyList();
private void ensureVersionRequirementIsMutable() {
- if (!((bitField0_ & 0x00080000) == 0x00080000)) {
+ if (!((bitField0_ & 0x00100000) == 0x00100000)) {
versionRequirement_ = new java.util.ArrayList(versionRequirement_);
- bitField0_ |= 0x00080000;
+ bitField0_ |= 0x00100000;
}
}
/**
@@ -12096,7 +13340,7 @@ public final class ProtoBuf {
*/
public Builder clearVersionRequirement() {
versionRequirement_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00080000);
+ bitField0_ = (bitField0_ & ~0x00100000);
return this;
}
@@ -12106,7 +13350,7 @@ public final class ProtoBuf {
* optional .org.jetbrains.kotlin.metadata.VersionRequirementTable version_requirement_table = 32;
*/
public boolean hasVersionRequirementTable() {
- return ((bitField0_ & 0x00100000) == 0x00100000);
+ return ((bitField0_ & 0x00200000) == 0x00200000);
}
/**
* optional .org.jetbrains.kotlin.metadata.VersionRequirementTable version_requirement_table = 32;
@@ -12123,7 +13367,7 @@ public final class ProtoBuf {
}
versionRequirementTable_ = value;
- bitField0_ |= 0x00100000;
+ bitField0_ |= 0x00200000;
return this;
}
/**
@@ -12133,14 +13377,14 @@ public final class ProtoBuf {
org.jetbrains.kotlin.metadata.ProtoBuf.VersionRequirementTable.Builder builderForValue) {
versionRequirementTable_ = builderForValue.build();
- bitField0_ |= 0x00100000;
+ bitField0_ |= 0x00200000;
return this;
}
/**
* optional .org.jetbrains.kotlin.metadata.VersionRequirementTable version_requirement_table = 32;
*/
public Builder mergeVersionRequirementTable(org.jetbrains.kotlin.metadata.ProtoBuf.VersionRequirementTable value) {
- if (((bitField0_ & 0x00100000) == 0x00100000) &&
+ if (((bitField0_ & 0x00200000) == 0x00200000) &&
versionRequirementTable_ != org.jetbrains.kotlin.metadata.ProtoBuf.VersionRequirementTable.getDefaultInstance()) {
versionRequirementTable_ =
org.jetbrains.kotlin.metadata.ProtoBuf.VersionRequirementTable.newBuilder(versionRequirementTable_).mergeFrom(value).buildPartial();
@@ -12148,7 +13392,7 @@ public final class ProtoBuf {
versionRequirementTable_ = value;
}
- bitField0_ |= 0x00100000;
+ bitField0_ |= 0x00200000;
return this;
}
/**
@@ -12157,7 +13401,7 @@ public final class ProtoBuf {
public Builder clearVersionRequirementTable() {
versionRequirementTable_ = org.jetbrains.kotlin.metadata.ProtoBuf.VersionRequirementTable.getDefaultInstance();
- bitField0_ = (bitField0_ & ~0x00100000);
+ bitField0_ = (bitField0_ & ~0x00200000);
return this;
}