diff --git a/build-common/src/org/jetbrains/kotlin/incremental/ProtoCompareGenerated.kt b/build-common/src/org/jetbrains/kotlin/incremental/ProtoCompareGenerated.kt index 69b0c08bcf8..fdb051253a7 100644 --- a/build-common/src/org/jetbrains/kotlin/incremental/ProtoCompareGenerated.kt +++ b/build-common/src/org/jetbrains/kotlin/incremental/ProtoCompareGenerated.kt @@ -354,6 +354,11 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR if (old.versionRequirement != new.versionRequirement) return false } + if (old.hasContract() != new.hasContract()) return false + if (old.hasContract()) { + if (!checkEquals(old.contract, new.contract)) return false + } + if (old.hasExtension(JvmProtoBuf.methodSignature) != new.hasExtension(JvmProtoBuf.methodSignature)) return false if (old.hasExtension(JvmProtoBuf.methodSignature)) { if (!checkEquals(old.getExtension(JvmProtoBuf.methodSignature), new.getExtension(JvmProtoBuf.methodSignature))) return false @@ -745,6 +750,12 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR return true } + open fun checkEquals(old: ProtoBuf.Contract, new: ProtoBuf.Contract): Boolean { + if (!checkEqualsContractEffect(old, new)) return false + + return true + } + open fun checkEquals(old: JvmProtoBuf.JvmMethodSignature, new: JvmProtoBuf.JvmMethodSignature): Boolean { if (old.hasName() != new.hasName()) return false if (old.hasName()) { @@ -890,6 +901,27 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR return true } + open fun checkEquals(old: ProtoBuf.Effect, new: ProtoBuf.Effect): Boolean { + if (old.hasEffectType() != new.hasEffectType()) return false + if (old.hasEffectType()) { + if (old.effectType != new.effectType) return false + } + + if (!checkEqualsEffectEffectConstructorArgument(old, new)) return false + + if (old.hasConclusionOfConditionalEffect() != new.hasConclusionOfConditionalEffect()) return false + if (old.hasConclusionOfConditionalEffect()) { + if (!checkEquals(old.conclusionOfConditionalEffect, new.conclusionOfConditionalEffect)) return false + } + + if (old.hasKind() != new.hasKind()) return false + if (old.hasKind()) { + if (old.kind != new.kind) return false + } + + return true + } + open fun checkEquals(old: JvmProtoBuf.JvmFieldSignature, new: JvmProtoBuf.JvmFieldSignature): Boolean { if (old.hasName() != new.hasName()) return false if (old.hasName()) { @@ -904,6 +936,39 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR return true } + open fun checkEquals(old: ProtoBuf.Expression, new: ProtoBuf.Expression): Boolean { + if (old.hasFlags() != new.hasFlags()) return false + if (old.hasFlags()) { + if (old.flags != new.flags) return false + } + + if (old.hasValueParameterReference() != new.hasValueParameterReference()) return false + if (old.hasValueParameterReference()) { + if (old.valueParameterReference != new.valueParameterReference) return false + } + + if (old.hasConstantValue() != new.hasConstantValue()) return false + if (old.hasConstantValue()) { + if (old.constantValue != new.constantValue) return false + } + + if (old.hasIsInstanceType() != new.hasIsInstanceType()) return false + if (old.hasIsInstanceType()) { + if (!checkEquals(old.isInstanceType, new.isInstanceType)) return false + } + + if (old.hasIsInstanceTypeId() != new.hasIsInstanceTypeId()) return false + if (old.hasIsInstanceTypeId()) { + if (old.isInstanceTypeId != new.isInstanceTypeId) return false + } + + if (!checkEqualsExpressionAndArgument(old, new)) return false + + if (!checkEqualsExpressionOrArgument(old, new)) return false + + return true + } + open fun checkEqualsPackageFunction(old: ProtoBuf.Package, new: ProtoBuf.Package): Boolean { if (old.functionCount != new.functionCount) return false @@ -1154,6 +1219,16 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR return true } + open fun checkEqualsContractEffect(old: ProtoBuf.Contract, new: ProtoBuf.Contract): Boolean { + if (old.effectCount != new.effectCount) return false + + for(i in 0..old.effectCount - 1) { + if (!checkEquals(old.getEffect(i), new.getEffect(i))) return false + } + + return true + } + open fun checkEqualsAnnotationArgumentValueArrayElement(old: ProtoBuf.Annotation.Argument.Value, new: ProtoBuf.Annotation.Argument.Value): Boolean { if (old.arrayElementCount != new.arrayElementCount) return false @@ -1164,6 +1239,36 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR return true } + open fun checkEqualsEffectEffectConstructorArgument(old: ProtoBuf.Effect, new: ProtoBuf.Effect): Boolean { + if (old.effectConstructorArgumentCount != new.effectConstructorArgumentCount) return false + + for(i in 0..old.effectConstructorArgumentCount - 1) { + if (!checkEquals(old.getEffectConstructorArgument(i), new.getEffectConstructorArgument(i))) return false + } + + return true + } + + open fun checkEqualsExpressionAndArgument(old: ProtoBuf.Expression, new: ProtoBuf.Expression): Boolean { + if (old.andArgumentCount != new.andArgumentCount) return false + + for(i in 0..old.andArgumentCount - 1) { + if (!checkEquals(old.getAndArgument(i), new.getAndArgument(i))) return false + } + + return true + } + + open fun checkEqualsExpressionOrArgument(old: ProtoBuf.Expression, new: ProtoBuf.Expression): Boolean { + if (old.orArgumentCount != new.orArgumentCount) return false + + for(i in 0..old.orArgumentCount - 1) { + if (!checkEquals(old.getOrArgument(i), new.getOrArgument(i))) return false + } + + return true + } + fun oldGetIndexOfString(index: Int): Int = getIndexOfString(index, oldStringIndexesMap, oldNameResolver) fun newGetIndexOfString(index: Int): Int = getIndexOfString(index, newStringIndexesMap, newNameResolver) @@ -1362,6 +1467,10 @@ fun ProtoBuf.Function.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) hashCode = 31 * hashCode + versionRequirement } + if (hasContract()) { + hashCode = 31 * hashCode + contract.hashCode(stringIndexes, fqNameIndexes) + } + if (hasExtension(JvmProtoBuf.methodSignature)) { hashCode = 31 * hashCode + getExtension(JvmProtoBuf.methodSignature).hashCode(stringIndexes, fqNameIndexes) } @@ -1701,6 +1810,16 @@ fun ProtoBuf.ValueParameter.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: return hashCode } +fun ProtoBuf.Contract.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int): Int { + var hashCode = 1 + + for(i in 0..effectCount - 1) { + hashCode = 31 * hashCode + getEffect(i).hashCode(stringIndexes, fqNameIndexes) + } + + return hashCode +} + fun JvmProtoBuf.JvmMethodSignature.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int): Int { var hashCode = 1 @@ -1837,6 +1956,28 @@ fun ProtoBuf.Annotation.Argument.hashCode(stringIndexes: (Int) -> Int, fqNameInd return hashCode } +fun ProtoBuf.Effect.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int): Int { + var hashCode = 1 + + if (hasEffectType()) { + hashCode = 31 * hashCode + effectType.hashCode() + } + + for(i in 0..effectConstructorArgumentCount - 1) { + hashCode = 31 * hashCode + getEffectConstructorArgument(i).hashCode(stringIndexes, fqNameIndexes) + } + + if (hasConclusionOfConditionalEffect()) { + hashCode = 31 * hashCode + conclusionOfConditionalEffect.hashCode(stringIndexes, fqNameIndexes) + } + + if (hasKind()) { + hashCode = 31 * hashCode + kind.hashCode() + } + + return hashCode +} + fun JvmProtoBuf.JvmFieldSignature.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int): Int { var hashCode = 1 @@ -1850,3 +1991,37 @@ fun JvmProtoBuf.JvmFieldSignature.hashCode(stringIndexes: (Int) -> Int, fqNameIn return hashCode } + +fun ProtoBuf.Expression.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int): Int { + var hashCode = 1 + + if (hasFlags()) { + hashCode = 31 * hashCode + flags + } + + if (hasValueParameterReference()) { + hashCode = 31 * hashCode + valueParameterReference + } + + if (hasConstantValue()) { + hashCode = 31 * hashCode + constantValue.hashCode() + } + + if (hasIsInstanceType()) { + hashCode = 31 * hashCode + isInstanceType.hashCode(stringIndexes, fqNameIndexes) + } + + if (hasIsInstanceTypeId()) { + hashCode = 31 * hashCode + isInstanceTypeId + } + + for(i in 0..andArgumentCount - 1) { + hashCode = 31 * hashCode + getAndArgument(i).hashCode(stringIndexes, fqNameIndexes) + } + + for(i in 0..orArgumentCount - 1) { + hashCode = 31 * hashCode + getOrArgument(i).hashCode(stringIndexes, fqNameIndexes) + } + + return hashCode +} diff --git a/build-common/test/org/jetbrains/kotlin/serialization/DebugProtoBuf.java b/build-common/test/org/jetbrains/kotlin/serialization/DebugProtoBuf.java index 2fdcc7cf8bb..f96bc97e9ce 100644 --- a/build-common/test/org/jetbrains/kotlin/serialization/DebugProtoBuf.java +++ b/build-common/test/org/jetbrains/kotlin/serialization/DebugProtoBuf.java @@ -17896,6 +17896,19 @@ public final class DebugProtoBuf { * */ int getVersionRequirement(); + + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + boolean hasContract(); + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract getContract(); + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.ContractOrBuilder getContractOrBuilder(); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.Function} @@ -18035,6 +18048,19 @@ public final class DebugProtoBuf { versionRequirement_ = input.readInt32(); break; } + case 258: { + org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.Builder subBuilder = null; + if (((bitField0_ & 0x00000200) == 0x00000200)) { + subBuilder = contract_.toBuilder(); + } + contract_ = input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(contract_); + contract_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000200; + break; + } } } } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { @@ -18340,6 +18366,27 @@ public final class DebugProtoBuf { return versionRequirement_; } + public static final int CONTRACT_FIELD_NUMBER = 32; + private org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract contract_; + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + public boolean hasContract() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract getContract() { + return contract_; + } + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.ContractOrBuilder getContractOrBuilder() { + return contract_; + } + private void initFields() { flags_ = 6; oldFlags_ = 6; @@ -18352,6 +18399,7 @@ public final class DebugProtoBuf { valueParameter_ = java.util.Collections.emptyList(); typeTable_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.getDefaultInstance(); versionRequirement_ = 0; + contract_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -18393,6 +18441,12 @@ public final class DebugProtoBuf { return false; } } + if (hasContract()) { + if (!getContract().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } if (!extensionsAreInitialized()) { memoizedIsInitialized = 0; return false; @@ -18440,6 +18494,9 @@ public final class DebugProtoBuf { if (((bitField0_ & 0x00000100) == 0x00000100)) { output.writeInt32(31, versionRequirement_); } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeMessage(32, contract_); + } extensionWriter.writeUntil(200, output); getUnknownFields().writeTo(output); } @@ -18494,6 +18551,10 @@ public final class DebugProtoBuf { size += org.jetbrains.kotlin.protobuf.CodedOutputStream .computeInt32Size(31, versionRequirement_); } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(32, contract_); + } size += extensionsSerializedSize(); size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -18610,6 +18671,7 @@ public final class DebugProtoBuf { getReceiverTypeFieldBuilder(); getValueParameterFieldBuilder(); getTypeTableFieldBuilder(); + getContractFieldBuilder(); } } private static Builder create() { @@ -18660,6 +18722,12 @@ public final class DebugProtoBuf { bitField0_ = (bitField0_ & ~0x00000200); versionRequirement_ = 0; bitField0_ = (bitField0_ & ~0x00000400); + if (contractBuilder_ == null) { + contract_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.getDefaultInstance(); + } else { + contractBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000800); return this; } @@ -18754,6 +18822,14 @@ public final class DebugProtoBuf { to_bitField0_ |= 0x00000100; } result.versionRequirement_ = versionRequirement_; + if (((from_bitField0_ & 0x00000800) == 0x00000800)) { + to_bitField0_ |= 0x00000200; + } + if (contractBuilder_ == null) { + result.contract_ = contract_; + } else { + result.contract_ = contractBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -18849,6 +18925,9 @@ public final class DebugProtoBuf { if (other.hasVersionRequirement()) { setVersionRequirement(other.getVersionRequirement()); } + if (other.hasContract()) { + mergeContract(other.getContract()); + } this.mergeExtensionFields(other); this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -18889,6 +18968,12 @@ public final class DebugProtoBuf { return false; } } + if (hasContract()) { + if (!getContract().isInitialized()) { + + return false; + } + } if (!extensionsAreInitialized()) { return false; @@ -20007,6 +20092,122 @@ public final class DebugProtoBuf { return this; } + private org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract contract_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.getDefaultInstance(); + private org.jetbrains.kotlin.protobuf.SingleFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract, org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.ContractOrBuilder> contractBuilder_; + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + public boolean hasContract() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract getContract() { + if (contractBuilder_ == null) { + return contract_; + } else { + return contractBuilder_.getMessage(); + } + } + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + public Builder setContract(org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract value) { + if (contractBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contract_ = value; + onChanged(); + } else { + contractBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + public Builder setContract( + org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.Builder builderForValue) { + if (contractBuilder_ == null) { + contract_ = builderForValue.build(); + onChanged(); + } else { + contractBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + public Builder mergeContract(org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract value) { + if (contractBuilder_ == null) { + if (((bitField0_ & 0x00000800) == 0x00000800) && + contract_ != org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.getDefaultInstance()) { + contract_ = + org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.newBuilder(contract_).mergeFrom(value).buildPartial(); + } else { + contract_ = value; + } + onChanged(); + } else { + contractBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000800; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + public Builder clearContract() { + if (contractBuilder_ == null) { + contract_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.getDefaultInstance(); + onChanged(); + } else { + contractBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000800); + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.Builder getContractBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getContractFieldBuilder().getBuilder(); + } + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.ContractOrBuilder getContractOrBuilder() { + if (contractBuilder_ != null) { + return contractBuilder_.getMessageOrBuilder(); + } else { + return contract_; + } + } + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + private org.jetbrains.kotlin.protobuf.SingleFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract, org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.ContractOrBuilder> + getContractFieldBuilder() { + if (contractBuilder_ == null) { + contractBuilder_ = new org.jetbrains.kotlin.protobuf.SingleFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract, org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.ContractOrBuilder>( + getContract(), + getParentForChildren(), + isClean()); + contract_ = null; + } + return contractBuilder_; + } + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.Function) } @@ -28869,6 +29070,4228 @@ public final class DebugProtoBuf { // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.PackageFragment) } + public interface ContractOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.serialization.Contract) + org.jetbrains.kotlin.protobuf.MessageOrBuilder { + + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + java.util.List + getEffectList(); + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect getEffect(int index); + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + int getEffectCount(); + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + java.util.List + getEffectOrBuilderList(); + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.EffectOrBuilder getEffectOrBuilder( + int index); + } + /** + * Protobuf type {@code org.jetbrains.kotlin.serialization.Contract} + */ + public static final class Contract extends + org.jetbrains.kotlin.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.serialization.Contract) + ContractOrBuilder { + // Use Contract.newBuilder() to construct. + private Contract(org.jetbrains.kotlin.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Contract(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final Contract defaultInstance; + public static Contract getDefaultInstance() { + return defaultInstance; + } + + public Contract 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 Contract( + 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)) { + effect_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + effect_.add(input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.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)) { + effect_ = java.util.Collections.unmodifiableList(effect_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Contract_descriptor; + } + + protected org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Contract_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.class, org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.Builder.class); + } + + public static org.jetbrains.kotlin.protobuf.Parser PARSER = + new org.jetbrains.kotlin.protobuf.AbstractParser() { + public Contract parsePartialFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input, + org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return new Contract(input, extensionRegistry); + } + }; + + @java.lang.Override + public org.jetbrains.kotlin.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int EFFECT_FIELD_NUMBER = 1; + private java.util.List effect_; + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public java.util.List getEffectList() { + return effect_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public java.util.List + getEffectOrBuilderList() { + return effect_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public int getEffectCount() { + return effect_.size(); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect getEffect(int index) { + return effect_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.EffectOrBuilder getEffectOrBuilder( + int index) { + return effect_.get(index); + } + + private void initFields() { + effect_ = 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 < getEffectCount(); i++) { + if (!getEffect(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 < effect_.size(); i++) { + output.writeMessage(1, effect_.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 < effect_.size(); i++) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(1, effect_.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.serialization.DebugProtoBuf.Contract parseFrom( + org.jetbrains.kotlin.protobuf.ByteString data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract 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.serialization.DebugProtoBuf.Contract parseFrom(byte[] data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract 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.serialization.DebugProtoBuf.Contract parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract 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.serialization.DebugProtoBuf.Contract parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract 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.serialization.DebugProtoBuf.Contract parseFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract 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.serialization.DebugProtoBuf.Contract 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.serialization.Contract} + */ + public static final class Builder extends + org.jetbrains.kotlin.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.serialization.Contract) + org.jetbrains.kotlin.serialization.DebugProtoBuf.ContractOrBuilder { + public static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Contract_descriptor; + } + + protected org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Contract_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.class, org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.Builder.class); + } + + // Construct using org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.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) { + getEffectFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (effectBuilder_ == null) { + effect_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + effectBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public org.jetbrains.kotlin.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Contract_descriptor; + } + + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract getDefaultInstanceForType() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.getDefaultInstance(); + } + + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract build() { + org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract buildPartial() { + org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract result = new org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract(this); + int from_bitField0_ = bitField0_; + if (effectBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + effect_ = java.util.Collections.unmodifiableList(effect_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.effect_ = effect_; + } else { + result.effect_ = effectBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(org.jetbrains.kotlin.protobuf.Message other) { + if (other instanceof org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract) { + return mergeFrom((org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract other) { + if (other == org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract.getDefaultInstance()) return this; + if (effectBuilder_ == null) { + if (!other.effect_.isEmpty()) { + if (effect_.isEmpty()) { + effect_ = other.effect_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEffectIsMutable(); + effect_.addAll(other.effect_); + } + onChanged(); + } + } else { + if (!other.effect_.isEmpty()) { + if (effectBuilder_.isEmpty()) { + effectBuilder_.dispose(); + effectBuilder_ = null; + effect_ = other.effect_; + bitField0_ = (bitField0_ & ~0x00000001); + effectBuilder_ = + org.jetbrains.kotlin.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getEffectFieldBuilder() : null; + } else { + effectBuilder_.addAllMessages(other.effect_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getEffectCount(); i++) { + if (!getEffect(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.serialization.DebugProtoBuf.Contract parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.jetbrains.kotlin.serialization.DebugProtoBuf.Contract) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List effect_ = + java.util.Collections.emptyList(); + private void ensureEffectIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + effect_ = new java.util.ArrayList(effect_); + bitField0_ |= 0x00000001; + } + } + + private org.jetbrains.kotlin.protobuf.RepeatedFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect, org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.EffectOrBuilder> effectBuilder_; + + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public java.util.List getEffectList() { + if (effectBuilder_ == null) { + return java.util.Collections.unmodifiableList(effect_); + } else { + return effectBuilder_.getMessageList(); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public int getEffectCount() { + if (effectBuilder_ == null) { + return effect_.size(); + } else { + return effectBuilder_.getCount(); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect getEffect(int index) { + if (effectBuilder_ == null) { + return effect_.get(index); + } else { + return effectBuilder_.getMessage(index); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public Builder setEffect( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect value) { + if (effectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEffectIsMutable(); + effect_.set(index, value); + onChanged(); + } else { + effectBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public Builder setEffect( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.Builder builderForValue) { + if (effectBuilder_ == null) { + ensureEffectIsMutable(); + effect_.set(index, builderForValue.build()); + onChanged(); + } else { + effectBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public Builder addEffect(org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect value) { + if (effectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEffectIsMutable(); + effect_.add(value); + onChanged(); + } else { + effectBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public Builder addEffect( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect value) { + if (effectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEffectIsMutable(); + effect_.add(index, value); + onChanged(); + } else { + effectBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public Builder addEffect( + org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.Builder builderForValue) { + if (effectBuilder_ == null) { + ensureEffectIsMutable(); + effect_.add(builderForValue.build()); + onChanged(); + } else { + effectBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public Builder addEffect( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.Builder builderForValue) { + if (effectBuilder_ == null) { + ensureEffectIsMutable(); + effect_.add(index, builderForValue.build()); + onChanged(); + } else { + effectBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public Builder addAllEffect( + java.lang.Iterable values) { + if (effectBuilder_ == null) { + ensureEffectIsMutable(); + org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( + values, effect_); + onChanged(); + } else { + effectBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public Builder clearEffect() { + if (effectBuilder_ == null) { + effect_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + effectBuilder_.clear(); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public Builder removeEffect(int index) { + if (effectBuilder_ == null) { + ensureEffectIsMutable(); + effect_.remove(index); + onChanged(); + } else { + effectBuilder_.remove(index); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.Builder getEffectBuilder( + int index) { + return getEffectFieldBuilder().getBuilder(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.EffectOrBuilder getEffectOrBuilder( + int index) { + if (effectBuilder_ == null) { + return effect_.get(index); } else { + return effectBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public java.util.List + getEffectOrBuilderList() { + if (effectBuilder_ != null) { + return effectBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(effect_); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.Builder addEffectBuilder() { + return getEffectFieldBuilder().addBuilder( + org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.getDefaultInstance()); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.Builder addEffectBuilder( + int index) { + return getEffectFieldBuilder().addBuilder( + index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.getDefaultInstance()); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public java.util.List + getEffectBuilderList() { + return getEffectFieldBuilder().getBuilderList(); + } + private org.jetbrains.kotlin.protobuf.RepeatedFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect, org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.EffectOrBuilder> + getEffectFieldBuilder() { + if (effectBuilder_ == null) { + effectBuilder_ = new org.jetbrains.kotlin.protobuf.RepeatedFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect, org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.EffectOrBuilder>( + effect_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + effect_ = null; + } + return effectBuilder_; + } + + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.Contract) + } + + static { + defaultInstance = new Contract(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.Contract) + } + + public interface EffectOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.serialization.Effect) + org.jetbrains.kotlin.protobuf.MessageOrBuilder { + + /** + * optional .org.jetbrains.kotlin.serialization.Effect.EffectType effect_type = 1; + */ + boolean hasEffectType(); + /** + * optional .org.jetbrains.kotlin.serialization.Effect.EffectType effect_type = 1; + */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.EffectType getEffectType(); + + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + java.util.List + getEffectConstructorArgumentList(); + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression getEffectConstructorArgument(int index); + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + int getEffectConstructorArgumentCount(); + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + java.util.List + getEffectConstructorArgumentOrBuilderList(); + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder getEffectConstructorArgumentOrBuilder( + int index); + + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+     * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+     * is given by other fields in this message, and 'Expression' is stored in this field.
+     * 
+ */ + boolean hasConclusionOfConditionalEffect(); + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+     * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+     * is given by other fields in this message, and 'Expression' is stored in this field.
+     * 
+ */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression getConclusionOfConditionalEffect(); + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+     * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+     * is given by other fields in this message, and 'Expression' is stored in this field.
+     * 
+ */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder getConclusionOfConditionalEffectOrBuilder(); + + /** + * optional .org.jetbrains.kotlin.serialization.Effect.InvocationKind kind = 4; + */ + boolean hasKind(); + /** + * optional .org.jetbrains.kotlin.serialization.Effect.InvocationKind kind = 4; + */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.InvocationKind getKind(); + } + /** + * Protobuf type {@code org.jetbrains.kotlin.serialization.Effect} + */ + public static final class Effect extends + org.jetbrains.kotlin.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.serialization.Effect) + EffectOrBuilder { + // Use Effect.newBuilder() to construct. + private Effect(org.jetbrains.kotlin.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Effect(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final Effect defaultInstance; + public static Effect getDefaultInstance() { + return defaultInstance; + } + + public Effect 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 Effect( + 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: { + int rawValue = input.readEnum(); + org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.EffectType value = org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.EffectType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + effectType_ = value; + } + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + effectConstructorArgument_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + effectConstructorArgument_.add(input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.PARSER, extensionRegistry)); + break; + } + case 26: { + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder subBuilder = null; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + subBuilder = conclusionOfConditionalEffect_.toBuilder(); + } + conclusionOfConditionalEffect_ = input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(conclusionOfConditionalEffect_); + conclusionOfConditionalEffect_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000002; + break; + } + case 32: { + int rawValue = input.readEnum(); + org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.InvocationKind value = org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.InvocationKind.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(4, rawValue); + } else { + bitField0_ |= 0x00000004; + kind_ = value; + } + 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_ & 0x00000002) == 0x00000002)) { + effectConstructorArgument_ = java.util.Collections.unmodifiableList(effectConstructorArgument_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Effect_descriptor; + } + + protected org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Effect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.class, org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.Builder.class); + } + + public static org.jetbrains.kotlin.protobuf.Parser PARSER = + new org.jetbrains.kotlin.protobuf.AbstractParser() { + public Effect parsePartialFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input, + org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return new Effect(input, extensionRegistry); + } + }; + + @java.lang.Override + public org.jetbrains.kotlin.protobuf.Parser getParserForType() { + return PARSER; + } + + /** + * Protobuf enum {@code org.jetbrains.kotlin.serialization.Effect.EffectType} + * + *
+     * This enum controls which effect this message contains and how 'effectConstructorArguments'
+     * should be parsed.
+     * Each enum value documented in the following syntax: "EffectName(arg1: T1, arg2: T2, ...)"
+     * Those arguments are expected to be found in 'effectConstructorArguments' in exactly the same
+     * order and amount as defined by signature, otherwise message should be dropped.
+     * 
+ */ + public enum EffectType + implements org.jetbrains.kotlin.protobuf.ProtocolMessageEnum { + /** + * RETURNS_CONSTANT = 0; + * + *
+       * Returns(value: ConstantValue?)
+       * 
+ */ + RETURNS_CONSTANT(0, 0), + /** + * CALLS = 1; + * + *
+       * CallsInPlace(callable: ParameterReference)
+       * Additionally, InvocationKind in the field 'kind' may be provided to define exact amount of invocations.
+       * 
+ */ + CALLS(1, 1), + /** + * RETURNS_NOT_NULL = 2; + * + *
+       * ReturnsNotNull()
+       * 
+ */ + RETURNS_NOT_NULL(2, 2), + ; + + /** + * RETURNS_CONSTANT = 0; + * + *
+       * Returns(value: ConstantValue?)
+       * 
+ */ + public static final int RETURNS_CONSTANT_VALUE = 0; + /** + * CALLS = 1; + * + *
+       * CallsInPlace(callable: ParameterReference)
+       * Additionally, InvocationKind in the field 'kind' may be provided to define exact amount of invocations.
+       * 
+ */ + public static final int CALLS_VALUE = 1; + /** + * RETURNS_NOT_NULL = 2; + * + *
+       * ReturnsNotNull()
+       * 
+ */ + public static final int RETURNS_NOT_NULL_VALUE = 2; + + + public final int getNumber() { return value; } + + public static EffectType valueOf(int value) { + switch (value) { + case 0: return RETURNS_CONSTANT; + case 1: return CALLS; + case 2: return RETURNS_NOT_NULL; + default: return null; + } + } + + public static org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap + internalValueMap = + new org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap() { + public EffectType findValueByNumber(int number) { + return EffectType.valueOf(number); + } + }; + + public final org.jetbrains.kotlin.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final org.jetbrains.kotlin.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final org.jetbrains.kotlin.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.getDescriptor().getEnumTypes().get(0); + } + + private static final EffectType[] VALUES = values(); + + public static EffectType valueOf( + org.jetbrains.kotlin.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private EffectType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:org.jetbrains.kotlin.serialization.Effect.EffectType) + } + + /** + * Protobuf enum {@code org.jetbrains.kotlin.serialization.Effect.InvocationKind} + */ + public enum InvocationKind + implements org.jetbrains.kotlin.protobuf.ProtocolMessageEnum { + /** + * AT_MOST_ONCE = 0; + */ + AT_MOST_ONCE(0, 0), + /** + * EXACTLY_ONCE = 1; + */ + EXACTLY_ONCE(1, 1), + /** + * AT_LEAST_ONCE = 2; + */ + AT_LEAST_ONCE(2, 2), + ; + + /** + * AT_MOST_ONCE = 0; + */ + public static final int AT_MOST_ONCE_VALUE = 0; + /** + * EXACTLY_ONCE = 1; + */ + public static final int EXACTLY_ONCE_VALUE = 1; + /** + * AT_LEAST_ONCE = 2; + */ + public static final int AT_LEAST_ONCE_VALUE = 2; + + + public final int getNumber() { return value; } + + public static InvocationKind valueOf(int value) { + switch (value) { + case 0: return AT_MOST_ONCE; + case 1: return EXACTLY_ONCE; + case 2: return AT_LEAST_ONCE; + default: return null; + } + } + + public static org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap + internalValueMap = + new org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap() { + public InvocationKind findValueByNumber(int number) { + return InvocationKind.valueOf(number); + } + }; + + public final org.jetbrains.kotlin.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final org.jetbrains.kotlin.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final org.jetbrains.kotlin.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.getDescriptor().getEnumTypes().get(1); + } + + private static final InvocationKind[] VALUES = values(); + + public static InvocationKind valueOf( + org.jetbrains.kotlin.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private InvocationKind(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:org.jetbrains.kotlin.serialization.Effect.InvocationKind) + } + + private int bitField0_; + public static final int EFFECT_TYPE_FIELD_NUMBER = 1; + private org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.EffectType effectType_; + /** + * optional .org.jetbrains.kotlin.serialization.Effect.EffectType effect_type = 1; + */ + public boolean hasEffectType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .org.jetbrains.kotlin.serialization.Effect.EffectType effect_type = 1; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.EffectType getEffectType() { + return effectType_; + } + + public static final int EFFECT_CONSTRUCTOR_ARGUMENT_FIELD_NUMBER = 2; + private java.util.List effectConstructorArgument_; + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public java.util.List getEffectConstructorArgumentList() { + return effectConstructorArgument_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public java.util.List + getEffectConstructorArgumentOrBuilderList() { + return effectConstructorArgument_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public int getEffectConstructorArgumentCount() { + return effectConstructorArgument_.size(); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression getEffectConstructorArgument(int index) { + return effectConstructorArgument_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder getEffectConstructorArgumentOrBuilder( + int index) { + return effectConstructorArgument_.get(index); + } + + public static final int CONCLUSION_OF_CONDITIONAL_EFFECT_FIELD_NUMBER = 3; + private org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression conclusionOfConditionalEffect_; + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+     * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+     * is given by other fields in this message, and 'Expression' is stored in this field.
+     * 
+ */ + public boolean hasConclusionOfConditionalEffect() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+     * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+     * is given by other fields in this message, and 'Expression' is stored in this field.
+     * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression getConclusionOfConditionalEffect() { + return conclusionOfConditionalEffect_; + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+     * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+     * is given by other fields in this message, and 'Expression' is stored in this field.
+     * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder getConclusionOfConditionalEffectOrBuilder() { + return conclusionOfConditionalEffect_; + } + + public static final int KIND_FIELD_NUMBER = 4; + private org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.InvocationKind kind_; + /** + * optional .org.jetbrains.kotlin.serialization.Effect.InvocationKind kind = 4; + */ + public boolean hasKind() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .org.jetbrains.kotlin.serialization.Effect.InvocationKind kind = 4; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.InvocationKind getKind() { + return kind_; + } + + private void initFields() { + effectType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.EffectType.RETURNS_CONSTANT; + effectConstructorArgument_ = java.util.Collections.emptyList(); + conclusionOfConditionalEffect_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.getDefaultInstance(); + kind_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.InvocationKind.AT_MOST_ONCE; + } + 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 < getEffectConstructorArgumentCount(); i++) { + if (!getEffectConstructorArgument(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + if (hasConclusionOfConditionalEffect()) { + if (!getConclusionOfConditionalEffect().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.writeEnum(1, effectType_.getNumber()); + } + for (int i = 0; i < effectConstructorArgument_.size(); i++) { + output.writeMessage(2, effectConstructorArgument_.get(i)); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(3, conclusionOfConditionalEffect_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(4, kind_.getNumber()); + } + 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 + .computeEnumSize(1, effectType_.getNumber()); + } + for (int i = 0; i < effectConstructorArgument_.size(); i++) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(2, effectConstructorArgument_.get(i)); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(3, conclusionOfConditionalEffect_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeEnumSize(4, kind_.getNumber()); + } + 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.serialization.DebugProtoBuf.Effect parseFrom( + org.jetbrains.kotlin.protobuf.ByteString data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect 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.serialization.DebugProtoBuf.Effect parseFrom(byte[] data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect 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.serialization.DebugProtoBuf.Effect parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect 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.serialization.DebugProtoBuf.Effect parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect 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.serialization.DebugProtoBuf.Effect parseFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect 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.serialization.DebugProtoBuf.Effect 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.serialization.Effect} + */ + public static final class Builder extends + org.jetbrains.kotlin.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.serialization.Effect) + org.jetbrains.kotlin.serialization.DebugProtoBuf.EffectOrBuilder { + public static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Effect_descriptor; + } + + protected org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Effect_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.class, org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.Builder.class); + } + + // Construct using org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.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) { + getEffectConstructorArgumentFieldBuilder(); + getConclusionOfConditionalEffectFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + effectType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.EffectType.RETURNS_CONSTANT; + bitField0_ = (bitField0_ & ~0x00000001); + if (effectConstructorArgumentBuilder_ == null) { + effectConstructorArgument_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + effectConstructorArgumentBuilder_.clear(); + } + if (conclusionOfConditionalEffectBuilder_ == null) { + conclusionOfConditionalEffect_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.getDefaultInstance(); + } else { + conclusionOfConditionalEffectBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + kind_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.InvocationKind.AT_MOST_ONCE; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public org.jetbrains.kotlin.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Effect_descriptor; + } + + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect getDefaultInstanceForType() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.getDefaultInstance(); + } + + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect build() { + org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect buildPartial() { + org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect result = new org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.effectType_ = effectType_; + if (effectConstructorArgumentBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + effectConstructorArgument_ = java.util.Collections.unmodifiableList(effectConstructorArgument_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.effectConstructorArgument_ = effectConstructorArgument_; + } else { + result.effectConstructorArgument_ = effectConstructorArgumentBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + if (conclusionOfConditionalEffectBuilder_ == null) { + result.conclusionOfConditionalEffect_ = conclusionOfConditionalEffect_; + } else { + result.conclusionOfConditionalEffect_ = conclusionOfConditionalEffectBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000004; + } + result.kind_ = kind_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(org.jetbrains.kotlin.protobuf.Message other) { + if (other instanceof org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect) { + return mergeFrom((org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect other) { + if (other == org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.getDefaultInstance()) return this; + if (other.hasEffectType()) { + setEffectType(other.getEffectType()); + } + if (effectConstructorArgumentBuilder_ == null) { + if (!other.effectConstructorArgument_.isEmpty()) { + if (effectConstructorArgument_.isEmpty()) { + effectConstructorArgument_ = other.effectConstructorArgument_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureEffectConstructorArgumentIsMutable(); + effectConstructorArgument_.addAll(other.effectConstructorArgument_); + } + onChanged(); + } + } else { + if (!other.effectConstructorArgument_.isEmpty()) { + if (effectConstructorArgumentBuilder_.isEmpty()) { + effectConstructorArgumentBuilder_.dispose(); + effectConstructorArgumentBuilder_ = null; + effectConstructorArgument_ = other.effectConstructorArgument_; + bitField0_ = (bitField0_ & ~0x00000002); + effectConstructorArgumentBuilder_ = + org.jetbrains.kotlin.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getEffectConstructorArgumentFieldBuilder() : null; + } else { + effectConstructorArgumentBuilder_.addAllMessages(other.effectConstructorArgument_); + } + } + } + if (other.hasConclusionOfConditionalEffect()) { + mergeConclusionOfConditionalEffect(other.getConclusionOfConditionalEffect()); + } + if (other.hasKind()) { + setKind(other.getKind()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getEffectConstructorArgumentCount(); i++) { + if (!getEffectConstructorArgument(i).isInitialized()) { + + return false; + } + } + if (hasConclusionOfConditionalEffect()) { + if (!getConclusionOfConditionalEffect().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.serialization.DebugProtoBuf.Effect parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.EffectType effectType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.EffectType.RETURNS_CONSTANT; + /** + * optional .org.jetbrains.kotlin.serialization.Effect.EffectType effect_type = 1; + */ + public boolean hasEffectType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .org.jetbrains.kotlin.serialization.Effect.EffectType effect_type = 1; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.EffectType getEffectType() { + return effectType_; + } + /** + * optional .org.jetbrains.kotlin.serialization.Effect.EffectType effect_type = 1; + */ + public Builder setEffectType(org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.EffectType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + effectType_ = value; + onChanged(); + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Effect.EffectType effect_type = 1; + */ + public Builder clearEffectType() { + bitField0_ = (bitField0_ & ~0x00000001); + effectType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.EffectType.RETURNS_CONSTANT; + onChanged(); + return this; + } + + private java.util.List effectConstructorArgument_ = + java.util.Collections.emptyList(); + private void ensureEffectConstructorArgumentIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + effectConstructorArgument_ = new java.util.ArrayList(effectConstructorArgument_); + bitField0_ |= 0x00000002; + } + } + + private org.jetbrains.kotlin.protobuf.RepeatedFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder> effectConstructorArgumentBuilder_; + + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public java.util.List getEffectConstructorArgumentList() { + if (effectConstructorArgumentBuilder_ == null) { + return java.util.Collections.unmodifiableList(effectConstructorArgument_); + } else { + return effectConstructorArgumentBuilder_.getMessageList(); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public int getEffectConstructorArgumentCount() { + if (effectConstructorArgumentBuilder_ == null) { + return effectConstructorArgument_.size(); + } else { + return effectConstructorArgumentBuilder_.getCount(); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression getEffectConstructorArgument(int index) { + if (effectConstructorArgumentBuilder_ == null) { + return effectConstructorArgument_.get(index); + } else { + return effectConstructorArgumentBuilder_.getMessage(index); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public Builder setEffectConstructorArgument( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression value) { + if (effectConstructorArgumentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEffectConstructorArgumentIsMutable(); + effectConstructorArgument_.set(index, value); + onChanged(); + } else { + effectConstructorArgumentBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public Builder setEffectConstructorArgument( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder builderForValue) { + if (effectConstructorArgumentBuilder_ == null) { + ensureEffectConstructorArgumentIsMutable(); + effectConstructorArgument_.set(index, builderForValue.build()); + onChanged(); + } else { + effectConstructorArgumentBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public Builder addEffectConstructorArgument(org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression value) { + if (effectConstructorArgumentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEffectConstructorArgumentIsMutable(); + effectConstructorArgument_.add(value); + onChanged(); + } else { + effectConstructorArgumentBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public Builder addEffectConstructorArgument( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression value) { + if (effectConstructorArgumentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEffectConstructorArgumentIsMutable(); + effectConstructorArgument_.add(index, value); + onChanged(); + } else { + effectConstructorArgumentBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public Builder addEffectConstructorArgument( + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder builderForValue) { + if (effectConstructorArgumentBuilder_ == null) { + ensureEffectConstructorArgumentIsMutable(); + effectConstructorArgument_.add(builderForValue.build()); + onChanged(); + } else { + effectConstructorArgumentBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public Builder addEffectConstructorArgument( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder builderForValue) { + if (effectConstructorArgumentBuilder_ == null) { + ensureEffectConstructorArgumentIsMutable(); + effectConstructorArgument_.add(index, builderForValue.build()); + onChanged(); + } else { + effectConstructorArgumentBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public Builder addAllEffectConstructorArgument( + java.lang.Iterable values) { + if (effectConstructorArgumentBuilder_ == null) { + ensureEffectConstructorArgumentIsMutable(); + org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( + values, effectConstructorArgument_); + onChanged(); + } else { + effectConstructorArgumentBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public Builder clearEffectConstructorArgument() { + if (effectConstructorArgumentBuilder_ == null) { + effectConstructorArgument_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + effectConstructorArgumentBuilder_.clear(); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public Builder removeEffectConstructorArgument(int index) { + if (effectConstructorArgumentBuilder_ == null) { + ensureEffectConstructorArgumentIsMutable(); + effectConstructorArgument_.remove(index); + onChanged(); + } else { + effectConstructorArgumentBuilder_.remove(index); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder getEffectConstructorArgumentBuilder( + int index) { + return getEffectConstructorArgumentFieldBuilder().getBuilder(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder getEffectConstructorArgumentOrBuilder( + int index) { + if (effectConstructorArgumentBuilder_ == null) { + return effectConstructorArgument_.get(index); } else { + return effectConstructorArgumentBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public java.util.List + getEffectConstructorArgumentOrBuilderList() { + if (effectConstructorArgumentBuilder_ != null) { + return effectConstructorArgumentBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(effectConstructorArgument_); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder addEffectConstructorArgumentBuilder() { + return getEffectConstructorArgumentFieldBuilder().addBuilder( + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.getDefaultInstance()); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder addEffectConstructorArgumentBuilder( + int index) { + return getEffectConstructorArgumentFieldBuilder().addBuilder( + index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.getDefaultInstance()); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public java.util.List + getEffectConstructorArgumentBuilderList() { + return getEffectConstructorArgumentFieldBuilder().getBuilderList(); + } + private org.jetbrains.kotlin.protobuf.RepeatedFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder> + getEffectConstructorArgumentFieldBuilder() { + if (effectConstructorArgumentBuilder_ == null) { + effectConstructorArgumentBuilder_ = new org.jetbrains.kotlin.protobuf.RepeatedFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder>( + effectConstructorArgument_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + effectConstructorArgument_ = null; + } + return effectConstructorArgumentBuilder_; + } + + private org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression conclusionOfConditionalEffect_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.getDefaultInstance(); + private org.jetbrains.kotlin.protobuf.SingleFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder> conclusionOfConditionalEffectBuilder_; + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+       * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+       * is given by other fields in this message, and 'Expression' is stored in this field.
+       * 
+ */ + public boolean hasConclusionOfConditionalEffect() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+       * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+       * is given by other fields in this message, and 'Expression' is stored in this field.
+       * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression getConclusionOfConditionalEffect() { + if (conclusionOfConditionalEffectBuilder_ == null) { + return conclusionOfConditionalEffect_; + } else { + return conclusionOfConditionalEffectBuilder_.getMessage(); + } + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+       * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+       * is given by other fields in this message, and 'Expression' is stored in this field.
+       * 
+ */ + public Builder setConclusionOfConditionalEffect(org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression value) { + if (conclusionOfConditionalEffectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + conclusionOfConditionalEffect_ = value; + onChanged(); + } else { + conclusionOfConditionalEffectBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+       * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+       * is given by other fields in this message, and 'Expression' is stored in this field.
+       * 
+ */ + public Builder setConclusionOfConditionalEffect( + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder builderForValue) { + if (conclusionOfConditionalEffectBuilder_ == null) { + conclusionOfConditionalEffect_ = builderForValue.build(); + onChanged(); + } else { + conclusionOfConditionalEffectBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+       * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+       * is given by other fields in this message, and 'Expression' is stored in this field.
+       * 
+ */ + public Builder mergeConclusionOfConditionalEffect(org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression value) { + if (conclusionOfConditionalEffectBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + conclusionOfConditionalEffect_ != org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.getDefaultInstance()) { + conclusionOfConditionalEffect_ = + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.newBuilder(conclusionOfConditionalEffect_).mergeFrom(value).buildPartial(); + } else { + conclusionOfConditionalEffect_ = value; + } + onChanged(); + } else { + conclusionOfConditionalEffectBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+       * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+       * is given by other fields in this message, and 'Expression' is stored in this field.
+       * 
+ */ + public Builder clearConclusionOfConditionalEffect() { + if (conclusionOfConditionalEffectBuilder_ == null) { + conclusionOfConditionalEffect_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.getDefaultInstance(); + onChanged(); + } else { + conclusionOfConditionalEffectBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+       * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+       * is given by other fields in this message, and 'Expression' is stored in this field.
+       * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder getConclusionOfConditionalEffectBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getConclusionOfConditionalEffectFieldBuilder().getBuilder(); + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+       * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+       * is given by other fields in this message, and 'Expression' is stored in this field.
+       * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder getConclusionOfConditionalEffectOrBuilder() { + if (conclusionOfConditionalEffectBuilder_ != null) { + return conclusionOfConditionalEffectBuilder_.getMessageOrBuilder(); + } else { + return conclusionOfConditionalEffect_; + } + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+       * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+       * is given by other fields in this message, and 'Expression' is stored in this field.
+       * 
+ */ + private org.jetbrains.kotlin.protobuf.SingleFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder> + getConclusionOfConditionalEffectFieldBuilder() { + if (conclusionOfConditionalEffectBuilder_ == null) { + conclusionOfConditionalEffectBuilder_ = new org.jetbrains.kotlin.protobuf.SingleFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder>( + getConclusionOfConditionalEffect(), + getParentForChildren(), + isClean()); + conclusionOfConditionalEffect_ = null; + } + return conclusionOfConditionalEffectBuilder_; + } + + private org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.InvocationKind kind_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.InvocationKind.AT_MOST_ONCE; + /** + * optional .org.jetbrains.kotlin.serialization.Effect.InvocationKind kind = 4; + */ + public boolean hasKind() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .org.jetbrains.kotlin.serialization.Effect.InvocationKind kind = 4; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.InvocationKind getKind() { + return kind_; + } + /** + * optional .org.jetbrains.kotlin.serialization.Effect.InvocationKind kind = 4; + */ + public Builder setKind(org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.InvocationKind value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + kind_ = value; + onChanged(); + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Effect.InvocationKind kind = 4; + */ + public Builder clearKind() { + bitField0_ = (bitField0_ & ~0x00000008); + kind_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Effect.InvocationKind.AT_MOST_ONCE; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.Effect) + } + + static { + defaultInstance = new Effect(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.Effect) + } + + public interface ExpressionOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.serialization.Expression) + org.jetbrains.kotlin.protobuf.MessageOrBuilder { + + /** + * optional int32 flags = 1; + * + *
+     *isNegated => this expression should be negated
+     *isIsNullPredicate => this expression is IsNullPredicate with 'variableName' as argument
+     * 
+ */ + boolean hasFlags(); + /** + * optional int32 flags = 1; + * + *
+     *isNegated => this expression should be negated
+     *isIsNullPredicate => this expression is IsNullPredicate with 'variableName' as argument
+     * 
+ */ + int getFlags(); + + /** + * optional int32 value_parameter_reference = 2; + * + *
+     * stored as index in valueParameters list of owner-function in 1-indexation
+     * Index '0' is reserved for extension receiver
+     * 
+ */ + boolean hasValueParameterReference(); + /** + * optional int32 value_parameter_reference = 2; + * + *
+     * stored as index in valueParameters list of owner-function in 1-indexation
+     * Index '0' is reserved for extension receiver
+     * 
+ */ + int getValueParameterReference(); + + /** + * optional .org.jetbrains.kotlin.serialization.Expression.ConstantValue constant_value = 3; + */ + boolean hasConstantValue(); + /** + * optional .org.jetbrains.kotlin.serialization.Expression.ConstantValue constant_value = 3; + */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.ConstantValue getConstantValue(); + + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+     * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+     * and with type encoded in either one of next two fields as RHS.
+     * 
+ */ + boolean hasIsInstanceType(); + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+     * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+     * and with type encoded in either one of next two fields as RHS.
+     * 
+ */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getIsInstanceType(); + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+     * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+     * and with type encoded in either one of next two fields as RHS.
+     * 
+ */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getIsInstanceTypeOrBuilder(); + + /** + * optional int32 is_instance_type_id = 5; + */ + boolean hasIsInstanceTypeId(); + /** + * optional int32 is_instance_type_id = 5; + */ + int getIsInstanceTypeId(); + + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+     * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message
+     * 
+ */ + java.util.List + getAndArgumentList(); + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+     * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message
+     * 
+ */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression getAndArgument(int index); + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+     * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message
+     * 
+ */ + int getAndArgumentCount(); + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+     * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message
+     * 
+ */ + java.util.List + getAndArgumentOrBuilderList(); + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+     * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message
+     * 
+ */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder getAndArgumentOrBuilder( + int index); + + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+     * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message.
+     * 
+ */ + java.util.List + getOrArgumentList(); + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+     * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message.
+     * 
+ */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression getOrArgument(int index); + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+     * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message.
+     * 
+ */ + int getOrArgumentCount(); + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+     * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message.
+     * 
+ */ + java.util.List + getOrArgumentOrBuilderList(); + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+     * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message.
+     * 
+ */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder getOrArgumentOrBuilder( + int index); + } + /** + * Protobuf type {@code org.jetbrains.kotlin.serialization.Expression} + * + *
+   * We use some trickery to optimize memory footprint of contract-expressions:
+   * exact type of Expression is determined based on its contents.
+   * 
+ */ + public static final class Expression extends + org.jetbrains.kotlin.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.serialization.Expression) + ExpressionOrBuilder { + // Use Expression.newBuilder() to construct. + private Expression(org.jetbrains.kotlin.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Expression(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final Expression defaultInstance; + public static Expression getDefaultInstance() { + return defaultInstance; + } + + public Expression 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 Expression( + 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; + flags_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + valueParameterReference_ = input.readInt32(); + break; + } + case 24: { + int rawValue = input.readEnum(); + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.ConstantValue value = org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.ConstantValue.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(3, rawValue); + } else { + bitField0_ |= 0x00000004; + constantValue_ = value; + } + break; + } + case 34: { + org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder subBuilder = null; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + subBuilder = isInstanceType_.toBuilder(); + } + isInstanceType_ = input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(isInstanceType_); + isInstanceType_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000008; + break; + } + case 40: { + bitField0_ |= 0x00000010; + isInstanceTypeId_ = input.readInt32(); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + andArgument_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + andArgument_.add(input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.PARSER, extensionRegistry)); + break; + } + case 58: { + if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + orArgument_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000040; + } + orArgument_.add(input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.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_ & 0x00000020) == 0x00000020)) { + andArgument_ = java.util.Collections.unmodifiableList(andArgument_); + } + if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + orArgument_ = java.util.Collections.unmodifiableList(orArgument_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Expression_descriptor; + } + + protected org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Expression_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.class, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder.class); + } + + public static org.jetbrains.kotlin.protobuf.Parser PARSER = + new org.jetbrains.kotlin.protobuf.AbstractParser() { + public Expression parsePartialFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input, + org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return new Expression(input, extensionRegistry); + } + }; + + @java.lang.Override + public org.jetbrains.kotlin.protobuf.Parser getParserForType() { + return PARSER; + } + + /** + * Protobuf enum {@code org.jetbrains.kotlin.serialization.Expression.ConstantValue} + */ + public enum ConstantValue + implements org.jetbrains.kotlin.protobuf.ProtocolMessageEnum { + /** + * TRUE = 0; + */ + TRUE(0, 0), + /** + * FALSE = 1; + */ + FALSE(1, 1), + /** + * NULL = 2; + */ + NULL(2, 2), + ; + + /** + * TRUE = 0; + */ + public static final int TRUE_VALUE = 0; + /** + * FALSE = 1; + */ + public static final int FALSE_VALUE = 1; + /** + * NULL = 2; + */ + public static final int NULL_VALUE = 2; + + + public final int getNumber() { return value; } + + public static ConstantValue valueOf(int value) { + switch (value) { + case 0: return TRUE; + case 1: return FALSE; + case 2: return NULL; + default: return null; + } + } + + public static org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap + internalValueMap = + new org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap() { + public ConstantValue findValueByNumber(int number) { + return ConstantValue.valueOf(number); + } + }; + + public final org.jetbrains.kotlin.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final org.jetbrains.kotlin.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final org.jetbrains.kotlin.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.getDescriptor().getEnumTypes().get(0); + } + + private static final ConstantValue[] VALUES = values(); + + public static ConstantValue valueOf( + org.jetbrains.kotlin.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private ConstantValue(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:org.jetbrains.kotlin.serialization.Expression.ConstantValue) + } + + private int bitField0_; + public static final int FLAGS_FIELD_NUMBER = 1; + private int flags_; + /** + * optional int32 flags = 1; + * + *
+     *isNegated => this expression should be negated
+     *isIsNullPredicate => this expression is IsNullPredicate with 'variableName' as argument
+     * 
+ */ + public boolean hasFlags() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 flags = 1; + * + *
+     *isNegated => this expression should be negated
+     *isIsNullPredicate => this expression is IsNullPredicate with 'variableName' as argument
+     * 
+ */ + public int getFlags() { + return flags_; + } + + public static final int VALUE_PARAMETER_REFERENCE_FIELD_NUMBER = 2; + private int valueParameterReference_; + /** + * optional int32 value_parameter_reference = 2; + * + *
+     * stored as index in valueParameters list of owner-function in 1-indexation
+     * Index '0' is reserved for extension receiver
+     * 
+ */ + public boolean hasValueParameterReference() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 value_parameter_reference = 2; + * + *
+     * stored as index in valueParameters list of owner-function in 1-indexation
+     * Index '0' is reserved for extension receiver
+     * 
+ */ + public int getValueParameterReference() { + return valueParameterReference_; + } + + public static final int CONSTANT_VALUE_FIELD_NUMBER = 3; + private org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.ConstantValue constantValue_; + /** + * optional .org.jetbrains.kotlin.serialization.Expression.ConstantValue constant_value = 3; + */ + public boolean hasConstantValue() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression.ConstantValue constant_value = 3; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.ConstantValue getConstantValue() { + return constantValue_; + } + + public static final int IS_INSTANCE_TYPE_FIELD_NUMBER = 4; + private org.jetbrains.kotlin.serialization.DebugProtoBuf.Type isInstanceType_; + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+     * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+     * and with type encoded in either one of next two fields as RHS.
+     * 
+ */ + public boolean hasIsInstanceType() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+     * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+     * and with type encoded in either one of next two fields as RHS.
+     * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getIsInstanceType() { + return isInstanceType_; + } + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+     * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+     * and with type encoded in either one of next two fields as RHS.
+     * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getIsInstanceTypeOrBuilder() { + return isInstanceType_; + } + + public static final int IS_INSTANCE_TYPE_ID_FIELD_NUMBER = 5; + private int isInstanceTypeId_; + /** + * optional int32 is_instance_type_id = 5; + */ + public boolean hasIsInstanceTypeId() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional int32 is_instance_type_id = 5; + */ + public int getIsInstanceTypeId() { + return isInstanceTypeId_; + } + + public static final int AND_ARGUMENT_FIELD_NUMBER = 6; + private java.util.List andArgument_; + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+     * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message
+     * 
+ */ + public java.util.List getAndArgumentList() { + return andArgument_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+     * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message
+     * 
+ */ + public java.util.List + getAndArgumentOrBuilderList() { + return andArgument_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+     * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message
+     * 
+ */ + public int getAndArgumentCount() { + return andArgument_.size(); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+     * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message
+     * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression getAndArgument(int index) { + return andArgument_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+     * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message
+     * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder getAndArgumentOrBuilder( + int index) { + return andArgument_.get(index); + } + + public static final int OR_ARGUMENT_FIELD_NUMBER = 7; + private java.util.List orArgument_; + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+     * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message.
+     * 
+ */ + public java.util.List getOrArgumentList() { + return orArgument_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+     * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message.
+     * 
+ */ + public java.util.List + getOrArgumentOrBuilderList() { + return orArgument_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+     * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message.
+     * 
+ */ + public int getOrArgumentCount() { + return orArgument_.size(); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+     * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message.
+     * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression getOrArgument(int index) { + return orArgument_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+     * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message.
+     * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder getOrArgumentOrBuilder( + int index) { + return orArgument_.get(index); + } + + private void initFields() { + flags_ = 0; + valueParameterReference_ = 0; + constantValue_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.ConstantValue.TRUE; + isInstanceType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); + isInstanceTypeId_ = 0; + andArgument_ = java.util.Collections.emptyList(); + orArgument_ = 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; + + if (hasIsInstanceType()) { + if (!getIsInstanceType().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + for (int i = 0; i < getAndArgumentCount(); i++) { + if (!getAndArgument(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + for (int i = 0; i < getOrArgumentCount(); i++) { + if (!getOrArgument(i).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, flags_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, valueParameterReference_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(3, constantValue_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, isInstanceType_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt32(5, isInstanceTypeId_); + } + for (int i = 0; i < andArgument_.size(); i++) { + output.writeMessage(6, andArgument_.get(i)); + } + for (int i = 0; i < orArgument_.size(); i++) { + output.writeMessage(7, orArgument_.get(i)); + } + 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, flags_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeInt32Size(2, valueParameterReference_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeEnumSize(3, constantValue_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(4, isInstanceType_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeInt32Size(5, isInstanceTypeId_); + } + for (int i = 0; i < andArgument_.size(); i++) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(6, andArgument_.get(i)); + } + for (int i = 0; i < orArgument_.size(); i++) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(7, orArgument_.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.serialization.DebugProtoBuf.Expression parseFrom( + org.jetbrains.kotlin.protobuf.ByteString data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression 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.serialization.DebugProtoBuf.Expression parseFrom(byte[] data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression 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.serialization.DebugProtoBuf.Expression parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression 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.serialization.DebugProtoBuf.Expression parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression 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.serialization.DebugProtoBuf.Expression parseFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression 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.serialization.DebugProtoBuf.Expression 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.serialization.Expression} + * + *
+     * We use some trickery to optimize memory footprint of contract-expressions:
+     * exact type of Expression is determined based on its contents.
+     * 
+ */ + public static final class Builder extends + org.jetbrains.kotlin.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.serialization.Expression) + org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder { + public static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Expression_descriptor; + } + + protected org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Expression_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.class, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder.class); + } + + // Construct using org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.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) { + getIsInstanceTypeFieldBuilder(); + getAndArgumentFieldBuilder(); + getOrArgumentFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + flags_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + valueParameterReference_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + constantValue_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.ConstantValue.TRUE; + bitField0_ = (bitField0_ & ~0x00000004); + if (isInstanceTypeBuilder_ == null) { + isInstanceType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); + } else { + isInstanceTypeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + isInstanceTypeId_ = 0; + bitField0_ = (bitField0_ & ~0x00000010); + if (andArgumentBuilder_ == null) { + andArgument_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + } else { + andArgumentBuilder_.clear(); + } + if (orArgumentBuilder_ == null) { + orArgument_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + } else { + orArgumentBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public org.jetbrains.kotlin.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Expression_descriptor; + } + + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression getDefaultInstanceForType() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.getDefaultInstance(); + } + + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression build() { + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression buildPartial() { + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression result = new org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.flags_ = flags_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.valueParameterReference_ = valueParameterReference_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.constantValue_ = constantValue_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + if (isInstanceTypeBuilder_ == null) { + result.isInstanceType_ = isInstanceType_; + } else { + result.isInstanceType_ = isInstanceTypeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.isInstanceTypeId_ = isInstanceTypeId_; + if (andArgumentBuilder_ == null) { + if (((bitField0_ & 0x00000020) == 0x00000020)) { + andArgument_ = java.util.Collections.unmodifiableList(andArgument_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.andArgument_ = andArgument_; + } else { + result.andArgument_ = andArgumentBuilder_.build(); + } + if (orArgumentBuilder_ == null) { + if (((bitField0_ & 0x00000040) == 0x00000040)) { + orArgument_ = java.util.Collections.unmodifiableList(orArgument_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.orArgument_ = orArgument_; + } else { + result.orArgument_ = orArgumentBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(org.jetbrains.kotlin.protobuf.Message other) { + if (other instanceof org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression) { + return mergeFrom((org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression other) { + if (other == org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.getDefaultInstance()) return this; + if (other.hasFlags()) { + setFlags(other.getFlags()); + } + if (other.hasValueParameterReference()) { + setValueParameterReference(other.getValueParameterReference()); + } + if (other.hasConstantValue()) { + setConstantValue(other.getConstantValue()); + } + if (other.hasIsInstanceType()) { + mergeIsInstanceType(other.getIsInstanceType()); + } + if (other.hasIsInstanceTypeId()) { + setIsInstanceTypeId(other.getIsInstanceTypeId()); + } + if (andArgumentBuilder_ == null) { + if (!other.andArgument_.isEmpty()) { + if (andArgument_.isEmpty()) { + andArgument_ = other.andArgument_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureAndArgumentIsMutable(); + andArgument_.addAll(other.andArgument_); + } + onChanged(); + } + } else { + if (!other.andArgument_.isEmpty()) { + if (andArgumentBuilder_.isEmpty()) { + andArgumentBuilder_.dispose(); + andArgumentBuilder_ = null; + andArgument_ = other.andArgument_; + bitField0_ = (bitField0_ & ~0x00000020); + andArgumentBuilder_ = + org.jetbrains.kotlin.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getAndArgumentFieldBuilder() : null; + } else { + andArgumentBuilder_.addAllMessages(other.andArgument_); + } + } + } + if (orArgumentBuilder_ == null) { + if (!other.orArgument_.isEmpty()) { + if (orArgument_.isEmpty()) { + orArgument_ = other.orArgument_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureOrArgumentIsMutable(); + orArgument_.addAll(other.orArgument_); + } + onChanged(); + } + } else { + if (!other.orArgument_.isEmpty()) { + if (orArgumentBuilder_.isEmpty()) { + orArgumentBuilder_.dispose(); + orArgumentBuilder_ = null; + orArgument_ = other.orArgument_; + bitField0_ = (bitField0_ & ~0x00000040); + orArgumentBuilder_ = + org.jetbrains.kotlin.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getOrArgumentFieldBuilder() : null; + } else { + orArgumentBuilder_.addAllMessages(other.orArgument_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (hasIsInstanceType()) { + if (!getIsInstanceType().isInitialized()) { + + return false; + } + } + for (int i = 0; i < getAndArgumentCount(); i++) { + if (!getAndArgument(i).isInitialized()) { + + return false; + } + } + for (int i = 0; i < getOrArgumentCount(); i++) { + if (!getOrArgument(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.serialization.DebugProtoBuf.Expression parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int flags_ ; + /** + * optional int32 flags = 1; + * + *
+       *isNegated => this expression should be negated
+       *isIsNullPredicate => this expression is IsNullPredicate with 'variableName' as argument
+       * 
+ */ + public boolean hasFlags() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 flags = 1; + * + *
+       *isNegated => this expression should be negated
+       *isIsNullPredicate => this expression is IsNullPredicate with 'variableName' as argument
+       * 
+ */ + public int getFlags() { + return flags_; + } + /** + * optional int32 flags = 1; + * + *
+       *isNegated => this expression should be negated
+       *isIsNullPredicate => this expression is IsNullPredicate with 'variableName' as argument
+       * 
+ */ + public Builder setFlags(int value) { + bitField0_ |= 0x00000001; + flags_ = value; + onChanged(); + return this; + } + /** + * optional int32 flags = 1; + * + *
+       *isNegated => this expression should be negated
+       *isIsNullPredicate => this expression is IsNullPredicate with 'variableName' as argument
+       * 
+ */ + public Builder clearFlags() { + bitField0_ = (bitField0_ & ~0x00000001); + flags_ = 0; + onChanged(); + return this; + } + + private int valueParameterReference_ ; + /** + * optional int32 value_parameter_reference = 2; + * + *
+       * stored as index in valueParameters list of owner-function in 1-indexation
+       * Index '0' is reserved for extension receiver
+       * 
+ */ + public boolean hasValueParameterReference() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 value_parameter_reference = 2; + * + *
+       * stored as index in valueParameters list of owner-function in 1-indexation
+       * Index '0' is reserved for extension receiver
+       * 
+ */ + public int getValueParameterReference() { + return valueParameterReference_; + } + /** + * optional int32 value_parameter_reference = 2; + * + *
+       * stored as index in valueParameters list of owner-function in 1-indexation
+       * Index '0' is reserved for extension receiver
+       * 
+ */ + public Builder setValueParameterReference(int value) { + bitField0_ |= 0x00000002; + valueParameterReference_ = value; + onChanged(); + return this; + } + /** + * optional int32 value_parameter_reference = 2; + * + *
+       * stored as index in valueParameters list of owner-function in 1-indexation
+       * Index '0' is reserved for extension receiver
+       * 
+ */ + public Builder clearValueParameterReference() { + bitField0_ = (bitField0_ & ~0x00000002); + valueParameterReference_ = 0; + onChanged(); + return this; + } + + private org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.ConstantValue constantValue_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.ConstantValue.TRUE; + /** + * optional .org.jetbrains.kotlin.serialization.Expression.ConstantValue constant_value = 3; + */ + public boolean hasConstantValue() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression.ConstantValue constant_value = 3; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.ConstantValue getConstantValue() { + return constantValue_; + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression.ConstantValue constant_value = 3; + */ + public Builder setConstantValue(org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.ConstantValue value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + constantValue_ = value; + onChanged(); + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression.ConstantValue constant_value = 3; + */ + public Builder clearConstantValue() { + bitField0_ = (bitField0_ & ~0x00000004); + constantValue_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.ConstantValue.TRUE; + onChanged(); + return this; + } + + private org.jetbrains.kotlin.serialization.DebugProtoBuf.Type isInstanceType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); + private org.jetbrains.kotlin.protobuf.SingleFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Type, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder> isInstanceTypeBuilder_; + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+       * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+       * and with type encoded in either one of next two fields as RHS.
+       * 
+ */ + public boolean hasIsInstanceType() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+       * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+       * and with type encoded in either one of next two fields as RHS.
+       * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getIsInstanceType() { + if (isInstanceTypeBuilder_ == null) { + return isInstanceType_; + } else { + return isInstanceTypeBuilder_.getMessage(); + } + } + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+       * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+       * and with type encoded in either one of next two fields as RHS.
+       * 
+ */ + public Builder setIsInstanceType(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type value) { + if (isInstanceTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + isInstanceType_ = value; + onChanged(); + } else { + isInstanceTypeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+       * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+       * and with type encoded in either one of next two fields as RHS.
+       * 
+ */ + public Builder setIsInstanceType( + org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder builderForValue) { + if (isInstanceTypeBuilder_ == null) { + isInstanceType_ = builderForValue.build(); + onChanged(); + } else { + isInstanceTypeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+       * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+       * and with type encoded in either one of next two fields as RHS.
+       * 
+ */ + public Builder mergeIsInstanceType(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type value) { + if (isInstanceTypeBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + isInstanceType_ != org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance()) { + isInstanceType_ = + org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.newBuilder(isInstanceType_).mergeFrom(value).buildPartial(); + } else { + isInstanceType_ = value; + } + onChanged(); + } else { + isInstanceTypeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+       * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+       * and with type encoded in either one of next two fields as RHS.
+       * 
+ */ + public Builder clearIsInstanceType() { + if (isInstanceTypeBuilder_ == null) { + isInstanceType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); + onChanged(); + } else { + isInstanceTypeBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+       * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+       * and with type encoded in either one of next two fields as RHS.
+       * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder getIsInstanceTypeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getIsInstanceTypeFieldBuilder().getBuilder(); + } + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+       * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+       * and with type encoded in either one of next two fields as RHS.
+       * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getIsInstanceTypeOrBuilder() { + if (isInstanceTypeBuilder_ != null) { + return isInstanceTypeBuilder_.getMessageOrBuilder(); + } else { + return isInstanceType_; + } + } + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+       * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+       * and with type encoded in either one of next two fields as RHS.
+       * 
+ */ + private org.jetbrains.kotlin.protobuf.SingleFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Type, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder> + getIsInstanceTypeFieldBuilder() { + if (isInstanceTypeBuilder_ == null) { + isInstanceTypeBuilder_ = new org.jetbrains.kotlin.protobuf.SingleFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Type, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder>( + getIsInstanceType(), + getParentForChildren(), + isClean()); + isInstanceType_ = null; + } + return isInstanceTypeBuilder_; + } + + private int isInstanceTypeId_ ; + /** + * optional int32 is_instance_type_id = 5; + */ + public boolean hasIsInstanceTypeId() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional int32 is_instance_type_id = 5; + */ + public int getIsInstanceTypeId() { + return isInstanceTypeId_; + } + /** + * optional int32 is_instance_type_id = 5; + */ + public Builder setIsInstanceTypeId(int value) { + bitField0_ |= 0x00000010; + isInstanceTypeId_ = value; + onChanged(); + return this; + } + /** + * optional int32 is_instance_type_id = 5; + */ + public Builder clearIsInstanceTypeId() { + bitField0_ = (bitField0_ & ~0x00000010); + isInstanceTypeId_ = 0; + onChanged(); + return this; + } + + private java.util.List andArgument_ = + java.util.Collections.emptyList(); + private void ensureAndArgumentIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + andArgument_ = new java.util.ArrayList(andArgument_); + bitField0_ |= 0x00000020; + } + } + + private org.jetbrains.kotlin.protobuf.RepeatedFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder> andArgumentBuilder_; + + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public java.util.List getAndArgumentList() { + if (andArgumentBuilder_ == null) { + return java.util.Collections.unmodifiableList(andArgument_); + } else { + return andArgumentBuilder_.getMessageList(); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public int getAndArgumentCount() { + if (andArgumentBuilder_ == null) { + return andArgument_.size(); + } else { + return andArgumentBuilder_.getCount(); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression getAndArgument(int index) { + if (andArgumentBuilder_ == null) { + return andArgument_.get(index); + } else { + return andArgumentBuilder_.getMessage(index); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public Builder setAndArgument( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression value) { + if (andArgumentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAndArgumentIsMutable(); + andArgument_.set(index, value); + onChanged(); + } else { + andArgumentBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public Builder setAndArgument( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder builderForValue) { + if (andArgumentBuilder_ == null) { + ensureAndArgumentIsMutable(); + andArgument_.set(index, builderForValue.build()); + onChanged(); + } else { + andArgumentBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public Builder addAndArgument(org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression value) { + if (andArgumentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAndArgumentIsMutable(); + andArgument_.add(value); + onChanged(); + } else { + andArgumentBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public Builder addAndArgument( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression value) { + if (andArgumentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAndArgumentIsMutable(); + andArgument_.add(index, value); + onChanged(); + } else { + andArgumentBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public Builder addAndArgument( + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder builderForValue) { + if (andArgumentBuilder_ == null) { + ensureAndArgumentIsMutable(); + andArgument_.add(builderForValue.build()); + onChanged(); + } else { + andArgumentBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public Builder addAndArgument( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder builderForValue) { + if (andArgumentBuilder_ == null) { + ensureAndArgumentIsMutable(); + andArgument_.add(index, builderForValue.build()); + onChanged(); + } else { + andArgumentBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public Builder addAllAndArgument( + java.lang.Iterable values) { + if (andArgumentBuilder_ == null) { + ensureAndArgumentIsMutable(); + org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( + values, andArgument_); + onChanged(); + } else { + andArgumentBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public Builder clearAndArgument() { + if (andArgumentBuilder_ == null) { + andArgument_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + andArgumentBuilder_.clear(); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public Builder removeAndArgument(int index) { + if (andArgumentBuilder_ == null) { + ensureAndArgumentIsMutable(); + andArgument_.remove(index); + onChanged(); + } else { + andArgumentBuilder_.remove(index); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder getAndArgumentBuilder( + int index) { + return getAndArgumentFieldBuilder().getBuilder(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder getAndArgumentOrBuilder( + int index) { + if (andArgumentBuilder_ == null) { + return andArgument_.get(index); } else { + return andArgumentBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public java.util.List + getAndArgumentOrBuilderList() { + if (andArgumentBuilder_ != null) { + return andArgumentBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(andArgument_); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder addAndArgumentBuilder() { + return getAndArgumentFieldBuilder().addBuilder( + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.getDefaultInstance()); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder addAndArgumentBuilder( + int index) { + return getAndArgumentFieldBuilder().addBuilder( + index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.getDefaultInstance()); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public java.util.List + getAndArgumentBuilderList() { + return getAndArgumentFieldBuilder().getBuilderList(); + } + private org.jetbrains.kotlin.protobuf.RepeatedFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder> + getAndArgumentFieldBuilder() { + if (andArgumentBuilder_ == null) { + andArgumentBuilder_ = new org.jetbrains.kotlin.protobuf.RepeatedFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder>( + andArgument_, + ((bitField0_ & 0x00000020) == 0x00000020), + getParentForChildren(), + isClean()); + andArgument_ = null; + } + return andArgumentBuilder_; + } + + private java.util.List orArgument_ = + java.util.Collections.emptyList(); + private void ensureOrArgumentIsMutable() { + if (!((bitField0_ & 0x00000040) == 0x00000040)) { + orArgument_ = new java.util.ArrayList(orArgument_); + bitField0_ |= 0x00000040; + } + } + + private org.jetbrains.kotlin.protobuf.RepeatedFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder> orArgumentBuilder_; + + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public java.util.List getOrArgumentList() { + if (orArgumentBuilder_ == null) { + return java.util.Collections.unmodifiableList(orArgument_); + } else { + return orArgumentBuilder_.getMessageList(); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public int getOrArgumentCount() { + if (orArgumentBuilder_ == null) { + return orArgument_.size(); + } else { + return orArgumentBuilder_.getCount(); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression getOrArgument(int index) { + if (orArgumentBuilder_ == null) { + return orArgument_.get(index); + } else { + return orArgumentBuilder_.getMessage(index); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public Builder setOrArgument( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression value) { + if (orArgumentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrArgumentIsMutable(); + orArgument_.set(index, value); + onChanged(); + } else { + orArgumentBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public Builder setOrArgument( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder builderForValue) { + if (orArgumentBuilder_ == null) { + ensureOrArgumentIsMutable(); + orArgument_.set(index, builderForValue.build()); + onChanged(); + } else { + orArgumentBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public Builder addOrArgument(org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression value) { + if (orArgumentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrArgumentIsMutable(); + orArgument_.add(value); + onChanged(); + } else { + orArgumentBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public Builder addOrArgument( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression value) { + if (orArgumentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrArgumentIsMutable(); + orArgument_.add(index, value); + onChanged(); + } else { + orArgumentBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public Builder addOrArgument( + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder builderForValue) { + if (orArgumentBuilder_ == null) { + ensureOrArgumentIsMutable(); + orArgument_.add(builderForValue.build()); + onChanged(); + } else { + orArgumentBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public Builder addOrArgument( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder builderForValue) { + if (orArgumentBuilder_ == null) { + ensureOrArgumentIsMutable(); + orArgument_.add(index, builderForValue.build()); + onChanged(); + } else { + orArgumentBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public Builder addAllOrArgument( + java.lang.Iterable values) { + if (orArgumentBuilder_ == null) { + ensureOrArgumentIsMutable(); + org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( + values, orArgument_); + onChanged(); + } else { + orArgumentBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public Builder clearOrArgument() { + if (orArgumentBuilder_ == null) { + orArgument_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + orArgumentBuilder_.clear(); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public Builder removeOrArgument(int index) { + if (orArgumentBuilder_ == null) { + ensureOrArgumentIsMutable(); + orArgument_.remove(index); + onChanged(); + } else { + orArgumentBuilder_.remove(index); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder getOrArgumentBuilder( + int index) { + return getOrArgumentFieldBuilder().getBuilder(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder getOrArgumentOrBuilder( + int index) { + if (orArgumentBuilder_ == null) { + return orArgument_.get(index); } else { + return orArgumentBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public java.util.List + getOrArgumentOrBuilderList() { + if (orArgumentBuilder_ != null) { + return orArgumentBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(orArgument_); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder addOrArgumentBuilder() { + return getOrArgumentFieldBuilder().addBuilder( + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.getDefaultInstance()); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder addOrArgumentBuilder( + int index) { + return getOrArgumentFieldBuilder().addBuilder( + index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.getDefaultInstance()); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public java.util.List + getOrArgumentBuilderList() { + return getOrArgumentFieldBuilder().getBuilderList(); + } + private org.jetbrains.kotlin.protobuf.RepeatedFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder> + getOrArgumentFieldBuilder() { + if (orArgumentBuilder_ == null) { + orArgumentBuilder_ = new org.jetbrains.kotlin.protobuf.RepeatedFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression, org.jetbrains.kotlin.serialization.DebugProtoBuf.Expression.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.ExpressionOrBuilder>( + orArgument_, + ((bitField0_ & 0x00000040) == 0x00000040), + getParentForChildren(), + isClean()); + orArgument_ = null; + } + return orArgumentBuilder_; + } + + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.Expression) + } + + static { + defaultInstance = new Expression(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.Expression) + } + private static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor internal_static_org_jetbrains_kotlin_serialization_StringTable_descriptor; private static @@ -28974,6 +33397,21 @@ public final class DebugProtoBuf { private static org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_jetbrains_kotlin_serialization_PackageFragment_fieldAccessorTable; + private static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor + internal_static_org_jetbrains_kotlin_serialization_Contract_descriptor; + private static + org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_jetbrains_kotlin_serialization_Contract_fieldAccessorTable; + private static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor + internal_static_org_jetbrains_kotlin_serialization_Effect_descriptor; + private static + org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_jetbrains_kotlin_serialization_Effect_fieldAccessorTable; + private static final org.jetbrains.kotlin.protobuf.Descriptors.Descriptor + internal_static_org_jetbrains_kotlin_serialization_Expression_descriptor; + private static + org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_jetbrains_kotlin_serialization_Expression_fieldAccessorTable; public static org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -29081,7 +33519,7 @@ public final class DebugProtoBuf { "-1\"\220\001\n\013Constructor\022\020\n\005flags\030\001 \001(\005:\0016\022K\n\017" + "value_parameter\030\002 \003(\01322.org.jetbrains.ko" + "tlin.serialization.ValueParameter\022\033\n\023ver" + - "sion_requirement\030\037 \001(\005*\005\010d\020\310\001\"\367\003\n\010Functi" + + "sion_requirement\030\037 \001(\005*\005\010d\020\310\001\"\267\004\n\010Functi" + "on\022\020\n\005flags\030\t \001(\005:\0016\022\024\n\told_flags\030\001 \001(\005:", "\0016\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\022=\n\013return_type\030\003 " + "\001(\0132(.org.jetbrains.kotlin.serialization" + @@ -29094,64 +33532,90 @@ public final class DebugProtoBuf { "lin.serialization.ValueParameter\022A\n\ntype" + "_table\030\036 \001(\0132-.org.jetbrains.kotlin.seri", "alization.TypeTable\022\033\n\023version_requireme" + - "nt\030\037 \001(\005*\005\010d\020\310\001\"\354\003\n\010Property\022\022\n\005flags\030\013 " + - "\001(\005:\003518\022\027\n\told_flags\030\001 \001(\005:\0042054\022\022\n\004nam" + - "e\030\002 \002(\005B\004\210\265\030\001\022=\n\013return_type\030\003 \001(\0132(.org" + - ".jetbrains.kotlin.serialization.Type\022\026\n\016" + - "return_type_id\030\t \001(\005\022I\n\016type_parameter\030\004" + - " \003(\01321.org.jetbrains.kotlin.serializatio" + - "n.TypeParameter\022?\n\rreceiver_type\030\005 \001(\0132(" + - ".org.jetbrains.kotlin.serialization.Type" + - "\022\030\n\020receiver_type_id\030\n \001(\005\022R\n\026setter_val", - "ue_parameter\030\006 \001(\01322.org.jetbrains.kotli" + - "n.serialization.ValueParameter\022\024\n\014getter" + - "_flags\030\007 \001(\005\022\024\n\014setter_flags\030\010 \001(\005\022\033\n\023ve" + - "rsion_requirement\030\037 \001(\005*\005\010d\020\310\001\"\355\001\n\016Value" + - "Parameter\022\020\n\005flags\030\001 \001(\005:\0010\022\022\n\004name\030\002 \002(" + - "\005B\004\210\265\030\001\0226\n\004type\030\003 \001(\0132(.org.jetbrains.ko" + - "tlin.serialization.Type\022\017\n\007type_id\030\005 \001(\005" + - "\022E\n\023vararg_element_type\030\004 \001(\0132(.org.jetb" + - "rains.kotlin.serialization.Type\022\036\n\026varar" + - "g_element_type_id\030\006 \001(\005*\005\010d\020\310\001\"\236\003\n\tTypeA", - "lias\022\020\n\005flags\030\001 \001(\005:\0016\022\022\n\004name\030\002 \002(\005B\004\210\265" + - "\030\001\022I\n\016type_parameter\030\003 \003(\01321.org.jetbrai" + - "ns.kotlin.serialization.TypeParameter\022A\n" + - "\017underlying_type\030\004 \001(\0132(.org.jetbrains.k" + - "otlin.serialization.Type\022\032\n\022underlying_t" + - "ype_id\030\005 \001(\005\022?\n\rexpanded_type\030\006 \001(\0132(.or" + - "g.jetbrains.kotlin.serialization.Type\022\030\n" + - "\020expanded_type_id\030\007 \001(\005\022B\n\nannotation\030\010 " + + "nt\030\037 \001(\005\022>\n\010contract\030 \001(\0132,.org.jetbrai" + + "ns.kotlin.serialization.Contract*\005\010d\020\310\001\"" + + "\354\003\n\010Property\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\022=\n" + + "\013return_type\030\003 \001(\0132(.org.jetbrains.kotli" + + "n.serialization.Type\022\026\n\016return_type_id\030\t" + + " \001(\005\022I\n\016type_parameter\030\004 \003(\01321.org.jetbr" + + "ains.kotlin.serialization.TypeParameter\022" + + "?\n\rreceiver_type\030\005 \001(\0132(.org.jetbrains.k", + "otlin.serialization.Type\022\030\n\020receiver_typ" + + "e_id\030\n \001(\005\022R\n\026setter_value_parameter\030\006 \001" + + "(\01322.org.jetbrains.kotlin.serialization." + + "ValueParameter\022\024\n\014getter_flags\030\007 \001(\005\022\024\n\014" + + "setter_flags\030\010 \001(\005\022\033\n\023version_requiremen" + + "t\030\037 \001(\005*\005\010d\020\310\001\"\355\001\n\016ValueParameter\022\020\n\005fla" + + "gs\030\001 \001(\005:\0010\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\0226\n\004type\030" + + "\003 \001(\0132(.org.jetbrains.kotlin.serializati" + + "on.Type\022\017\n\007type_id\030\005 \001(\005\022E\n\023vararg_eleme" + + "nt_type\030\004 \001(\0132(.org.jetbrains.kotlin.ser", + "ialization.Type\022\036\n\026vararg_element_type_i" + + "d\030\006 \001(\005*\005\010d\020\310\001\"\236\003\n\tTypeAlias\022\020\n\005flags\030\001 " + + "\001(\005:\0016\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\022I\n\016type_param" + + "eter\030\003 \003(\01321.org.jetbrains.kotlin.serial" + + "ization.TypeParameter\022A\n\017underlying_type" + + "\030\004 \001(\0132(.org.jetbrains.kotlin.serializat" + + "ion.Type\022\032\n\022underlying_type_id\030\005 \001(\005\022?\n\r" + + "expanded_type\030\006 \001(\0132(.org.jetbrains.kotl" + + "in.serialization.Type\022\030\n\020expanded_type_i" + + "d\030\007 \001(\005\022B\n\nannotation\030\010 \003(\0132..org.jetbra", + "ins.kotlin.serialization.Annotation\022\033\n\023v" + + "ersion_requirement\030\037 \001(\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\"\237\003\n\022Vers" + + "ionRequirement\022\017\n\007version\030\001 \001(\005\022\024\n\014versi" + + "on_full\030\002 \001(\005\022R\n\005level\030\003 \001(\0162<.org.jetbr" + + "ains.kotlin.serialization.VersionRequire" + + "ment.Level:\005ERROR\022\022\n\nerror_code\030\004 \001(\005\022\025\n" + + "\007message\030\005 \001(\005B\004\230\265\030\001\022j\n\014version_kind\030\006 \001" + + "(\0162B.org.jetbrains.kotlin.serialization." + + "VersionRequirement.VersionKind:\020LANGUAGE", + "_VERSION\"+\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" + + "_VERSION\020\000\022\024\n\020COMPILER_VERSION\020\001\022\017\n\013API_" + + "VERSION\020\002\"f\n\027VersionRequirementTable\022K\n\013" + + "requirement\030\001 \003(\01326.org.jetbrains.kotlin" + + ".serialization.VersionRequirement\"\243\002\n\017Pa" + + "ckageFragment\022@\n\007strings\030\001 \001(\0132/.org.jet" + + "brains.kotlin.serialization.StringTable\022" + + "O\n\017qualified_names\030\002 \001(\01326.org.jetbrains" + + ".kotlin.serialization.QualifiedNameTable", + "\022<\n\007package\030\003 \001(\0132+.org.jetbrains.kotlin" + + ".serialization.Package\0228\n\005class\030\004 \003(\0132)." + + "org.jetbrains.kotlin.serialization.Class" + + "*\005\010d\020\310\001\"F\n\010Contract\022:\n\006effect\030\001 \003(\0132*.or" + + "g.jetbrains.kotlin.serialization.Effect\"" + + "\332\003\n\006Effect\022J\n\013effect_type\030\001 \001(\01625.org.je" + + "tbrains.kotlin.serialization.Effect.Effe" + + "ctType\022S\n\033effect_constructor_argument\030\002 " + "\003(\0132..org.jetbrains.kotlin.serialization" + - ".Annotation\022\033\n\023version_requirement\030\037 \001(\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\"\237\003\n\022VersionRequirement\022\017\n\007versio" + - "n\030\001 \001(\005\022\024\n\014version_full\030\002 \001(\005\022R\n\005level\030\003" + - " \001(\0162<.org.jetbrains.kotlin.serializatio" + - "n.VersionRequirement.Level:\005ERROR\022\022\n\nerr" + - "or_code\030\004 \001(\005\022\025\n\007message\030\005 \001(\005B\004\230\265\030\001\022j\n\014" + - "version_kind\030\006 \001(\0162B.org.jetbrains.kotli" + - "n.serialization.VersionRequirement.Versi" + - "onKind:\020LANGUAGE_VERSION\"+\n\005Level\022\013\n\007WAR" + - "NING\020\000\022\t\n\005ERROR\020\001\022\n\n\006HIDDEN\020\002\"J\n\013Version", - "Kind\022\024\n\020LANGUAGE_VERSION\020\000\022\024\n\020COMPILER_V" + - "ERSION\020\001\022\017\n\013API_VERSION\020\002\"f\n\027VersionRequ" + - "irementTable\022K\n\013requirement\030\001 \003(\01326.org." + - "jetbrains.kotlin.serialization.VersionRe" + - "quirement\"\243\002\n\017PackageFragment\022@\n\007strings" + - "\030\001 \001(\0132/.org.jetbrains.kotlin.serializat" + - "ion.StringTable\022O\n\017qualified_names\030\002 \001(\013" + - "26.org.jetbrains.kotlin.serialization.Qu" + - "alifiedNameTable\022<\n\007package\030\003 \001(\0132+.org." + - "jetbrains.kotlin.serialization.Package\0228", - "\n\005class\030\004 \003(\0132).org.jetbrains.kotlin.ser" + - "ialization.Class*\005\010d\020\310\001*9\n\010Modality\022\t\n\005F" + - "INAL\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\007PRIVAT" + - "E\020\001\022\r\n\tPROTECTED\020\002\022\n\n\006PUBLIC\020\003\022\023\n\017PRIVAT" + - "E_TO_THIS\020\004\022\t\n\005LOCAL\020\005*Q\n\nMemberKind\022\017\n\013" + - "DECLARATION\020\000\022\021\n\rFAKE_OVERRIDE\020\001\022\016\n\nDELE" + - "GATION\020\002\022\017\n\013SYNTHESIZED\020\003B\017B\rDebugProtoB" + - "uf" + ".Expression\022X\n conclusion_of_conditional", + "_effect\030\003 \001(\0132..org.jetbrains.kotlin.ser" + + "ialization.Expression\022G\n\004kind\030\004 \001(\01629.or" + + "g.jetbrains.kotlin.serialization.Effect." + + "InvocationKind\"C\n\nEffectType\022\024\n\020RETURNS_" + + "CONSTANT\020\000\022\t\n\005CALLS\020\001\022\024\n\020RETURNS_NOT_NUL" + + "L\020\002\"G\n\016InvocationKind\022\020\n\014AT_MOST_ONCE\020\000\022" + + "\020\n\014EXACTLY_ONCE\020\001\022\021\n\rAT_LEAST_ONCE\020\002\"\260\003\n" + + "\nExpression\022\r\n\005flags\030\001 \001(\005\022!\n\031value_para" + + "meter_reference\030\002 \001(\005\022T\n\016constant_value\030" + + "\003 \001(\0162<.org.jetbrains.kotlin.serializati", + "on.Expression.ConstantValue\022B\n\020is_instan" + + "ce_type\030\004 \001(\0132(.org.jetbrains.kotlin.ser" + + "ialization.Type\022\033\n\023is_instance_type_id\030\005" + + " \001(\005\022D\n\014and_argument\030\006 \003(\0132..org.jetbrai" + + "ns.kotlin.serialization.Expression\022C\n\013or" + + "_argument\030\007 \003(\0132..org.jetbrains.kotlin.s" + + "erialization.Expression\".\n\rConstantValue" + + "\022\010\n\004TRUE\020\000\022\t\n\005FALSE\020\001\022\010\n\004NULL\020\002*9\n\010Modal" + + "ity\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\005LOCAL\020\005*Q\n\nMember" + + "Kind\022\017\n\013DECLARATION\020\000\022\021\n\rFAKE_OVERRIDE\020\001" + + "\022\016\n\nDELEGATION\020\002\022\017\n\013SYNTHESIZED\020\003B\017B\rDeb" + + "ugProtoBuf" }; org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -29249,7 +33713,7 @@ public final class DebugProtoBuf { internal_static_org_jetbrains_kotlin_serialization_Function_fieldAccessorTable = new org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_org_jetbrains_kotlin_serialization_Function_descriptor, - new java.lang.String[] { "Flags", "OldFlags", "Name", "ReturnType", "ReturnTypeId", "TypeParameter", "ReceiverType", "ReceiverTypeId", "ValueParameter", "TypeTable", "VersionRequirement", }); + new java.lang.String[] { "Flags", "OldFlags", "Name", "ReturnType", "ReturnTypeId", "TypeParameter", "ReceiverType", "ReceiverTypeId", "ValueParameter", "TypeTable", "VersionRequirement", "Contract", }); internal_static_org_jetbrains_kotlin_serialization_Property_descriptor = getDescriptor().getMessageTypes().get(10); internal_static_org_jetbrains_kotlin_serialization_Property_fieldAccessorTable = new @@ -29292,6 +33756,24 @@ public final class DebugProtoBuf { org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_org_jetbrains_kotlin_serialization_PackageFragment_descriptor, new java.lang.String[] { "Strings", "QualifiedNames", "Package", "Class_", }); + internal_static_org_jetbrains_kotlin_serialization_Contract_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_org_jetbrains_kotlin_serialization_Contract_fieldAccessorTable = new + org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_jetbrains_kotlin_serialization_Contract_descriptor, + new java.lang.String[] { "Effect", }); + internal_static_org_jetbrains_kotlin_serialization_Effect_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_org_jetbrains_kotlin_serialization_Effect_fieldAccessorTable = new + org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_jetbrains_kotlin_serialization_Effect_descriptor, + new java.lang.String[] { "EffectType", "EffectConstructorArgument", "ConclusionOfConditionalEffect", "Kind", }); + internal_static_org_jetbrains_kotlin_serialization_Expression_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_org_jetbrains_kotlin_serialization_Expression_fieldAccessorTable = new + org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_jetbrains_kotlin_serialization_Expression_descriptor, + new java.lang.String[] { "Flags", "ValueParameterReference", "ConstantValue", "IsInstanceType", "IsInstanceTypeId", "AndArgument", "OrArgument", }); org.jetbrains.kotlin.protobuf.ExtensionRegistry registry = org.jetbrains.kotlin.protobuf.ExtensionRegistry.newInstance(); registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.fqNameIdInTable); diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/frontend/java/di/injection.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/frontend/java/di/injection.kt index 2d5a1bde482..bc387e50c1c 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/frontend/java/di/injection.kt +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/frontend/java/di/injection.kt @@ -25,6 +25,7 @@ import org.jetbrains.kotlin.config.LanguageFeature import org.jetbrains.kotlin.config.LanguageVersionSettings import org.jetbrains.kotlin.container.* import org.jetbrains.kotlin.context.ModuleContext +import org.jetbrains.kotlin.contracts.ContractDeserializerImpl import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.descriptors.PackagePartProvider import org.jetbrains.kotlin.frontend.di.configureModule @@ -109,6 +110,8 @@ fun createContainerForLazyResolveWithJava( } targetEnvironment.configure(this) + + useImpl() }.apply { get().initialize(bindingTrace, get()) } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/contracts/ContractDeserializerImpl.kt b/compiler/frontend/src/org/jetbrains/kotlin/contracts/ContractDeserializerImpl.kt new file mode 100644 index 00000000000..68596539c8f --- /dev/null +++ b/compiler/frontend/src/org/jetbrains/kotlin/contracts/ContractDeserializerImpl.kt @@ -0,0 +1,248 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.kotlin.contracts + +import org.jetbrains.kotlin.builtins.KotlinBuiltIns +import org.jetbrains.kotlin.contracts.description.* +import org.jetbrains.kotlin.contracts.description.expressions.* +import org.jetbrains.kotlin.descriptors.FunctionDescriptor +import org.jetbrains.kotlin.serialization.Flags +import org.jetbrains.kotlin.serialization.ProtoBuf +import org.jetbrains.kotlin.serialization.deserialization.ContractDeserializer +import org.jetbrains.kotlin.serialization.deserialization.DeserializationConfiguration +import org.jetbrains.kotlin.serialization.deserialization.TypeDeserializer +import org.jetbrains.kotlin.serialization.deserialization.TypeTable +import org.jetbrains.kotlin.types.KotlinType +import org.jetbrains.kotlin.utils.addIfNotNull + +class ContractDeserializerImpl(private val configuration: DeserializationConfiguration) : ContractDeserializer { + override fun deserializeContractFromFunction( + proto: ProtoBuf.Function, + ownerFunction: FunctionDescriptor, + typeTable: TypeTable, + typeDeserializer: TypeDeserializer + ): Pair, LazyContractProvider>? { + if (!proto.hasContract()) return null + + if (!configuration.returnsEffectAllowed && !configuration.callsInPlaceEffectAllowed) return null + + val worker = ContractDeserializationWorker(typeTable, typeDeserializer, ownerFunction) + val contract = worker.deserializeContract(proto.contract) + return ContractProviderKey to LazyContractProvider.createInitialized(contract) + } + + private class ContractDeserializationWorker( + private val typeTable: TypeTable, + private val typeDeserializer: TypeDeserializer, + private val ownerFunction: FunctionDescriptor + ) { + + fun deserializeContract(proto: ProtoBuf.Contract): ContractDescription? { + val effects = proto.effectList.map { deserializePossiblyConditionalEffect(it) ?: return null } + return ContractDescription(effects, ownerFunction) + } + + private fun deserializePossiblyConditionalEffect(proto: ProtoBuf.Effect): EffectDeclaration? { + if (proto.hasConclusionOfConditionalEffect()) { + // conditional effect + val conclusion = deserializeExpression(proto.conclusionOfConditionalEffect) ?: return null + val effect = deserializeSimpleEffect(proto) ?: return null + return ConditionalEffectDeclaration(effect, conclusion) + } + return deserializeSimpleEffect(proto) + } + + private fun deserializeSimpleEffect(proto: ProtoBuf.Effect): EffectDeclaration? { + val type = if (proto.hasEffectType()) proto.effectType else return null + return when (type!!) { + ProtoBuf.Effect.EffectType.RETURNS_CONSTANT -> { + val argument = proto.effectConstructorArgumentList.getOrNull(0) + val returnValue = if (argument == null) ConstantReference.WILDCARD else deserializeExpression(argument) as? ConstantReference ?: return null + ReturnsEffectDeclaration(returnValue) + } + + ProtoBuf.Effect.EffectType.RETURNS_NOT_NULL -> { + ReturnsEffectDeclaration(ConstantReference.NOT_NULL) + } + + ProtoBuf.Effect.EffectType.CALLS -> { + val argument = proto.effectConstructorArgumentList.getOrNull(0) ?: return null + val callable = extractVariable(argument) ?: return null + val invocationKind = if (proto.hasKind()) + proto.kind.toDescriptorInvocationKind() ?: return null + else + InvocationKind.UNKNOWN + CallsEffectDeclaration(callable, invocationKind) + } + } + } + + private fun deserializeExpression(proto: ProtoBuf.Expression): BooleanExpression? { + val primitiveType = getPrimitiveType(proto) + val primitiveExpression = extractPrimitiveExpression(proto, primitiveType) + + val complexType = getComplexType(proto) + val childs: MutableList = mutableListOf() + childs.addIfNotNull(primitiveExpression) + + return when (complexType) { + ComplexExpressionType.AND_SEQUENCE -> { + proto.andArgumentList.mapTo(childs) { deserializeExpression(it) ?: return null } + childs.reduce { acc, booleanExpression -> LogicalAnd(acc, booleanExpression) } + } + + ComplexExpressionType.OR_SEQUENCE -> { + proto.orArgumentList.mapTo(childs) { deserializeExpression(it) ?: return null } + childs.reduce { acc, booleanExpression -> LogicalOr(acc, booleanExpression) } + } + + null -> primitiveExpression + } + } + + private fun extractPrimitiveExpression(proto: ProtoBuf.Expression, primitiveType: PrimitiveExpressionType?): BooleanExpression? { + val isInverted = proto.hasFlags() && Flags.IS_NEGATED.get(proto.flags) + + return when (primitiveType) { + PrimitiveExpressionType.VALUE_PARAMETER_REFERENCE, PrimitiveExpressionType.RECEIVER_REFERENCE -> { + (extractVariable(proto) as? BooleanVariableReference?)?.invertIfNecessary(isInverted) + } + + PrimitiveExpressionType.CONSTANT -> + (deserializeConstant(proto.constantValue) as? BooleanConstantReference)?.invertIfNecessary(isInverted) + + PrimitiveExpressionType.INSTANCE_CHECK -> { + val variable = extractVariable(proto) ?: return null + val type = extractType(proto) ?: return null + IsInstancePredicate(variable, type, isInverted) + } + + PrimitiveExpressionType.NULLABILITY_CHECK -> { + val variable = extractVariable(proto) ?: return null + IsNullPredicate(variable, isInverted) + } + + null -> null + } + } + + private fun BooleanExpression.invertIfNecessary(shouldInvert: Boolean) = if (shouldInvert) LogicalNot(this) else this + + private fun extractVariable(proto: ProtoBuf.Expression): VariableReference? { + if (!proto.hasValueParameterReference()) return null + + val parameterDescriptor = if (proto.valueParameterReference == 0) + ownerFunction.extensionReceiverParameter ?: return null + else + ownerFunction.valueParameters.getOrNull(proto.valueParameterReference - 1) ?: return null + + return if (!KotlinBuiltIns.isBoolean(parameterDescriptor.type)) + VariableReference(parameterDescriptor) + else + BooleanVariableReference(parameterDescriptor) + } + + private fun ProtoBuf.Effect.InvocationKind.toDescriptorInvocationKind(): InvocationKind? = when (this) { + ProtoBuf.Effect.InvocationKind.AT_MOST_ONCE -> InvocationKind.AT_MOST_ONCE + ProtoBuf.Effect.InvocationKind.EXACTLY_ONCE -> InvocationKind.EXACTLY_ONCE + ProtoBuf.Effect.InvocationKind.AT_LEAST_ONCE -> InvocationKind.AT_LEAST_ONCE + } + + private fun extractType(proto: ProtoBuf.Expression): KotlinType? { + val protoType = when { + proto.hasIsInstanceType() -> proto.isInstanceType + proto.hasIsInstanceTypeId() -> typeTable.types.getOrNull(proto.isInstanceTypeId) ?: return null + else -> return null + } + + return typeDeserializer.type(protoType) + } + + private fun deserializeConstant(value: ProtoBuf.Expression.ConstantValue): ConstantReference? = when (value) { + ProtoBuf.Expression.ConstantValue.TRUE -> BooleanConstantReference.TRUE + ProtoBuf.Expression.ConstantValue.FALSE -> BooleanConstantReference.FALSE + ProtoBuf.Expression.ConstantValue.NULL -> ConstantReference.NULL + } + + private fun getComplexType(proto: ProtoBuf.Expression): ComplexExpressionType? { + val isOrSequence = proto.orArgumentCount != 0 + val isAndSequence = proto.andArgumentCount != 0 + return when { + isOrSequence && isAndSequence -> null + isOrSequence -> ComplexExpressionType.OR_SEQUENCE + isAndSequence -> ComplexExpressionType.AND_SEQUENCE + else -> null + } + } + + private fun getPrimitiveType(proto: ProtoBuf.Expression): PrimitiveExpressionType? { + // Expected to be one element, but can be empty (unknown expression) or contain several elements (invalid data) + val expressionTypes: MutableList = mutableListOf() + + // Check for predicates + when { + proto.hasValueParameterReference() && proto.hasType() -> + expressionTypes.add(PrimitiveExpressionType.INSTANCE_CHECK) + + proto.hasValueParameterReference() && proto.hasFlag(Flags.IS_NULL_CHECK_PREDICATE) -> + expressionTypes.add(PrimitiveExpressionType.NULLABILITY_CHECK) + } + + // If message contains correct predicate, then predicate's type overrides type of value, + // even is message has one + if (expressionTypes.isNotEmpty()) { + return expressionTypes.singleOrNull() + } + + // Otherwise, check if it is a value + when { + proto.hasValueParameterReference() && proto.valueParameterReference > 0 -> + expressionTypes.add(PrimitiveExpressionType.VALUE_PARAMETER_REFERENCE) + + proto.hasValueParameterReference() && proto.valueParameterReference == 0 -> + expressionTypes.add(PrimitiveExpressionType.RECEIVER_REFERENCE) + + proto.hasConstantValue() -> expressionTypes.add(PrimitiveExpressionType.CONSTANT) + } + + return expressionTypes.singleOrNull() + } + + private fun ProtoBuf.Expression.hasType(): Boolean = this.hasIsInstanceType() || this.hasIsInstanceTypeId() + + private fun ProtoBuf.Expression.hasFlag(flag: Flags.BooleanFlagField) = + this.hasFlags() && flag.get(this.flags) + + // Arguments of expressions with such types are never other expressions + private enum class PrimitiveExpressionType { + VALUE_PARAMETER_REFERENCE, + RECEIVER_REFERENCE, + CONSTANT, + INSTANCE_CHECK, + NULLABILITY_CHECK + } + + // Expressions with such type can take other expressions as arguments. + // Additionally, for performance reasons, "complex expression" and "primitive expression" + // can co-exist in the one and the same message. If "primitive expression" is present + // in the current message, it is treated as the first argument of "complex expression". + private enum class ComplexExpressionType { + AND_SEQUENCE, + OR_SEQUENCE + } + } +} \ No newline at end of file diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/CompilerDeserializationConfiguration.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/CompilerDeserializationConfiguration.kt index e63a899c206..99d7b3fef71 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/CompilerDeserializationConfiguration.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/CompilerDeserializationConfiguration.kt @@ -27,4 +27,8 @@ class CompilerDeserializationConfiguration(languageVersionSettings: LanguageVers override val skipMetadataVersionCheck = languageVersionSettings.getFlag(AnalysisFlag.skipMetadataVersionCheck) override val isJvmPackageNameSupported = languageVersionSettings.supportsFeature(LanguageFeature.JvmPackageName) + + override val returnsEffectAllowed: Boolean = languageVersionSettings.supportsFeature(LanguageFeature.ReturnsEffect) + + override val callsInPlaceEffectAllowed: Boolean = languageVersionSettings.supportsFeature(LanguageFeature.CallsInPlaceEffect) } diff --git a/compiler/resolution/src/org/jetbrains/kotlin/contracts/description/LazyContractProvider.kt b/compiler/resolution/src/org/jetbrains/kotlin/contracts/description/LazyContractProvider.kt index 4b733a53fa8..f6b14587b22 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/contracts/description/LazyContractProvider.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/contracts/description/LazyContractProvider.kt @@ -17,12 +17,13 @@ package org.jetbrains.kotlin.contracts.description import org.jetbrains.kotlin.descriptors.FunctionDescriptor +import org.jetbrains.kotlin.serialization.deserialization.ContractProvider /** * Essentially, this is a composition of two fields: value of type 'ContractDescription' and * 'computation', which guarantees to initialize this field. */ -class LazyContractProvider(private val computation: () -> Any?) { +class LazyContractProvider(private val computation: () -> Any?) : ContractProvider { @Volatile private var isComputed: Boolean = false diff --git a/compiler/serialization/src/org/jetbrains/kotlin/serialization/ContractSerializer.kt b/compiler/serialization/src/org/jetbrains/kotlin/serialization/ContractSerializer.kt new file mode 100644 index 00000000000..fd97543b722 --- /dev/null +++ b/compiler/serialization/src/org/jetbrains/kotlin/serialization/ContractSerializer.kt @@ -0,0 +1,201 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.kotlin.serialization + +import org.jetbrains.kotlin.contracts.description.* +import org.jetbrains.kotlin.contracts.description.expressions.* +import org.jetbrains.kotlin.descriptors.FunctionDescriptor +import org.jetbrains.kotlin.descriptors.ReceiverParameterDescriptor +import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor + +class ContractSerializer { + fun serializeContractOfFunctionIfAny( + functionDescriptor: FunctionDescriptor, + proto: ProtoBuf.Function.Builder, + parentSerializer: DescriptorSerializer + ) { + val contractDescription = functionDescriptor.getUserData(ContractProviderKey)?.getContractDescription() + if (contractDescription != null) { + val worker = ContractSerializerWorker(parentSerializer) + proto.setContract(worker.contractProto(contractDescription)) + } + } + + private class ContractSerializerWorker(private val parentSerializer: DescriptorSerializer) { + fun contractProto(contractDescription: ContractDescription): ProtoBuf.Contract.Builder { + return ProtoBuf.Contract.newBuilder().apply { + contractDescription.effects.forEach { addEffect(effectProto(it, contractDescription)) } + } + } + + private fun effectProto(effectDeclaration: EffectDeclaration, contractDescription: ContractDescription): ProtoBuf.Effect.Builder { + return ProtoBuf.Effect.newBuilder().apply { + fillEffectProto(this, effectDeclaration, contractDescription) + } + } + + private fun fillEffectProto(builder: ProtoBuf.Effect.Builder, effectDeclaration: EffectDeclaration, contractDescription: ContractDescription) { + when (effectDeclaration) { + is ConditionalEffectDeclaration -> { + builder.setConclusionOfConditionalEffect(contractExpressionProto(effectDeclaration.condition, contractDescription)) + fillEffectProto(builder, effectDeclaration.effect, contractDescription) + } + + is ReturnsEffectDeclaration -> { + when { + effectDeclaration.value == ConstantReference.NOT_NULL -> builder.effectType = ProtoBuf.Effect.EffectType.RETURNS_NOT_NULL + effectDeclaration.value == ConstantReference.WILDCARD -> builder.effectType = ProtoBuf.Effect.EffectType.RETURNS_CONSTANT + else -> { + builder.effectType = ProtoBuf.Effect.EffectType.RETURNS_CONSTANT + builder.addEffectConstructorArgument(contractExpressionProto(effectDeclaration.value, contractDescription)) + } + } + } + + is CallsEffectDeclaration -> { + builder.effectType = ProtoBuf.Effect.EffectType.CALLS + builder.addEffectConstructorArgument(contractExpressionProto(effectDeclaration.variableReference, contractDescription)) + val invocationKindProtobufEnum = invocationKindProtobufEnum(effectDeclaration.kind) + if (invocationKindProtobufEnum != null) { + builder.kind = invocationKindProtobufEnum + } + } + + // TODO: Add else and do something like reporting issue? + } + } + + private fun contractExpressionProto(contractDescriptionElement: ContractDescriptionElement, contractDescription: ContractDescription): ProtoBuf.Expression.Builder { + return contractDescriptionElement.accept(object : ContractDescriptionVisitor { + override fun visitLogicalOr(logicalOr: LogicalOr, data: Unit): ProtoBuf.Expression.Builder { + val leftBuilder = logicalOr.left.accept(this, data) + + return if (leftBuilder.andArgumentCount != 0) { + // can't flatten and re-use left builder + ProtoBuf.Expression.newBuilder().apply { + addOrArgument(leftBuilder) + addOrArgument(contractExpressionProto(logicalOr.right, contractDescription)) + } + } + else { + // we can save some space by re-using left builder instead of nesting new one + leftBuilder.apply { addOrArgument(contractExpressionProto(logicalOr.right, contractDescription)) } + } + } + + override fun visitLogicalAnd(logicalAnd: LogicalAnd, data: Unit): ProtoBuf.Expression.Builder { + val leftBuilder = logicalAnd.left.accept(this, data) + + return if (leftBuilder.orArgumentCount != 0) { + // leftBuilder is already a sequence of Or-operators, so we can't re-use it + ProtoBuf.Expression.newBuilder().apply { + addAndArgument(leftBuilder) + addAndArgument(contractExpressionProto(logicalAnd.right, contractDescription)) + } + } + else { + // we can save some space by re-using left builder instead of nesting new one + leftBuilder.apply { addAndArgument(contractExpressionProto(logicalAnd.right, contractDescription)) } + } + } + + override fun visitLogicalNot(logicalNot: LogicalNot, data: Unit): ProtoBuf.Expression.Builder = + logicalNot.arg.accept(this, data).apply { + writeFlags(Flags.IS_NEGATED.invert(flags)) + } + + override fun visitIsInstancePredicate(isInstancePredicate: IsInstancePredicate, data: Unit): ProtoBuf.Expression.Builder { + // write variable + val builder = visitVariableReference(isInstancePredicate.arg, data) + + // write rhs type + builder.isInstanceTypeId = parentSerializer.typeId(isInstancePredicate.type) + + // set flags + builder.writeFlags(Flags.getContractExpressionFlags(isInstancePredicate.isNegated, false)) + + return builder + } + + override fun visitIsNullPredicate(isNullPredicate: IsNullPredicate, data: Unit): ProtoBuf.Expression.Builder { + // get builder with variable embeded into it + val builder = visitVariableReference(isNullPredicate.arg, data) + + // set flags + builder.writeFlags(Flags.getContractExpressionFlags(isNullPredicate.isNegated, true)) + + return builder + } + + override fun visitConstantDescriptor(constantReference: ConstantReference, data: Unit): ProtoBuf.Expression.Builder { + val builder = ProtoBuf.Expression.newBuilder() + + // write constant value + val constantValueProtobufEnum = constantValueProtobufEnum(constantReference) + if (constantValueProtobufEnum != null) { + builder.constantValue = constantValueProtobufEnum + } + + return builder + } + + override fun visitVariableReference(variableReference: VariableReference, data: Unit): ProtoBuf.Expression.Builder { + val builder = ProtoBuf.Expression.newBuilder() + + val descriptor = variableReference.descriptor + val indexOfParameter = when (descriptor) { + is ReceiverParameterDescriptor -> 0 + + is ValueParameterDescriptor -> + contractDescription.ownerFunction.valueParameters.indexOf(descriptor).takeIf { it != -1 }?.inc() + + else -> null + } + + builder.valueParameterReference = indexOfParameter ?: return builder + + return builder + } + }, Unit) + } + + private fun ProtoBuf.Expression.Builder.writeFlags(newFlagsValue: Int) { + if (flags != newFlagsValue) { + flags = newFlagsValue + } + } + + private fun invocationKindProtobufEnum(kind: InvocationKind): ProtoBuf.Effect.InvocationKind? = when (kind) { + InvocationKind.AT_MOST_ONCE -> ProtoBuf.Effect.InvocationKind.AT_MOST_ONCE + InvocationKind.EXACTLY_ONCE -> ProtoBuf.Effect.InvocationKind.EXACTLY_ONCE + InvocationKind.AT_LEAST_ONCE -> ProtoBuf.Effect.InvocationKind.AT_LEAST_ONCE + InvocationKind.UNKNOWN -> null + } + + private fun constantValueProtobufEnum(constantReference: ConstantReference): ProtoBuf.Expression.ConstantValue? = when (constantReference) { + BooleanConstantReference.TRUE -> ProtoBuf.Expression.ConstantValue.TRUE + BooleanConstantReference.FALSE -> ProtoBuf.Expression.ConstantValue.FALSE + ConstantReference.NULL -> ProtoBuf.Expression.ConstantValue.NULL + ConstantReference.NOT_NULL -> throw IllegalStateException( + "Internal error during serialization of function contract: NOT_NULL constant isn't denotable in protobuf format. " + + "Its serialization should be handled at higher level" + ) + ConstantReference.WILDCARD -> null + else -> throw IllegalArgumentException("Unknown constant: $constantReference") + } + } +} \ No newline at end of file diff --git a/compiler/serialization/src/org/jetbrains/kotlin/serialization/DescriptorSerializer.kt b/compiler/serialization/src/org/jetbrains/kotlin/serialization/DescriptorSerializer.kt index 15cd9c4cc70..13482c98db1 100644 --- a/compiler/serialization/src/org/jetbrains/kotlin/serialization/DescriptorSerializer.kt +++ b/compiler/serialization/src/org/jetbrains/kotlin/serialization/DescriptorSerializer.kt @@ -49,6 +49,8 @@ class DescriptorSerializer private constructor( private val versionRequirementTable: MutableVersionRequirementTable, private val serializeTypeTableToFunction: Boolean ) { + private val contractSerializer = ContractSerializer() + fun serialize(message: MessageLite): ByteArray { return ByteArrayOutputStream().apply { stringTable.serializeTo(this) @@ -150,7 +152,6 @@ class DescriptorSerializer private constructor( } extension.serializeClass(classDescriptor, builder) - return builder } @@ -295,6 +296,8 @@ class DescriptorSerializer private constructor( builder.versionRequirement = writeVersionRequirement(LanguageFeature.Coroutines) } + contractSerializer.serializeContractOfFunctionIfAny(descriptor, builder, this) + extension.serializeFunction(descriptor, builder) return builder @@ -452,9 +455,9 @@ class DescriptorSerializer private constructor( return builder } - private fun typeId(type: KotlinType): Int = typeTable[type(type)] + internal fun typeId(type: KotlinType): Int = typeTable[type(type)] - private fun type(type: KotlinType): ProtoBuf.Type.Builder { + internal fun type(type: KotlinType): ProtoBuf.Type.Builder { val builder = ProtoBuf.Type.newBuilder() if (type.isError) { @@ -661,6 +664,8 @@ class DescriptorSerializer private constructor( private fun getTypeParameterId(descriptor: TypeParameterDescriptor): Int = typeParameters.intern(descriptor) + + companion object { @JvmStatic fun createTopLevel(extension: SerializerExtension): DescriptorSerializer { diff --git a/core/descriptor.loader.java/src/org/jetbrains/kotlin/builtins/JvmBuiltInsPackageFragmentProvider.kt b/core/descriptor.loader.java/src/org/jetbrains/kotlin/builtins/JvmBuiltInsPackageFragmentProvider.kt index 5e2fb81b60a..92d58b3bce3 100644 --- a/core/descriptor.loader.java/src/org/jetbrains/kotlin/builtins/JvmBuiltInsPackageFragmentProvider.kt +++ b/core/descriptor.loader.java/src/org/jetbrains/kotlin/builtins/JvmBuiltInsPackageFragmentProvider.kt @@ -51,7 +51,9 @@ class JvmBuiltInsPackageFragmentProvider( BuiltInFictitiousFunctionClassFactory(storageManager, moduleDescriptor), JvmBuiltInClassDescriptorFactory(storageManager, moduleDescriptor) ), - notFoundClasses, additionalClassPartsProvider, platformDependentDeclarationFilter + notFoundClasses, + ContractDeserializer.DEFAULT, + additionalClassPartsProvider, platformDependentDeclarationFilter ) } diff --git a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/DeserializationComponentsForJava.kt b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/DeserializationComponentsForJava.kt index 021e121b64e..a45419bfed6 100644 --- a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/DeserializationComponentsForJava.kt +++ b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/DeserializationComponentsForJava.kt @@ -23,10 +23,7 @@ import org.jetbrains.kotlin.descriptors.deserialization.PlatformDependentDeclara import org.jetbrains.kotlin.incremental.components.LookupTracker import org.jetbrains.kotlin.load.java.lazy.LazyJavaPackageFragmentProvider import org.jetbrains.kotlin.platform.JvmBuiltIns -import org.jetbrains.kotlin.serialization.deserialization.DeserializationComponents -import org.jetbrains.kotlin.serialization.deserialization.DeserializationConfiguration -import org.jetbrains.kotlin.serialization.deserialization.ErrorReporter -import org.jetbrains.kotlin.serialization.deserialization.LocalClassifierTypeSettings +import org.jetbrains.kotlin.serialization.deserialization.* import org.jetbrains.kotlin.storage.StorageManager // This class is needed only for easier injection: exact types of needed components are specified in the constructor here. @@ -40,7 +37,8 @@ class DeserializationComponentsForJava( packageFragmentProvider: LazyJavaPackageFragmentProvider, notFoundClasses: NotFoundClasses, errorReporter: ErrorReporter, - lookupTracker: LookupTracker + lookupTracker: LookupTracker, + contractDeserializer: ContractDeserializer ) { val components: DeserializationComponents @@ -50,7 +48,7 @@ class DeserializationComponentsForJava( components = DeserializationComponents( storageManager, moduleDescriptor, configuration, classDataFinder, annotationAndConstantLoader, packageFragmentProvider, LocalClassifierTypeSettings.Default, errorReporter, lookupTracker, JavaFlexibleTypeDeserializer, - emptyList(), notFoundClasses, + emptyList(), notFoundClasses, contractDeserializer, additionalClassPartsProvider = jvmBuiltIns?.settings ?: AdditionalClassPartsProvider.None, platformDependentDeclarationFilter = jvmBuiltIns?.settings ?: PlatformDependentDeclarationFilter.NoPlatformDependent ) diff --git a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/kotlin/reflect/RuntimeModuleData.kt b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/kotlin/reflect/RuntimeModuleData.kt index 5b226d431d7..3a39ca706db 100644 --- a/core/descriptors.runtime/src/org/jetbrains/kotlin/load/kotlin/reflect/RuntimeModuleData.kt +++ b/core/descriptors.runtime/src/org/jetbrains/kotlin/load/kotlin/reflect/RuntimeModuleData.kt @@ -36,6 +36,7 @@ import org.jetbrains.kotlin.load.kotlin.JavaClassDataFinder import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.platform.JvmBuiltIns import org.jetbrains.kotlin.resolve.jvm.JavaDescriptorResolver +import org.jetbrains.kotlin.serialization.deserialization.ContractDeserializer import org.jetbrains.kotlin.serialization.deserialization.DeserializationComponents import org.jetbrains.kotlin.serialization.deserialization.DeserializationConfiguration import org.jetbrains.kotlin.storage.LockBasedStorageManager @@ -82,7 +83,7 @@ class RuntimeModuleData private constructor( val deserializationComponentsForJava = DeserializationComponentsForJava( storageManager, module, DeserializationConfiguration.Default, javaClassDataFinder, binaryClassAnnotationAndConstantLoader, lazyJavaPackageFragmentProvider, notFoundClasses, - RuntimeErrorReporter, LookupTracker.DO_NOTHING + RuntimeErrorReporter, LookupTracker.DO_NOTHING, ContractDeserializer.DEFAULT ) singleModuleClassResolver.resolver = javaDescriptorResolver diff --git a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/FunctionDescriptorImpl.java b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/FunctionDescriptorImpl.java index e0f67125a5c..89bf61c05a4 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/FunctionDescriptorImpl.java +++ b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/FunctionDescriptorImpl.java @@ -818,4 +818,9 @@ public abstract class FunctionDescriptorImpl extends DeclarationDescriptorNonRoo private void setInitialSignatureDescriptor(@Nullable FunctionDescriptor initialSignatureDescriptor) { this.initialSignatureDescriptor = initialSignatureDescriptor; } + + // Don't use on published descriptors + public void putInUserDataMap(UserDataKey key, Object value) { + userDataMap.put(key, value); + } } diff --git a/core/deserialization/src/descriptors.proto b/core/deserialization/src/descriptors.proto index 1ab174c55d4..effd95aacf6 100644 --- a/core/deserialization/src/descriptors.proto +++ b/core/deserialization/src/descriptors.proto @@ -289,6 +289,8 @@ message Function { // Index into the VersionRequirementTable optional int32 version_requirement = 31; + optional Contract contract = 32; + extensions 100 to 199; } @@ -469,3 +471,78 @@ message PackageFragment { extensions 100 to 199; } + + + +message Contract { + repeated Effect effect = 1; +} + +message Effect { + // This enum controls which effect this message contains and how 'effectConstructorArguments' + // should be parsed. + // Each enum value documented in the following syntax: "EffectName(arg1: T1, arg2: T2, ...)" + // Those arguments are expected to be found in 'effectConstructorArguments' in exactly the same + // order and amount as defined by signature, otherwise message should be dropped. + enum EffectType { + // Returns(value: ConstantValue?) + RETURNS_CONSTANT = 0; + + // CallsInPlace(callable: ParameterReference) + // Additionally, InvocationKind in the field 'kind' may be provided to define exact amount of invocations. + CALLS = 1; + + // ReturnsNotNull() + RETURNS_NOT_NULL = 2; + } + optional EffectType effect_type = 1; + + repeated Expression effect_constructor_argument = 2; + + // If present, then whole message is clause of form 'Effect -> Expression', where 'Effect' + // is given by other fields in this message, and 'Expression' is stored in this field. + optional Expression conclusion_of_conditional_effect = 3; + + enum InvocationKind { + AT_MOST_ONCE = 0; + EXACTLY_ONCE = 1; + AT_LEAST_ONCE = 2; + } + optional InvocationKind kind = 4; +} + +// We use some trickery to optimize memory footprint of contract-expressions: +// exact type of Expression is determined based on its contents. +message Expression { + /* + isNegated => this expression should be negated + isIsNullPredicate => this expression is IsNullPredicate with 'variableName' as argument + */ + optional int32 flags = 1; + + // stored as index in valueParameters list of owner-function in 1-indexation + // Index '0' is reserved for extension receiver + optional int32 value_parameter_reference = 2; + + enum ConstantValue { + TRUE = 0; + FALSE = 1; + NULL = 2; + } + optional ConstantValue constant_value = 3; + + // present => this expression is IsInstancePredicate, with 'variableName' as LHS + // and with type encoded in either one of next two fields as RHS. + optional Type is_instance_type = 4; + optional int32 is_instance_type_id = 5; + + // non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...' + // Additionally, if first argument of formula is primitive expression (i.e. predicate or value), + // it is optimized and embedded straight into this message + repeated Expression and_argument = 6; + + // non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...' + // Additionally, if first argument of formula is primitive expression (i.e. predicate or value), + // it is optimized and embedded straight into this message. + repeated Expression or_argument = 7; +} \ No newline at end of file diff --git a/core/deserialization/src/org/jetbrains/kotlin/builtins/BuiltInsLoaderImpl.kt b/core/deserialization/src/org/jetbrains/kotlin/builtins/BuiltInsLoaderImpl.kt index 1a717c218bf..71a35620f56 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/builtins/BuiltInsLoaderImpl.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/builtins/BuiltInsLoaderImpl.kt @@ -82,8 +82,9 @@ class BuiltInsLoaderImpl : BuiltInsLoader { FlexibleTypeDeserializer.ThrowException, classDescriptorFactories, notFoundClasses, - additionalClassPartsProvider = additionalClassPartsProvider, - platformDependentDeclarationFilter = platformDependentDeclarationFilter + ContractDeserializer.DEFAULT, + additionalClassPartsProvider, + platformDependentDeclarationFilter ) for (packageFragment in packageFragments) { diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/Flags.java b/core/deserialization/src/org/jetbrains/kotlin/serialization/Flags.java index 4674dc8df88..374706c903c 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/Flags.java +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/Flags.java @@ -83,6 +83,11 @@ public class Flags { public static final BooleanFlagField IS_EXTERNAL_ACCESSOR = FlagField.booleanAfter(IS_NOT_DEFAULT); public static final BooleanFlagField IS_INLINE_ACCESSOR = FlagField.booleanAfter(IS_EXTERNAL_ACCESSOR); + // Contracts expressions + public static final BooleanFlagField IS_NEGATED = FlagField.booleanFirst(); + public static final BooleanFlagField IS_NULL_CHECK_PREDICATE = FlagField.booleanAfter(IS_NEGATED); + + // --- public static int getTypeFlags(boolean isSuspend) { @@ -217,6 +222,14 @@ public class Flags { ; } + public static int getContractExpressionFlags( + @NotNull boolean isNegated, + @NotNull boolean isNullCheckPredicate + ) { + return IS_NEGATED.toFlags(isNegated) + | IS_NULL_CHECK_PREDICATE.toFlags(isNullCheckPredicate); + } + @NotNull private static ProtoBuf.Visibility visibility(@NotNull Visibility visibility) { if (visibility == Visibilities.INTERNAL) { @@ -339,6 +352,8 @@ public class Flags { public int toFlags(Boolean value) { return value ? 1 << offset : 0; } + + public int invert(int flags) { return (flags ^ (1 << offset)); } } private static class EnumLiteFlagField extends FlagField { diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/ProtoBuf.java b/core/deserialization/src/org/jetbrains/kotlin/serialization/ProtoBuf.java index 9ae76484402..5402955f31b 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/ProtoBuf.java +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/ProtoBuf.java @@ -13745,6 +13745,15 @@ public final class ProtoBuf { * */ int getVersionRequirement(); + + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + boolean hasContract(); + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + org.jetbrains.kotlin.serialization.ProtoBuf.Contract getContract(); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.Function} @@ -13882,6 +13891,19 @@ public final class ProtoBuf { versionRequirement_ = input.readInt32(); break; } + case 258: { + org.jetbrains.kotlin.serialization.ProtoBuf.Contract.Builder subBuilder = null; + if (((bitField0_ & 0x00000200) == 0x00000200)) { + subBuilder = contract_.toBuilder(); + } + contract_ = input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.Contract.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(contract_); + contract_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000200; + break; + } } } } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { @@ -14163,6 +14185,21 @@ public final class ProtoBuf { return versionRequirement_; } + public static final int CONTRACT_FIELD_NUMBER = 32; + private org.jetbrains.kotlin.serialization.ProtoBuf.Contract contract_; + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + public boolean hasContract() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Contract getContract() { + return contract_; + } + private void initFields() { flags_ = 6; oldFlags_ = 6; @@ -14175,6 +14212,7 @@ public final class ProtoBuf { valueParameter_ = java.util.Collections.emptyList(); typeTable_ = org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.getDefaultInstance(); versionRequirement_ = 0; + contract_ = org.jetbrains.kotlin.serialization.ProtoBuf.Contract.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -14216,6 +14254,12 @@ public final class ProtoBuf { return false; } } + if (hasContract()) { + if (!getContract().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } if (!extensionsAreInitialized()) { memoizedIsInitialized = 0; return false; @@ -14263,6 +14307,9 @@ public final class ProtoBuf { if (((bitField0_ & 0x00000100) == 0x00000100)) { output.writeInt32(31, versionRequirement_); } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeMessage(32, contract_); + } extensionWriter.writeUntil(200, output); output.writeRawBytes(unknownFields); } @@ -14317,6 +14364,10 @@ public final class ProtoBuf { size += org.jetbrains.kotlin.protobuf.CodedOutputStream .computeInt32Size(31, versionRequirement_); } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(32, contract_); + } size += extensionsSerializedSize(); size += unknownFields.size(); memoizedSerializedSize = size; @@ -14433,6 +14484,8 @@ public final class ProtoBuf { bitField0_ = (bitField0_ & ~0x00000200); versionRequirement_ = 0; bitField0_ = (bitField0_ & ~0x00000400); + contract_ = org.jetbrains.kotlin.serialization.ProtoBuf.Contract.getDefaultInstance(); + bitField0_ = (bitField0_ & ~0x00000800); return this; } @@ -14502,6 +14555,10 @@ public final class ProtoBuf { to_bitField0_ |= 0x00000100; } result.versionRequirement_ = versionRequirement_; + if (((from_bitField0_ & 0x00000800) == 0x00000800)) { + to_bitField0_ |= 0x00000200; + } + result.contract_ = contract_; result.bitField0_ = to_bitField0_; return result; } @@ -14555,6 +14612,9 @@ public final class ProtoBuf { if (other.hasVersionRequirement()) { setVersionRequirement(other.getVersionRequirement()); } + if (other.hasContract()) { + mergeContract(other.getContract()); + } this.mergeExtensionFields(other); setUnknownFields( getUnknownFields().concat(other.unknownFields)); @@ -14596,6 +14656,12 @@ public final class ProtoBuf { return false; } } + if (hasContract()) { + if (!getContract().isInitialized()) { + + return false; + } + } if (!extensionsAreInitialized()) { return false; @@ -15316,6 +15382,66 @@ public final class ProtoBuf { return this; } + private org.jetbrains.kotlin.serialization.ProtoBuf.Contract contract_ = org.jetbrains.kotlin.serialization.ProtoBuf.Contract.getDefaultInstance(); + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + public boolean hasContract() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Contract getContract() { + return contract_; + } + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + public Builder setContract(org.jetbrains.kotlin.serialization.ProtoBuf.Contract value) { + if (value == null) { + throw new NullPointerException(); + } + contract_ = value; + + bitField0_ |= 0x00000800; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + public Builder setContract( + org.jetbrains.kotlin.serialization.ProtoBuf.Contract.Builder builderForValue) { + contract_ = builderForValue.build(); + + bitField0_ |= 0x00000800; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + public Builder mergeContract(org.jetbrains.kotlin.serialization.ProtoBuf.Contract value) { + if (((bitField0_ & 0x00000800) == 0x00000800) && + contract_ != org.jetbrains.kotlin.serialization.ProtoBuf.Contract.getDefaultInstance()) { + contract_ = + org.jetbrains.kotlin.serialization.ProtoBuf.Contract.newBuilder(contract_).mergeFrom(value).buildPartial(); + } else { + contract_ = value; + } + + bitField0_ |= 0x00000800; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Contract contract = 32; + */ + public Builder clearContract() { + contract_ = org.jetbrains.kotlin.serialization.ProtoBuf.Contract.getDefaultInstance(); + + bitField0_ = (bitField0_ & ~0x00000800); + return this; + } + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.Function) } @@ -22303,6 +22429,3122 @@ public final class ProtoBuf { // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.PackageFragment) } + public interface ContractOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.serialization.Contract) + org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { + + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + java.util.List + getEffectList(); + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + org.jetbrains.kotlin.serialization.ProtoBuf.Effect getEffect(int index); + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + int getEffectCount(); + } + /** + * Protobuf type {@code org.jetbrains.kotlin.serialization.Contract} + */ + public static final class Contract extends + org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements + // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.serialization.Contract) + ContractOrBuilder { + // Use Contract.newBuilder() to construct. + private Contract(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Contract(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} + + private static final Contract defaultInstance; + public static Contract getDefaultInstance() { + return defaultInstance; + } + + public Contract getDefaultInstanceForType() { + return defaultInstance; + } + + private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; + private Contract( + 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)) { + effect_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + effect_.add(input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.Effect.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)) { + effect_ = java.util.Collections.unmodifiableList(effect_); + } + 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 Contract parsePartialFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input, + org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return new Contract(input, extensionRegistry); + } + }; + + @java.lang.Override + public org.jetbrains.kotlin.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int EFFECT_FIELD_NUMBER = 1; + private java.util.List effect_; + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public java.util.List getEffectList() { + return effect_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public java.util.List + getEffectOrBuilderList() { + return effect_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public int getEffectCount() { + return effect_.size(); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Effect getEffect(int index) { + return effect_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.EffectOrBuilder getEffectOrBuilder( + int index) { + return effect_.get(index); + } + + private void initFields() { + effect_ = 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 < getEffectCount(); i++) { + if (!getEffect(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 < effect_.size(); i++) { + output.writeMessage(1, effect_.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 < effect_.size(); i++) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(1, effect_.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.serialization.ProtoBuf.Contract parseFrom( + org.jetbrains.kotlin.protobuf.ByteString data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.Contract 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.serialization.ProtoBuf.Contract parseFrom(byte[] data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.Contract 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.serialization.ProtoBuf.Contract parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.Contract 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.serialization.ProtoBuf.Contract parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.Contract 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.serialization.ProtoBuf.Contract parseFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.Contract 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.serialization.ProtoBuf.Contract prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + /** + * Protobuf type {@code org.jetbrains.kotlin.serialization.Contract} + */ + public static final class Builder extends + org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< + org.jetbrains.kotlin.serialization.ProtoBuf.Contract, Builder> + implements + // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.serialization.Contract) + org.jetbrains.kotlin.serialization.ProtoBuf.ContractOrBuilder { + // Construct using org.jetbrains.kotlin.serialization.ProtoBuf.Contract.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + effect_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public org.jetbrains.kotlin.serialization.ProtoBuf.Contract getDefaultInstanceForType() { + return org.jetbrains.kotlin.serialization.ProtoBuf.Contract.getDefaultInstance(); + } + + public org.jetbrains.kotlin.serialization.ProtoBuf.Contract build() { + org.jetbrains.kotlin.serialization.ProtoBuf.Contract result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.jetbrains.kotlin.serialization.ProtoBuf.Contract buildPartial() { + org.jetbrains.kotlin.serialization.ProtoBuf.Contract result = new org.jetbrains.kotlin.serialization.ProtoBuf.Contract(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + effect_ = java.util.Collections.unmodifiableList(effect_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.effect_ = effect_; + return result; + } + + public Builder mergeFrom(org.jetbrains.kotlin.serialization.ProtoBuf.Contract other) { + if (other == org.jetbrains.kotlin.serialization.ProtoBuf.Contract.getDefaultInstance()) return this; + if (!other.effect_.isEmpty()) { + if (effect_.isEmpty()) { + effect_ = other.effect_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEffectIsMutable(); + effect_.addAll(other.effect_); + } + + } + setUnknownFields( + getUnknownFields().concat(other.unknownFields)); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getEffectCount(); i++) { + if (!getEffect(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.serialization.ProtoBuf.Contract parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.jetbrains.kotlin.serialization.ProtoBuf.Contract) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List effect_ = + java.util.Collections.emptyList(); + private void ensureEffectIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + effect_ = new java.util.ArrayList(effect_); + bitField0_ |= 0x00000001; + } + } + + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public java.util.List getEffectList() { + return java.util.Collections.unmodifiableList(effect_); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public int getEffectCount() { + return effect_.size(); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Effect getEffect(int index) { + return effect_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public Builder setEffect( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Effect value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEffectIsMutable(); + effect_.set(index, value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public Builder setEffect( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Effect.Builder builderForValue) { + ensureEffectIsMutable(); + effect_.set(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public Builder addEffect(org.jetbrains.kotlin.serialization.ProtoBuf.Effect value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEffectIsMutable(); + effect_.add(value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public Builder addEffect( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Effect value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEffectIsMutable(); + effect_.add(index, value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public Builder addEffect( + org.jetbrains.kotlin.serialization.ProtoBuf.Effect.Builder builderForValue) { + ensureEffectIsMutable(); + effect_.add(builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public Builder addEffect( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Effect.Builder builderForValue) { + ensureEffectIsMutable(); + effect_.add(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public Builder addAllEffect( + java.lang.Iterable values) { + ensureEffectIsMutable(); + org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( + values, effect_); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public Builder clearEffect() { + effect_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Effect effect = 1; + */ + public Builder removeEffect(int index) { + ensureEffectIsMutable(); + effect_.remove(index); + + return this; + } + + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.Contract) + } + + static { + defaultInstance = new Contract(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.Contract) + } + + public interface EffectOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.serialization.Effect) + org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { + + /** + * optional .org.jetbrains.kotlin.serialization.Effect.EffectType effect_type = 1; + */ + boolean hasEffectType(); + /** + * optional .org.jetbrains.kotlin.serialization.Effect.EffectType effect_type = 1; + */ + org.jetbrains.kotlin.serialization.ProtoBuf.Effect.EffectType getEffectType(); + + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + java.util.List + getEffectConstructorArgumentList(); + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + org.jetbrains.kotlin.serialization.ProtoBuf.Expression getEffectConstructorArgument(int index); + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + int getEffectConstructorArgumentCount(); + + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+     * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+     * is given by other fields in this message, and 'Expression' is stored in this field.
+     * 
+ */ + boolean hasConclusionOfConditionalEffect(); + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+     * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+     * is given by other fields in this message, and 'Expression' is stored in this field.
+     * 
+ */ + org.jetbrains.kotlin.serialization.ProtoBuf.Expression getConclusionOfConditionalEffect(); + + /** + * optional .org.jetbrains.kotlin.serialization.Effect.InvocationKind kind = 4; + */ + boolean hasKind(); + /** + * optional .org.jetbrains.kotlin.serialization.Effect.InvocationKind kind = 4; + */ + org.jetbrains.kotlin.serialization.ProtoBuf.Effect.InvocationKind getKind(); + } + /** + * Protobuf type {@code org.jetbrains.kotlin.serialization.Effect} + */ + public static final class Effect extends + org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements + // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.serialization.Effect) + EffectOrBuilder { + // Use Effect.newBuilder() to construct. + private Effect(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Effect(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} + + private static final Effect defaultInstance; + public static Effect getDefaultInstance() { + return defaultInstance; + } + + public Effect getDefaultInstanceForType() { + return defaultInstance; + } + + private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; + private Effect( + 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: { + int rawValue = input.readEnum(); + org.jetbrains.kotlin.serialization.ProtoBuf.Effect.EffectType value = org.jetbrains.kotlin.serialization.ProtoBuf.Effect.EffectType.valueOf(rawValue); + if (value == null) { + unknownFieldsCodedOutput.writeRawVarint32(tag); + unknownFieldsCodedOutput.writeRawVarint32(rawValue); + } else { + bitField0_ |= 0x00000001; + effectType_ = value; + } + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + effectConstructorArgument_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + effectConstructorArgument_.add(input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.Expression.PARSER, extensionRegistry)); + break; + } + case 26: { + org.jetbrains.kotlin.serialization.ProtoBuf.Expression.Builder subBuilder = null; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + subBuilder = conclusionOfConditionalEffect_.toBuilder(); + } + conclusionOfConditionalEffect_ = input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.Expression.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(conclusionOfConditionalEffect_); + conclusionOfConditionalEffect_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000002; + break; + } + case 32: { + int rawValue = input.readEnum(); + org.jetbrains.kotlin.serialization.ProtoBuf.Effect.InvocationKind value = org.jetbrains.kotlin.serialization.ProtoBuf.Effect.InvocationKind.valueOf(rawValue); + if (value == null) { + unknownFieldsCodedOutput.writeRawVarint32(tag); + unknownFieldsCodedOutput.writeRawVarint32(rawValue); + } else { + bitField0_ |= 0x00000004; + kind_ = value; + } + 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_ & 0x00000002) == 0x00000002)) { + effectConstructorArgument_ = java.util.Collections.unmodifiableList(effectConstructorArgument_); + } + 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 Effect parsePartialFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input, + org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return new Effect(input, extensionRegistry); + } + }; + + @java.lang.Override + public org.jetbrains.kotlin.protobuf.Parser getParserForType() { + return PARSER; + } + + /** + * Protobuf enum {@code org.jetbrains.kotlin.serialization.Effect.EffectType} + * + *
+     * This enum controls which effect this message contains and how 'effectConstructorArguments'
+     * should be parsed.
+     * Each enum value documented in the following syntax: "EffectName(arg1: T1, arg2: T2, ...)"
+     * Those arguments are expected to be found in 'effectConstructorArguments' in exactly the same
+     * order and amount as defined by signature, otherwise message should be dropped.
+     * 
+ */ + public enum EffectType + implements org.jetbrains.kotlin.protobuf.Internal.EnumLite { + /** + * RETURNS_CONSTANT = 0; + * + *
+       * Returns(value: ConstantValue?)
+       * 
+ */ + RETURNS_CONSTANT(0, 0), + /** + * CALLS = 1; + * + *
+       * CallsInPlace(callable: ParameterReference)
+       * Additionally, InvocationKind in the field 'kind' may be provided to define exact amount of invocations.
+       * 
+ */ + CALLS(1, 1), + /** + * RETURNS_NOT_NULL = 2; + * + *
+       * ReturnsNotNull()
+       * 
+ */ + RETURNS_NOT_NULL(2, 2), + ; + + /** + * RETURNS_CONSTANT = 0; + * + *
+       * Returns(value: ConstantValue?)
+       * 
+ */ + public static final int RETURNS_CONSTANT_VALUE = 0; + /** + * CALLS = 1; + * + *
+       * CallsInPlace(callable: ParameterReference)
+       * Additionally, InvocationKind in the field 'kind' may be provided to define exact amount of invocations.
+       * 
+ */ + public static final int CALLS_VALUE = 1; + /** + * RETURNS_NOT_NULL = 2; + * + *
+       * ReturnsNotNull()
+       * 
+ */ + public static final int RETURNS_NOT_NULL_VALUE = 2; + + + public final int getNumber() { return value; } + + public static EffectType valueOf(int value) { + switch (value) { + case 0: return RETURNS_CONSTANT; + case 1: return CALLS; + case 2: return RETURNS_NOT_NULL; + default: return null; + } + } + + public static org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap + internalValueMap = + new org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap() { + public EffectType findValueByNumber(int number) { + return EffectType.valueOf(number); + } + }; + + private final int value; + + private EffectType(int index, int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:org.jetbrains.kotlin.serialization.Effect.EffectType) + } + + /** + * Protobuf enum {@code org.jetbrains.kotlin.serialization.Effect.InvocationKind} + */ + public enum InvocationKind + implements org.jetbrains.kotlin.protobuf.Internal.EnumLite { + /** + * AT_MOST_ONCE = 0; + */ + AT_MOST_ONCE(0, 0), + /** + * EXACTLY_ONCE = 1; + */ + EXACTLY_ONCE(1, 1), + /** + * AT_LEAST_ONCE = 2; + */ + AT_LEAST_ONCE(2, 2), + ; + + /** + * AT_MOST_ONCE = 0; + */ + public static final int AT_MOST_ONCE_VALUE = 0; + /** + * EXACTLY_ONCE = 1; + */ + public static final int EXACTLY_ONCE_VALUE = 1; + /** + * AT_LEAST_ONCE = 2; + */ + public static final int AT_LEAST_ONCE_VALUE = 2; + + + public final int getNumber() { return value; } + + public static InvocationKind valueOf(int value) { + switch (value) { + case 0: return AT_MOST_ONCE; + case 1: return EXACTLY_ONCE; + case 2: return AT_LEAST_ONCE; + default: return null; + } + } + + public static org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap + internalValueMap = + new org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap() { + public InvocationKind findValueByNumber(int number) { + return InvocationKind.valueOf(number); + } + }; + + private final int value; + + private InvocationKind(int index, int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:org.jetbrains.kotlin.serialization.Effect.InvocationKind) + } + + private int bitField0_; + public static final int EFFECT_TYPE_FIELD_NUMBER = 1; + private org.jetbrains.kotlin.serialization.ProtoBuf.Effect.EffectType effectType_; + /** + * optional .org.jetbrains.kotlin.serialization.Effect.EffectType effect_type = 1; + */ + public boolean hasEffectType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .org.jetbrains.kotlin.serialization.Effect.EffectType effect_type = 1; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Effect.EffectType getEffectType() { + return effectType_; + } + + public static final int EFFECT_CONSTRUCTOR_ARGUMENT_FIELD_NUMBER = 2; + private java.util.List effectConstructorArgument_; + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public java.util.List getEffectConstructorArgumentList() { + return effectConstructorArgument_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public java.util.List + getEffectConstructorArgumentOrBuilderList() { + return effectConstructorArgument_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public int getEffectConstructorArgumentCount() { + return effectConstructorArgument_.size(); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Expression getEffectConstructorArgument(int index) { + return effectConstructorArgument_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.ExpressionOrBuilder getEffectConstructorArgumentOrBuilder( + int index) { + return effectConstructorArgument_.get(index); + } + + public static final int CONCLUSION_OF_CONDITIONAL_EFFECT_FIELD_NUMBER = 3; + private org.jetbrains.kotlin.serialization.ProtoBuf.Expression conclusionOfConditionalEffect_; + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+     * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+     * is given by other fields in this message, and 'Expression' is stored in this field.
+     * 
+ */ + public boolean hasConclusionOfConditionalEffect() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+     * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+     * is given by other fields in this message, and 'Expression' is stored in this field.
+     * 
+ */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Expression getConclusionOfConditionalEffect() { + return conclusionOfConditionalEffect_; + } + + public static final int KIND_FIELD_NUMBER = 4; + private org.jetbrains.kotlin.serialization.ProtoBuf.Effect.InvocationKind kind_; + /** + * optional .org.jetbrains.kotlin.serialization.Effect.InvocationKind kind = 4; + */ + public boolean hasKind() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .org.jetbrains.kotlin.serialization.Effect.InvocationKind kind = 4; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Effect.InvocationKind getKind() { + return kind_; + } + + private void initFields() { + effectType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Effect.EffectType.RETURNS_CONSTANT; + effectConstructorArgument_ = java.util.Collections.emptyList(); + conclusionOfConditionalEffect_ = org.jetbrains.kotlin.serialization.ProtoBuf.Expression.getDefaultInstance(); + kind_ = org.jetbrains.kotlin.serialization.ProtoBuf.Effect.InvocationKind.AT_MOST_ONCE; + } + 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 < getEffectConstructorArgumentCount(); i++) { + if (!getEffectConstructorArgument(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + if (hasConclusionOfConditionalEffect()) { + if (!getConclusionOfConditionalEffect().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.writeEnum(1, effectType_.getNumber()); + } + for (int i = 0; i < effectConstructorArgument_.size(); i++) { + output.writeMessage(2, effectConstructorArgument_.get(i)); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(3, conclusionOfConditionalEffect_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(4, kind_.getNumber()); + } + 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 + .computeEnumSize(1, effectType_.getNumber()); + } + for (int i = 0; i < effectConstructorArgument_.size(); i++) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(2, effectConstructorArgument_.get(i)); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(3, conclusionOfConditionalEffect_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeEnumSize(4, kind_.getNumber()); + } + 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.serialization.ProtoBuf.Effect parseFrom( + org.jetbrains.kotlin.protobuf.ByteString data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.Effect 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.serialization.ProtoBuf.Effect parseFrom(byte[] data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.Effect 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.serialization.ProtoBuf.Effect parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.Effect 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.serialization.ProtoBuf.Effect parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.Effect 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.serialization.ProtoBuf.Effect parseFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.Effect 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.serialization.ProtoBuf.Effect prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + /** + * Protobuf type {@code org.jetbrains.kotlin.serialization.Effect} + */ + public static final class Builder extends + org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< + org.jetbrains.kotlin.serialization.ProtoBuf.Effect, Builder> + implements + // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.serialization.Effect) + org.jetbrains.kotlin.serialization.ProtoBuf.EffectOrBuilder { + // Construct using org.jetbrains.kotlin.serialization.ProtoBuf.Effect.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + effectType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Effect.EffectType.RETURNS_CONSTANT; + bitField0_ = (bitField0_ & ~0x00000001); + effectConstructorArgument_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + conclusionOfConditionalEffect_ = org.jetbrains.kotlin.serialization.ProtoBuf.Expression.getDefaultInstance(); + bitField0_ = (bitField0_ & ~0x00000004); + kind_ = org.jetbrains.kotlin.serialization.ProtoBuf.Effect.InvocationKind.AT_MOST_ONCE; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public org.jetbrains.kotlin.serialization.ProtoBuf.Effect getDefaultInstanceForType() { + return org.jetbrains.kotlin.serialization.ProtoBuf.Effect.getDefaultInstance(); + } + + public org.jetbrains.kotlin.serialization.ProtoBuf.Effect build() { + org.jetbrains.kotlin.serialization.ProtoBuf.Effect result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.jetbrains.kotlin.serialization.ProtoBuf.Effect buildPartial() { + org.jetbrains.kotlin.serialization.ProtoBuf.Effect result = new org.jetbrains.kotlin.serialization.ProtoBuf.Effect(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.effectType_ = effectType_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + effectConstructorArgument_ = java.util.Collections.unmodifiableList(effectConstructorArgument_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.effectConstructorArgument_ = effectConstructorArgument_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + result.conclusionOfConditionalEffect_ = conclusionOfConditionalEffect_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000004; + } + result.kind_ = kind_; + result.bitField0_ = to_bitField0_; + return result; + } + + public Builder mergeFrom(org.jetbrains.kotlin.serialization.ProtoBuf.Effect other) { + if (other == org.jetbrains.kotlin.serialization.ProtoBuf.Effect.getDefaultInstance()) return this; + if (other.hasEffectType()) { + setEffectType(other.getEffectType()); + } + if (!other.effectConstructorArgument_.isEmpty()) { + if (effectConstructorArgument_.isEmpty()) { + effectConstructorArgument_ = other.effectConstructorArgument_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureEffectConstructorArgumentIsMutable(); + effectConstructorArgument_.addAll(other.effectConstructorArgument_); + } + + } + if (other.hasConclusionOfConditionalEffect()) { + mergeConclusionOfConditionalEffect(other.getConclusionOfConditionalEffect()); + } + if (other.hasKind()) { + setKind(other.getKind()); + } + setUnknownFields( + getUnknownFields().concat(other.unknownFields)); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getEffectConstructorArgumentCount(); i++) { + if (!getEffectConstructorArgument(i).isInitialized()) { + + return false; + } + } + if (hasConclusionOfConditionalEffect()) { + if (!getConclusionOfConditionalEffect().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.serialization.ProtoBuf.Effect parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.jetbrains.kotlin.serialization.ProtoBuf.Effect) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private org.jetbrains.kotlin.serialization.ProtoBuf.Effect.EffectType effectType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Effect.EffectType.RETURNS_CONSTANT; + /** + * optional .org.jetbrains.kotlin.serialization.Effect.EffectType effect_type = 1; + */ + public boolean hasEffectType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .org.jetbrains.kotlin.serialization.Effect.EffectType effect_type = 1; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Effect.EffectType getEffectType() { + return effectType_; + } + /** + * optional .org.jetbrains.kotlin.serialization.Effect.EffectType effect_type = 1; + */ + public Builder setEffectType(org.jetbrains.kotlin.serialization.ProtoBuf.Effect.EffectType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + effectType_ = value; + + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Effect.EffectType effect_type = 1; + */ + public Builder clearEffectType() { + bitField0_ = (bitField0_ & ~0x00000001); + effectType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Effect.EffectType.RETURNS_CONSTANT; + + return this; + } + + private java.util.List effectConstructorArgument_ = + java.util.Collections.emptyList(); + private void ensureEffectConstructorArgumentIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + effectConstructorArgument_ = new java.util.ArrayList(effectConstructorArgument_); + bitField0_ |= 0x00000002; + } + } + + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public java.util.List getEffectConstructorArgumentList() { + return java.util.Collections.unmodifiableList(effectConstructorArgument_); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public int getEffectConstructorArgumentCount() { + return effectConstructorArgument_.size(); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Expression getEffectConstructorArgument(int index) { + return effectConstructorArgument_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public Builder setEffectConstructorArgument( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Expression value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEffectConstructorArgumentIsMutable(); + effectConstructorArgument_.set(index, value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public Builder setEffectConstructorArgument( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Expression.Builder builderForValue) { + ensureEffectConstructorArgumentIsMutable(); + effectConstructorArgument_.set(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public Builder addEffectConstructorArgument(org.jetbrains.kotlin.serialization.ProtoBuf.Expression value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEffectConstructorArgumentIsMutable(); + effectConstructorArgument_.add(value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public Builder addEffectConstructorArgument( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Expression value) { + if (value == null) { + throw new NullPointerException(); + } + ensureEffectConstructorArgumentIsMutable(); + effectConstructorArgument_.add(index, value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public Builder addEffectConstructorArgument( + org.jetbrains.kotlin.serialization.ProtoBuf.Expression.Builder builderForValue) { + ensureEffectConstructorArgumentIsMutable(); + effectConstructorArgument_.add(builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public Builder addEffectConstructorArgument( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Expression.Builder builderForValue) { + ensureEffectConstructorArgumentIsMutable(); + effectConstructorArgument_.add(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public Builder addAllEffectConstructorArgument( + java.lang.Iterable values) { + ensureEffectConstructorArgumentIsMutable(); + org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( + values, effectConstructorArgument_); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public Builder clearEffectConstructorArgument() { + effectConstructorArgument_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression effect_constructor_argument = 2; + */ + public Builder removeEffectConstructorArgument(int index) { + ensureEffectConstructorArgumentIsMutable(); + effectConstructorArgument_.remove(index); + + return this; + } + + private org.jetbrains.kotlin.serialization.ProtoBuf.Expression conclusionOfConditionalEffect_ = org.jetbrains.kotlin.serialization.ProtoBuf.Expression.getDefaultInstance(); + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+       * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+       * is given by other fields in this message, and 'Expression' is stored in this field.
+       * 
+ */ + public boolean hasConclusionOfConditionalEffect() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+       * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+       * is given by other fields in this message, and 'Expression' is stored in this field.
+       * 
+ */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Expression getConclusionOfConditionalEffect() { + return conclusionOfConditionalEffect_; + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+       * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+       * is given by other fields in this message, and 'Expression' is stored in this field.
+       * 
+ */ + public Builder setConclusionOfConditionalEffect(org.jetbrains.kotlin.serialization.ProtoBuf.Expression value) { + if (value == null) { + throw new NullPointerException(); + } + conclusionOfConditionalEffect_ = value; + + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+       * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+       * is given by other fields in this message, and 'Expression' is stored in this field.
+       * 
+ */ + public Builder setConclusionOfConditionalEffect( + org.jetbrains.kotlin.serialization.ProtoBuf.Expression.Builder builderForValue) { + conclusionOfConditionalEffect_ = builderForValue.build(); + + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+       * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+       * is given by other fields in this message, and 'Expression' is stored in this field.
+       * 
+ */ + public Builder mergeConclusionOfConditionalEffect(org.jetbrains.kotlin.serialization.ProtoBuf.Expression value) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + conclusionOfConditionalEffect_ != org.jetbrains.kotlin.serialization.ProtoBuf.Expression.getDefaultInstance()) { + conclusionOfConditionalEffect_ = + org.jetbrains.kotlin.serialization.ProtoBuf.Expression.newBuilder(conclusionOfConditionalEffect_).mergeFrom(value).buildPartial(); + } else { + conclusionOfConditionalEffect_ = value; + } + + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression conclusion_of_conditional_effect = 3; + * + *
+       * If present, then whole message is clause of form 'Effect -> Expression', where 'Effect'
+       * is given by other fields in this message, and 'Expression' is stored in this field.
+       * 
+ */ + public Builder clearConclusionOfConditionalEffect() { + conclusionOfConditionalEffect_ = org.jetbrains.kotlin.serialization.ProtoBuf.Expression.getDefaultInstance(); + + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + private org.jetbrains.kotlin.serialization.ProtoBuf.Effect.InvocationKind kind_ = org.jetbrains.kotlin.serialization.ProtoBuf.Effect.InvocationKind.AT_MOST_ONCE; + /** + * optional .org.jetbrains.kotlin.serialization.Effect.InvocationKind kind = 4; + */ + public boolean hasKind() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .org.jetbrains.kotlin.serialization.Effect.InvocationKind kind = 4; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Effect.InvocationKind getKind() { + return kind_; + } + /** + * optional .org.jetbrains.kotlin.serialization.Effect.InvocationKind kind = 4; + */ + public Builder setKind(org.jetbrains.kotlin.serialization.ProtoBuf.Effect.InvocationKind value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + kind_ = value; + + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Effect.InvocationKind kind = 4; + */ + public Builder clearKind() { + bitField0_ = (bitField0_ & ~0x00000008); + kind_ = org.jetbrains.kotlin.serialization.ProtoBuf.Effect.InvocationKind.AT_MOST_ONCE; + + return this; + } + + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.Effect) + } + + static { + defaultInstance = new Effect(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.Effect) + } + + public interface ExpressionOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.serialization.Expression) + org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { + + /** + * optional int32 flags = 1; + * + *
+     *isNegated => this expression should be negated
+     *isIsNullPredicate => this expression is IsNullPredicate with 'variableName' as argument
+     * 
+ */ + boolean hasFlags(); + /** + * optional int32 flags = 1; + * + *
+     *isNegated => this expression should be negated
+     *isIsNullPredicate => this expression is IsNullPredicate with 'variableName' as argument
+     * 
+ */ + int getFlags(); + + /** + * optional int32 value_parameter_reference = 2; + * + *
+     * stored as index in valueParameters list of owner-function in 1-indexation
+     * Index '0' is reserved for extension receiver
+     * 
+ */ + boolean hasValueParameterReference(); + /** + * optional int32 value_parameter_reference = 2; + * + *
+     * stored as index in valueParameters list of owner-function in 1-indexation
+     * Index '0' is reserved for extension receiver
+     * 
+ */ + int getValueParameterReference(); + + /** + * optional .org.jetbrains.kotlin.serialization.Expression.ConstantValue constant_value = 3; + */ + boolean hasConstantValue(); + /** + * optional .org.jetbrains.kotlin.serialization.Expression.ConstantValue constant_value = 3; + */ + org.jetbrains.kotlin.serialization.ProtoBuf.Expression.ConstantValue getConstantValue(); + + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+     * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+     * and with type encoded in either one of next two fields as RHS.
+     * 
+ */ + boolean hasIsInstanceType(); + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+     * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+     * and with type encoded in either one of next two fields as RHS.
+     * 
+ */ + org.jetbrains.kotlin.serialization.ProtoBuf.Type getIsInstanceType(); + + /** + * optional int32 is_instance_type_id = 5; + */ + boolean hasIsInstanceTypeId(); + /** + * optional int32 is_instance_type_id = 5; + */ + int getIsInstanceTypeId(); + + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+     * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message
+     * 
+ */ + java.util.List + getAndArgumentList(); + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+     * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message
+     * 
+ */ + org.jetbrains.kotlin.serialization.ProtoBuf.Expression getAndArgument(int index); + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+     * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message
+     * 
+ */ + int getAndArgumentCount(); + + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+     * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message.
+     * 
+ */ + java.util.List + getOrArgumentList(); + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+     * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message.
+     * 
+ */ + org.jetbrains.kotlin.serialization.ProtoBuf.Expression getOrArgument(int index); + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+     * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message.
+     * 
+ */ + int getOrArgumentCount(); + } + /** + * Protobuf type {@code org.jetbrains.kotlin.serialization.Expression} + * + *
+   * We use some trickery to optimize memory footprint of contract-expressions:
+   * exact type of Expression is determined based on its contents.
+   * 
+ */ + public static final class Expression extends + org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements + // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.serialization.Expression) + ExpressionOrBuilder { + // Use Expression.newBuilder() to construct. + private Expression(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Expression(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} + + private static final Expression defaultInstance; + public static Expression getDefaultInstance() { + return defaultInstance; + } + + public Expression getDefaultInstanceForType() { + return defaultInstance; + } + + private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; + private Expression( + 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; + flags_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + valueParameterReference_ = input.readInt32(); + break; + } + case 24: { + int rawValue = input.readEnum(); + org.jetbrains.kotlin.serialization.ProtoBuf.Expression.ConstantValue value = org.jetbrains.kotlin.serialization.ProtoBuf.Expression.ConstantValue.valueOf(rawValue); + if (value == null) { + unknownFieldsCodedOutput.writeRawVarint32(tag); + unknownFieldsCodedOutput.writeRawVarint32(rawValue); + } else { + bitField0_ |= 0x00000004; + constantValue_ = value; + } + break; + } + case 34: { + org.jetbrains.kotlin.serialization.ProtoBuf.Type.Builder subBuilder = null; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + subBuilder = isInstanceType_.toBuilder(); + } + isInstanceType_ = input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.Type.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(isInstanceType_); + isInstanceType_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000008; + break; + } + case 40: { + bitField0_ |= 0x00000010; + isInstanceTypeId_ = input.readInt32(); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + andArgument_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + andArgument_.add(input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.Expression.PARSER, extensionRegistry)); + break; + } + case 58: { + if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + orArgument_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000040; + } + orArgument_.add(input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.Expression.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_ & 0x00000020) == 0x00000020)) { + andArgument_ = java.util.Collections.unmodifiableList(andArgument_); + } + if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + orArgument_ = java.util.Collections.unmodifiableList(orArgument_); + } + 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 Expression parsePartialFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input, + org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return new Expression(input, extensionRegistry); + } + }; + + @java.lang.Override + public org.jetbrains.kotlin.protobuf.Parser getParserForType() { + return PARSER; + } + + /** + * Protobuf enum {@code org.jetbrains.kotlin.serialization.Expression.ConstantValue} + */ + public enum ConstantValue + implements org.jetbrains.kotlin.protobuf.Internal.EnumLite { + /** + * TRUE = 0; + */ + TRUE(0, 0), + /** + * FALSE = 1; + */ + FALSE(1, 1), + /** + * NULL = 2; + */ + NULL(2, 2), + ; + + /** + * TRUE = 0; + */ + public static final int TRUE_VALUE = 0; + /** + * FALSE = 1; + */ + public static final int FALSE_VALUE = 1; + /** + * NULL = 2; + */ + public static final int NULL_VALUE = 2; + + + public final int getNumber() { return value; } + + public static ConstantValue valueOf(int value) { + switch (value) { + case 0: return TRUE; + case 1: return FALSE; + case 2: return NULL; + default: return null; + } + } + + public static org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap + internalValueMap = + new org.jetbrains.kotlin.protobuf.Internal.EnumLiteMap() { + public ConstantValue findValueByNumber(int number) { + return ConstantValue.valueOf(number); + } + }; + + private final int value; + + private ConstantValue(int index, int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:org.jetbrains.kotlin.serialization.Expression.ConstantValue) + } + + private int bitField0_; + public static final int FLAGS_FIELD_NUMBER = 1; + private int flags_; + /** + * optional int32 flags = 1; + * + *
+     *isNegated => this expression should be negated
+     *isIsNullPredicate => this expression is IsNullPredicate with 'variableName' as argument
+     * 
+ */ + public boolean hasFlags() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 flags = 1; + * + *
+     *isNegated => this expression should be negated
+     *isIsNullPredicate => this expression is IsNullPredicate with 'variableName' as argument
+     * 
+ */ + public int getFlags() { + return flags_; + } + + public static final int VALUE_PARAMETER_REFERENCE_FIELD_NUMBER = 2; + private int valueParameterReference_; + /** + * optional int32 value_parameter_reference = 2; + * + *
+     * stored as index in valueParameters list of owner-function in 1-indexation
+     * Index '0' is reserved for extension receiver
+     * 
+ */ + public boolean hasValueParameterReference() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 value_parameter_reference = 2; + * + *
+     * stored as index in valueParameters list of owner-function in 1-indexation
+     * Index '0' is reserved for extension receiver
+     * 
+ */ + public int getValueParameterReference() { + return valueParameterReference_; + } + + public static final int CONSTANT_VALUE_FIELD_NUMBER = 3; + private org.jetbrains.kotlin.serialization.ProtoBuf.Expression.ConstantValue constantValue_; + /** + * optional .org.jetbrains.kotlin.serialization.Expression.ConstantValue constant_value = 3; + */ + public boolean hasConstantValue() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression.ConstantValue constant_value = 3; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Expression.ConstantValue getConstantValue() { + return constantValue_; + } + + public static final int IS_INSTANCE_TYPE_FIELD_NUMBER = 4; + private org.jetbrains.kotlin.serialization.ProtoBuf.Type isInstanceType_; + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+     * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+     * and with type encoded in either one of next two fields as RHS.
+     * 
+ */ + public boolean hasIsInstanceType() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+     * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+     * and with type encoded in either one of next two fields as RHS.
+     * 
+ */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Type getIsInstanceType() { + return isInstanceType_; + } + + public static final int IS_INSTANCE_TYPE_ID_FIELD_NUMBER = 5; + private int isInstanceTypeId_; + /** + * optional int32 is_instance_type_id = 5; + */ + public boolean hasIsInstanceTypeId() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional int32 is_instance_type_id = 5; + */ + public int getIsInstanceTypeId() { + return isInstanceTypeId_; + } + + public static final int AND_ARGUMENT_FIELD_NUMBER = 6; + private java.util.List andArgument_; + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+     * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message
+     * 
+ */ + public java.util.List getAndArgumentList() { + return andArgument_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+     * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message
+     * 
+ */ + public java.util.List + getAndArgumentOrBuilderList() { + return andArgument_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+     * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message
+     * 
+ */ + public int getAndArgumentCount() { + return andArgument_.size(); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+     * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message
+     * 
+ */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Expression getAndArgument(int index) { + return andArgument_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+     * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message
+     * 
+ */ + public org.jetbrains.kotlin.serialization.ProtoBuf.ExpressionOrBuilder getAndArgumentOrBuilder( + int index) { + return andArgument_.get(index); + } + + public static final int OR_ARGUMENT_FIELD_NUMBER = 7; + private java.util.List orArgument_; + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+     * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message.
+     * 
+ */ + public java.util.List getOrArgumentList() { + return orArgument_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+     * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message.
+     * 
+ */ + public java.util.List + getOrArgumentOrBuilderList() { + return orArgument_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+     * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message.
+     * 
+ */ + public int getOrArgumentCount() { + return orArgument_.size(); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+     * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message.
+     * 
+ */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Expression getOrArgument(int index) { + return orArgument_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+     * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+     * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+     * it is optimized and embedded straight into this message.
+     * 
+ */ + public org.jetbrains.kotlin.serialization.ProtoBuf.ExpressionOrBuilder getOrArgumentOrBuilder( + int index) { + return orArgument_.get(index); + } + + private void initFields() { + flags_ = 0; + valueParameterReference_ = 0; + constantValue_ = org.jetbrains.kotlin.serialization.ProtoBuf.Expression.ConstantValue.TRUE; + isInstanceType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); + isInstanceTypeId_ = 0; + andArgument_ = java.util.Collections.emptyList(); + orArgument_ = 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; + + if (hasIsInstanceType()) { + if (!getIsInstanceType().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + for (int i = 0; i < getAndArgumentCount(); i++) { + if (!getAndArgument(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + for (int i = 0; i < getOrArgumentCount(); i++) { + if (!getOrArgument(i).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, flags_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, valueParameterReference_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(3, constantValue_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, isInstanceType_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt32(5, isInstanceTypeId_); + } + for (int i = 0; i < andArgument_.size(); i++) { + output.writeMessage(6, andArgument_.get(i)); + } + for (int i = 0; i < orArgument_.size(); i++) { + output.writeMessage(7, orArgument_.get(i)); + } + 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, flags_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeInt32Size(2, valueParameterReference_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeEnumSize(3, constantValue_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(4, isInstanceType_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeInt32Size(5, isInstanceTypeId_); + } + for (int i = 0; i < andArgument_.size(); i++) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(6, andArgument_.get(i)); + } + for (int i = 0; i < orArgument_.size(); i++) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(7, orArgument_.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.serialization.ProtoBuf.Expression parseFrom( + org.jetbrains.kotlin.protobuf.ByteString data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.Expression 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.serialization.ProtoBuf.Expression parseFrom(byte[] data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.Expression 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.serialization.ProtoBuf.Expression parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.Expression 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.serialization.ProtoBuf.Expression parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.Expression 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.serialization.ProtoBuf.Expression parseFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.Expression 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.serialization.ProtoBuf.Expression prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + /** + * Protobuf type {@code org.jetbrains.kotlin.serialization.Expression} + * + *
+     * We use some trickery to optimize memory footprint of contract-expressions:
+     * exact type of Expression is determined based on its contents.
+     * 
+ */ + public static final class Builder extends + org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< + org.jetbrains.kotlin.serialization.ProtoBuf.Expression, Builder> + implements + // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.serialization.Expression) + org.jetbrains.kotlin.serialization.ProtoBuf.ExpressionOrBuilder { + // Construct using org.jetbrains.kotlin.serialization.ProtoBuf.Expression.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + flags_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + valueParameterReference_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + constantValue_ = org.jetbrains.kotlin.serialization.ProtoBuf.Expression.ConstantValue.TRUE; + bitField0_ = (bitField0_ & ~0x00000004); + isInstanceType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); + bitField0_ = (bitField0_ & ~0x00000008); + isInstanceTypeId_ = 0; + bitField0_ = (bitField0_ & ~0x00000010); + andArgument_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + orArgument_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public org.jetbrains.kotlin.serialization.ProtoBuf.Expression getDefaultInstanceForType() { + return org.jetbrains.kotlin.serialization.ProtoBuf.Expression.getDefaultInstance(); + } + + public org.jetbrains.kotlin.serialization.ProtoBuf.Expression build() { + org.jetbrains.kotlin.serialization.ProtoBuf.Expression result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.jetbrains.kotlin.serialization.ProtoBuf.Expression buildPartial() { + org.jetbrains.kotlin.serialization.ProtoBuf.Expression result = new org.jetbrains.kotlin.serialization.ProtoBuf.Expression(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.flags_ = flags_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.valueParameterReference_ = valueParameterReference_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.constantValue_ = constantValue_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.isInstanceType_ = isInstanceType_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.isInstanceTypeId_ = isInstanceTypeId_; + if (((bitField0_ & 0x00000020) == 0x00000020)) { + andArgument_ = java.util.Collections.unmodifiableList(andArgument_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.andArgument_ = andArgument_; + if (((bitField0_ & 0x00000040) == 0x00000040)) { + orArgument_ = java.util.Collections.unmodifiableList(orArgument_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.orArgument_ = orArgument_; + result.bitField0_ = to_bitField0_; + return result; + } + + public Builder mergeFrom(org.jetbrains.kotlin.serialization.ProtoBuf.Expression other) { + if (other == org.jetbrains.kotlin.serialization.ProtoBuf.Expression.getDefaultInstance()) return this; + if (other.hasFlags()) { + setFlags(other.getFlags()); + } + if (other.hasValueParameterReference()) { + setValueParameterReference(other.getValueParameterReference()); + } + if (other.hasConstantValue()) { + setConstantValue(other.getConstantValue()); + } + if (other.hasIsInstanceType()) { + mergeIsInstanceType(other.getIsInstanceType()); + } + if (other.hasIsInstanceTypeId()) { + setIsInstanceTypeId(other.getIsInstanceTypeId()); + } + if (!other.andArgument_.isEmpty()) { + if (andArgument_.isEmpty()) { + andArgument_ = other.andArgument_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureAndArgumentIsMutable(); + andArgument_.addAll(other.andArgument_); + } + + } + if (!other.orArgument_.isEmpty()) { + if (orArgument_.isEmpty()) { + orArgument_ = other.orArgument_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureOrArgumentIsMutable(); + orArgument_.addAll(other.orArgument_); + } + + } + setUnknownFields( + getUnknownFields().concat(other.unknownFields)); + return this; + } + + public final boolean isInitialized() { + if (hasIsInstanceType()) { + if (!getIsInstanceType().isInitialized()) { + + return false; + } + } + for (int i = 0; i < getAndArgumentCount(); i++) { + if (!getAndArgument(i).isInitialized()) { + + return false; + } + } + for (int i = 0; i < getOrArgumentCount(); i++) { + if (!getOrArgument(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.serialization.ProtoBuf.Expression parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.jetbrains.kotlin.serialization.ProtoBuf.Expression) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int flags_ ; + /** + * optional int32 flags = 1; + * + *
+       *isNegated => this expression should be negated
+       *isIsNullPredicate => this expression is IsNullPredicate with 'variableName' as argument
+       * 
+ */ + public boolean hasFlags() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 flags = 1; + * + *
+       *isNegated => this expression should be negated
+       *isIsNullPredicate => this expression is IsNullPredicate with 'variableName' as argument
+       * 
+ */ + public int getFlags() { + return flags_; + } + /** + * optional int32 flags = 1; + * + *
+       *isNegated => this expression should be negated
+       *isIsNullPredicate => this expression is IsNullPredicate with 'variableName' as argument
+       * 
+ */ + public Builder setFlags(int value) { + bitField0_ |= 0x00000001; + flags_ = value; + + return this; + } + /** + * optional int32 flags = 1; + * + *
+       *isNegated => this expression should be negated
+       *isIsNullPredicate => this expression is IsNullPredicate with 'variableName' as argument
+       * 
+ */ + public Builder clearFlags() { + bitField0_ = (bitField0_ & ~0x00000001); + flags_ = 0; + + return this; + } + + private int valueParameterReference_ ; + /** + * optional int32 value_parameter_reference = 2; + * + *
+       * stored as index in valueParameters list of owner-function in 1-indexation
+       * Index '0' is reserved for extension receiver
+       * 
+ */ + public boolean hasValueParameterReference() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 value_parameter_reference = 2; + * + *
+       * stored as index in valueParameters list of owner-function in 1-indexation
+       * Index '0' is reserved for extension receiver
+       * 
+ */ + public int getValueParameterReference() { + return valueParameterReference_; + } + /** + * optional int32 value_parameter_reference = 2; + * + *
+       * stored as index in valueParameters list of owner-function in 1-indexation
+       * Index '0' is reserved for extension receiver
+       * 
+ */ + public Builder setValueParameterReference(int value) { + bitField0_ |= 0x00000002; + valueParameterReference_ = value; + + return this; + } + /** + * optional int32 value_parameter_reference = 2; + * + *
+       * stored as index in valueParameters list of owner-function in 1-indexation
+       * Index '0' is reserved for extension receiver
+       * 
+ */ + public Builder clearValueParameterReference() { + bitField0_ = (bitField0_ & ~0x00000002); + valueParameterReference_ = 0; + + return this; + } + + private org.jetbrains.kotlin.serialization.ProtoBuf.Expression.ConstantValue constantValue_ = org.jetbrains.kotlin.serialization.ProtoBuf.Expression.ConstantValue.TRUE; + /** + * optional .org.jetbrains.kotlin.serialization.Expression.ConstantValue constant_value = 3; + */ + public boolean hasConstantValue() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression.ConstantValue constant_value = 3; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Expression.ConstantValue getConstantValue() { + return constantValue_; + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression.ConstantValue constant_value = 3; + */ + public Builder setConstantValue(org.jetbrains.kotlin.serialization.ProtoBuf.Expression.ConstantValue value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + constantValue_ = value; + + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Expression.ConstantValue constant_value = 3; + */ + public Builder clearConstantValue() { + bitField0_ = (bitField0_ & ~0x00000004); + constantValue_ = org.jetbrains.kotlin.serialization.ProtoBuf.Expression.ConstantValue.TRUE; + + return this; + } + + private org.jetbrains.kotlin.serialization.ProtoBuf.Type isInstanceType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+       * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+       * and with type encoded in either one of next two fields as RHS.
+       * 
+ */ + public boolean hasIsInstanceType() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+       * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+       * and with type encoded in either one of next two fields as RHS.
+       * 
+ */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Type getIsInstanceType() { + return isInstanceType_; + } + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+       * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+       * and with type encoded in either one of next two fields as RHS.
+       * 
+ */ + public Builder setIsInstanceType(org.jetbrains.kotlin.serialization.ProtoBuf.Type value) { + if (value == null) { + throw new NullPointerException(); + } + isInstanceType_ = value; + + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+       * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+       * and with type encoded in either one of next two fields as RHS.
+       * 
+ */ + public Builder setIsInstanceType( + org.jetbrains.kotlin.serialization.ProtoBuf.Type.Builder builderForValue) { + isInstanceType_ = builderForValue.build(); + + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+       * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+       * and with type encoded in either one of next two fields as RHS.
+       * 
+ */ + public Builder mergeIsInstanceType(org.jetbrains.kotlin.serialization.ProtoBuf.Type value) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + isInstanceType_ != org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance()) { + isInstanceType_ = + org.jetbrains.kotlin.serialization.ProtoBuf.Type.newBuilder(isInstanceType_).mergeFrom(value).buildPartial(); + } else { + isInstanceType_ = value; + } + + bitField0_ |= 0x00000008; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.Type is_instance_type = 4; + * + *
+       * present => this expression is IsInstancePredicate,  with 'variableName' as LHS
+       * and with type encoded in either one of next two fields as RHS.
+       * 
+ */ + public Builder clearIsInstanceType() { + isInstanceType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); + + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + private int isInstanceTypeId_ ; + /** + * optional int32 is_instance_type_id = 5; + */ + public boolean hasIsInstanceTypeId() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional int32 is_instance_type_id = 5; + */ + public int getIsInstanceTypeId() { + return isInstanceTypeId_; + } + /** + * optional int32 is_instance_type_id = 5; + */ + public Builder setIsInstanceTypeId(int value) { + bitField0_ |= 0x00000010; + isInstanceTypeId_ = value; + + return this; + } + /** + * optional int32 is_instance_type_id = 5; + */ + public Builder clearIsInstanceTypeId() { + bitField0_ = (bitField0_ & ~0x00000010); + isInstanceTypeId_ = 0; + + return this; + } + + private java.util.List andArgument_ = + java.util.Collections.emptyList(); + private void ensureAndArgumentIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + andArgument_ = new java.util.ArrayList(andArgument_); + bitField0_ |= 0x00000020; + } + } + + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public java.util.List getAndArgumentList() { + return java.util.Collections.unmodifiableList(andArgument_); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public int getAndArgumentCount() { + return andArgument_.size(); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Expression getAndArgument(int index) { + return andArgument_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public Builder setAndArgument( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Expression value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAndArgumentIsMutable(); + andArgument_.set(index, value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public Builder setAndArgument( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Expression.Builder builderForValue) { + ensureAndArgumentIsMutable(); + andArgument_.set(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public Builder addAndArgument(org.jetbrains.kotlin.serialization.ProtoBuf.Expression value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAndArgumentIsMutable(); + andArgument_.add(value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public Builder addAndArgument( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Expression value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAndArgumentIsMutable(); + andArgument_.add(index, value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public Builder addAndArgument( + org.jetbrains.kotlin.serialization.ProtoBuf.Expression.Builder builderForValue) { + ensureAndArgumentIsMutable(); + andArgument_.add(builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public Builder addAndArgument( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Expression.Builder builderForValue) { + ensureAndArgumentIsMutable(); + andArgument_.add(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public Builder addAllAndArgument( + java.lang.Iterable values) { + ensureAndArgumentIsMutable(); + org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( + values, andArgument_); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public Builder clearAndArgument() { + andArgument_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression and_argument = 6; + * + *
+       * non-empty => this expression is boolean formula of form 'andArguments[0] && andArguments[1] && ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message
+       * 
+ */ + public Builder removeAndArgument(int index) { + ensureAndArgumentIsMutable(); + andArgument_.remove(index); + + return this; + } + + private java.util.List orArgument_ = + java.util.Collections.emptyList(); + private void ensureOrArgumentIsMutable() { + if (!((bitField0_ & 0x00000040) == 0x00000040)) { + orArgument_ = new java.util.ArrayList(orArgument_); + bitField0_ |= 0x00000040; + } + } + + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public java.util.List getOrArgumentList() { + return java.util.Collections.unmodifiableList(orArgument_); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public int getOrArgumentCount() { + return orArgument_.size(); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Expression getOrArgument(int index) { + return orArgument_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public Builder setOrArgument( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Expression value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrArgumentIsMutable(); + orArgument_.set(index, value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public Builder setOrArgument( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Expression.Builder builderForValue) { + ensureOrArgumentIsMutable(); + orArgument_.set(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public Builder addOrArgument(org.jetbrains.kotlin.serialization.ProtoBuf.Expression value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrArgumentIsMutable(); + orArgument_.add(value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public Builder addOrArgument( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Expression value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOrArgumentIsMutable(); + orArgument_.add(index, value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public Builder addOrArgument( + org.jetbrains.kotlin.serialization.ProtoBuf.Expression.Builder builderForValue) { + ensureOrArgumentIsMutable(); + orArgument_.add(builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public Builder addOrArgument( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Expression.Builder builderForValue) { + ensureOrArgumentIsMutable(); + orArgument_.add(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public Builder addAllOrArgument( + java.lang.Iterable values) { + ensureOrArgumentIsMutable(); + org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( + values, orArgument_); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public Builder clearOrArgument() { + orArgument_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Expression or_argument = 7; + * + *
+       * non-empty => this expression is boolean formula of form 'orArguments[0] || andArguments[1] || ...'
+       * Additionally, if first argument of formula is primitive expression (i.e. predicate or value),
+       * it is optimized and embedded straight into this message.
+       * 
+ */ + public Builder removeOrArgument(int index) { + ensureOrArgumentIsMutable(); + orArgument_.remove(index); + + return this; + } + + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.Expression) + } + + static { + defaultInstance = new Expression(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.Expression) + } + static { } diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/ContractDeserializer.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/ContractDeserializer.kt new file mode 100644 index 00000000000..0b076f28277 --- /dev/null +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/ContractDeserializer.kt @@ -0,0 +1,42 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.kotlin.serialization.deserialization + +import org.jetbrains.kotlin.descriptors.FunctionDescriptor +import org.jetbrains.kotlin.serialization.ProtoBuf + +interface ContractDeserializer { + fun deserializeContractFromFunction( + proto: ProtoBuf.Function, + ownerFunction: FunctionDescriptor, + typeTable: TypeTable, + typeDeserializer: TypeDeserializer + ): Pair, ContractProvider>? + + companion object { + val DEFAULT = object : ContractDeserializer { + override fun deserializeContractFromFunction( + proto: ProtoBuf.Function, + ownerFunction: FunctionDescriptor, + typeTable: TypeTable, + typeDeserializer: TypeDeserializer + ): Pair, Nothing>? = null + } + } +} + +interface ContractProvider \ No newline at end of file diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/DeserializationConfiguration.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/DeserializationConfiguration.kt index cb143ed62a8..aec4855673e 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/DeserializationConfiguration.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/DeserializationConfiguration.kt @@ -26,5 +26,11 @@ interface DeserializationConfiguration { val isJvmPackageNameSupported: Boolean get() = true + val returnsEffectAllowed: Boolean + get() = false + + val callsInPlaceEffectAllowed: Boolean + get() = false + object Default : DeserializationConfiguration } diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/MemberDeserializer.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/MemberDeserializer.kt index 61b911c57d0..bc42e0ee438 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/MemberDeserializer.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/MemberDeserializer.kt @@ -162,6 +162,7 @@ class MemberDeserializer(private val c: DeserializationContext) { c.containerSource ) val local = c.childContext(function, proto.typeParameterList) + function.initialize( proto.receiverType(c.typeTable)?.let { local.typeDeserializer.type(it, receiverAnnotations) }, getDispatchReceiverParameter(), @@ -169,7 +170,8 @@ class MemberDeserializer(private val c: DeserializationContext) { local.memberDeserializer.valueParameters(proto.valueParameterList, proto, AnnotatedCallableKind.FUNCTION), local.typeDeserializer.type(proto.returnType(c.typeTable)), Deserialization.modality(Flags.MODALITY.get(flags)), - Deserialization.visibility(Flags.VISIBILITY.get(flags)) + Deserialization.visibility(Flags.VISIBILITY.get(flags)), + emptyMap, Any?>() ) function.isOperator = Flags.IS_OPERATOR.get(flags) function.isInfix = Flags.IS_INFIX.get(flags) @@ -178,6 +180,12 @@ class MemberDeserializer(private val c: DeserializationContext) { function.isTailrec = Flags.IS_TAILREC.get(flags) function.isSuspend = Flags.IS_SUSPEND.get(flags) function.isExpect = Flags.IS_EXPECT_FUNCTION.get(flags) + + val mapValueForContract = c.components.contractDeserializer.deserializeContractFromFunction(proto, function, c.typeTable, c.typeDeserializer) + if (mapValueForContract != null) { + function.putInUserDataMap(mapValueForContract.first, mapValueForContract.second) + } + return function } diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/MetadataPackageFragmentProvider.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/MetadataPackageFragmentProvider.kt index f3a6c79e598..58d8a80172d 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/MetadataPackageFragmentProvider.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/MetadataPackageFragmentProvider.kt @@ -58,7 +58,9 @@ class MetadataPackageFragmentProvider( LookupTracker.DO_NOTHING, FlexibleTypeDeserializer.ThrowException, emptyList(), - notFoundClasses, AdditionalClassPartsProvider.None, PlatformDependentDeclarationFilter.All + notFoundClasses, + ContractDeserializer.DEFAULT, + AdditionalClassPartsProvider.None, PlatformDependentDeclarationFilter.All ) } diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/context.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/context.kt index 96f802cad2f..f4440b4128c 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/context.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/context.kt @@ -43,6 +43,7 @@ class DeserializationComponents( val flexibleTypeDeserializer: FlexibleTypeDeserializer, val fictitiousClassDescriptorFactories: Iterable, val notFoundClasses: NotFoundClasses, + val contractDeserializer: ContractDeserializer, val additionalClassPartsProvider: AdditionalClassPartsProvider = AdditionalClassPartsProvider.None, val platformDependentDeclarationFilter: PlatformDependentDeclarationFilter = PlatformDependentDeclarationFilter.All ) { diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/classFile/DeserializerForClassfileDecompiler.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/classFile/DeserializerForClassfileDecompiler.kt index 8435a8b6a91..c00db751b96 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/classFile/DeserializerForClassfileDecompiler.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/classFile/DeserializerForClassfileDecompiler.kt @@ -35,6 +35,7 @@ import org.jetbrains.kotlin.resolve.TargetPlatform import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatform import org.jetbrains.kotlin.serialization.ClassDataWithSource import org.jetbrains.kotlin.serialization.deserialization.ClassDataFinder +import org.jetbrains.kotlin.serialization.deserialization.ContractDeserializer import org.jetbrains.kotlin.serialization.deserialization.DeserializationComponents import org.jetbrains.kotlin.serialization.deserialization.DeserializationConfiguration import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedPackageMemberScope @@ -68,7 +69,8 @@ class DeserializerForClassfileDecompiler( deserializationComponents = DeserializationComponents( storageManager, moduleDescriptor, DeserializationConfiguration.Default, classDataFinder, annotationAndConstantLoader, packageFragmentProvider, ResolveEverythingToKotlinAnyLocalClassifierResolver(builtIns), LoggingErrorReporter(LOG), - LookupTracker.DO_NOTHING, JavaFlexibleTypeDeserializer, emptyList(), notFoundClasses + LookupTracker.DO_NOTHING, JavaFlexibleTypeDeserializer, emptyList(), notFoundClasses, + ContractDeserializer.DEFAULT ) } diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/common/KotlinMetadataDeserializerForDecompiler.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/common/KotlinMetadataDeserializerForDecompiler.kt index dc78e4d1de5..4bbbe35094a 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/common/KotlinMetadataDeserializerForDecompiler.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/common/KotlinMetadataDeserializerForDecompiler.kt @@ -51,7 +51,8 @@ class KotlinMetadataDeserializerForDecompiler( storageManager, moduleDescriptor, DeserializationConfiguration.Default, ProtoBasedClassDataFinder(proto, nameResolver), AnnotationAndConstantLoaderImpl(moduleDescriptor, notFoundClasses, serializerProtocol), packageFragmentProvider, ResolveEverythingToKotlinAnyLocalClassifierResolver(builtIns), LoggingErrorReporter(LOG), - LookupTracker.DO_NOTHING, flexibleTypeDeserializer, emptyList(), notFoundClasses + LookupTracker.DO_NOTHING, flexibleTypeDeserializer, emptyList(), notFoundClasses, + ContractDeserializer.DEFAULT ) } diff --git a/js/js.serializer/src/org/jetbrains/kotlin/serialization/js/kotlinJavascriptPackageFragmentProvider.kt b/js/js.serializer/src/org/jetbrains/kotlin/serialization/js/kotlinJavascriptPackageFragmentProvider.kt index 869927bfdd8..eca0828610b 100644 --- a/js/js.serializer/src/org/jetbrains/kotlin/serialization/js/kotlinJavascriptPackageFragmentProvider.kt +++ b/js/js.serializer/src/org/jetbrains/kotlin/serialization/js/kotlinJavascriptPackageFragmentProvider.kt @@ -16,6 +16,7 @@ package org.jetbrains.kotlin.serialization.js +import org.jetbrains.kotlin.contracts.ContractDeserializerImpl import org.jetbrains.kotlin.descriptors.ModuleDescriptor import org.jetbrains.kotlin.descriptors.NotFoundClasses import org.jetbrains.kotlin.descriptors.PackageFragmentProvider @@ -58,6 +59,7 @@ fun createKotlinJavascriptPackageFragmentProvider( DynamicTypeDeserializer, emptyList(), notFoundClasses, + ContractDeserializerImpl(configuration), platformDependentDeclarationFilter = PlatformDependentDeclarationFilter.NoPlatformDependent )