IR ser/deser: IrSimpleFunction.isOperator
This commit is contained in:
@@ -528,6 +528,7 @@ message IrFunction {
|
||||
repeated int32 overridden = 5;
|
||||
//optional UniqId corresponding_property = 7;
|
||||
required bool is_fake_override = 8;
|
||||
required bool is_operator = 9;
|
||||
}
|
||||
|
||||
message IrConstructor {
|
||||
|
||||
+2
-1
@@ -1053,7 +1053,8 @@ abstract class IrFileDeserializer(
|
||||
isTailrec = proto.isTailrec,
|
||||
isSuspend = proto.isSuspend,
|
||||
isExpect = proto.base.isExpect,
|
||||
isFakeOverride = proto.isFakeOverride
|
||||
isFakeOverride = proto.isFakeOverride,
|
||||
isOperator = proto.isOperator
|
||||
)
|
||||
}.apply {
|
||||
proto.overriddenList.mapTo(overriddenSymbols) { deserializeIrSymbol(it) as IrSimpleFunctionSymbol }
|
||||
|
||||
+1
@@ -1070,6 +1070,7 @@ open class IrFileSerializer(
|
||||
.setIsTailrec(declaration.isTailrec)
|
||||
.setIsSuspend(declaration.isSuspend)
|
||||
.setIsFakeOverride(declaration.isFakeOverride)
|
||||
.setIsOperator(declaration.isOperator)
|
||||
|
||||
declaration.overriddenSymbols.forEach {
|
||||
proto.addOverridden(serializeIrSymbol(it))
|
||||
|
||||
+77
@@ -114,6 +114,11 @@ public final class IrFunction extends
|
||||
isFakeOverride_ = input.readBool();
|
||||
break;
|
||||
}
|
||||
case 72: {
|
||||
bitField0_ |= 0x00000020;
|
||||
isOperator_ = input.readBool();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||
@@ -256,6 +261,21 @@ public final class IrFunction extends
|
||||
return isFakeOverride_;
|
||||
}
|
||||
|
||||
public static final int IS_OPERATOR_FIELD_NUMBER = 9;
|
||||
private boolean isOperator_;
|
||||
/**
|
||||
* <code>required bool is_operator = 9;</code>
|
||||
*/
|
||||
public boolean hasIsOperator() {
|
||||
return ((bitField0_ & 0x00000020) == 0x00000020);
|
||||
}
|
||||
/**
|
||||
* <code>required bool is_operator = 9;</code>
|
||||
*/
|
||||
public boolean getIsOperator() {
|
||||
return isOperator_;
|
||||
}
|
||||
|
||||
private void initFields() {
|
||||
base_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionBase.getDefaultInstance();
|
||||
modality_ = org.jetbrains.kotlin.backend.common.serialization.proto.ModalityKind.FINAL_MODALITY;
|
||||
@@ -263,6 +283,7 @@ public final class IrFunction extends
|
||||
isSuspend_ = false;
|
||||
overridden_ = java.util.Collections.emptyList();
|
||||
isFakeOverride_ = false;
|
||||
isOperator_ = false;
|
||||
}
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
@@ -290,6 +311,10 @@ public final class IrFunction extends
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
}
|
||||
if (!hasIsOperator()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
}
|
||||
if (!getBase().isInitialized()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
@@ -319,6 +344,9 @@ public final class IrFunction extends
|
||||
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
||||
output.writeBool(8, isFakeOverride_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000020) == 0x00000020)) {
|
||||
output.writeBool(9, isOperator_);
|
||||
}
|
||||
output.writeRawBytes(unknownFields);
|
||||
}
|
||||
|
||||
@@ -357,6 +385,10 @@ public final class IrFunction extends
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeBoolSize(8, isFakeOverride_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000020) == 0x00000020)) {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeBoolSize(9, isOperator_);
|
||||
}
|
||||
size += unknownFields.size();
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
@@ -463,6 +495,8 @@ public final class IrFunction extends
|
||||
bitField0_ = (bitField0_ & ~0x00000010);
|
||||
isFakeOverride_ = false;
|
||||
bitField0_ = (bitField0_ & ~0x00000020);
|
||||
isOperator_ = false;
|
||||
bitField0_ = (bitField0_ & ~0x00000040);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -511,6 +545,10 @@ public final class IrFunction extends
|
||||
to_bitField0_ |= 0x00000010;
|
||||
}
|
||||
result.isFakeOverride_ = isFakeOverride_;
|
||||
if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
|
||||
to_bitField0_ |= 0x00000020;
|
||||
}
|
||||
result.isOperator_ = isOperator_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
return result;
|
||||
}
|
||||
@@ -542,6 +580,9 @@ public final class IrFunction extends
|
||||
if (other.hasIsFakeOverride()) {
|
||||
setIsFakeOverride(other.getIsFakeOverride());
|
||||
}
|
||||
if (other.hasIsOperator()) {
|
||||
setIsOperator(other.getIsOperator());
|
||||
}
|
||||
setUnknownFields(
|
||||
getUnknownFields().concat(other.unknownFields));
|
||||
return this;
|
||||
@@ -568,6 +609,10 @@ public final class IrFunction extends
|
||||
|
||||
return false;
|
||||
}
|
||||
if (!hasIsOperator()) {
|
||||
|
||||
return false;
|
||||
}
|
||||
if (!getBase().isInitialized()) {
|
||||
|
||||
return false;
|
||||
@@ -867,6 +912,38 @@ public final class IrFunction extends
|
||||
return this;
|
||||
}
|
||||
|
||||
private boolean isOperator_ ;
|
||||
/**
|
||||
* <code>required bool is_operator = 9;</code>
|
||||
*/
|
||||
public boolean hasIsOperator() {
|
||||
return ((bitField0_ & 0x00000040) == 0x00000040);
|
||||
}
|
||||
/**
|
||||
* <code>required bool is_operator = 9;</code>
|
||||
*/
|
||||
public boolean getIsOperator() {
|
||||
return isOperator_;
|
||||
}
|
||||
/**
|
||||
* <code>required bool is_operator = 9;</code>
|
||||
*/
|
||||
public Builder setIsOperator(boolean value) {
|
||||
bitField0_ |= 0x00000040;
|
||||
isOperator_ = value;
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>required bool is_operator = 9;</code>
|
||||
*/
|
||||
public Builder clearIsOperator() {
|
||||
bitField0_ = (bitField0_ & ~0x00000040);
|
||||
isOperator_ = false;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction)
|
||||
}
|
||||
|
||||
|
||||
+9
@@ -72,4 +72,13 @@ public interface IrFunctionOrBuilder extends
|
||||
* </pre>
|
||||
*/
|
||||
boolean getIsFakeOverride();
|
||||
|
||||
/**
|
||||
* <code>required bool is_operator = 9;</code>
|
||||
*/
|
||||
boolean hasIsOperator();
|
||||
/**
|
||||
* <code>required bool is_operator = 9;</code>
|
||||
*/
|
||||
boolean getIsOperator();
|
||||
}
|
||||
Reference in New Issue
Block a user