From 2ea65e1cbcf8f3ea1ff62382757f70ac8420f781 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Tue, 11 Aug 2015 19:13:28 -0700 Subject: [PATCH] Refactor command-line interface to kotlin-preloader.jar Use reasonable defaults for the options: no time profiling, no instrumenters, empty classpath, 4096 as the class number estimate. Replace 4096 in the codebase with the constant field. Keep the old interface intact until the build is bootstrapped and the new one can be used in all compilation steps Original commit: aba6ab129991d100508c1e13e28f597813b89bc3 --- .../jetbrains/kotlin/compilerRunner/CompilerRunnerUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/CompilerRunnerUtil.java b/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/CompilerRunnerUtil.java index 75036a84842..47bee730d39 100644 --- a/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/CompilerRunnerUtil.java +++ b/jps/jps-plugin/src/org/jetbrains/kotlin/compilerRunner/CompilerRunnerUtil.java @@ -20,6 +20,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.kotlin.cli.common.messages.MessageCollector; import org.jetbrains.kotlin.preloading.ClassPreloadingUtils; +import org.jetbrains.kotlin.preloading.Preloader; import org.jetbrains.kotlin.utils.KotlinPaths; import java.io.File; @@ -45,7 +46,7 @@ public class CompilerRunnerUtil { if (classLoader == null) { classLoader = ClassPreloadingUtils.preloadClasses( Collections.singletonList(new File(libPath, "kotlin-compiler.jar")), - /* estimatedClassNumber = */ 4096, + Preloader.DEFAULT_CLASS_NUMBER_ESTIMATE, CompilerRunnerUtil.class.getClassLoader(), environment.getClassesToLoadByParent() );