From 77c646adfb0b41aa0c6c4f0316f9c2a7edd846c0 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Mon, 11 Jan 2016 22:11:14 +0300 Subject: [PATCH] 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: 693a9c945300a2bf93c0b9cdb26af796e59d04e8 --- .../jps/incremental/ProtoCompareGenerated.kt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/ProtoCompareGenerated.kt b/jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/ProtoCompareGenerated.kt index 1768649095e..4a3907764d2 100644 --- a/jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/ProtoCompareGenerated.kt +++ b/jps/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/ProtoCompareGenerated.kt @@ -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()) {