Refactor inheritMultifileParts to be a JVM analysis flag

Instead of a JVMConfigurationKeys key. This will allow to use it in a
checker in 'frontend.java'
This commit is contained in:
Alexander Udalov
2019-01-23 13:18:47 +01:00
parent f3758771c9
commit 6b5a16884c
24 changed files with 39 additions and 34 deletions
@@ -268,11 +268,12 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
)
result[AnalysisFlags.ignoreDataFlowInAssert] = JVMAssertionsMode.fromString(assertionsMode) != JVMAssertionsMode.LEGACY
JvmDefaultMode.fromStringOrNull(jvmDefault)?.let { result[JvmAnalysisFlags.jvmDefaultMode] = it }
?: collector.report(
CompilerMessageSeverity.ERROR,
"Unknown @JvmDefault mode: $jvmDefault, " +
"supported modes: ${JvmDefaultMode.values().map { it.description }}"
)
?: collector.report(
CompilerMessageSeverity.ERROR,
"Unknown @JvmDefault mode: $jvmDefault, " +
"supported modes: ${JvmDefaultMode.values().map { it.description }}"
)
result[JvmAnalysisFlags.inheritMultifileParts] = inheritMultifileParts
return result
}
@@ -390,7 +390,6 @@ class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
assertionsMode ?: JVMAssertionsMode.DEFAULT
)
configuration.put(JVMConfigurationKeys.INHERIT_MULTIFILE_PARTS, arguments.inheritMultifileParts)
configuration.put(JVMConfigurationKeys.USE_TYPE_TABLE, arguments.useTypeTable)
configuration.put(JVMConfigurationKeys.SKIP_RUNTIME_VERSION_CHECK, arguments.skipRuntimeVersionCheck)
configuration.put(JVMConfigurationKeys.USE_FAST_CLASS_FILES_READING, !arguments.useOldClassFilesReading)