IR: 'fun interface' support
This commit is contained in:
@@ -648,6 +648,7 @@ message IrClass {
|
||||
required IrDeclarationContainer declaration_container = 13;
|
||||
repeated int32 super_type = 14;
|
||||
required bool is_expect = 15;
|
||||
required bool is_fun = 16;
|
||||
}
|
||||
|
||||
message IrTypeAlias {
|
||||
|
||||
+2
-1
@@ -980,7 +980,8 @@ abstract class IrFileDeserializer(
|
||||
isData = proto.isData,
|
||||
isExternal = proto.isExternal,
|
||||
isInline = proto.isInline,
|
||||
isExpect = proto.isExpect
|
||||
isExpect = proto.isExpect,
|
||||
isFun = proto.isFun
|
||||
)
|
||||
}.usingParent {
|
||||
proto.declarationContainer.declarationList.mapTo(declarations) { deserializeDeclaration(it) }
|
||||
|
||||
+1
@@ -1198,6 +1198,7 @@ open class IrFileSerializer(
|
||||
.setIsExternal(clazz.isExternal)
|
||||
.setIsInline(clazz.isInline)
|
||||
.setIsExpect(clazz.isExpect)
|
||||
.setIsFun(clazz.isFun)
|
||||
.setTypeParameters(serializeIrTypeParameterContainer(clazz.typeParameters))
|
||||
.setDeclarationContainer(serializeIrDeclarationContainer(clazz.declarations))
|
||||
clazz.superTypes.forEach {
|
||||
|
||||
+77
@@ -198,6 +198,11 @@ public final class IrClass extends
|
||||
isExpect_ = input.readBool();
|
||||
break;
|
||||
}
|
||||
case 128: {
|
||||
bitField0_ |= 0x00004000;
|
||||
isFun_ = input.readBool();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||
@@ -475,6 +480,21 @@ public final class IrClass extends
|
||||
return isExpect_;
|
||||
}
|
||||
|
||||
public static final int IS_FUN_FIELD_NUMBER = 16;
|
||||
private boolean isFun_;
|
||||
/**
|
||||
* <code>required bool is_fun = 16;</code>
|
||||
*/
|
||||
public boolean hasIsFun() {
|
||||
return ((bitField0_ & 0x00004000) == 0x00004000);
|
||||
}
|
||||
/**
|
||||
* <code>required bool is_fun = 16;</code>
|
||||
*/
|
||||
public boolean getIsFun() {
|
||||
return isFun_;
|
||||
}
|
||||
|
||||
private void initFields() {
|
||||
base_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclarationBase.getDefaultInstance();
|
||||
name_ = 0;
|
||||
@@ -491,6 +511,7 @@ public final class IrClass extends
|
||||
declarationContainer_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclarationContainer.getDefaultInstance();
|
||||
superType_ = java.util.Collections.emptyList();
|
||||
isExpect_ = false;
|
||||
isFun_ = false;
|
||||
}
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
@@ -550,6 +571,10 @@ public final class IrClass extends
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
}
|
||||
if (!hasIsFun()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
}
|
||||
if (!getBase().isInitialized()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
@@ -624,6 +649,9 @@ public final class IrClass extends
|
||||
if (((bitField0_ & 0x00002000) == 0x00002000)) {
|
||||
output.writeBool(15, isExpect_);
|
||||
}
|
||||
if (((bitField0_ & 0x00004000) == 0x00004000)) {
|
||||
output.writeBool(16, isFun_);
|
||||
}
|
||||
output.writeRawBytes(unknownFields);
|
||||
}
|
||||
|
||||
@@ -698,6 +726,10 @@ public final class IrClass extends
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeBoolSize(15, isExpect_);
|
||||
}
|
||||
if (((bitField0_ & 0x00004000) == 0x00004000)) {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeBoolSize(16, isFun_);
|
||||
}
|
||||
size += unknownFields.size();
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
@@ -822,6 +854,8 @@ public final class IrClass extends
|
||||
bitField0_ = (bitField0_ & ~0x00002000);
|
||||
isExpect_ = false;
|
||||
bitField0_ = (bitField0_ & ~0x00004000);
|
||||
isFun_ = false;
|
||||
bitField0_ = (bitField0_ & ~0x00008000);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -906,6 +940,10 @@ public final class IrClass extends
|
||||
to_bitField0_ |= 0x00002000;
|
||||
}
|
||||
result.isExpect_ = isExpect_;
|
||||
if (((from_bitField0_ & 0x00008000) == 0x00008000)) {
|
||||
to_bitField0_ |= 0x00004000;
|
||||
}
|
||||
result.isFun_ = isFun_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
return result;
|
||||
}
|
||||
@@ -964,6 +1002,9 @@ public final class IrClass extends
|
||||
if (other.hasIsExpect()) {
|
||||
setIsExpect(other.getIsExpect());
|
||||
}
|
||||
if (other.hasIsFun()) {
|
||||
setIsFun(other.getIsFun());
|
||||
}
|
||||
setUnknownFields(
|
||||
getUnknownFields().concat(other.unknownFields));
|
||||
return this;
|
||||
@@ -1022,6 +1063,10 @@ public final class IrClass extends
|
||||
|
||||
return false;
|
||||
}
|
||||
if (!hasIsFun()) {
|
||||
|
||||
return false;
|
||||
}
|
||||
if (!getBase().isInitialized()) {
|
||||
|
||||
return false;
|
||||
@@ -1742,6 +1787,38 @@ public final class IrClass extends
|
||||
return this;
|
||||
}
|
||||
|
||||
private boolean isFun_ ;
|
||||
/**
|
||||
* <code>required bool is_fun = 16;</code>
|
||||
*/
|
||||
public boolean hasIsFun() {
|
||||
return ((bitField0_ & 0x00008000) == 0x00008000);
|
||||
}
|
||||
/**
|
||||
* <code>required bool is_fun = 16;</code>
|
||||
*/
|
||||
public boolean getIsFun() {
|
||||
return isFun_;
|
||||
}
|
||||
/**
|
||||
* <code>required bool is_fun = 16;</code>
|
||||
*/
|
||||
public Builder setIsFun(boolean value) {
|
||||
bitField0_ |= 0x00008000;
|
||||
isFun_ = value;
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>required bool is_fun = 16;</code>
|
||||
*/
|
||||
public Builder clearIsFun() {
|
||||
bitField0_ = (bitField0_ & ~0x00008000);
|
||||
isFun_ = false;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrClass)
|
||||
}
|
||||
|
||||
|
||||
+9
@@ -153,4 +153,13 @@ public interface IrClassOrBuilder extends
|
||||
* <code>required bool is_expect = 15;</code>
|
||||
*/
|
||||
boolean getIsExpect();
|
||||
|
||||
/**
|
||||
* <code>required bool is_fun = 16;</code>
|
||||
*/
|
||||
boolean hasIsFun();
|
||||
/**
|
||||
* <code>required bool is_fun = 16;</code>
|
||||
*/
|
||||
boolean getIsFun();
|
||||
}
|
||||
Reference in New Issue
Block a user