JVM: introduce JvmBackendConfig

Move language version settings, compiler configuration and different
flags there, and use this config everywhere in both backends instead of
GenerationState.

This will hopefully make GenerationState less of a "god object" and
remove the need to have it available everywhere, in particular in JVM IR
lowerings code, in the future.

Also, future refactorings will make it easier to inject backend-specific
behavior into common code, so that we would not need to handle support
of new features in the old backend.
This commit is contained in:
Alexander Udalov
2023-07-21 18:18:42 +02:00
committed by Space Team
parent b6f8991072
commit 72d048bd62
70 changed files with 265 additions and 237 deletions
@@ -316,7 +316,7 @@ open class ParcelableCodegenExtension : ParcelableExtensionBase, ExpressionCodeg
writeNewArrayMethod(codegenForCreator, parcelableClass, parcelableCreatorClassType, creatorClass, parcelerObject)
writeCreateFromParcel(codegenForCreator, parcelableClass, parcelableCreatorClassType, creatorClass, parcelClassType, parcelAsmType, parcelerObject, properties)
classBuilderForCreator.done(codegen.state.generateSmapCopyToAnnotation)
classBuilderForCreator.done(codegen.state.config.generateSmapCopyToAnnotation)
}
private fun writeCreatorConstructor(codegen: ImplementationBodyCodegen, creatorClass: ClassDescriptor, creatorAsmType: Type) {