From ab3d6490edeeb763e9aaf0b32aa348cfd878b946 Mon Sep 17 00:00:00 2001 From: Georgy Bronnikov Date: Tue, 9 Mar 2021 15:51:07 +0300 Subject: [PATCH] JVM_IR: save auxTables as byte strings --- compiler/ir/serialization.jvm/src/JvmIr.proto | 8 +- .../jvm/serialization/JvmIrSerializer.kt | 16 +- .../jvm/serialization/proto/JvmIr.java | 643 +++++------------- 3 files changed, 194 insertions(+), 473 deletions(-) diff --git a/compiler/ir/serialization.jvm/src/JvmIr.proto b/compiler/ir/serialization.jvm/src/JvmIr.proto index 45db2ec1966..2056f377f9f 100644 --- a/compiler/ir/serialization.jvm/src/JvmIr.proto +++ b/compiler/ir/serialization.jvm/src/JvmIr.proto @@ -55,10 +55,10 @@ message XStatementOrExpression { //} message AuxTables { - repeated common.serialization.proto.IrType type = 1; - repeated common.serialization.proto.IdSignature signature = 2; - repeated string string = 3; - repeated XStatementOrExpression body = 4; + repeated bytes type = 1; + repeated bytes signature = 2; + repeated bytes string = 3; + repeated bytes body = 4; // required TypeTable type_table = 2; // required SignatureTable signature_table = 1; diff --git a/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/JvmIrSerializer.kt b/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/JvmIrSerializer.kt index f8803452310..0268649d060 100644 --- a/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/JvmIrSerializer.kt +++ b/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/JvmIrSerializer.kt @@ -13,6 +13,7 @@ import org.jetbrains.kotlin.ir.declarations.IrClass import org.jetbrains.kotlin.ir.declarations.IrFile import org.jetbrains.kotlin.ir.symbols.IrSymbol import org.jetbrains.kotlin.ir.util.IrMessageLogger +import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.protobuf.ByteString class JvmIrSerializer( @@ -47,17 +48,10 @@ class JvmIrSerializer( private fun serializeAuxTables(): JvmIr.AuxTables { val proto = JvmIr.AuxTables.newBuilder() - proto.addAllType(protoTypeArray) - proto.addAllSignature(protoIdSignatureArray) - proto.addAllString(protoStringArray) - for (body in protoBodyArray) { - val bodyProto = JvmIr.XStatementOrExpression.newBuilder() - when (body) { - is XStatementOrExpression.XStatement -> bodyProto.statement = body.toProtoStatement() - is XStatementOrExpression.XExpression -> bodyProto.expression = body.toProtoExpression() - } - proto.addBody(bodyProto.build()) - } + protoTypeArray.forEach { proto.addType(it.toByteString()) } + protoIdSignatureArray.forEach { proto.addSignature(it.toByteString()) } + protoStringArray.forEach { proto.addString(ByteString.copyFromUtf8(it)) } + protoBodyArray.forEach { proto.addBody(ByteString.copyFrom(it.toByteArray())) } return proto.build() } } \ No newline at end of file diff --git a/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/proto/JvmIr.java b/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/proto/JvmIr.java index a0664c5872e..9334da9b016 100644 --- a/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/proto/JvmIr.java +++ b/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/proto/JvmIr.java @@ -598,65 +598,56 @@ public final class JvmIr { org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + * repeated bytes type = 1; */ - java.util.List - getTypeList(); + java.util.List getTypeList(); /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; - */ - org.jetbrains.kotlin.backend.common.serialization.proto.IrType getType(int index); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + * repeated bytes type = 1; */ int getTypeCount(); + /** + * repeated bytes type = 1; + */ + org.jetbrains.kotlin.protobuf.ByteString getType(int index); /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + * repeated bytes signature = 2; */ - java.util.List - getSignatureList(); + java.util.List getSignatureList(); /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; - */ - org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature getSignature(int index); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + * repeated bytes signature = 2; */ int getSignatureCount(); + /** + * repeated bytes signature = 2; + */ + org.jetbrains.kotlin.protobuf.ByteString getSignature(int index); /** - * repeated string string = 3; + * repeated bytes string = 3; */ - org.jetbrains.kotlin.protobuf.ProtocolStringList - getStringList(); + java.util.List getStringList(); /** - * repeated string string = 3; + * repeated bytes string = 3; */ int getStringCount(); /** - * repeated string string = 3; + * repeated bytes string = 3; */ - java.lang.String getString(int index); - /** - * repeated string string = 3; - */ - org.jetbrains.kotlin.protobuf.ByteString - getStringBytes(int index); + org.jetbrains.kotlin.protobuf.ByteString getString(int index); /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + * repeated bytes body = 4; */ - java.util.List - getBodyList(); + java.util.List getBodyList(); /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; - */ - org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression getBody(int index); - /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + * repeated bytes body = 4; */ int getBodyCount(); + /** + * repeated bytes body = 4; + */ + org.jetbrains.kotlin.protobuf.ByteString getBody(int index); } /** * Protobuf type {@code org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables} @@ -710,35 +701,34 @@ public final class JvmIr { } case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - type_ = new java.util.ArrayList(); + type_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } - type_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrType.PARSER, extensionRegistry)); + type_.add(input.readBytes()); break; } case 18: { if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - signature_ = new java.util.ArrayList(); + signature_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } - signature_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.PARSER, extensionRegistry)); + signature_.add(input.readBytes()); break; } case 26: { - org.jetbrains.kotlin.protobuf.ByteString bs = input.readBytes(); if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - string_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList(); + string_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } - string_.add(bs); + string_.add(input.readBytes()); break; } case 34: { if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - body_ = new java.util.ArrayList(); + body_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000008; } - body_.add(input.readMessage(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression.PARSER, extensionRegistry)); + body_.add(input.readBytes()); break; } } @@ -756,7 +746,7 @@ public final class JvmIr { signature_ = java.util.Collections.unmodifiableList(signature_); } if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - string_ = string_.getUnmodifiableView(); + string_ = java.util.Collections.unmodifiableList(string_); } if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { body_ = java.util.Collections.unmodifiableList(body_); @@ -787,143 +777,97 @@ public final class JvmIr { } public static final int TYPE_FIELD_NUMBER = 1; - private java.util.List type_; + private java.util.List type_; /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + * repeated bytes type = 1; */ - public java.util.List getTypeList() { + public java.util.List + getTypeList() { return type_; } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; - */ - public java.util.List - getTypeOrBuilderList() { - return type_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + * repeated bytes type = 1; */ public int getTypeCount() { return type_.size(); } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + * repeated bytes type = 1; */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrType getType(int index) { - return type_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeOrBuilder getTypeOrBuilder( - int index) { + public org.jetbrains.kotlin.protobuf.ByteString getType(int index) { return type_.get(index); } public static final int SIGNATURE_FIELD_NUMBER = 2; - private java.util.List signature_; + private java.util.List signature_; /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + * repeated bytes signature = 2; */ - public java.util.List getSignatureList() { + public java.util.List + getSignatureList() { return signature_; } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; - */ - public java.util.List - getSignatureOrBuilderList() { - return signature_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + * repeated bytes signature = 2; */ public int getSignatureCount() { return signature_.size(); } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + * repeated bytes signature = 2; */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature getSignature(int index) { - return signature_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IdSignatureOrBuilder getSignatureOrBuilder( - int index) { + public org.jetbrains.kotlin.protobuf.ByteString getSignature(int index) { return signature_.get(index); } public static final int STRING_FIELD_NUMBER = 3; - private org.jetbrains.kotlin.protobuf.LazyStringList string_; + private java.util.List string_; /** - * repeated string string = 3; + * repeated bytes string = 3; */ - public org.jetbrains.kotlin.protobuf.ProtocolStringList + public java.util.List getStringList() { return string_; } /** - * repeated string string = 3; + * repeated bytes string = 3; */ public int getStringCount() { return string_.size(); } /** - * repeated string string = 3; + * repeated bytes string = 3; */ - public java.lang.String getString(int index) { + public org.jetbrains.kotlin.protobuf.ByteString getString(int index) { return string_.get(index); } - /** - * repeated string string = 3; - */ - public org.jetbrains.kotlin.protobuf.ByteString - getStringBytes(int index) { - return string_.getByteString(index); - } public static final int BODY_FIELD_NUMBER = 4; - private java.util.List body_; + private java.util.List body_; /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + * repeated bytes body = 4; */ - public java.util.List getBodyList() { + public java.util.List + getBodyList() { return body_; } /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; - */ - public java.util.List - getBodyOrBuilderList() { - return body_; - } - /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + * repeated bytes body = 4; */ public int getBodyCount() { return body_.size(); } /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + * repeated bytes body = 4; */ - public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression getBody(int index) { - return body_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; - */ - public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpressionOrBuilder getBodyOrBuilder( - int index) { + public org.jetbrains.kotlin.protobuf.ByteString getBody(int index) { return body_.get(index); } private void initFields() { type_ = java.util.Collections.emptyList(); signature_ = java.util.Collections.emptyList(); - string_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + string_ = java.util.Collections.emptyList(); body_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; @@ -932,24 +876,6 @@ public final class JvmIr { if (isInitialized == 1) return true; if (isInitialized == 0) return false; - for (int i = 0; i < getTypeCount(); i++) { - if (!getType(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getSignatureCount(); i++) { - if (!getSignature(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getBodyCount(); i++) { - if (!getBody(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } memoizedIsInitialized = 1; return true; } @@ -958,16 +884,16 @@ public final class JvmIr { throws java.io.IOException { getSerializedSize(); for (int i = 0; i < type_.size(); i++) { - output.writeMessage(1, type_.get(i)); + output.writeBytes(1, type_.get(i)); } for (int i = 0; i < signature_.size(); i++) { - output.writeMessage(2, signature_.get(i)); + output.writeBytes(2, signature_.get(i)); } for (int i = 0; i < string_.size(); i++) { - output.writeBytes(3, string_.getByteString(i)); + output.writeBytes(3, string_.get(i)); } for (int i = 0; i < body_.size(); i++) { - output.writeMessage(4, body_.get(i)); + output.writeBytes(4, body_.get(i)); } output.writeRawBytes(unknownFields); } @@ -978,26 +904,41 @@ public final class JvmIr { if (size != -1) return size; size = 0; - for (int i = 0; i < type_.size(); i++) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeMessageSize(1, type_.get(i)); + { + int dataSize = 0; + for (int i = 0; i < type_.size(); i++) { + dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeBytesSizeNoTag(type_.get(i)); + } + size += dataSize; + size += 1 * getTypeList().size(); } - for (int i = 0; i < signature_.size(); i++) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeMessageSize(2, signature_.get(i)); + { + int dataSize = 0; + for (int i = 0; i < signature_.size(); i++) { + dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeBytesSizeNoTag(signature_.get(i)); + } + size += dataSize; + size += 1 * getSignatureList().size(); } { int dataSize = 0; for (int i = 0; i < string_.size(); i++) { dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeBytesSizeNoTag(string_.getByteString(i)); + .computeBytesSizeNoTag(string_.get(i)); } size += dataSize; size += 1 * getStringList().size(); } - for (int i = 0; i < body_.size(); i++) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeMessageSize(4, body_.get(i)); + { + int dataSize = 0; + for (int i = 0; i < body_.size(); i++) { + dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeBytesSizeNoTag(body_.get(i)); + } + size += dataSize; + size += 1 * getBodyList().size(); } size += unknownFields.size(); memoizedSerializedSize = size; @@ -1097,7 +1038,7 @@ public final class JvmIr { bitField0_ = (bitField0_ & ~0x00000001); signature_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); - string_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + string_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); body_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); @@ -1134,7 +1075,7 @@ public final class JvmIr { } result.signature_ = signature_; if (((bitField0_ & 0x00000004) == 0x00000004)) { - string_ = string_.getUnmodifiableView(); + string_ = java.util.Collections.unmodifiableList(string_); bitField0_ = (bitField0_ & ~0x00000004); } result.string_ = string_; @@ -1194,24 +1135,6 @@ public final class JvmIr { } public final boolean isInitialized() { - for (int i = 0; i < getTypeCount(); i++) { - if (!getType(i).isInitialized()) { - - return false; - } - } - for (int i = 0; i < getSignatureCount(); i++) { - if (!getSignature(i).isInitialized()) { - - return false; - } - } - for (int i = 0; i < getBodyCount(); i++) { - if (!getBody(i).isInitialized()) { - - return false; - } - } return true; } @@ -1234,294 +1157,181 @@ public final class JvmIr { } private int bitField0_; - private java.util.List type_ = - java.util.Collections.emptyList(); + private java.util.List type_ = java.util.Collections.emptyList(); private void ensureTypeIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { - type_ = new java.util.ArrayList(type_); + type_ = new java.util.ArrayList(type_); bitField0_ |= 0x00000001; } } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + * repeated bytes type = 1; */ - public java.util.List getTypeList() { + public java.util.List + getTypeList() { return java.util.Collections.unmodifiableList(type_); } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + * repeated bytes type = 1; */ public int getTypeCount() { return type_.size(); } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + * repeated bytes type = 1; */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrType getType(int index) { + public org.jetbrains.kotlin.protobuf.ByteString getType(int index) { return type_.get(index); } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + * repeated bytes type = 1; */ public Builder setType( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrType value) { + int index, org.jetbrains.kotlin.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - ensureTypeIsMutable(); + throw new NullPointerException(); + } + ensureTypeIsMutable(); type_.set(index, value); - + return this; } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + * repeated bytes type = 1; */ - public Builder setType( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrType.Builder builderForValue) { - ensureTypeIsMutable(); - type_.set(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; - */ - public Builder addType(org.jetbrains.kotlin.backend.common.serialization.proto.IrType value) { + public Builder addType(org.jetbrains.kotlin.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - ensureTypeIsMutable(); + throw new NullPointerException(); + } + ensureTypeIsMutable(); type_.add(value); - + return this; } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; - */ - public Builder addType( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrType value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTypeIsMutable(); - type_.add(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; - */ - public Builder addType( - org.jetbrains.kotlin.backend.common.serialization.proto.IrType.Builder builderForValue) { - ensureTypeIsMutable(); - type_.add(builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; - */ - public Builder addType( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrType.Builder builderForValue) { - ensureTypeIsMutable(); - type_.add(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + * repeated bytes type = 1; */ public Builder addAllType( - java.lang.Iterable values) { + java.lang.Iterable values) { ensureTypeIsMutable(); org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( values, type_); - + return this; } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + * repeated bytes type = 1; */ public Builder clearType() { type_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; - */ - public Builder removeType(int index) { - ensureTypeIsMutable(); - type_.remove(index); - + return this; } - private java.util.List signature_ = - java.util.Collections.emptyList(); + private java.util.List signature_ = java.util.Collections.emptyList(); private void ensureSignatureIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { - signature_ = new java.util.ArrayList(signature_); + signature_ = new java.util.ArrayList(signature_); bitField0_ |= 0x00000002; } } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + * repeated bytes signature = 2; */ - public java.util.List getSignatureList() { + public java.util.List + getSignatureList() { return java.util.Collections.unmodifiableList(signature_); } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + * repeated bytes signature = 2; */ public int getSignatureCount() { return signature_.size(); } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + * repeated bytes signature = 2; */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature getSignature(int index) { + public org.jetbrains.kotlin.protobuf.ByteString getSignature(int index) { return signature_.get(index); } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + * repeated bytes signature = 2; */ public Builder setSignature( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature value) { + int index, org.jetbrains.kotlin.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - ensureSignatureIsMutable(); + throw new NullPointerException(); + } + ensureSignatureIsMutable(); signature_.set(index, value); - + return this; } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + * repeated bytes signature = 2; */ - public Builder setSignature( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.Builder builderForValue) { - ensureSignatureIsMutable(); - signature_.set(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; - */ - public Builder addSignature(org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature value) { + public Builder addSignature(org.jetbrains.kotlin.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - ensureSignatureIsMutable(); + throw new NullPointerException(); + } + ensureSignatureIsMutable(); signature_.add(value); - + return this; } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; - */ - public Builder addSignature( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature value) { - if (value == null) { - throw new NullPointerException(); - } - ensureSignatureIsMutable(); - signature_.add(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; - */ - public Builder addSignature( - org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.Builder builderForValue) { - ensureSignatureIsMutable(); - signature_.add(builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; - */ - public Builder addSignature( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.Builder builderForValue) { - ensureSignatureIsMutable(); - signature_.add(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + * repeated bytes signature = 2; */ public Builder addAllSignature( - java.lang.Iterable values) { + java.lang.Iterable values) { ensureSignatureIsMutable(); org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( values, signature_); - + return this; } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + * repeated bytes signature = 2; */ public Builder clearSignature() { signature_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; - */ - public Builder removeSignature(int index) { - ensureSignatureIsMutable(); - signature_.remove(index); - + return this; } - private org.jetbrains.kotlin.protobuf.LazyStringList string_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + private java.util.List string_ = java.util.Collections.emptyList(); private void ensureStringIsMutable() { if (!((bitField0_ & 0x00000004) == 0x00000004)) { - string_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList(string_); + string_ = new java.util.ArrayList(string_); bitField0_ |= 0x00000004; } } /** - * repeated string string = 3; + * repeated bytes string = 3; */ - public org.jetbrains.kotlin.protobuf.ProtocolStringList + public java.util.List getStringList() { - return string_.getUnmodifiableView(); + return java.util.Collections.unmodifiableList(string_); } /** - * repeated string string = 3; + * repeated bytes string = 3; */ public int getStringCount() { return string_.size(); } /** - * repeated string string = 3; + * repeated bytes string = 3; */ - public java.lang.String getString(int index) { + public org.jetbrains.kotlin.protobuf.ByteString getString(int index) { return string_.get(index); } /** - * repeated string string = 3; - */ - public org.jetbrains.kotlin.protobuf.ByteString - getStringBytes(int index) { - return string_.getByteString(index); - } - /** - * repeated string string = 3; + * repeated bytes string = 3; */ public Builder setString( - int index, java.lang.String value) { + int index, org.jetbrains.kotlin.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } @@ -1531,10 +1341,9 @@ public final class JvmIr { return this; } /** - * repeated string string = 3; + * repeated bytes string = 3; */ - public Builder addString( - java.lang.String value) { + public Builder addString(org.jetbrains.kotlin.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } @@ -1544,10 +1353,10 @@ public final class JvmIr { return this; } /** - * repeated string string = 3; + * repeated bytes string = 3; */ public Builder addAllString( - java.lang.Iterable values) { + java.lang.Iterable values) { ensureStringIsMutable(); org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( values, string_); @@ -1555,150 +1364,84 @@ public final class JvmIr { return this; } /** - * repeated string string = 3; + * repeated bytes string = 3; */ public Builder clearString() { - string_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + string_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); return this; } - /** - * repeated string string = 3; - */ - public Builder addStringBytes( - org.jetbrains.kotlin.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureStringIsMutable(); - string_.add(value); - - return this; - } - private java.util.List body_ = - java.util.Collections.emptyList(); + private java.util.List body_ = java.util.Collections.emptyList(); private void ensureBodyIsMutable() { if (!((bitField0_ & 0x00000008) == 0x00000008)) { - body_ = new java.util.ArrayList(body_); + body_ = new java.util.ArrayList(body_); bitField0_ |= 0x00000008; } } - /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + * repeated bytes body = 4; */ - public java.util.List getBodyList() { + public java.util.List + getBodyList() { return java.util.Collections.unmodifiableList(body_); } /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + * repeated bytes body = 4; */ public int getBodyCount() { return body_.size(); } /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + * repeated bytes body = 4; */ - public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression getBody(int index) { + public org.jetbrains.kotlin.protobuf.ByteString getBody(int index) { return body_.get(index); } /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + * repeated bytes body = 4; */ public Builder setBody( - int index, org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression value) { + int index, org.jetbrains.kotlin.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - ensureBodyIsMutable(); + throw new NullPointerException(); + } + ensureBodyIsMutable(); body_.set(index, value); - + return this; } /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + * repeated bytes body = 4; */ - public Builder setBody( - int index, org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression.Builder builderForValue) { - ensureBodyIsMutable(); - body_.set(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; - */ - public Builder addBody(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression value) { + public Builder addBody(org.jetbrains.kotlin.protobuf.ByteString value) { if (value == null) { - throw new NullPointerException(); - } - ensureBodyIsMutable(); + throw new NullPointerException(); + } + ensureBodyIsMutable(); body_.add(value); - + return this; } /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; - */ - public Builder addBody( - int index, org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression value) { - if (value == null) { - throw new NullPointerException(); - } - ensureBodyIsMutable(); - body_.add(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; - */ - public Builder addBody( - org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression.Builder builderForValue) { - ensureBodyIsMutable(); - body_.add(builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; - */ - public Builder addBody( - int index, org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression.Builder builderForValue) { - ensureBodyIsMutable(); - body_.add(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + * repeated bytes body = 4; */ public Builder addAllBody( - java.lang.Iterable values) { + java.lang.Iterable values) { ensureBodyIsMutable(); org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( values, body_); - + return this; } /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + * repeated bytes body = 4; */ public Builder clearBody() { body_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; - */ - public Builder removeBody(int index) { - ensureBodyIsMutable(); - body_.remove(index); - + return this; } @@ -2045,10 +1788,6 @@ public final class JvmIr { return false; } } - if (!getAuxTables().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } memoizedIsInitialized = 1; return true; } @@ -2303,10 +2042,6 @@ public final class JvmIr { return false; } } - if (!getAuxTables().isInitialized()) { - - return false; - } return true; } @@ -2900,10 +2635,6 @@ public final class JvmIr { memoizedIsInitialized = 0; return false; } - if (!getAuxTables().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } memoizedIsInitialized = 1; return true; } @@ -3093,10 +2824,6 @@ public final class JvmIr { return false; } - if (!getAuxTables().isInitialized()) { - - return false; - } return true; }