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
+1
@@ -374,6 +374,7 @@ class IrDeclarationDeserializer(
|
||||
isValue = flags.isValue,
|
||||
isExpect = flags.isExpect,
|
||||
isFun = flags.isFun,
|
||||
hasEnumEntries = flags.hasEnumEntries,
|
||||
)
|
||||
}.usingParent {
|
||||
typeParameters = deserializeTypeParameters(proto.typeParameterList, true)
|
||||
|
||||
+1
@@ -33,6 +33,7 @@ value class ClassFlags(val flags: Long) {
|
||||
val isExpect: Boolean get() = IrFlags.IS_EXPECT_CLASS.get(flags.toInt())
|
||||
val isExternal: Boolean get() = IrFlags.IS_EXTERNAL_CLASS.get(flags.toInt())
|
||||
val isFun: Boolean get() = IrFlags.IS_FUN_INTERFACE.get(flags.toInt())
|
||||
val hasEnumEntries: Boolean get() = IrFlags.HAS_ENUM_ENTRIES.get(flags.toInt())
|
||||
|
||||
companion object {
|
||||
fun encode(clazz: IrClass, languageVersionSettings: LanguageVersionSettings): Long {
|
||||
|
||||
Reference in New Issue
Block a user