IR: add IrClass.hasEnumEntries
This flag will be used on JVM to determine whether or not to generate
external enum entries mappings ("$EntriesMappings") classes. Note that
from the frontend's point of view, every enum has `entries`, so for
backend purposes we have to reach out to the underlying deserialized
data to read the flag from the metadata.
This commit is contained in:
committed by
Space Team
parent
db31f1f926
commit
c33c918bd4
+3
-1
@@ -52,9 +52,11 @@ class DeserializedClassDescriptor(
|
||||
VersionRequirementTable.create(classProto.versionRequirementTable), metadataVersion
|
||||
)
|
||||
|
||||
val hasEnumEntriesMetadataFlag: Boolean = Flags.HAS_ENUM_ENTRIES.get(classProto.flags)
|
||||
|
||||
private val staticScope =
|
||||
if (kind == ClassKind.ENUM_CLASS) {
|
||||
val enumEntriesCanBeUsed = Flags.HAS_ENUM_ENTRIES.get(classProto.flags) ||
|
||||
val enumEntriesCanBeUsed = hasEnumEntriesMetadataFlag ||
|
||||
c.components.enumEntriesDeserializationSupport.canSynthesizeEnumEntries() == true
|
||||
StaticScopeForKotlinEnum(c.storageManager, this, enumEntriesCanBeUsed)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user