Write new flags to proto messages for callables
This is needed to get rid of two unused bits: Flags.RESERVED_1 and
Flags.RESERVED_2. The old flags are still there temporarily because of the
bootstrap dependency on built-ins. Soon the old flags will be dropped and the
current flags will be transformed to the new format
Original commit: 693a9c9453
This commit is contained in:
@@ -198,6 +198,11 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
|
||||
if (old.flags != new.flags) return false
|
||||
}
|
||||
|
||||
if (old.hasNewFlags() != new.hasNewFlags()) return false
|
||||
if (old.hasNewFlags()) {
|
||||
if (old.newFlags != new.newFlags) return false
|
||||
}
|
||||
|
||||
if (!checkStringEquals(old.name, new.name)) return false
|
||||
|
||||
if (old.hasReturnType() != new.hasReturnType()) return false
|
||||
@@ -243,6 +248,11 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
|
||||
if (old.flags != new.flags) return false
|
||||
}
|
||||
|
||||
if (old.hasNewFlags() != new.hasNewFlags()) return false
|
||||
if (old.hasNewFlags()) {
|
||||
if (old.newFlags != new.newFlags) return false
|
||||
}
|
||||
|
||||
if (!checkStringEquals(old.name, new.name)) return false
|
||||
|
||||
if (old.hasReturnType() != new.hasReturnType()) return false
|
||||
@@ -900,6 +910,10 @@ fun ProtoBuf.Function.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int)
|
||||
hashCode = 31 * hashCode + flags
|
||||
}
|
||||
|
||||
if (hasNewFlags()) {
|
||||
hashCode = 31 * hashCode + newFlags
|
||||
}
|
||||
|
||||
hashCode = 31 * hashCode + stringIndexes(name)
|
||||
|
||||
if (hasReturnType()) {
|
||||
@@ -944,6 +958,10 @@ fun ProtoBuf.Property.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int)
|
||||
hashCode = 31 * hashCode + flags
|
||||
}
|
||||
|
||||
if (hasNewFlags()) {
|
||||
hashCode = 31 * hashCode + newFlags
|
||||
}
|
||||
|
||||
hashCode = 31 * hashCode + stringIndexes(name)
|
||||
|
||||
if (hasReturnType()) {
|
||||
|
||||
Reference in New Issue
Block a user