[KLIB] Add IrStatementOrigin into IrConstructorCall message
This commit is contained in:
committed by
teamcityserver
parent
16ea3d9ae9
commit
2f772c7a7c
@@ -125,6 +125,7 @@ message IrConstructorCall {
|
||||
required int64 symbol = 1;
|
||||
required int32 constructor_type_arguments_count = 2;
|
||||
required MemberAccessCommon member_access = 3;
|
||||
optional int32 origin_name = 4;
|
||||
}
|
||||
|
||||
message IrFunctionReference {
|
||||
|
||||
+2
-1
@@ -245,7 +245,8 @@ class IrBodyDeserializer(
|
||||
start, end, type,
|
||||
symbol, typeArgumentsCount = proto.memberAccess.typeArgumentCount,
|
||||
constructorTypeArgumentsCount = proto.constructorTypeArgumentsCount,
|
||||
valueArgumentsCount = proto.memberAccess.valueArgumentCount
|
||||
valueArgumentsCount = proto.memberAccess.valueArgumentCount,
|
||||
origin = if (proto.hasOriginName()) deserializeIrStatementOrigin(proto.originName) else null
|
||||
).also {
|
||||
deserializeMemberAccessCommon(it, proto.memberAccess)
|
||||
}
|
||||
|
||||
+3
@@ -526,6 +526,9 @@ open class IrFileSerializer(
|
||||
symbol = serializeIrSymbol(call.symbol)
|
||||
constructorTypeArgumentsCount = call.constructorTypeArgumentsCount
|
||||
memberAccess = serializeMemberAccessCommon(call)
|
||||
call.origin?.let {
|
||||
originName = serializeIrStatementOrigin(it)
|
||||
}
|
||||
}.build()
|
||||
|
||||
private fun serializeFunctionExpression(functionExpression: IrFunctionExpression): ProtoFunctionExpression =
|
||||
|
||||
+69
@@ -76,6 +76,11 @@ public final class IrConstructorCall extends
|
||||
bitField0_ |= 0x00000004;
|
||||
break;
|
||||
}
|
||||
case 32: {
|
||||
bitField0_ |= 0x00000008;
|
||||
originName_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||
@@ -155,10 +160,26 @@ public final class IrConstructorCall extends
|
||||
return memberAccess_;
|
||||
}
|
||||
|
||||
public static final int ORIGIN_NAME_FIELD_NUMBER = 4;
|
||||
private int originName_;
|
||||
/**
|
||||
* <code>optional int32 origin_name = 4;</code>
|
||||
*/
|
||||
public boolean hasOriginName() {
|
||||
return ((bitField0_ & 0x00000008) == 0x00000008);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 origin_name = 4;</code>
|
||||
*/
|
||||
public int getOriginName() {
|
||||
return originName_;
|
||||
}
|
||||
|
||||
private void initFields() {
|
||||
symbol_ = 0L;
|
||||
constructorTypeArgumentsCount_ = 0;
|
||||
memberAccess_ = org.jetbrains.kotlin.backend.common.serialization.proto.MemberAccessCommon.getDefaultInstance();
|
||||
originName_ = 0;
|
||||
}
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
@@ -198,6 +219,9 @@ public final class IrConstructorCall extends
|
||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||
output.writeMessage(3, memberAccess_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||
output.writeInt32(4, originName_);
|
||||
}
|
||||
output.writeRawBytes(unknownFields);
|
||||
}
|
||||
|
||||
@@ -219,6 +243,10 @@ public final class IrConstructorCall extends
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeMessageSize(3, memberAccess_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeInt32Size(4, originName_);
|
||||
}
|
||||
size += unknownFields.size();
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
@@ -319,6 +347,8 @@ public final class IrConstructorCall extends
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
memberAccess_ = org.jetbrains.kotlin.backend.common.serialization.proto.MemberAccessCommon.getDefaultInstance();
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
originName_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000008);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -354,6 +384,10 @@ public final class IrConstructorCall extends
|
||||
to_bitField0_ |= 0x00000004;
|
||||
}
|
||||
result.memberAccess_ = memberAccess_;
|
||||
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
|
||||
to_bitField0_ |= 0x00000008;
|
||||
}
|
||||
result.originName_ = originName_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
return result;
|
||||
}
|
||||
@@ -369,6 +403,9 @@ public final class IrConstructorCall extends
|
||||
if (other.hasMemberAccess()) {
|
||||
mergeMemberAccess(other.getMemberAccess());
|
||||
}
|
||||
if (other.hasOriginName()) {
|
||||
setOriginName(other.getOriginName());
|
||||
}
|
||||
setUnknownFields(
|
||||
getUnknownFields().concat(other.unknownFields));
|
||||
return this;
|
||||
@@ -537,6 +574,38 @@ public final class IrConstructorCall extends
|
||||
return this;
|
||||
}
|
||||
|
||||
private int originName_ ;
|
||||
/**
|
||||
* <code>optional int32 origin_name = 4;</code>
|
||||
*/
|
||||
public boolean hasOriginName() {
|
||||
return ((bitField0_ & 0x00000008) == 0x00000008);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 origin_name = 4;</code>
|
||||
*/
|
||||
public int getOriginName() {
|
||||
return originName_;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 origin_name = 4;</code>
|
||||
*/
|
||||
public Builder setOriginName(int value) {
|
||||
bitField0_ |= 0x00000008;
|
||||
originName_ = value;
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 origin_name = 4;</code>
|
||||
*/
|
||||
public Builder clearOriginName() {
|
||||
bitField0_ = (bitField0_ & ~0x00000008);
|
||||
originName_ = 0;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall)
|
||||
}
|
||||
|
||||
|
||||
+9
@@ -33,4 +33,13 @@ public interface IrConstructorCallOrBuilder extends
|
||||
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.MemberAccessCommon member_access = 3;</code>
|
||||
*/
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.MemberAccessCommon getMemberAccess();
|
||||
|
||||
/**
|
||||
* <code>optional int32 origin_name = 4;</code>
|
||||
*/
|
||||
boolean hasOriginName();
|
||||
/**
|
||||
* <code>optional int32 origin_name = 4;</code>
|
||||
*/
|
||||
int getOriginName();
|
||||
}
|
||||
Reference in New Issue
Block a user