Serialize/deserialize IrFunctionExpression
This commit is contained in:
@@ -410,6 +410,11 @@ message IrWhile {
|
|||||||
required Loop loop = 1;
|
required Loop loop = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message IrFunctionExpression {
|
||||||
|
required IrFunction function = 1;
|
||||||
|
required IrStatementOrigin origin = 2;
|
||||||
|
}
|
||||||
|
|
||||||
/* ------ Dynamic expression --------------------------------------------- */
|
/* ------ Dynamic expression --------------------------------------------- */
|
||||||
|
|
||||||
message IrDynamicMemberExpression {
|
message IrDynamicMemberExpression {
|
||||||
@@ -494,6 +499,7 @@ message IrOperation {
|
|||||||
IrDynamicOperatorExpression dynamic_operator = 30;
|
IrDynamicOperatorExpression dynamic_operator = 30;
|
||||||
IrLocalDelegatedPropertyReference local_delegated_property_reference = 31;
|
IrLocalDelegatedPropertyReference local_delegated_property_reference = 31;
|
||||||
IrConstructorCall constructor_call = 32;
|
IrConstructorCall constructor_call = 32;
|
||||||
|
IrFunctionExpression function_expression = 33;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+46
-66
@@ -73,6 +73,7 @@ import org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression as P
|
|||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrField as ProtoField
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrField as ProtoField
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction as ProtoFunction
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction as ProtoFunction
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionBase as ProtoFunctionBase
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionBase as ProtoFunctionBase
|
||||||
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression as ProtoFunctionExpression
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionReference as ProtoFunctionReference
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionReference as ProtoFunctionReference
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrGetClass as ProtoGetClass
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrGetClass as ProtoGetClass
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrGetEnumValue as ProtoGetEnumValue
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrGetEnumValue as ProtoGetEnumValue
|
||||||
@@ -414,6 +415,17 @@ abstract class IrModuleDeserializer(
|
|||||||
return call
|
return call
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun deserializeFunctionExpression(
|
||||||
|
functionExpression: ProtoFunctionExpression,
|
||||||
|
start: Int,
|
||||||
|
end: Int,
|
||||||
|
type: IrType
|
||||||
|
) =
|
||||||
|
IrFunctionExpressionImpl(
|
||||||
|
start, end, type,
|
||||||
|
deserializeIrFunction(functionExpression.function),
|
||||||
|
deserializeIrStatementOrigin(functionExpression.origin)
|
||||||
|
)
|
||||||
|
|
||||||
private fun deserializeFunctionReference(
|
private fun deserializeFunctionReference(
|
||||||
proto: ProtoFunctionReference,
|
proto: ProtoFunctionReference,
|
||||||
@@ -813,72 +825,40 @@ abstract class IrModuleDeserializer(
|
|||||||
|
|
||||||
private fun deserializeOperation(proto: ProtoOperation, start: Int, end: Int, type: IrType): IrExpression =
|
private fun deserializeOperation(proto: ProtoOperation, start: Int, end: Int, type: IrType): IrExpression =
|
||||||
when (proto.operationCase!!) {
|
when (proto.operationCase!!) {
|
||||||
BLOCK
|
BLOCK -> deserializeBlock(proto.block, start, end, type)
|
||||||
-> deserializeBlock(proto.block, start, end, type)
|
BREAK -> deserializeBreak(proto.`break`, start, end, type)
|
||||||
BREAK
|
CLASS_REFERENCE -> deserializeClassReference(proto.classReference, start, end, type)
|
||||||
-> deserializeBreak(proto.`break`, start, end, type)
|
CALL -> deserializeCall(proto.call, start, end, type)
|
||||||
CLASS_REFERENCE
|
COMPOSITE -> deserializeComposite(proto.composite, start, end, type)
|
||||||
-> deserializeClassReference(proto.classReference, start, end, type)
|
CONST -> deserializeConst(proto.const, start, end, type)
|
||||||
CALL
|
CONTINUE -> deserializeContinue(proto.`continue`, start, end, type)
|
||||||
-> deserializeCall(proto.call, start, end, type)
|
DELEGATING_CONSTRUCTOR_CALL -> deserializeDelegatingConstructorCall(proto.delegatingConstructorCall, start, end)
|
||||||
COMPOSITE
|
DO_WHILE -> deserializeDoWhile(proto.doWhile, start, end, type)
|
||||||
-> deserializeComposite(proto.composite, start, end, type)
|
ENUM_CONSTRUCTOR_CALL -> deserializeEnumConstructorCall(proto.enumConstructorCall, start, end, type)
|
||||||
CONST
|
FUNCTION_REFERENCE -> deserializeFunctionReference(proto.functionReference, start, end, type)
|
||||||
-> deserializeConst(proto.const, start, end, type)
|
GET_ENUM_VALUE -> deserializeGetEnumValue(proto.getEnumValue, start, end, type)
|
||||||
CONTINUE
|
GET_CLASS -> deserializeGetClass(proto.getClass, start, end, type)
|
||||||
-> deserializeContinue(proto.`continue`, start, end, type)
|
GET_FIELD -> deserializeGetField(proto.getField, start, end, type)
|
||||||
DELEGATING_CONSTRUCTOR_CALL
|
GET_OBJECT -> deserializeGetObject(proto.getObject, start, end, type)
|
||||||
-> deserializeDelegatingConstructorCall(proto.delegatingConstructorCall, start, end)
|
GET_VALUE -> deserializeGetValue(proto.getValue, start, end, type)
|
||||||
DO_WHILE
|
LOCAL_DELEGATED_PROPERTY_REFERENCE -> deserializeIrLocalDelegatedPropertyReference(proto.localDelegatedPropertyReference, start, end, type)
|
||||||
-> deserializeDoWhile(proto.doWhile, start, end, type)
|
INSTANCE_INITIALIZER_CALL -> deserializeInstanceInitializerCall(proto.instanceInitializerCall, start, end)
|
||||||
ENUM_CONSTRUCTOR_CALL
|
PROPERTY_REFERENCE -> deserializePropertyReference(proto.propertyReference, start, end, type)
|
||||||
-> deserializeEnumConstructorCall(proto.enumConstructorCall, start, end, type)
|
RETURN -> deserializeReturn(proto.`return`, start, end, type)
|
||||||
FUNCTION_REFERENCE
|
SET_FIELD -> deserializeSetField(proto.setField, start, end)
|
||||||
-> deserializeFunctionReference(proto.functionReference, start, end, type)
|
SET_VARIABLE -> deserializeSetVariable(proto.setVariable, start, end)
|
||||||
GET_ENUM_VALUE
|
STRING_CONCAT -> deserializeStringConcat(proto.stringConcat, start, end, type)
|
||||||
-> deserializeGetEnumValue(proto.getEnumValue, start, end, type)
|
THROW -> deserializeThrow(proto.`throw`, start, end, type)
|
||||||
GET_CLASS
|
TRY -> deserializeTry(proto.`try`, start, end, type)
|
||||||
-> deserializeGetClass(proto.getClass, start, end, type)
|
TYPE_OP -> deserializeTypeOp(proto.typeOp, start, end, type)
|
||||||
GET_FIELD
|
VARARG -> deserializeVararg(proto.vararg, start, end, type)
|
||||||
-> deserializeGetField(proto.getField, start, end, type)
|
WHEN -> deserializeWhen(proto.`when`, start, end, type)
|
||||||
GET_OBJECT
|
WHILE -> deserializeWhile(proto.`while`, start, end, type)
|
||||||
-> deserializeGetObject(proto.getObject, start, end, type)
|
DYNAMIC_MEMBER -> deserializeDynamicMemberExpression(proto.dynamicMember, start, end, type)
|
||||||
GET_VALUE
|
DYNAMIC_OPERATOR -> deserializeDynamicOperatorExpression(proto.dynamicOperator, start, end, type)
|
||||||
-> deserializeGetValue(proto.getValue, start, end, type)
|
CONSTRUCTOR_CALL -> deserializeConstructorCall(proto.constructorCall, start, end, type)
|
||||||
LOCAL_DELEGATED_PROPERTY_REFERENCE
|
FUNCTION_EXPRESSION -> deserializeFunctionExpression(proto.functionExpression, start, end, type)
|
||||||
-> deserializeIrLocalDelegatedPropertyReference(proto.localDelegatedPropertyReference, start, end, type)
|
OPERATION_NOT_SET -> error("Expression deserialization not implemented: ${proto.operationCase}")
|
||||||
INSTANCE_INITIALIZER_CALL
|
|
||||||
-> deserializeInstanceInitializerCall(proto.instanceInitializerCall, start, end)
|
|
||||||
PROPERTY_REFERENCE
|
|
||||||
-> deserializePropertyReference(proto.propertyReference, start, end, type)
|
|
||||||
RETURN
|
|
||||||
-> deserializeReturn(proto.`return`, start, end, type)
|
|
||||||
SET_FIELD
|
|
||||||
-> deserializeSetField(proto.setField, start, end)
|
|
||||||
SET_VARIABLE
|
|
||||||
-> deserializeSetVariable(proto.setVariable, start, end)
|
|
||||||
STRING_CONCAT
|
|
||||||
-> deserializeStringConcat(proto.stringConcat, start, end, type)
|
|
||||||
THROW
|
|
||||||
-> deserializeThrow(proto.`throw`, start, end, type)
|
|
||||||
TRY
|
|
||||||
-> deserializeTry(proto.`try`, start, end, type)
|
|
||||||
TYPE_OP
|
|
||||||
-> deserializeTypeOp(proto.typeOp, start, end, type)
|
|
||||||
VARARG
|
|
||||||
-> deserializeVararg(proto.vararg, start, end, type)
|
|
||||||
WHEN
|
|
||||||
-> deserializeWhen(proto.`when`, start, end, type)
|
|
||||||
WHILE
|
|
||||||
-> deserializeWhile(proto.`while`, start, end, type)
|
|
||||||
DYNAMIC_MEMBER
|
|
||||||
-> deserializeDynamicMemberExpression(proto.dynamicMember, start, end, type)
|
|
||||||
DYNAMIC_OPERATOR
|
|
||||||
-> deserializeDynamicOperatorExpression(proto.dynamicOperator, start, end, type)
|
|
||||||
CONSTRUCTOR_CALL
|
|
||||||
-> deserializeConstructorCall(proto.constructorCall, start, end, type)
|
|
||||||
OPERATION_NOT_SET
|
|
||||||
-> error("Expression deserialization not implemented: ${proto.operationCase}")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun deserializeExpression(proto: ProtoExpression): IrExpression {
|
private fun deserializeExpression(proto: ProtoExpression): IrExpression {
|
||||||
|
|||||||
+19
-22
@@ -65,6 +65,7 @@ import org.jetbrains.kotlin.backend.common.serialization.proto.IrFile as ProtoFi
|
|||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrField as ProtoField
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrField as ProtoField
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction as ProtoFunction
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction as ProtoFunction
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionBase as ProtoFunctionBase
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionBase as ProtoFunctionBase
|
||||||
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression as ProtoFunctionExpression
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionReference as ProtoFunctionReference
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionReference as ProtoFunctionReference
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrGetClass as ProtoGetClass
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrGetClass as ProtoGetClass
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrGetEnumValue as ProtoGetEnumValue
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrGetEnumValue as ProtoGetEnumValue
|
||||||
@@ -489,6 +490,12 @@ open class IrModuleSerializer(
|
|||||||
memberAccess = serializeMemberAccessCommon(call)
|
memberAccess = serializeMemberAccessCommon(call)
|
||||||
}.build()
|
}.build()
|
||||||
|
|
||||||
|
private fun serializeFunctionExpression(functionExpression: IrFunctionExpression): ProtoFunctionExpression =
|
||||||
|
ProtoFunctionExpression.newBuilder().apply {
|
||||||
|
function = serializeIrFunction(functionExpression.function)
|
||||||
|
origin = serializeIrStatementOrigin(functionExpression.origin)
|
||||||
|
}.build()
|
||||||
|
|
||||||
private fun serializeFunctionReference(callable: IrFunctionReference): ProtoFunctionReference {
|
private fun serializeFunctionReference(callable: IrFunctionReference): ProtoFunctionReference {
|
||||||
val proto = ProtoFunctionReference.newBuilder()
|
val proto = ProtoFunctionReference.newBuilder()
|
||||||
.setSymbol(serializeIrSymbol(callable.symbol))
|
.setSymbol(serializeIrSymbol(callable.symbol))
|
||||||
@@ -867,42 +874,32 @@ open class IrModuleSerializer(
|
|||||||
when (expression) {
|
when (expression) {
|
||||||
is IrBlock -> operationProto.block = serializeBlock(expression)
|
is IrBlock -> operationProto.block = serializeBlock(expression)
|
||||||
is IrBreak -> operationProto.`break` = serializeBreak(expression)
|
is IrBreak -> operationProto.`break` = serializeBreak(expression)
|
||||||
is IrClassReference
|
is IrClassReference -> operationProto.classReference = serializeClassReference(expression)
|
||||||
-> operationProto.classReference = serializeClassReference(expression)
|
|
||||||
is IrCall -> operationProto.call = serializeCall(expression)
|
is IrCall -> operationProto.call = serializeCall(expression)
|
||||||
is IrConstructorCall -> operationProto.constructorCall = serializeConstructorCall(expression)
|
is IrConstructorCall -> operationProto.constructorCall = serializeConstructorCall(expression)
|
||||||
is IrComposite -> operationProto.composite = serializeComposite(expression)
|
is IrComposite -> operationProto.composite = serializeComposite(expression)
|
||||||
is IrConst<*> -> operationProto.const = serializeConst(expression)
|
is IrConst<*> -> operationProto.const = serializeConst(expression)
|
||||||
is IrContinue -> operationProto.`continue` = serializeContinue(expression)
|
is IrContinue -> operationProto.`continue` = serializeContinue(expression)
|
||||||
is IrDelegatingConstructorCall
|
is IrDelegatingConstructorCall -> operationProto.delegatingConstructorCall = serializeDelegatingConstructorCall(expression)
|
||||||
-> operationProto.delegatingConstructorCall = serializeDelegatingConstructorCall(expression)
|
|
||||||
is IrDoWhileLoop -> operationProto.doWhile = serializeDoWhile(expression)
|
is IrDoWhileLoop -> operationProto.doWhile = serializeDoWhile(expression)
|
||||||
is IrEnumConstructorCall
|
is IrEnumConstructorCall -> operationProto.enumConstructorCall = serializeEnumConstructorCall(expression)
|
||||||
-> operationProto.enumConstructorCall = serializeEnumConstructorCall(expression)
|
is IrFunctionExpression -> operationProto.functionExpression = serializeFunctionExpression(expression)
|
||||||
is IrFunctionReference
|
is IrFunctionReference -> operationProto.functionReference = serializeFunctionReference(expression)
|
||||||
-> operationProto.functionReference = serializeFunctionReference(expression)
|
|
||||||
is IrGetClass -> operationProto.getClass = serializeGetClass(expression)
|
is IrGetClass -> operationProto.getClass = serializeGetClass(expression)
|
||||||
is IrGetField -> operationProto.getField = serializeGetField(expression)
|
is IrGetField -> operationProto.getField = serializeGetField(expression)
|
||||||
is IrGetValue -> operationProto.getValue = serializeGetValue(expression)
|
is IrGetValue -> operationProto.getValue = serializeGetValue(expression)
|
||||||
is IrGetEnumValue
|
is IrGetEnumValue -> operationProto.getEnumValue = serializeGetEnumValue(expression)
|
||||||
-> operationProto.getEnumValue = serializeGetEnumValue(expression)
|
is IrGetObjectValue -> operationProto.getObject = serializeGetObject(expression)
|
||||||
is IrGetObjectValue
|
is IrInstanceInitializerCall -> operationProto.instanceInitializerCall = serializeInstanceInitializerCall(expression)
|
||||||
-> operationProto.getObject = serializeGetObject(expression)
|
is IrLocalDelegatedPropertyReference -> operationProto.localDelegatedPropertyReference = serializeIrLocalDelegatedPropertyReference(expression)
|
||||||
is IrInstanceInitializerCall
|
is IrPropertyReference -> operationProto.propertyReference = serializePropertyReference(expression)
|
||||||
-> operationProto.instanceInitializerCall = serializeInstanceInitializerCall(expression)
|
|
||||||
is IrLocalDelegatedPropertyReference
|
|
||||||
-> operationProto.localDelegatedPropertyReference = serializeIrLocalDelegatedPropertyReference(expression)
|
|
||||||
is IrPropertyReference
|
|
||||||
-> operationProto.propertyReference = serializePropertyReference(expression)
|
|
||||||
is IrReturn -> operationProto.`return` = serializeReturn(expression)
|
is IrReturn -> operationProto.`return` = serializeReturn(expression)
|
||||||
is IrSetField -> operationProto.setField = serializeSetField(expression)
|
is IrSetField -> operationProto.setField = serializeSetField(expression)
|
||||||
is IrSetVariable -> operationProto.setVariable = serializeSetVariable(expression)
|
is IrSetVariable -> operationProto.setVariable = serializeSetVariable(expression)
|
||||||
is IrStringConcatenation
|
is IrStringConcatenation -> operationProto.stringConcat = serializeStringConcat(expression)
|
||||||
-> operationProto.stringConcat = serializeStringConcat(expression)
|
|
||||||
is IrThrow -> operationProto.`throw` = serializeThrow(expression)
|
is IrThrow -> operationProto.`throw` = serializeThrow(expression)
|
||||||
is IrTry -> operationProto.`try` = serializeTry(expression)
|
is IrTry -> operationProto.`try` = serializeTry(expression)
|
||||||
is IrTypeOperatorCall
|
is IrTypeOperatorCall -> operationProto.typeOp = serializeTypeOp(expression)
|
||||||
-> operationProto.typeOp = serializeTypeOp(expression)
|
|
||||||
is IrVararg -> operationProto.vararg = serializeVararg(expression)
|
is IrVararg -> operationProto.vararg = serializeVararg(expression)
|
||||||
is IrWhen -> operationProto.`when` = serializeWhen(expression)
|
is IrWhen -> operationProto.`when` = serializeWhen(expression)
|
||||||
is IrWhileLoop -> operationProto.`while` = serializeWhile(expression)
|
is IrWhileLoop -> operationProto.`while` = serializeWhile(expression)
|
||||||
|
|||||||
+516
@@ -0,0 +1,516 @@
|
|||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: compiler/ir/serialization.common/src/KotlinIr.proto
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.backend.common.serialization.proto;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression}
|
||||||
|
*/
|
||||||
|
public final class IrFunctionExpression extends
|
||||||
|
org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements
|
||||||
|
// @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression)
|
||||||
|
IrFunctionExpressionOrBuilder {
|
||||||
|
// Use IrFunctionExpression.newBuilder() to construct.
|
||||||
|
private IrFunctionExpression(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) {
|
||||||
|
super(builder);
|
||||||
|
this.unknownFields = builder.getUnknownFields();
|
||||||
|
}
|
||||||
|
private IrFunctionExpression(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;}
|
||||||
|
|
||||||
|
private static final IrFunctionExpression defaultInstance;
|
||||||
|
public static IrFunctionExpression getDefaultInstance() {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IrFunctionExpression getDefaultInstanceForType() {
|
||||||
|
return defaultInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
private final org.jetbrains.kotlin.protobuf.ByteString unknownFields;
|
||||||
|
private IrFunctionExpression(
|
||||||
|
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);
|
||||||
|
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: {
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction.Builder subBuilder = null;
|
||||||
|
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||||
|
subBuilder = function_.toBuilder();
|
||||||
|
}
|
||||||
|
function_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction.PARSER, extensionRegistry);
|
||||||
|
if (subBuilder != null) {
|
||||||
|
subBuilder.mergeFrom(function_);
|
||||||
|
function_ = subBuilder.buildPartial();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 18: {
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin.Builder subBuilder = null;
|
||||||
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
|
subBuilder = origin_.toBuilder();
|
||||||
|
}
|
||||||
|
origin_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin.PARSER, extensionRegistry);
|
||||||
|
if (subBuilder != null) {
|
||||||
|
subBuilder.mergeFrom(origin_);
|
||||||
|
origin_ = subBuilder.buildPartial();
|
||||||
|
}
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
throw e.setUnfinishedMessage(this);
|
||||||
|
} catch (java.io.IOException e) {
|
||||||
|
throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException(
|
||||||
|
e.getMessage()).setUnfinishedMessage(this);
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
unknownFieldsCodedOutput.flush();
|
||||||
|
} catch (java.io.IOException e) {
|
||||||
|
// Should not happen
|
||||||
|
} finally {
|
||||||
|
unknownFields = unknownFieldsOutput.toByteString();
|
||||||
|
}
|
||||||
|
makeExtensionsImmutable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static org.jetbrains.kotlin.protobuf.Parser<IrFunctionExpression> PARSER =
|
||||||
|
new org.jetbrains.kotlin.protobuf.AbstractParser<IrFunctionExpression>() {
|
||||||
|
public IrFunctionExpression parsePartialFrom(
|
||||||
|
org.jetbrains.kotlin.protobuf.CodedInputStream input,
|
||||||
|
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||||
|
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
||||||
|
return new IrFunctionExpression(input, extensionRegistry);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
@java.lang.Override
|
||||||
|
public org.jetbrains.kotlin.protobuf.Parser<IrFunctionExpression> getParserForType() {
|
||||||
|
return PARSER;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int bitField0_;
|
||||||
|
public static final int FUNCTION_FIELD_NUMBER = 1;
|
||||||
|
private org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction function_;
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction function = 1;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasFunction() {
|
||||||
|
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction function = 1;</code>
|
||||||
|
*/
|
||||||
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction getFunction() {
|
||||||
|
return function_;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final int ORIGIN_FIELD_NUMBER = 2;
|
||||||
|
private org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin origin_;
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin origin = 2;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasOrigin() {
|
||||||
|
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin origin = 2;</code>
|
||||||
|
*/
|
||||||
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin getOrigin() {
|
||||||
|
return origin_;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initFields() {
|
||||||
|
function_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction.getDefaultInstance();
|
||||||
|
origin_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin.getDefaultInstance();
|
||||||
|
}
|
||||||
|
private byte memoizedIsInitialized = -1;
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
byte isInitialized = memoizedIsInitialized;
|
||||||
|
if (isInitialized == 1) return true;
|
||||||
|
if (isInitialized == 0) return false;
|
||||||
|
|
||||||
|
if (!hasFunction()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasOrigin()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!getFunction().isInitialized()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!getOrigin().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.writeMessage(1, function_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
|
output.writeMessage(2, origin_);
|
||||||
|
}
|
||||||
|
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
|
||||||
|
.computeMessageSize(1, function_);
|
||||||
|
}
|
||||||
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
|
.computeMessageSize(2, origin_);
|
||||||
|
}
|
||||||
|
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.backend.common.serialization.proto.IrFunctionExpression parseFrom(
|
||||||
|
org.jetbrains.kotlin.protobuf.ByteString data)
|
||||||
|
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression 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.backend.common.serialization.proto.IrFunctionExpression parseFrom(byte[] data)
|
||||||
|
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
||||||
|
return PARSER.parseFrom(data);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression 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.backend.common.serialization.proto.IrFunctionExpression parseFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return PARSER.parseFrom(input);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression 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.backend.common.serialization.proto.IrFunctionExpression parseDelimitedFrom(java.io.InputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return PARSER.parseDelimitedFrom(input);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression 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.backend.common.serialization.proto.IrFunctionExpression parseFrom(
|
||||||
|
org.jetbrains.kotlin.protobuf.CodedInputStream input)
|
||||||
|
throws java.io.IOException {
|
||||||
|
return PARSER.parseFrom(input);
|
||||||
|
}
|
||||||
|
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression 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.backend.common.serialization.proto.IrFunctionExpression prototype) {
|
||||||
|
return newBuilder().mergeFrom(prototype);
|
||||||
|
}
|
||||||
|
public Builder toBuilder() { return newBuilder(this); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression}
|
||||||
|
*/
|
||||||
|
public static final class Builder extends
|
||||||
|
org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder<
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression, Builder>
|
||||||
|
implements
|
||||||
|
// @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression)
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpressionOrBuilder {
|
||||||
|
// Construct using org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression.newBuilder()
|
||||||
|
private Builder() {
|
||||||
|
maybeForceBuilderInitialization();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void maybeForceBuilderInitialization() {
|
||||||
|
}
|
||||||
|
private static Builder create() {
|
||||||
|
return new Builder();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder clear() {
|
||||||
|
super.clear();
|
||||||
|
function_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction.getDefaultInstance();
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
origin_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin.getDefaultInstance();
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder clone() {
|
||||||
|
return create().mergeFrom(buildPartial());
|
||||||
|
}
|
||||||
|
|
||||||
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression getDefaultInstanceForType() {
|
||||||
|
return org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression.getDefaultInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression build() {
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression result = buildPartial();
|
||||||
|
if (!result.isInitialized()) {
|
||||||
|
throw newUninitializedMessageException(result);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression buildPartial() {
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression result = new org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression(this);
|
||||||
|
int from_bitField0_ = bitField0_;
|
||||||
|
int to_bitField0_ = 0;
|
||||||
|
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||||
|
to_bitField0_ |= 0x00000001;
|
||||||
|
}
|
||||||
|
result.function_ = function_;
|
||||||
|
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
|
to_bitField0_ |= 0x00000002;
|
||||||
|
}
|
||||||
|
result.origin_ = origin_;
|
||||||
|
result.bitField0_ = to_bitField0_;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression other) {
|
||||||
|
if (other == org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression.getDefaultInstance()) return this;
|
||||||
|
if (other.hasFunction()) {
|
||||||
|
mergeFunction(other.getFunction());
|
||||||
|
}
|
||||||
|
if (other.hasOrigin()) {
|
||||||
|
mergeOrigin(other.getOrigin());
|
||||||
|
}
|
||||||
|
setUnknownFields(
|
||||||
|
getUnknownFields().concat(other.unknownFields));
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final boolean isInitialized() {
|
||||||
|
if (!hasFunction()) {
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!hasOrigin()) {
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!getFunction().isInitialized()) {
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!getOrigin().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.backend.common.serialization.proto.IrFunctionExpression parsedMessage = null;
|
||||||
|
try {
|
||||||
|
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||||
|
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||||
|
parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression) e.getUnfinishedMessage();
|
||||||
|
throw e;
|
||||||
|
} finally {
|
||||||
|
if (parsedMessage != null) {
|
||||||
|
mergeFrom(parsedMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
private int bitField0_;
|
||||||
|
|
||||||
|
private org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction function_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction.getDefaultInstance();
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction function = 1;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasFunction() {
|
||||||
|
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction function = 1;</code>
|
||||||
|
*/
|
||||||
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction getFunction() {
|
||||||
|
return function_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction function = 1;</code>
|
||||||
|
*/
|
||||||
|
public Builder setFunction(org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
function_ = value;
|
||||||
|
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction function = 1;</code>
|
||||||
|
*/
|
||||||
|
public Builder setFunction(
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction.Builder builderForValue) {
|
||||||
|
function_ = builderForValue.build();
|
||||||
|
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction function = 1;</code>
|
||||||
|
*/
|
||||||
|
public Builder mergeFunction(org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction value) {
|
||||||
|
if (((bitField0_ & 0x00000001) == 0x00000001) &&
|
||||||
|
function_ != org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction.getDefaultInstance()) {
|
||||||
|
function_ =
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction.newBuilder(function_).mergeFrom(value).buildPartial();
|
||||||
|
} else {
|
||||||
|
function_ = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bitField0_ |= 0x00000001;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction function = 1;</code>
|
||||||
|
*/
|
||||||
|
public Builder clearFunction() {
|
||||||
|
function_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction.getDefaultInstance();
|
||||||
|
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin origin_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin.getDefaultInstance();
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin origin = 2;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasOrigin() {
|
||||||
|
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin origin = 2;</code>
|
||||||
|
*/
|
||||||
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin getOrigin() {
|
||||||
|
return origin_;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin origin = 2;</code>
|
||||||
|
*/
|
||||||
|
public Builder setOrigin(org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
origin_ = value;
|
||||||
|
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin origin = 2;</code>
|
||||||
|
*/
|
||||||
|
public Builder setOrigin(
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin.Builder builderForValue) {
|
||||||
|
origin_ = builderForValue.build();
|
||||||
|
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin origin = 2;</code>
|
||||||
|
*/
|
||||||
|
public Builder mergeOrigin(org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin value) {
|
||||||
|
if (((bitField0_ & 0x00000002) == 0x00000002) &&
|
||||||
|
origin_ != org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin.getDefaultInstance()) {
|
||||||
|
origin_ =
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin.newBuilder(origin_).mergeFrom(value).buildPartial();
|
||||||
|
} else {
|
||||||
|
origin_ = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bitField0_ |= 0x00000002;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin origin = 2;</code>
|
||||||
|
*/
|
||||||
|
public Builder clearOrigin() {
|
||||||
|
origin_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin.getDefaultInstance();
|
||||||
|
|
||||||
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression)
|
||||||
|
}
|
||||||
|
|
||||||
|
static {
|
||||||
|
defaultInstance = new IrFunctionExpression(true);
|
||||||
|
defaultInstance.initFields();
|
||||||
|
}
|
||||||
|
|
||||||
|
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression)
|
||||||
|
}
|
||||||
+27
@@ -0,0 +1,27 @@
|
|||||||
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
|
// source: compiler/ir/serialization.common/src/KotlinIr.proto
|
||||||
|
|
||||||
|
package org.jetbrains.kotlin.backend.common.serialization.proto;
|
||||||
|
|
||||||
|
public interface IrFunctionExpressionOrBuilder extends
|
||||||
|
// @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression)
|
||||||
|
org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction function = 1;</code>
|
||||||
|
*/
|
||||||
|
boolean hasFunction();
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction function = 1;</code>
|
||||||
|
*/
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction getFunction();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin origin = 2;</code>
|
||||||
|
*/
|
||||||
|
boolean hasOrigin();
|
||||||
|
/**
|
||||||
|
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin origin = 2;</code>
|
||||||
|
*/
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrigin getOrigin();
|
||||||
|
}
|
||||||
+128
@@ -38,6 +38,7 @@ public final class IrOperation extends
|
|||||||
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
||||||
initFields();
|
initFields();
|
||||||
int mutable_bitField0_ = 0;
|
int mutable_bitField0_ = 0;
|
||||||
|
int mutable_bitField1_ = 0;
|
||||||
org.jetbrains.kotlin.protobuf.ByteString.Output unknownFieldsOutput =
|
org.jetbrains.kotlin.protobuf.ByteString.Output unknownFieldsOutput =
|
||||||
org.jetbrains.kotlin.protobuf.ByteString.newOutput();
|
org.jetbrains.kotlin.protobuf.ByteString.newOutput();
|
||||||
org.jetbrains.kotlin.protobuf.CodedOutputStream unknownFieldsCodedOutput =
|
org.jetbrains.kotlin.protobuf.CodedOutputStream unknownFieldsCodedOutput =
|
||||||
@@ -474,6 +475,19 @@ public final class IrOperation extends
|
|||||||
operationCase_ = 32;
|
operationCase_ = 32;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 266: {
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression.Builder subBuilder = null;
|
||||||
|
if (operationCase_ == 33) {
|
||||||
|
subBuilder = ((org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression) operation_).toBuilder();
|
||||||
|
}
|
||||||
|
operation_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression.PARSER, extensionRegistry);
|
||||||
|
if (subBuilder != null) {
|
||||||
|
subBuilder.mergeFrom((org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression) operation_);
|
||||||
|
operation_ = subBuilder.buildPartial();
|
||||||
|
}
|
||||||
|
operationCase_ = 33;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||||
@@ -508,6 +522,7 @@ public final class IrOperation extends
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int bitField0_;
|
private int bitField0_;
|
||||||
|
private int bitField1_;
|
||||||
private int operationCase_ = 0;
|
private int operationCase_ = 0;
|
||||||
private java.lang.Object operation_;
|
private java.lang.Object operation_;
|
||||||
public enum OperationCase
|
public enum OperationCase
|
||||||
@@ -544,6 +559,7 @@ public final class IrOperation extends
|
|||||||
DYNAMIC_OPERATOR(30),
|
DYNAMIC_OPERATOR(30),
|
||||||
LOCAL_DELEGATED_PROPERTY_REFERENCE(31),
|
LOCAL_DELEGATED_PROPERTY_REFERENCE(31),
|
||||||
CONSTRUCTOR_CALL(32),
|
CONSTRUCTOR_CALL(32),
|
||||||
|
FUNCTION_EXPRESSION(33),
|
||||||
OPERATION_NOT_SET(0);
|
OPERATION_NOT_SET(0);
|
||||||
private int value = 0;
|
private int value = 0;
|
||||||
private OperationCase(int value) {
|
private OperationCase(int value) {
|
||||||
@@ -583,6 +599,7 @@ public final class IrOperation extends
|
|||||||
case 30: return DYNAMIC_OPERATOR;
|
case 30: return DYNAMIC_OPERATOR;
|
||||||
case 31: return LOCAL_DELEGATED_PROPERTY_REFERENCE;
|
case 31: return LOCAL_DELEGATED_PROPERTY_REFERENCE;
|
||||||
case 32: return CONSTRUCTOR_CALL;
|
case 32: return CONSTRUCTOR_CALL;
|
||||||
|
case 33: return FUNCTION_EXPRESSION;
|
||||||
case 0: return OPERATION_NOT_SET;
|
case 0: return OPERATION_NOT_SET;
|
||||||
default: throw new java.lang.IllegalArgumentException(
|
default: throw new java.lang.IllegalArgumentException(
|
||||||
"Value is undefined for this oneof enum.");
|
"Value is undefined for this oneof enum.");
|
||||||
@@ -1143,6 +1160,23 @@ public final class IrOperation extends
|
|||||||
return org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.getDefaultInstance();
|
return org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.getDefaultInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final int FUNCTION_EXPRESSION_FIELD_NUMBER = 33;
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression function_expression = 33;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasFunctionExpression() {
|
||||||
|
return operationCase_ == 33;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression function_expression = 33;</code>
|
||||||
|
*/
|
||||||
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression getFunctionExpression() {
|
||||||
|
if (operationCase_ == 33) {
|
||||||
|
return (org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression) operation_;
|
||||||
|
}
|
||||||
|
return org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression.getDefaultInstance();
|
||||||
|
}
|
||||||
|
|
||||||
private void initFields() {
|
private void initFields() {
|
||||||
}
|
}
|
||||||
private byte memoizedIsInitialized = -1;
|
private byte memoizedIsInitialized = -1;
|
||||||
@@ -1343,6 +1377,12 @@ public final class IrOperation extends
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (hasFunctionExpression()) {
|
||||||
|
if (!getFunctionExpression().isInitialized()) {
|
||||||
|
memoizedIsInitialized = 0;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
memoizedIsInitialized = 1;
|
memoizedIsInitialized = 1;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1446,6 +1486,9 @@ public final class IrOperation extends
|
|||||||
if (operationCase_ == 32) {
|
if (operationCase_ == 32) {
|
||||||
output.writeMessage(32, (org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall) operation_);
|
output.writeMessage(32, (org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall) operation_);
|
||||||
}
|
}
|
||||||
|
if (operationCase_ == 33) {
|
||||||
|
output.writeMessage(33, (org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression) operation_);
|
||||||
|
}
|
||||||
output.writeRawBytes(unknownFields);
|
output.writeRawBytes(unknownFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1583,6 +1626,10 @@ public final class IrOperation extends
|
|||||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
.computeMessageSize(32, (org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall) operation_);
|
.computeMessageSize(32, (org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall) operation_);
|
||||||
}
|
}
|
||||||
|
if (operationCase_ == 33) {
|
||||||
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
|
.computeMessageSize(33, (org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression) operation_);
|
||||||
|
}
|
||||||
size += unknownFields.size();
|
size += unknownFields.size();
|
||||||
memoizedSerializedSize = size;
|
memoizedSerializedSize = size;
|
||||||
return size;
|
return size;
|
||||||
@@ -1706,7 +1753,9 @@ public final class IrOperation extends
|
|||||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrOperation buildPartial() {
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrOperation buildPartial() {
|
||||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrOperation result = new org.jetbrains.kotlin.backend.common.serialization.proto.IrOperation(this);
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrOperation result = new org.jetbrains.kotlin.backend.common.serialization.proto.IrOperation(this);
|
||||||
int from_bitField0_ = bitField0_;
|
int from_bitField0_ = bitField0_;
|
||||||
|
int from_bitField1_ = bitField1_;
|
||||||
int to_bitField0_ = 0;
|
int to_bitField0_ = 0;
|
||||||
|
int to_bitField1_ = 0;
|
||||||
if (operationCase_ == 1) {
|
if (operationCase_ == 1) {
|
||||||
result.operation_ = operation_;
|
result.operation_ = operation_;
|
||||||
}
|
}
|
||||||
@@ -1803,7 +1852,11 @@ public final class IrOperation extends
|
|||||||
if (operationCase_ == 32) {
|
if (operationCase_ == 32) {
|
||||||
result.operation_ = operation_;
|
result.operation_ = operation_;
|
||||||
}
|
}
|
||||||
|
if (operationCase_ == 33) {
|
||||||
|
result.operation_ = operation_;
|
||||||
|
}
|
||||||
result.bitField0_ = to_bitField0_;
|
result.bitField0_ = to_bitField0_;
|
||||||
|
result.bitField1_ = to_bitField1_;
|
||||||
result.operationCase_ = operationCase_;
|
result.operationCase_ = operationCase_;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -1939,6 +1992,10 @@ public final class IrOperation extends
|
|||||||
mergeConstructorCall(other.getConstructorCall());
|
mergeConstructorCall(other.getConstructorCall());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case FUNCTION_EXPRESSION: {
|
||||||
|
mergeFunctionExpression(other.getFunctionExpression());
|
||||||
|
break;
|
||||||
|
}
|
||||||
case OPERATION_NOT_SET: {
|
case OPERATION_NOT_SET: {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2141,6 +2198,12 @@ public final class IrOperation extends
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (hasFunctionExpression()) {
|
||||||
|
if (!getFunctionExpression().isInitialized()) {
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2176,6 +2239,7 @@ public final class IrOperation extends
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int bitField0_;
|
private int bitField0_;
|
||||||
|
private int bitField1_;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrBlock block = 1;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrBlock block = 1;</code>
|
||||||
@@ -4225,6 +4289,70 @@ public final class IrOperation extends
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression function_expression = 33;</code>
|
||||||
|
*/
|
||||||
|
public boolean hasFunctionExpression() {
|
||||||
|
return operationCase_ == 33;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression function_expression = 33;</code>
|
||||||
|
*/
|
||||||
|
public org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression getFunctionExpression() {
|
||||||
|
if (operationCase_ == 33) {
|
||||||
|
return (org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression) operation_;
|
||||||
|
}
|
||||||
|
return org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression.getDefaultInstance();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression function_expression = 33;</code>
|
||||||
|
*/
|
||||||
|
public Builder setFunctionExpression(org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression value) {
|
||||||
|
if (value == null) {
|
||||||
|
throw new NullPointerException();
|
||||||
|
}
|
||||||
|
operation_ = value;
|
||||||
|
|
||||||
|
operationCase_ = 33;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression function_expression = 33;</code>
|
||||||
|
*/
|
||||||
|
public Builder setFunctionExpression(
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression.Builder builderForValue) {
|
||||||
|
operation_ = builderForValue.build();
|
||||||
|
|
||||||
|
operationCase_ = 33;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression function_expression = 33;</code>
|
||||||
|
*/
|
||||||
|
public Builder mergeFunctionExpression(org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression value) {
|
||||||
|
if (operationCase_ == 33 &&
|
||||||
|
operation_ != org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression.getDefaultInstance()) {
|
||||||
|
operation_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression.newBuilder((org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression) operation_)
|
||||||
|
.mergeFrom(value).buildPartial();
|
||||||
|
} else {
|
||||||
|
operation_ = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
operationCase_ = 33;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression function_expression = 33;</code>
|
||||||
|
*/
|
||||||
|
public Builder clearFunctionExpression() {
|
||||||
|
if (operationCase_ == 33) {
|
||||||
|
operationCase_ = 0;
|
||||||
|
operation_ = null;
|
||||||
|
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrOperation)
|
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrOperation)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+9
@@ -294,4 +294,13 @@ public interface IrOperationOrBuilder extends
|
|||||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall constructor_call = 32;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall constructor_call = 32;</code>
|
||||||
*/
|
*/
|
||||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getConstructorCall();
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getConstructorCall();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression function_expression = 33;</code>
|
||||||
|
*/
|
||||||
|
boolean hasFunctionExpression();
|
||||||
|
/**
|
||||||
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression function_expression = 33;</code>
|
||||||
|
*/
|
||||||
|
org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression getFunctionExpression();
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user