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
This commit is contained in:
Alexander Udalov
2015-08-11 19:13:28 -07:00
parent a592b42357
commit aba6ab1299
7 changed files with 144 additions and 82 deletions
+3 -2
View File
@@ -278,9 +278,9 @@
<assertions>
<enable/>
</assertions>
<arg value="-cp"/>
<arg value="${kotlin-home}/lib/kotlin-compiler.jar"/>
<arg value="org.jetbrains.kotlin.cli.js.K2JSCompiler"/>
<arg line="4096 notime"/>
<arg line="${src.line}"/>
<arg value="-output"/>
<arg value="@{output}"/>
@@ -415,6 +415,7 @@
<assertions>
<enable/>
</assertions>
<!-- TODO: use the new command-line interface to preloader here -->
<arg value="${bootstrap.compiler.home}/lib/kotlin-compiler.jar"/>
<arg value="org.jetbrains.kotlin.serialization.builtins.BuiltinsPackage"/>
<arg value="4096"/>
@@ -646,9 +647,9 @@
<assertions>
<enable/>
</assertions>
<arg value="-cp"/>
<arg value="${kotlin-home}/lib/kotlin-compiler.jar"/>
<arg value="org.jetbrains.kotlin.cli.jvm.K2JVMCompiler"/>
<arg line="4096 notime"/>
<arg line="${src.line}"/>
<arg value="-d"/>
<arg value="@{output}"/>