Do not write old callable proto flags, use only new ones

This commit is contained in:
Alexander Udalov
2016-01-19 20:29:03 +03:00
parent 300a4be060
commit 0b7d2e3a68
8 changed files with 293 additions and 299 deletions
@@ -185,9 +185,9 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
if (old.flags != new.flags) return false if (old.flags != new.flags) return false
} }
if (old.hasNewFlags() != new.hasNewFlags()) return false if (old.hasOldFlags() != new.hasOldFlags()) return false
if (old.hasNewFlags()) { if (old.hasOldFlags()) {
if (old.newFlags != new.newFlags) return false if (old.oldFlags != new.oldFlags) return false
} }
if (!checkStringEquals(old.name, new.name)) return false if (!checkStringEquals(old.name, new.name)) return false
@@ -235,9 +235,9 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
if (old.flags != new.flags) return false if (old.flags != new.flags) return false
} }
if (old.hasNewFlags() != new.hasNewFlags()) return false if (old.hasOldFlags() != new.hasOldFlags()) return false
if (old.hasNewFlags()) { if (old.hasOldFlags()) {
if (old.newFlags != new.newFlags) return false if (old.oldFlags != new.oldFlags) return false
} }
if (!checkStringEquals(old.name, new.name)) return false if (!checkStringEquals(old.name, new.name)) return false
@@ -893,8 +893,8 @@ fun ProtoBuf.Function.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int)
hashCode = 31 * hashCode + flags hashCode = 31 * hashCode + flags
} }
if (hasNewFlags()) { if (hasOldFlags()) {
hashCode = 31 * hashCode + newFlags hashCode = 31 * hashCode + oldFlags
} }
hashCode = 31 * hashCode + stringIndexes(name) hashCode = 31 * hashCode + stringIndexes(name)
@@ -941,8 +941,8 @@ fun ProtoBuf.Property.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int)
hashCode = 31 * hashCode + flags hashCode = 31 * hashCode + flags
} }
if (hasNewFlags()) { if (hasOldFlags()) {
hashCode = 31 * hashCode + newFlags hashCode = 31 * hashCode + oldFlags
} }
hashCode = 31 * hashCode + stringIndexes(name) hashCode = 31 * hashCode + stringIndexes(name)
@@ -877,7 +877,7 @@ public class DescriptorResolver {
return setterDescriptor; return setterDescriptor;
} }
@Nullable @NotNull
private PropertyGetterDescriptorImpl resolvePropertyGetterDescriptor( private PropertyGetterDescriptorImpl resolvePropertyGetterDescriptor(
@NotNull LexicalScope scopeWithTypeParameters, @NotNull LexicalScope scopeWithTypeParameters,
@NotNull KtProperty property, @NotNull KtProperty property,
@@ -252,10 +252,6 @@ public class DescriptorSerializer {
if (flags != builder.getFlags()) { if (flags != builder.getFlags()) {
builder.setFlags(flags); builder.setFlags(flags);
} }
int newFlags = (flags & 0x3f) + ((flags >> 2) & ~0x3f);
if (newFlags != builder.getNewFlags()) {
builder.setNewFlags(newFlags);
}
builder.setName(getSimpleNameIndex(descriptor.getName())); builder.setName(getSimpleNameIndex(descriptor.getName()));
@@ -299,10 +295,6 @@ public class DescriptorSerializer {
if (flags != builder.getFlags()) { if (flags != builder.getFlags()) {
builder.setFlags(flags); builder.setFlags(flags);
} }
int newFlags = (flags & 0x3f) + ((flags >> 2) & ~0x3f);
if (newFlags != builder.getNewFlags()) {
builder.setNewFlags(newFlags);
}
builder.setName(getSimpleNameIndex(descriptor.getName())); builder.setName(getSimpleNameIndex(descriptor.getName()));
@@ -15800,9 +15800,9 @@ public final class DebugProtoBuf {
com.google.protobuf.GeneratedMessage. com.google.protobuf.GeneratedMessage.
ExtendableMessageOrBuilder<Function> { ExtendableMessageOrBuilder<Function> {
// optional int32 flags = 1 [default = 6]; // optional int32 flags = 9 [default = 6];
/** /**
* <code>optional int32 flags = 1 [default = 6];</code> * <code>optional int32 flags = 9 [default = 6];</code>
* *
* <pre> * <pre>
* *
@@ -15819,7 +15819,7 @@ public final class DebugProtoBuf {
*/ */
boolean hasFlags(); boolean hasFlags();
/** /**
* <code>optional int32 flags = 1 [default = 6];</code> * <code>optional int32 flags = 9 [default = 6];</code>
* *
* <pre> * <pre>
* *
@@ -15836,15 +15836,15 @@ public final class DebugProtoBuf {
*/ */
int getFlags(); int getFlags();
// optional int32 new_flags = 9 [default = 6]; // optional int32 old_flags = 1 [default = 6];
/** /**
* <code>optional int32 new_flags = 9 [default = 6];</code> * <code>optional int32 old_flags = 1 [default = 6];</code>
*/ */
boolean hasNewFlags(); boolean hasOldFlags();
/** /**
* <code>optional int32 new_flags = 9 [default = 6];</code> * <code>optional int32 old_flags = 1 [default = 6];</code>
*/ */
int getNewFlags(); int getOldFlags();
// required int32 name = 2; // required int32 name = 2;
/** /**
@@ -16020,8 +16020,8 @@ public final class DebugProtoBuf {
break; break;
} }
case 8: { case 8: {
bitField0_ |= 0x00000001; bitField0_ |= 0x00000002;
flags_ = input.readInt32(); oldFlags_ = input.readInt32();
break; break;
} }
case 16: { case 16: {
@@ -16082,8 +16082,8 @@ public final class DebugProtoBuf {
break; break;
} }
case 72: { case 72: {
bitField0_ |= 0x00000002; bitField0_ |= 0x00000001;
newFlags_ = input.readInt32(); flags_ = input.readInt32();
break; break;
} }
case 242: { case 242: {
@@ -16145,11 +16145,11 @@ public final class DebugProtoBuf {
} }
private int bitField0_; private int bitField0_;
// optional int32 flags = 1 [default = 6]; // optional int32 flags = 9 [default = 6];
public static final int FLAGS_FIELD_NUMBER = 1; public static final int FLAGS_FIELD_NUMBER = 9;
private int flags_; private int flags_;
/** /**
* <code>optional int32 flags = 1 [default = 6];</code> * <code>optional int32 flags = 9 [default = 6];</code>
* *
* <pre> * <pre>
* *
@@ -16168,7 +16168,7 @@ public final class DebugProtoBuf {
return ((bitField0_ & 0x00000001) == 0x00000001); return ((bitField0_ & 0x00000001) == 0x00000001);
} }
/** /**
* <code>optional int32 flags = 1 [default = 6];</code> * <code>optional int32 flags = 9 [default = 6];</code>
* *
* <pre> * <pre>
* *
@@ -16187,20 +16187,20 @@ public final class DebugProtoBuf {
return flags_; return flags_;
} }
// optional int32 new_flags = 9 [default = 6]; // optional int32 old_flags = 1 [default = 6];
public static final int NEW_FLAGS_FIELD_NUMBER = 9; public static final int OLD_FLAGS_FIELD_NUMBER = 1;
private int newFlags_; private int oldFlags_;
/** /**
* <code>optional int32 new_flags = 9 [default = 6];</code> * <code>optional int32 old_flags = 1 [default = 6];</code>
*/ */
public boolean hasNewFlags() { public boolean hasOldFlags() {
return ((bitField0_ & 0x00000002) == 0x00000002); return ((bitField0_ & 0x00000002) == 0x00000002);
} }
/** /**
* <code>optional int32 new_flags = 9 [default = 6];</code> * <code>optional int32 old_flags = 1 [default = 6];</code>
*/ */
public int getNewFlags() { public int getOldFlags() {
return newFlags_; return oldFlags_;
} }
// required int32 name = 2; // required int32 name = 2;
@@ -16391,7 +16391,7 @@ public final class DebugProtoBuf {
private void initFields() { private void initFields() {
flags_ = 6; flags_ = 6;
newFlags_ = 6; oldFlags_ = 6;
name_ = 0; name_ = 0;
returnType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); returnType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance();
returnTypeId_ = 0; returnTypeId_ = 0;
@@ -16454,8 +16454,8 @@ public final class DebugProtoBuf {
com.google.protobuf.GeneratedMessage com.google.protobuf.GeneratedMessage
.ExtendableMessage<org.jetbrains.kotlin.serialization.DebugProtoBuf.Function>.ExtensionWriter extensionWriter = .ExtendableMessage<org.jetbrains.kotlin.serialization.DebugProtoBuf.Function>.ExtensionWriter extensionWriter =
newExtensionWriter(); newExtensionWriter();
if (((bitField0_ & 0x00000001) == 0x00000001)) { if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(1, flags_); output.writeInt32(1, oldFlags_);
} }
if (((bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeInt32(2, name_); output.writeInt32(2, name_);
@@ -16478,8 +16478,8 @@ public final class DebugProtoBuf {
if (((bitField0_ & 0x00000040) == 0x00000040)) { if (((bitField0_ & 0x00000040) == 0x00000040)) {
output.writeInt32(8, receiverTypeId_); output.writeInt32(8, receiverTypeId_);
} }
if (((bitField0_ & 0x00000002) == 0x00000002)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeInt32(9, newFlags_); output.writeInt32(9, flags_);
} }
if (((bitField0_ & 0x00000080) == 0x00000080)) { if (((bitField0_ & 0x00000080) == 0x00000080)) {
output.writeMessage(30, typeTable_); output.writeMessage(30, typeTable_);
@@ -16494,9 +16494,9 @@ public final class DebugProtoBuf {
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) { if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, flags_); .computeInt32Size(1, oldFlags_);
} }
if (((bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
@@ -16526,9 +16526,9 @@ public final class DebugProtoBuf {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
.computeInt32Size(8, receiverTypeId_); .computeInt32Size(8, receiverTypeId_);
} }
if (((bitField0_ & 0x00000002) == 0x00000002)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
.computeInt32Size(9, newFlags_); .computeInt32Size(9, flags_);
} }
if (((bitField0_ & 0x00000080) == 0x00000080)) { if (((bitField0_ & 0x00000080) == 0x00000080)) {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
@@ -16658,7 +16658,7 @@ public final class DebugProtoBuf {
super.clear(); super.clear();
flags_ = 6; flags_ = 6;
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
newFlags_ = 6; oldFlags_ = 6;
bitField0_ = (bitField0_ & ~0x00000002); bitField0_ = (bitField0_ & ~0x00000002);
name_ = 0; name_ = 0;
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
@@ -16731,7 +16731,7 @@ public final class DebugProtoBuf {
if (((from_bitField0_ & 0x00000002) == 0x00000002)) { if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002; to_bitField0_ |= 0x00000002;
} }
result.newFlags_ = newFlags_; result.oldFlags_ = oldFlags_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) { if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004; to_bitField0_ |= 0x00000004;
} }
@@ -16805,8 +16805,8 @@ public final class DebugProtoBuf {
if (other.hasFlags()) { if (other.hasFlags()) {
setFlags(other.getFlags()); setFlags(other.getFlags());
} }
if (other.hasNewFlags()) { if (other.hasOldFlags()) {
setNewFlags(other.getNewFlags()); setOldFlags(other.getOldFlags());
} }
if (other.hasName()) { if (other.hasName()) {
setName(other.getName()); setName(other.getName());
@@ -16944,10 +16944,10 @@ public final class DebugProtoBuf {
} }
private int bitField0_; private int bitField0_;
// optional int32 flags = 1 [default = 6]; // optional int32 flags = 9 [default = 6];
private int flags_ = 6; private int flags_ = 6;
/** /**
* <code>optional int32 flags = 1 [default = 6];</code> * <code>optional int32 flags = 9 [default = 6];</code>
* *
* <pre> * <pre>
* *
@@ -16966,7 +16966,7 @@ public final class DebugProtoBuf {
return ((bitField0_ & 0x00000001) == 0x00000001); return ((bitField0_ & 0x00000001) == 0x00000001);
} }
/** /**
* <code>optional int32 flags = 1 [default = 6];</code> * <code>optional int32 flags = 9 [default = 6];</code>
* *
* <pre> * <pre>
* *
@@ -16985,7 +16985,7 @@ public final class DebugProtoBuf {
return flags_; return flags_;
} }
/** /**
* <code>optional int32 flags = 1 [default = 6];</code> * <code>optional int32 flags = 9 [default = 6];</code>
* *
* <pre> * <pre>
* *
@@ -17007,7 +17007,7 @@ public final class DebugProtoBuf {
return this; return this;
} }
/** /**
* <code>optional int32 flags = 1 [default = 6];</code> * <code>optional int32 flags = 9 [default = 6];</code>
* *
* <pre> * <pre>
* *
@@ -17029,35 +17029,35 @@ public final class DebugProtoBuf {
return this; return this;
} }
// optional int32 new_flags = 9 [default = 6]; // optional int32 old_flags = 1 [default = 6];
private int newFlags_ = 6; private int oldFlags_ = 6;
/** /**
* <code>optional int32 new_flags = 9 [default = 6];</code> * <code>optional int32 old_flags = 1 [default = 6];</code>
*/ */
public boolean hasNewFlags() { public boolean hasOldFlags() {
return ((bitField0_ & 0x00000002) == 0x00000002); return ((bitField0_ & 0x00000002) == 0x00000002);
} }
/** /**
* <code>optional int32 new_flags = 9 [default = 6];</code> * <code>optional int32 old_flags = 1 [default = 6];</code>
*/ */
public int getNewFlags() { public int getOldFlags() {
return newFlags_; return oldFlags_;
} }
/** /**
* <code>optional int32 new_flags = 9 [default = 6];</code> * <code>optional int32 old_flags = 1 [default = 6];</code>
*/ */
public Builder setNewFlags(int value) { public Builder setOldFlags(int value) {
bitField0_ |= 0x00000002; bitField0_ |= 0x00000002;
newFlags_ = value; oldFlags_ = value;
onChanged(); onChanged();
return this; return this;
} }
/** /**
* <code>optional int32 new_flags = 9 [default = 6];</code> * <code>optional int32 old_flags = 1 [default = 6];</code>
*/ */
public Builder clearNewFlags() { public Builder clearOldFlags() {
bitField0_ = (bitField0_ & ~0x00000002); bitField0_ = (bitField0_ & ~0x00000002);
newFlags_ = 6; oldFlags_ = 6;
onChanged(); onChanged();
return this; return this;
} }
@@ -18007,9 +18007,9 @@ public final class DebugProtoBuf {
com.google.protobuf.GeneratedMessage. com.google.protobuf.GeneratedMessage.
ExtendableMessageOrBuilder<Property> { ExtendableMessageOrBuilder<Property> {
// optional int32 flags = 1 [default = 262]; // optional int32 flags = 11 [default = 518];
/** /**
* <code>optional int32 flags = 1 [default = 262];</code> * <code>optional int32 flags = 11 [default = 518];</code>
* *
* <pre> * <pre>
* *
@@ -18027,7 +18027,7 @@ public final class DebugProtoBuf {
*/ */
boolean hasFlags(); boolean hasFlags();
/** /**
* <code>optional int32 flags = 1 [default = 262];</code> * <code>optional int32 flags = 11 [default = 518];</code>
* *
* <pre> * <pre>
* *
@@ -18045,15 +18045,15 @@ public final class DebugProtoBuf {
*/ */
int getFlags(); int getFlags();
// optional int32 new_flags = 11 [default = 518]; // optional int32 old_flags = 1 [default = 2054];
/** /**
* <code>optional int32 new_flags = 11 [default = 518];</code> * <code>optional int32 old_flags = 1 [default = 2054];</code>
*/ */
boolean hasNewFlags(); boolean hasOldFlags();
/** /**
* <code>optional int32 new_flags = 11 [default = 518];</code> * <code>optional int32 old_flags = 1 [default = 2054];</code>
*/ */
int getNewFlags(); int getOldFlags();
// required int32 name = 2; // required int32 name = 2;
/** /**
@@ -18242,8 +18242,8 @@ public final class DebugProtoBuf {
break; break;
} }
case 8: { case 8: {
bitField0_ |= 0x00000001; bitField0_ |= 0x00000002;
flags_ = input.readInt32(); oldFlags_ = input.readInt32();
break; break;
} }
case 16: { case 16: {
@@ -18319,8 +18319,8 @@ public final class DebugProtoBuf {
break; break;
} }
case 88: { case 88: {
bitField0_ |= 0x00000002; bitField0_ |= 0x00000001;
newFlags_ = input.readInt32(); flags_ = input.readInt32();
break; break;
} }
} }
@@ -18366,11 +18366,11 @@ public final class DebugProtoBuf {
} }
private int bitField0_; private int bitField0_;
// optional int32 flags = 1 [default = 262]; // optional int32 flags = 11 [default = 518];
public static final int FLAGS_FIELD_NUMBER = 1; public static final int FLAGS_FIELD_NUMBER = 11;
private int flags_; private int flags_;
/** /**
* <code>optional int32 flags = 1 [default = 262];</code> * <code>optional int32 flags = 11 [default = 518];</code>
* *
* <pre> * <pre>
* *
@@ -18390,7 +18390,7 @@ public final class DebugProtoBuf {
return ((bitField0_ & 0x00000001) == 0x00000001); return ((bitField0_ & 0x00000001) == 0x00000001);
} }
/** /**
* <code>optional int32 flags = 1 [default = 262];</code> * <code>optional int32 flags = 11 [default = 518];</code>
* *
* <pre> * <pre>
* *
@@ -18410,20 +18410,20 @@ public final class DebugProtoBuf {
return flags_; return flags_;
} }
// optional int32 new_flags = 11 [default = 518]; // optional int32 old_flags = 1 [default = 2054];
public static final int NEW_FLAGS_FIELD_NUMBER = 11; public static final int OLD_FLAGS_FIELD_NUMBER = 1;
private int newFlags_; private int oldFlags_;
/** /**
* <code>optional int32 new_flags = 11 [default = 518];</code> * <code>optional int32 old_flags = 1 [default = 2054];</code>
*/ */
public boolean hasNewFlags() { public boolean hasOldFlags() {
return ((bitField0_ & 0x00000002) == 0x00000002); return ((bitField0_ & 0x00000002) == 0x00000002);
} }
/** /**
* <code>optional int32 new_flags = 11 [default = 518];</code> * <code>optional int32 old_flags = 1 [default = 2054];</code>
*/ */
public int getNewFlags() { public int getOldFlags() {
return newFlags_; return oldFlags_;
} }
// required int32 name = 2; // required int32 name = 2;
@@ -18627,8 +18627,8 @@ public final class DebugProtoBuf {
} }
private void initFields() { private void initFields() {
flags_ = 262; flags_ = 518;
newFlags_ = 518; oldFlags_ = 2054;
name_ = 0; name_ = 0;
returnType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); returnType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance();
returnTypeId_ = 0; returnTypeId_ = 0;
@@ -18686,8 +18686,8 @@ public final class DebugProtoBuf {
com.google.protobuf.GeneratedMessage com.google.protobuf.GeneratedMessage
.ExtendableMessage<org.jetbrains.kotlin.serialization.DebugProtoBuf.Property>.ExtensionWriter extensionWriter = .ExtendableMessage<org.jetbrains.kotlin.serialization.DebugProtoBuf.Property>.ExtensionWriter extensionWriter =
newExtensionWriter(); newExtensionWriter();
if (((bitField0_ & 0x00000001) == 0x00000001)) { if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(1, flags_); output.writeInt32(1, oldFlags_);
} }
if (((bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeInt32(2, name_); output.writeInt32(2, name_);
@@ -18716,8 +18716,8 @@ public final class DebugProtoBuf {
if (((bitField0_ & 0x00000040) == 0x00000040)) { if (((bitField0_ & 0x00000040) == 0x00000040)) {
output.writeInt32(10, receiverTypeId_); output.writeInt32(10, receiverTypeId_);
} }
if (((bitField0_ & 0x00000002) == 0x00000002)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeInt32(11, newFlags_); output.writeInt32(11, flags_);
} }
extensionWriter.writeUntil(200, output); extensionWriter.writeUntil(200, output);
getUnknownFields().writeTo(output); getUnknownFields().writeTo(output);
@@ -18729,9 +18729,9 @@ public final class DebugProtoBuf {
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) { if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, flags_); .computeInt32Size(1, oldFlags_);
} }
if (((bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
@@ -18769,9 +18769,9 @@ public final class DebugProtoBuf {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
.computeInt32Size(10, receiverTypeId_); .computeInt32Size(10, receiverTypeId_);
} }
if (((bitField0_ & 0x00000002) == 0x00000002)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
.computeInt32Size(11, newFlags_); .computeInt32Size(11, flags_);
} }
size += extensionsSerializedSize(); size += extensionsSerializedSize();
size += getUnknownFields().getSerializedSize(); size += getUnknownFields().getSerializedSize();
@@ -18894,9 +18894,9 @@ public final class DebugProtoBuf {
public Builder clear() { public Builder clear() {
super.clear(); super.clear();
flags_ = 262; flags_ = 518;
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
newFlags_ = 518; oldFlags_ = 2054;
bitField0_ = (bitField0_ & ~0x00000002); bitField0_ = (bitField0_ & ~0x00000002);
name_ = 0; name_ = 0;
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
@@ -18967,7 +18967,7 @@ public final class DebugProtoBuf {
if (((from_bitField0_ & 0x00000002) == 0x00000002)) { if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002; to_bitField0_ |= 0x00000002;
} }
result.newFlags_ = newFlags_; result.oldFlags_ = oldFlags_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) { if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004; to_bitField0_ |= 0x00000004;
} }
@@ -19040,8 +19040,8 @@ public final class DebugProtoBuf {
if (other.hasFlags()) { if (other.hasFlags()) {
setFlags(other.getFlags()); setFlags(other.getFlags());
} }
if (other.hasNewFlags()) { if (other.hasOldFlags()) {
setNewFlags(other.getNewFlags()); setOldFlags(other.getOldFlags());
} }
if (other.hasName()) { if (other.hasName()) {
setName(other.getName()); setName(other.getName());
@@ -19153,10 +19153,10 @@ public final class DebugProtoBuf {
} }
private int bitField0_; private int bitField0_;
// optional int32 flags = 1 [default = 262]; // optional int32 flags = 11 [default = 518];
private int flags_ = 262; private int flags_ = 518;
/** /**
* <code>optional int32 flags = 1 [default = 262];</code> * <code>optional int32 flags = 11 [default = 518];</code>
* *
* <pre> * <pre>
* *
@@ -19176,7 +19176,7 @@ public final class DebugProtoBuf {
return ((bitField0_ & 0x00000001) == 0x00000001); return ((bitField0_ & 0x00000001) == 0x00000001);
} }
/** /**
* <code>optional int32 flags = 1 [default = 262];</code> * <code>optional int32 flags = 11 [default = 518];</code>
* *
* <pre> * <pre>
* *
@@ -19196,7 +19196,7 @@ public final class DebugProtoBuf {
return flags_; return flags_;
} }
/** /**
* <code>optional int32 flags = 1 [default = 262];</code> * <code>optional int32 flags = 11 [default = 518];</code>
* *
* <pre> * <pre>
* *
@@ -19219,7 +19219,7 @@ public final class DebugProtoBuf {
return this; return this;
} }
/** /**
* <code>optional int32 flags = 1 [default = 262];</code> * <code>optional int32 flags = 11 [default = 518];</code>
* *
* <pre> * <pre>
* *
@@ -19237,40 +19237,40 @@ public final class DebugProtoBuf {
*/ */
public Builder clearFlags() { public Builder clearFlags() {
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
flags_ = 262; flags_ = 518;
onChanged(); onChanged();
return this; return this;
} }
// optional int32 new_flags = 11 [default = 518]; // optional int32 old_flags = 1 [default = 2054];
private int newFlags_ = 518; private int oldFlags_ = 2054;
/** /**
* <code>optional int32 new_flags = 11 [default = 518];</code> * <code>optional int32 old_flags = 1 [default = 2054];</code>
*/ */
public boolean hasNewFlags() { public boolean hasOldFlags() {
return ((bitField0_ & 0x00000002) == 0x00000002); return ((bitField0_ & 0x00000002) == 0x00000002);
} }
/** /**
* <code>optional int32 new_flags = 11 [default = 518];</code> * <code>optional int32 old_flags = 1 [default = 2054];</code>
*/ */
public int getNewFlags() { public int getOldFlags() {
return newFlags_; return oldFlags_;
} }
/** /**
* <code>optional int32 new_flags = 11 [default = 518];</code> * <code>optional int32 old_flags = 1 [default = 2054];</code>
*/ */
public Builder setNewFlags(int value) { public Builder setOldFlags(int value) {
bitField0_ |= 0x00000002; bitField0_ |= 0x00000002;
newFlags_ = value; oldFlags_ = value;
onChanged(); onChanged();
return this; return this;
} }
/** /**
* <code>optional int32 new_flags = 11 [default = 518];</code> * <code>optional int32 old_flags = 1 [default = 2054];</code>
*/ */
public Builder clearNewFlags() { public Builder clearOldFlags() {
bitField0_ = (bitField0_ & ~0x00000002); bitField0_ = (bitField0_ & ~0x00000002);
newFlags_ = 518; oldFlags_ = 2054;
onChanged(); onChanged();
return this; return this;
} }
@@ -21802,7 +21802,7 @@ public final class DebugProtoBuf {
"\n\005flags\030\001 \001(\005:\0016\022K\n\017value_parameter\030\002 \003(" + "\n\005flags\030\001 \001(\005:\0016\022K\n\017value_parameter\030\002 \003(" +
"\01322.org.jetbrains.kotlin.serialization.V" + "\01322.org.jetbrains.kotlin.serialization.V" +
"alueParameter*\005\010d\020\310\001\"\332\003\n\010Function\022\020\n\005fla" + "alueParameter*\005\010d\020\310\001\"\332\003\n\010Function\022\020\n\005fla" +
"gs\030\001 \001(\005:\0016\022\024\n\tnew_flags\030\t \001(\005:\0016\022\022\n\004nam" + "gs\030\t \001(\005:\0016\022\024\n\told_flags\030\001 \001(\005:\0016\022\022\n\004nam" +
"e\030\002 \002(\005B\004\210\265\030\001\022=\n\013return_type\030\003 \001(\0132(.org" + "e\030\002 \002(\005B\004\210\265\030\001\022=\n\013return_type\030\003 \001(\0132(.org" +
".jetbrains.kotlin.serialization.Type\022\026\n\016" + ".jetbrains.kotlin.serialization.Type\022\026\n\016" +
"return_type_id\030\007 \001(\005\022I\n\016type_parameter\030\004" + "return_type_id\030\007 \001(\005\022I\n\016type_parameter\030\004" +
@@ -21813,32 +21813,32 @@ public final class DebugProtoBuf {
"meter\030\006 \003(\01322.org.jetbrains.kotlin.seria" + "meter\030\006 \003(\01322.org.jetbrains.kotlin.seria" +
"lization.ValueParameter\022A\n\ntype_table\030\036 " + "lization.ValueParameter\022A\n\ntype_table\030\036 " +
"\001(\0132-.org.jetbrains.kotlin.serialization" + "\001(\0132-.org.jetbrains.kotlin.serialization" +
".TypeTable*\005\010d\020\310\001\"\316\003\n\010Property\022\022\n\005flags\030" + ".TypeTable*\005\010d\020\310\001\"\317\003\n\010Property\022\022\n\005flags\030" +
"\001 \001(\005:\003262\022\026\n\tnew_flags\030\013 \001(\005:\003518\022\022\n\004na" + "\013 \001(\005:\003518\022\027\n\told_flags\030\001 \001(\005:\0042054\022\022\n\004n" +
"me\030\002 \002(\005B\004\210\265\030\001\022=\n\013return_type\030\003 \001(\0132(.or" + "ame\030\002 \002(\005B\004\210\265\030\001\022=\n\013return_type\030\003 \001(\0132(.o" +
"g.jetbrains.kotlin.serialization.Type\022\026\n", "rg.jetbrains.kotlin.serialization.Type\022\026",
"\016return_type_id\030\t \001(\005\022I\n\016type_parameter\030" + "\n\016return_type_id\030\t \001(\005\022I\n\016type_parameter" +
"\004 \003(\01321.org.jetbrains.kotlin.serializati" + "\030\004 \003(\01321.org.jetbrains.kotlin.serializat" +
"on.TypeParameter\022?\n\rreceiver_type\030\005 \001(\0132" + "ion.TypeParameter\022?\n\rreceiver_type\030\005 \001(\013" +
"(.org.jetbrains.kotlin.serialization.Typ" + "2(.org.jetbrains.kotlin.serialization.Ty" +
"e\022\030\n\020receiver_type_id\030\n \001(\005\022R\n\026setter_va" + "pe\022\030\n\020receiver_type_id\030\n \001(\005\022R\n\026setter_v" +
"lue_parameter\030\006 \001(\01322.org.jetbrains.kotl" + "alue_parameter\030\006 \001(\01322.org.jetbrains.kot" +
"in.serialization.ValueParameter\022\024\n\014gette" + "lin.serialization.ValueParameter\022\024\n\014gett" +
"r_flags\030\007 \001(\005\022\024\n\014setter_flags\030\010 \001(\005*\005\010d\020" + "er_flags\030\007 \001(\005\022\024\n\014setter_flags\030\010 \001(\005*\005\010d" +
"\310\001\"\355\001\n\016ValueParameter\022\020\n\005flags\030\001 \001(\005:\0010\022" + "\020\310\001\"\355\001\n\016ValueParameter\022\020\n\005flags\030\001 \001(\005:\0010" +
"\022\n\004name\030\002 \002(\005B\004\210\265\030\001\0226\n\004type\030\003 \001(\0132(.org.", "\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\0226\n\004type\030\003 \001(\0132(.org",
"jetbrains.kotlin.serialization.Type\022\017\n\007t" + ".jetbrains.kotlin.serialization.Type\022\017\n\007" +
"ype_id\030\005 \001(\005\022E\n\023vararg_element_type\030\004 \001(" + "type_id\030\005 \001(\005\022E\n\023vararg_element_type\030\004 \001" +
"\0132(.org.jetbrains.kotlin.serialization.T" + "(\0132(.org.jetbrains.kotlin.serialization." +
"ype\022\036\n\026vararg_element_type_id\030\006 \001(\005*\005\010d\020" + "Type\022\036\n\026vararg_element_type_id\030\006 \001(\005*\005\010d" +
"\310\001\"&\n\tEnumEntry\022\022\n\004name\030\001 \001(\005B\004\210\265\030\001*\005\010d\020" + "\020\310\001\"&\n\tEnumEntry\022\022\n\004name\030\001 \001(\005B\004\210\265\030\001*\005\010d" +
"\310\001*9\n\010Modality\022\t\n\005FINAL\020\000\022\010\n\004OPEN\020\001\022\014\n\010A" + "\020\310\001*9\n\010Modality\022\t\n\005FINAL\020\000\022\010\n\004OPEN\020\001\022\014\n\010" +
"BSTRACT\020\002\022\n\n\006SEALED\020\003*b\n\nVisibility\022\014\n\010I" + "ABSTRACT\020\002\022\n\n\006SEALED\020\003*b\n\nVisibility\022\014\n\010" +
"NTERNAL\020\000\022\013\n\007PRIVATE\020\001\022\r\n\tPROTECTED\020\002\022\n\n" + "INTERNAL\020\000\022\013\n\007PRIVATE\020\001\022\r\n\tPROTECTED\020\002\022\n" +
"\006PUBLIC\020\003\022\023\n\017PRIVATE_TO_THIS\020\004\022\t\n\005LOCAL\020" + "\n\006PUBLIC\020\003\022\023\n\017PRIVATE_TO_THIS\020\004\022\t\n\005LOCAL" +
"\005*Q\n\nMemberKind\022\017\n\013DECLARATION\020\000\022\021\n\rFAKE", "\020\005*Q\n\nMemberKind\022\017\n\013DECLARATION\020\000\022\021\n\rFAK",
"_OVERRIDE\020\001\022\016\n\nDELEGATION\020\002\022\017\n\013SYNTHESIZ" + "E_OVERRIDE\020\001\022\016\n\nDELEGATION\020\002\022\017\n\013SYNTHESI" +
"ED\020\003B\022B\rDebugProtoBuf\210\001\000" "ZED\020\003B\022B\rDebugProtoBuf\210\001\000"
}; };
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@@ -21928,13 +21928,13 @@ public final class DebugProtoBuf {
internal_static_org_jetbrains_kotlin_serialization_Function_fieldAccessorTable = new internal_static_org_jetbrains_kotlin_serialization_Function_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable( com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_org_jetbrains_kotlin_serialization_Function_descriptor, internal_static_org_jetbrains_kotlin_serialization_Function_descriptor,
new java.lang.String[] { "Flags", "NewFlags", "Name", "ReturnType", "ReturnTypeId", "TypeParameter", "ReceiverType", "ReceiverTypeId", "ValueParameter", "TypeTable", }); new java.lang.String[] { "Flags", "OldFlags", "Name", "ReturnType", "ReturnTypeId", "TypeParameter", "ReceiverType", "ReceiverTypeId", "ValueParameter", "TypeTable", });
internal_static_org_jetbrains_kotlin_serialization_Property_descriptor = internal_static_org_jetbrains_kotlin_serialization_Property_descriptor =
getDescriptor().getMessageTypes().get(10); getDescriptor().getMessageTypes().get(10);
internal_static_org_jetbrains_kotlin_serialization_Property_fieldAccessorTable = new internal_static_org_jetbrains_kotlin_serialization_Property_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable( com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_org_jetbrains_kotlin_serialization_Property_descriptor, internal_static_org_jetbrains_kotlin_serialization_Property_descriptor,
new java.lang.String[] { "Flags", "NewFlags", "Name", "ReturnType", "ReturnTypeId", "TypeParameter", "ReceiverType", "ReceiverTypeId", "SetterValueParameter", "GetterFlags", "SetterFlags", }); new java.lang.String[] { "Flags", "OldFlags", "Name", "ReturnType", "ReturnTypeId", "TypeParameter", "ReceiverType", "ReceiverTypeId", "SetterValueParameter", "GetterFlags", "SetterFlags", });
internal_static_org_jetbrains_kotlin_serialization_ValueParameter_descriptor = internal_static_org_jetbrains_kotlin_serialization_ValueParameter_descriptor =
getDescriptor().getMessageTypes().get(11); getDescriptor().getMessageTypes().get(11);
internal_static_org_jetbrains_kotlin_serialization_ValueParameter_fieldAccessorTable = new internal_static_org_jetbrains_kotlin_serialization_ValueParameter_fieldAccessorTable = new
+4 -4
View File
@@ -241,8 +241,8 @@ message Function {
isTailrec isTailrec
isExternal isExternal
*/ */
optional int32 flags = 1 [default = 6]; optional int32 flags = 9 [default = 6 /* public final function, no annotations */];
optional int32 new_flags = 9 [default = 6 /* public final function, no annotations */]; optional int32 old_flags = 1 [default = 6];
required int32 name = 2 [(name_id_in_table) = true]; required int32 name = 2 [(name_id_in_table) = true];
@@ -274,8 +274,8 @@ message Property {
lateinit lateinit
hasConstant hasConstant
*/ */
optional int32 flags = 1 [default = 262]; optional int32 flags = 11 [default = 518 /* public (6) final property with getter (512) */];
optional int32 new_flags = 11 [default = 518 /* public (6) final property with getter (512) */]; optional int32 old_flags = 1 [default = 2054];
required int32 name = 2 [(name_id_in_table) = true]; required int32 name = 2 [(name_id_in_table) = true];
@@ -36,18 +36,14 @@ public class Flags {
public static final BooleanFlagField IS_INNER = FlagField.booleanAfter(CLASS_KIND); public static final BooleanFlagField IS_INNER = FlagField.booleanAfter(CLASS_KIND);
public static final BooleanFlagField IS_DATA = FlagField.booleanAfter(IS_INNER); public static final BooleanFlagField IS_DATA = FlagField.booleanAfter(IS_INNER);
// Callables
// TODO: use these flags
public static final BooleanFlagField RESERVED_1 = FlagField.booleanAfter(MODALITY);
public static final BooleanFlagField RESERVED_2 = FlagField.booleanAfter(RESERVED_1);
public static final FlagField<ProtoBuf.MemberKind> MEMBER_KIND = FlagField.after(RESERVED_2, ProtoBuf.MemberKind.values());
// Constructors // Constructors
public static final BooleanFlagField IS_SECONDARY = FlagField.booleanAfter(VISIBILITY); public static final BooleanFlagField IS_SECONDARY = FlagField.booleanAfter(VISIBILITY);
// Callables
public static final FlagField<ProtoBuf.MemberKind> MEMBER_KIND = FlagField.after(MODALITY, ProtoBuf.MemberKind.values());
// Functions // Functions
public static final BooleanFlagField IS_OPERATOR = FlagField.booleanAfter(MEMBER_KIND); public static final BooleanFlagField IS_OPERATOR = FlagField.booleanAfter(MEMBER_KIND);
@@ -73,7 +69,6 @@ public class Flags {
// Accessors // Accessors
// It's important that this flag is negated: "is NOT default" instead of "is default"
public static final BooleanFlagField IS_NOT_DEFAULT = FlagField.booleanAfter(MODALITY); public static final BooleanFlagField IS_NOT_DEFAULT = FlagField.booleanAfter(MODALITY);
public static final BooleanFlagField IS_EXTERNAL_ACCESSOR = FlagField.booleanAfter(IS_NOT_DEFAULT); public static final BooleanFlagField IS_EXTERNAL_ACCESSOR = FlagField.booleanAfter(IS_NOT_DEFAULT);
@@ -11965,9 +11965,9 @@ public final class ProtoBuf {
com.google.protobuf.GeneratedMessageLite. com.google.protobuf.GeneratedMessageLite.
ExtendableMessageOrBuilder<Function> { ExtendableMessageOrBuilder<Function> {
// optional int32 flags = 1 [default = 6]; // optional int32 flags = 9 [default = 6];
/** /**
* <code>optional int32 flags = 1 [default = 6];</code> * <code>optional int32 flags = 9 [default = 6];</code>
* *
* <pre> * <pre>
* *
@@ -11984,7 +11984,7 @@ public final class ProtoBuf {
*/ */
boolean hasFlags(); boolean hasFlags();
/** /**
* <code>optional int32 flags = 1 [default = 6];</code> * <code>optional int32 flags = 9 [default = 6];</code>
* *
* <pre> * <pre>
* *
@@ -12001,15 +12001,15 @@ public final class ProtoBuf {
*/ */
int getFlags(); int getFlags();
// optional int32 new_flags = 9 [default = 6]; // optional int32 old_flags = 1 [default = 6];
/** /**
* <code>optional int32 new_flags = 9 [default = 6];</code> * <code>optional int32 old_flags = 1 [default = 6];</code>
*/ */
boolean hasNewFlags(); boolean hasOldFlags();
/** /**
* <code>optional int32 new_flags = 9 [default = 6];</code> * <code>optional int32 old_flags = 1 [default = 6];</code>
*/ */
int getNewFlags(); int getOldFlags();
// required int32 name = 2; // required int32 name = 2;
/** /**
@@ -12145,8 +12145,8 @@ public final class ProtoBuf {
break; break;
} }
case 8: { case 8: {
bitField0_ |= 0x00000001; bitField0_ |= 0x00000002;
flags_ = input.readInt32(); oldFlags_ = input.readInt32();
break; break;
} }
case 16: { case 16: {
@@ -12207,8 +12207,8 @@ public final class ProtoBuf {
break; break;
} }
case 72: { case 72: {
bitField0_ |= 0x00000002; bitField0_ |= 0x00000001;
newFlags_ = input.readInt32(); flags_ = input.readInt32();
break; break;
} }
case 242: { case 242: {
@@ -12257,11 +12257,11 @@ public final class ProtoBuf {
} }
private int bitField0_; private int bitField0_;
// optional int32 flags = 1 [default = 6]; // optional int32 flags = 9 [default = 6];
public static final int FLAGS_FIELD_NUMBER = 1; public static final int FLAGS_FIELD_NUMBER = 9;
private int flags_; private int flags_;
/** /**
* <code>optional int32 flags = 1 [default = 6];</code> * <code>optional int32 flags = 9 [default = 6];</code>
* *
* <pre> * <pre>
* *
@@ -12280,7 +12280,7 @@ public final class ProtoBuf {
return ((bitField0_ & 0x00000001) == 0x00000001); return ((bitField0_ & 0x00000001) == 0x00000001);
} }
/** /**
* <code>optional int32 flags = 1 [default = 6];</code> * <code>optional int32 flags = 9 [default = 6];</code>
* *
* <pre> * <pre>
* *
@@ -12299,20 +12299,20 @@ public final class ProtoBuf {
return flags_; return flags_;
} }
// optional int32 new_flags = 9 [default = 6]; // optional int32 old_flags = 1 [default = 6];
public static final int NEW_FLAGS_FIELD_NUMBER = 9; public static final int OLD_FLAGS_FIELD_NUMBER = 1;
private int newFlags_; private int oldFlags_;
/** /**
* <code>optional int32 new_flags = 9 [default = 6];</code> * <code>optional int32 old_flags = 1 [default = 6];</code>
*/ */
public boolean hasNewFlags() { public boolean hasOldFlags() {
return ((bitField0_ & 0x00000002) == 0x00000002); return ((bitField0_ & 0x00000002) == 0x00000002);
} }
/** /**
* <code>optional int32 new_flags = 9 [default = 6];</code> * <code>optional int32 old_flags = 1 [default = 6];</code>
*/ */
public int getNewFlags() { public int getOldFlags() {
return newFlags_; return oldFlags_;
} }
// required int32 name = 2; // required int32 name = 2;
@@ -12485,7 +12485,7 @@ public final class ProtoBuf {
private void initFields() { private void initFields() {
flags_ = 6; flags_ = 6;
newFlags_ = 6; oldFlags_ = 6;
name_ = 0; name_ = 0;
returnType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); returnType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance();
returnTypeId_ = 0; returnTypeId_ = 0;
@@ -12548,8 +12548,8 @@ public final class ProtoBuf {
com.google.protobuf.GeneratedMessageLite com.google.protobuf.GeneratedMessageLite
.ExtendableMessage<org.jetbrains.kotlin.serialization.ProtoBuf.Function>.ExtensionWriter extensionWriter = .ExtendableMessage<org.jetbrains.kotlin.serialization.ProtoBuf.Function>.ExtensionWriter extensionWriter =
newExtensionWriter(); newExtensionWriter();
if (((bitField0_ & 0x00000001) == 0x00000001)) { if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(1, flags_); output.writeInt32(1, oldFlags_);
} }
if (((bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeInt32(2, name_); output.writeInt32(2, name_);
@@ -12572,8 +12572,8 @@ public final class ProtoBuf {
if (((bitField0_ & 0x00000040) == 0x00000040)) { if (((bitField0_ & 0x00000040) == 0x00000040)) {
output.writeInt32(8, receiverTypeId_); output.writeInt32(8, receiverTypeId_);
} }
if (((bitField0_ & 0x00000002) == 0x00000002)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeInt32(9, newFlags_); output.writeInt32(9, flags_);
} }
if (((bitField0_ & 0x00000080) == 0x00000080)) { if (((bitField0_ & 0x00000080) == 0x00000080)) {
output.writeMessage(30, typeTable_); output.writeMessage(30, typeTable_);
@@ -12587,9 +12587,9 @@ public final class ProtoBuf {
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) { if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, flags_); .computeInt32Size(1, oldFlags_);
} }
if (((bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
@@ -12619,9 +12619,9 @@ public final class ProtoBuf {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
.computeInt32Size(8, receiverTypeId_); .computeInt32Size(8, receiverTypeId_);
} }
if (((bitField0_ & 0x00000002) == 0x00000002)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
.computeInt32Size(9, newFlags_); .computeInt32Size(9, flags_);
} }
if (((bitField0_ & 0x00000080) == 0x00000080)) { if (((bitField0_ & 0x00000080) == 0x00000080)) {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
@@ -12720,7 +12720,7 @@ public final class ProtoBuf {
super.clear(); super.clear();
flags_ = 6; flags_ = 6;
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
newFlags_ = 6; oldFlags_ = 6;
bitField0_ = (bitField0_ & ~0x00000002); bitField0_ = (bitField0_ & ~0x00000002);
name_ = 0; name_ = 0;
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
@@ -12768,7 +12768,7 @@ public final class ProtoBuf {
if (((from_bitField0_ & 0x00000002) == 0x00000002)) { if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002; to_bitField0_ |= 0x00000002;
} }
result.newFlags_ = newFlags_; result.oldFlags_ = oldFlags_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) { if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004; to_bitField0_ |= 0x00000004;
} }
@@ -12812,8 +12812,8 @@ public final class ProtoBuf {
if (other.hasFlags()) { if (other.hasFlags()) {
setFlags(other.getFlags()); setFlags(other.getFlags());
} }
if (other.hasNewFlags()) { if (other.hasOldFlags()) {
setNewFlags(other.getNewFlags()); setOldFlags(other.getOldFlags());
} }
if (other.hasName()) { if (other.hasName()) {
setName(other.getName()); setName(other.getName());
@@ -12918,10 +12918,10 @@ public final class ProtoBuf {
} }
private int bitField0_; private int bitField0_;
// optional int32 flags = 1 [default = 6]; // optional int32 flags = 9 [default = 6];
private int flags_ = 6; private int flags_ = 6;
/** /**
* <code>optional int32 flags = 1 [default = 6];</code> * <code>optional int32 flags = 9 [default = 6];</code>
* *
* <pre> * <pre>
* *
@@ -12940,7 +12940,7 @@ public final class ProtoBuf {
return ((bitField0_ & 0x00000001) == 0x00000001); return ((bitField0_ & 0x00000001) == 0x00000001);
} }
/** /**
* <code>optional int32 flags = 1 [default = 6];</code> * <code>optional int32 flags = 9 [default = 6];</code>
* *
* <pre> * <pre>
* *
@@ -12959,7 +12959,7 @@ public final class ProtoBuf {
return flags_; return flags_;
} }
/** /**
* <code>optional int32 flags = 1 [default = 6];</code> * <code>optional int32 flags = 9 [default = 6];</code>
* *
* <pre> * <pre>
* *
@@ -12981,7 +12981,7 @@ public final class ProtoBuf {
return this; return this;
} }
/** /**
* <code>optional int32 flags = 1 [default = 6];</code> * <code>optional int32 flags = 9 [default = 6];</code>
* *
* <pre> * <pre>
* *
@@ -13003,35 +13003,35 @@ public final class ProtoBuf {
return this; return this;
} }
// optional int32 new_flags = 9 [default = 6]; // optional int32 old_flags = 1 [default = 6];
private int newFlags_ = 6; private int oldFlags_ = 6;
/** /**
* <code>optional int32 new_flags = 9 [default = 6];</code> * <code>optional int32 old_flags = 1 [default = 6];</code>
*/ */
public boolean hasNewFlags() { public boolean hasOldFlags() {
return ((bitField0_ & 0x00000002) == 0x00000002); return ((bitField0_ & 0x00000002) == 0x00000002);
} }
/** /**
* <code>optional int32 new_flags = 9 [default = 6];</code> * <code>optional int32 old_flags = 1 [default = 6];</code>
*/ */
public int getNewFlags() { public int getOldFlags() {
return newFlags_; return oldFlags_;
} }
/** /**
* <code>optional int32 new_flags = 9 [default = 6];</code> * <code>optional int32 old_flags = 1 [default = 6];</code>
*/ */
public Builder setNewFlags(int value) { public Builder setOldFlags(int value) {
bitField0_ |= 0x00000002; bitField0_ |= 0x00000002;
newFlags_ = value; oldFlags_ = value;
return this; return this;
} }
/** /**
* <code>optional int32 new_flags = 9 [default = 6];</code> * <code>optional int32 old_flags = 1 [default = 6];</code>
*/ */
public Builder clearNewFlags() { public Builder clearOldFlags() {
bitField0_ = (bitField0_ & ~0x00000002); bitField0_ = (bitField0_ & ~0x00000002);
newFlags_ = 6; oldFlags_ = 6;
return this; return this;
} }
@@ -13583,9 +13583,9 @@ public final class ProtoBuf {
com.google.protobuf.GeneratedMessageLite. com.google.protobuf.GeneratedMessageLite.
ExtendableMessageOrBuilder<Property> { ExtendableMessageOrBuilder<Property> {
// optional int32 flags = 1 [default = 262]; // optional int32 flags = 11 [default = 518];
/** /**
* <code>optional int32 flags = 1 [default = 262];</code> * <code>optional int32 flags = 11 [default = 518];</code>
* *
* <pre> * <pre>
* *
@@ -13603,7 +13603,7 @@ public final class ProtoBuf {
*/ */
boolean hasFlags(); boolean hasFlags();
/** /**
* <code>optional int32 flags = 1 [default = 262];</code> * <code>optional int32 flags = 11 [default = 518];</code>
* *
* <pre> * <pre>
* *
@@ -13621,15 +13621,15 @@ public final class ProtoBuf {
*/ */
int getFlags(); int getFlags();
// optional int32 new_flags = 11 [default = 518]; // optional int32 old_flags = 1 [default = 2054];
/** /**
* <code>optional int32 new_flags = 11 [default = 518];</code> * <code>optional int32 old_flags = 1 [default = 2054];</code>
*/ */
boolean hasNewFlags(); boolean hasOldFlags();
/** /**
* <code>optional int32 new_flags = 11 [default = 518];</code> * <code>optional int32 old_flags = 1 [default = 2054];</code>
*/ */
int getNewFlags(); int getOldFlags();
// required int32 name = 2; // required int32 name = 2;
/** /**
@@ -13788,8 +13788,8 @@ public final class ProtoBuf {
break; break;
} }
case 8: { case 8: {
bitField0_ |= 0x00000001; bitField0_ |= 0x00000002;
flags_ = input.readInt32(); oldFlags_ = input.readInt32();
break; break;
} }
case 16: { case 16: {
@@ -13865,8 +13865,8 @@ public final class ProtoBuf {
break; break;
} }
case 88: { case 88: {
bitField0_ |= 0x00000002; bitField0_ |= 0x00000001;
newFlags_ = input.readInt32(); flags_ = input.readInt32();
break; break;
} }
} }
@@ -13899,11 +13899,11 @@ public final class ProtoBuf {
} }
private int bitField0_; private int bitField0_;
// optional int32 flags = 1 [default = 262]; // optional int32 flags = 11 [default = 518];
public static final int FLAGS_FIELD_NUMBER = 1; public static final int FLAGS_FIELD_NUMBER = 11;
private int flags_; private int flags_;
/** /**
* <code>optional int32 flags = 1 [default = 262];</code> * <code>optional int32 flags = 11 [default = 518];</code>
* *
* <pre> * <pre>
* *
@@ -13923,7 +13923,7 @@ public final class ProtoBuf {
return ((bitField0_ & 0x00000001) == 0x00000001); return ((bitField0_ & 0x00000001) == 0x00000001);
} }
/** /**
* <code>optional int32 flags = 1 [default = 262];</code> * <code>optional int32 flags = 11 [default = 518];</code>
* *
* <pre> * <pre>
* *
@@ -13943,20 +13943,20 @@ public final class ProtoBuf {
return flags_; return flags_;
} }
// optional int32 new_flags = 11 [default = 518]; // optional int32 old_flags = 1 [default = 2054];
public static final int NEW_FLAGS_FIELD_NUMBER = 11; public static final int OLD_FLAGS_FIELD_NUMBER = 1;
private int newFlags_; private int oldFlags_;
/** /**
* <code>optional int32 new_flags = 11 [default = 518];</code> * <code>optional int32 old_flags = 1 [default = 2054];</code>
*/ */
public boolean hasNewFlags() { public boolean hasOldFlags() {
return ((bitField0_ & 0x00000002) == 0x00000002); return ((bitField0_ & 0x00000002) == 0x00000002);
} }
/** /**
* <code>optional int32 new_flags = 11 [default = 518];</code> * <code>optional int32 old_flags = 1 [default = 2054];</code>
*/ */
public int getNewFlags() { public int getOldFlags() {
return newFlags_; return oldFlags_;
} }
// required int32 name = 2; // required int32 name = 2;
@@ -14142,8 +14142,8 @@ public final class ProtoBuf {
} }
private void initFields() { private void initFields() {
flags_ = 262; flags_ = 518;
newFlags_ = 518; oldFlags_ = 2054;
name_ = 0; name_ = 0;
returnType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); returnType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance();
returnTypeId_ = 0; returnTypeId_ = 0;
@@ -14201,8 +14201,8 @@ public final class ProtoBuf {
com.google.protobuf.GeneratedMessageLite com.google.protobuf.GeneratedMessageLite
.ExtendableMessage<org.jetbrains.kotlin.serialization.ProtoBuf.Property>.ExtensionWriter extensionWriter = .ExtendableMessage<org.jetbrains.kotlin.serialization.ProtoBuf.Property>.ExtensionWriter extensionWriter =
newExtensionWriter(); newExtensionWriter();
if (((bitField0_ & 0x00000001) == 0x00000001)) { if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt32(1, flags_); output.writeInt32(1, oldFlags_);
} }
if (((bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeInt32(2, name_); output.writeInt32(2, name_);
@@ -14231,8 +14231,8 @@ public final class ProtoBuf {
if (((bitField0_ & 0x00000040) == 0x00000040)) { if (((bitField0_ & 0x00000040) == 0x00000040)) {
output.writeInt32(10, receiverTypeId_); output.writeInt32(10, receiverTypeId_);
} }
if (((bitField0_ & 0x00000002) == 0x00000002)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeInt32(11, newFlags_); output.writeInt32(11, flags_);
} }
extensionWriter.writeUntil(200, output); extensionWriter.writeUntil(200, output);
} }
@@ -14243,9 +14243,9 @@ public final class ProtoBuf {
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) { if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, flags_); .computeInt32Size(1, oldFlags_);
} }
if (((bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
@@ -14283,9 +14283,9 @@ public final class ProtoBuf {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
.computeInt32Size(10, receiverTypeId_); .computeInt32Size(10, receiverTypeId_);
} }
if (((bitField0_ & 0x00000002) == 0x00000002)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream size += com.google.protobuf.CodedOutputStream
.computeInt32Size(11, newFlags_); .computeInt32Size(11, flags_);
} }
size += extensionsSerializedSize(); size += extensionsSerializedSize();
memoizedSerializedSize = size; memoizedSerializedSize = size;
@@ -14378,9 +14378,9 @@ public final class ProtoBuf {
public Builder clear() { public Builder clear() {
super.clear(); super.clear();
flags_ = 262; flags_ = 518;
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
newFlags_ = 518; oldFlags_ = 2054;
bitField0_ = (bitField0_ & ~0x00000002); bitField0_ = (bitField0_ & ~0x00000002);
name_ = 0; name_ = 0;
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
@@ -14430,7 +14430,7 @@ public final class ProtoBuf {
if (((from_bitField0_ & 0x00000002) == 0x00000002)) { if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002; to_bitField0_ |= 0x00000002;
} }
result.newFlags_ = newFlags_; result.oldFlags_ = oldFlags_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) { if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004; to_bitField0_ |= 0x00000004;
} }
@@ -14477,8 +14477,8 @@ public final class ProtoBuf {
if (other.hasFlags()) { if (other.hasFlags()) {
setFlags(other.getFlags()); setFlags(other.getFlags());
} }
if (other.hasNewFlags()) { if (other.hasOldFlags()) {
setNewFlags(other.getNewFlags()); setOldFlags(other.getOldFlags());
} }
if (other.hasName()) { if (other.hasName()) {
setName(other.getName()); setName(other.getName());
@@ -14573,10 +14573,10 @@ public final class ProtoBuf {
} }
private int bitField0_; private int bitField0_;
// optional int32 flags = 1 [default = 262]; // optional int32 flags = 11 [default = 518];
private int flags_ = 262; private int flags_ = 518;
/** /**
* <code>optional int32 flags = 1 [default = 262];</code> * <code>optional int32 flags = 11 [default = 518];</code>
* *
* <pre> * <pre>
* *
@@ -14596,7 +14596,7 @@ public final class ProtoBuf {
return ((bitField0_ & 0x00000001) == 0x00000001); return ((bitField0_ & 0x00000001) == 0x00000001);
} }
/** /**
* <code>optional int32 flags = 1 [default = 262];</code> * <code>optional int32 flags = 11 [default = 518];</code>
* *
* <pre> * <pre>
* *
@@ -14616,7 +14616,7 @@ public final class ProtoBuf {
return flags_; return flags_;
} }
/** /**
* <code>optional int32 flags = 1 [default = 262];</code> * <code>optional int32 flags = 11 [default = 518];</code>
* *
* <pre> * <pre>
* *
@@ -14639,7 +14639,7 @@ public final class ProtoBuf {
return this; return this;
} }
/** /**
* <code>optional int32 flags = 1 [default = 262];</code> * <code>optional int32 flags = 11 [default = 518];</code>
* *
* <pre> * <pre>
* *
@@ -14657,40 +14657,40 @@ public final class ProtoBuf {
*/ */
public Builder clearFlags() { public Builder clearFlags() {
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
flags_ = 262; flags_ = 518;
return this; return this;
} }
// optional int32 new_flags = 11 [default = 518]; // optional int32 old_flags = 1 [default = 2054];
private int newFlags_ = 518; private int oldFlags_ = 2054;
/** /**
* <code>optional int32 new_flags = 11 [default = 518];</code> * <code>optional int32 old_flags = 1 [default = 2054];</code>
*/ */
public boolean hasNewFlags() { public boolean hasOldFlags() {
return ((bitField0_ & 0x00000002) == 0x00000002); return ((bitField0_ & 0x00000002) == 0x00000002);
} }
/** /**
* <code>optional int32 new_flags = 11 [default = 518];</code> * <code>optional int32 old_flags = 1 [default = 2054];</code>
*/ */
public int getNewFlags() { public int getOldFlags() {
return newFlags_; return oldFlags_;
} }
/** /**
* <code>optional int32 new_flags = 11 [default = 518];</code> * <code>optional int32 old_flags = 1 [default = 2054];</code>
*/ */
public Builder setNewFlags(int value) { public Builder setOldFlags(int value) {
bitField0_ |= 0x00000002; bitField0_ |= 0x00000002;
newFlags_ = value; oldFlags_ = value;
return this; return this;
} }
/** /**
* <code>optional int32 new_flags = 11 [default = 518];</code> * <code>optional int32 old_flags = 1 [default = 2054];</code>
*/ */
public Builder clearNewFlags() { public Builder clearOldFlags() {
bitField0_ = (bitField0_ & ~0x00000002); bitField0_ = (bitField0_ & ~0x00000002);
newFlags_ = 518; oldFlags_ = 2054;
return this; return this;
} }
@@ -32,7 +32,7 @@ import org.jetbrains.kotlin.utils.toReadOnlyList
class MemberDeserializer(private val c: DeserializationContext) { class MemberDeserializer(private val c: DeserializationContext) {
fun loadProperty(proto: ProtoBuf.Property): PropertyDescriptor { fun loadProperty(proto: ProtoBuf.Property): PropertyDescriptor {
val flags = proto.flags val flags = if (proto.hasFlags()) proto.flags else loadOldFlags(proto.oldFlags)
val property = DeserializedPropertyDescriptor( val property = DeserializedPropertyDescriptor(
c.containingDeclaration, null, c.containingDeclaration, null,
@@ -135,14 +135,21 @@ class MemberDeserializer(private val c: DeserializationContext) {
return property return property
} }
private fun loadOldFlags(oldFlags: Int): Int {
val lowSixBits = oldFlags and 0x3f
val rest = (oldFlags shr 8) shl 6
return lowSixBits + rest
}
fun loadFunction(proto: ProtoBuf.Function): FunctionDescriptor { fun loadFunction(proto: ProtoBuf.Function): FunctionDescriptor {
val annotations = getAnnotations(proto, proto.flags, AnnotatedCallableKind.FUNCTION) val flags = if (proto.hasFlags()) proto.flags else loadOldFlags(proto.oldFlags)
val annotations = getAnnotations(proto, flags, AnnotatedCallableKind.FUNCTION)
val receiverAnnotations = if (proto.hasReceiver()) val receiverAnnotations = if (proto.hasReceiver())
getReceiverParameterAnnotations(proto, AnnotatedCallableKind.FUNCTION) getReceiverParameterAnnotations(proto, AnnotatedCallableKind.FUNCTION)
else Annotations.EMPTY else Annotations.EMPTY
val function = DeserializedSimpleFunctionDescriptor( val function = DeserializedSimpleFunctionDescriptor(
c.containingDeclaration, /* original = */ null, annotations, c.nameResolver.getName(proto.name), c.containingDeclaration, /* original = */ null, annotations, c.nameResolver.getName(proto.name),
Deserialization.memberKind(Flags.MEMBER_KIND.get(proto.flags)), proto, c.nameResolver, c.typeTable, c.packagePartSource Deserialization.memberKind(Flags.MEMBER_KIND.get(flags)), proto, c.nameResolver, c.typeTable, c.packagePartSource
) )
val local = c.childContext(function, proto.typeParameterList) val local = c.childContext(function, proto.typeParameterList)
function.initialize( function.initialize(
@@ -151,14 +158,14 @@ class MemberDeserializer(private val c: DeserializationContext) {
local.typeDeserializer.ownTypeParameters, local.typeDeserializer.ownTypeParameters,
local.memberDeserializer.valueParameters(proto.valueParameterList, proto, AnnotatedCallableKind.FUNCTION), local.memberDeserializer.valueParameters(proto.valueParameterList, proto, AnnotatedCallableKind.FUNCTION),
local.typeDeserializer.type(proto.returnType(c.typeTable)), local.typeDeserializer.type(proto.returnType(c.typeTable)),
Deserialization.modality(Flags.MODALITY.get(proto.flags)), Deserialization.modality(Flags.MODALITY.get(flags)),
Deserialization.visibility(Flags.VISIBILITY.get(proto.flags)) Deserialization.visibility(Flags.VISIBILITY.get(flags))
) )
function.isOperator = Flags.IS_OPERATOR.get(proto.flags) function.isOperator = Flags.IS_OPERATOR.get(flags)
function.isInfix = Flags.IS_INFIX.get(proto.flags) function.isInfix = Flags.IS_INFIX.get(flags)
function.isExternal = Flags.IS_EXTERNAL_FUNCTION.get(proto.flags) function.isExternal = Flags.IS_EXTERNAL_FUNCTION.get(flags)
function.isInline = Flags.IS_INLINE.get(proto.flags) function.isInline = Flags.IS_INLINE.get(flags)
function.isTailrec = Flags.IS_TAILREC.get(proto.flags) function.isTailrec = Flags.IS_TAILREC.get(flags)
return function return function
} }