Drop old JVM binary format extensions: static in outer, impl class name

This commit is contained in:
Alexander Udalov
2015-12-23 23:22:55 +03:00
parent fc74759231
commit dc6a176282
12 changed files with 62 additions and 485 deletions
@@ -76,10 +76,6 @@ message JvmFieldSignature {
// JVM descriptor of the field type, e.g. 'Ljava/lang/String;'
optional int32 desc = 2 [(string_id_in_table) = true];
// True iff this field is a backing field for a companion object and is really present as a static
// field in the outer class, not as an instance field here
optional bool is_static_in_outer = 3 [default = false];
}
message JvmPropertySignature {
@@ -98,20 +94,10 @@ extend Constructor {
extend Function {
optional JvmMethodSignature method_signature = 100;
// Package-less name of the class with the callable's body and annotations, if it differs from the class it's serialized into.
// E.g. for a class "A/B/C$D" this would be "C$D".
// This is needed to find the class to load annotations from in the following cases:
// 1) annotations on top-level members are written to compiled package part classes
// 2) annotations on properties in traits are written to TImpl classes
optional int32 method_impl_class_name = 101 [(string_id_in_table) = true];
}
extend Property {
optional JvmPropertySignature property_signature = 100;
// see Function#method_impl_class_name
optional int32 property_impl_class_name = 101 [(string_id_in_table) = true];
}
extend Type {
@@ -9,9 +9,7 @@ public final class JvmProtoBuf {
com.google.protobuf.ExtensionRegistryLite registry) {
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.constructorSignature);
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.methodSignature);
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.methodImplClassName);
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.propertySignature);
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.propertyImplClassName);
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.typeAnnotation);
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.isRaw);
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.typeParameterAnnotation);
@@ -2538,26 +2536,6 @@ public final class JvmProtoBuf {
* </pre>
*/
int getDesc();
// optional bool is_static_in_outer = 3 [default = false];
/**
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
*
* <pre>
* True iff this field is a backing field for a companion object and is really present as a static
* field in the outer class, not as an instance field here
* </pre>
*/
boolean hasIsStaticInOuter();
/**
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
*
* <pre>
* True iff this field is a backing field for a companion object and is really present as a static
* field in the outer class, not as an instance field here
* </pre>
*/
boolean getIsStaticInOuter();
}
/**
* Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature}
@@ -2612,11 +2590,6 @@ public final class JvmProtoBuf {
desc_ = input.readInt32();
break;
}
case 24: {
bitField0_ |= 0x00000004;
isStaticInOuter_ = input.readBool();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -2684,36 +2657,9 @@ public final class JvmProtoBuf {
return desc_;
}
// optional bool is_static_in_outer = 3 [default = false];
public static final int IS_STATIC_IN_OUTER_FIELD_NUMBER = 3;
private boolean isStaticInOuter_;
/**
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
*
* <pre>
* True iff this field is a backing field for a companion object and is really present as a static
* field in the outer class, not as an instance field here
* </pre>
*/
public boolean hasIsStaticInOuter() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
*
* <pre>
* True iff this field is a backing field for a companion object and is really present as a static
* field in the outer class, not as an instance field here
* </pre>
*/
public boolean getIsStaticInOuter() {
return isStaticInOuter_;
}
private void initFields() {
name_ = 0;
desc_ = 0;
isStaticInOuter_ = false;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
@@ -2733,9 +2679,6 @@ public final class JvmProtoBuf {
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(2, desc_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeBool(3, isStaticInOuter_);
}
}
private int memoizedSerializedSize = -1;
@@ -2752,10 +2695,6 @@ public final class JvmProtoBuf {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, desc_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, isStaticInOuter_);
}
memoizedSerializedSize = size;
return size;
}
@@ -2851,8 +2790,6 @@ public final class JvmProtoBuf {
bitField0_ = (bitField0_ & ~0x00000001);
desc_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
isStaticInOuter_ = false;
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@@ -2884,10 +2821,6 @@ public final class JvmProtoBuf {
to_bitField0_ |= 0x00000002;
}
result.desc_ = desc_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004;
}
result.isStaticInOuter_ = isStaticInOuter_;
result.bitField0_ = to_bitField0_;
return result;
}
@@ -2900,9 +2833,6 @@ public final class JvmProtoBuf {
if (other.hasDesc()) {
setDesc(other.getDesc());
}
if (other.hasIsStaticInOuter()) {
setIsStaticInOuter(other.getIsStaticInOuter());
}
return this;
}
@@ -3011,59 +2941,6 @@ public final class JvmProtoBuf {
return this;
}
// optional bool is_static_in_outer = 3 [default = false];
private boolean isStaticInOuter_ ;
/**
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
*
* <pre>
* True iff this field is a backing field for a companion object and is really present as a static
* field in the outer class, not as an instance field here
* </pre>
*/
public boolean hasIsStaticInOuter() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
*
* <pre>
* True iff this field is a backing field for a companion object and is really present as a static
* field in the outer class, not as an instance field here
* </pre>
*/
public boolean getIsStaticInOuter() {
return isStaticInOuter_;
}
/**
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
*
* <pre>
* True iff this field is a backing field for a companion object and is really present as a static
* field in the outer class, not as an instance field here
* </pre>
*/
public Builder setIsStaticInOuter(boolean value) {
bitField0_ |= 0x00000004;
isStaticInOuter_ = value;
return this;
}
/**
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
*
* <pre>
* True iff this field is a backing field for a companion object and is really present as a static
* field in the outer class, not as an instance field here
* </pre>
*/
public Builder clearIsStaticInOuter() {
bitField0_ = (bitField0_ & ~0x00000004);
isStaticInOuter_ = false;
return this;
}
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature)
}
@@ -3865,21 +3742,6 @@ public final class JvmProtoBuf {
null,
100,
com.google.protobuf.WireFormat.FieldType.MESSAGE);
public static final int METHOD_IMPL_CLASS_NAME_FIELD_NUMBER = 101;
/**
* <code>extend .org.jetbrains.kotlin.serialization.Function { ... }</code>
*/
public static final
com.google.protobuf.GeneratedMessageLite.GeneratedExtension<
org.jetbrains.kotlin.serialization.ProtoBuf.Function,
java.lang.Integer> methodImplClassName = com.google.protobuf.GeneratedMessageLite
.newSingularGeneratedExtension(
org.jetbrains.kotlin.serialization.ProtoBuf.Function.getDefaultInstance(),
0,
null,
null,
101,
com.google.protobuf.WireFormat.FieldType.INT32);
public static final int PROPERTY_SIGNATURE_FIELD_NUMBER = 100;
/**
* <code>extend .org.jetbrains.kotlin.serialization.Property { ... }</code>
@@ -3895,21 +3757,6 @@ public final class JvmProtoBuf {
null,
100,
com.google.protobuf.WireFormat.FieldType.MESSAGE);
public static final int PROPERTY_IMPL_CLASS_NAME_FIELD_NUMBER = 101;
/**
* <code>extend .org.jetbrains.kotlin.serialization.Property { ... }</code>
*/
public static final
com.google.protobuf.GeneratedMessageLite.GeneratedExtension<
org.jetbrains.kotlin.serialization.ProtoBuf.Property,
java.lang.Integer> propertyImplClassName = com.google.protobuf.GeneratedMessageLite
.newSingularGeneratedExtension(
org.jetbrains.kotlin.serialization.ProtoBuf.Property.getDefaultInstance(),
0,
null,
null,
101,
com.google.protobuf.WireFormat.FieldType.INT32);
public static final int TYPE_ANNOTATION_FIELD_NUMBER = 100;
/**
* <code>extend .org.jetbrains.kotlin.serialization.Type { ... }</code>