From 875e0a64e76842cd81d756860dc93d7989ab61d1 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Wed, 21 Mar 2018 12:45:42 +0300 Subject: [PATCH] Add -Xuse-type-table to jvm compiler options --- .../kotlin/cli/common/arguments/K2JVMCompilerArguments.kt | 3 +++ compiler/cli/src/org/jetbrains/kotlin/cli/jvm/K2JVMCompiler.kt | 1 + compiler/testData/cli/jvm/extraHelp.out | 1 + 3 files changed, 5 insertions(+) diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArguments.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArguments.kt index 23bef30a62b..b0907025570 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArguments.kt +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArguments.kt @@ -138,6 +138,9 @@ class K2JVMCompilerArguments : CommonCompilerArguments() { @Argument(value = "-Xmultifile-parts-inherit", description = "Compile multifile classes as a hierarchy of parts and facade") var inheritMultifileParts: Boolean by FreezableVar(false) + @Argument(value = "-Xuse-type-table", description = "Use type table in metadata serialization") + var useTypeTable: Boolean by FreezableVar(false) + @Argument( value = "-Xskip-runtime-version-check", description = "Allow Kotlin runtime libraries of incompatible versions in the classpath" diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/K2JVMCompiler.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/K2JVMCompiler.kt index 3203ddf5573..b02ed2eb3e5 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/K2JVMCompiler.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/K2JVMCompiler.kt @@ -377,6 +377,7 @@ class K2JVMCompiler : CLICompiler() { ) 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) diff --git a/compiler/testData/cli/jvm/extraHelp.out b/compiler/testData/cli/jvm/extraHelp.out index b2b1d08f213..156ba101bd2 100644 --- a/compiler/testData/cli/jvm/extraHelp.out +++ b/compiler/testData/cli/jvm/extraHelp.out @@ -40,6 +40,7 @@ where advanced options include: Default value is 'enable' -Xuse-javac Use javac for Java source and class files analysis -Xuse-old-class-files-reading Use old class files reading implementation (may slow down the build and should be used in case of problems with the new implementation) + -Xuse-type-table Use type table in metadata serialization -Xallow-kotlin-package Allow compiling code in package 'kotlin' and allow not requiring kotlin.stdlib in module-info -Xcoroutines={enable|warn|error} Enable coroutines or report warnings or errors on declarations and use sites of 'suspend' modifier