Drop old preloader command-line interface, use new one instead
This commit is contained in:
@@ -415,11 +415,9 @@
|
|||||||
<assertions>
|
<assertions>
|
||||||
<enable/>
|
<enable/>
|
||||||
</assertions>
|
</assertions>
|
||||||
<!-- TODO: use the new command-line interface to preloader here -->
|
<arg value="-cp"/>
|
||||||
<arg value="${bootstrap.compiler.home}/lib/kotlin-compiler.jar"/>
|
<arg value="${bootstrap.compiler.home}/lib/kotlin-compiler.jar"/>
|
||||||
<arg value="org.jetbrains.kotlin.serialization.builtins.BuiltinsPackage"/>
|
<arg value="org.jetbrains.kotlin.serialization.builtins.BuiltinsPackage"/>
|
||||||
<arg value="4096"/>
|
|
||||||
<arg value="notime"/>
|
|
||||||
<arg value="${output}/builtins"/>
|
<arg value="${output}/builtins"/>
|
||||||
<arg value="core/builtins/native"/>
|
<arg value="core/builtins/native"/>
|
||||||
<arg value="core/builtins/src"/>
|
<arg value="core/builtins/src"/>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import java.net.URL;
|
|||||||
import java.net.URLClassLoader;
|
import java.net.URLClassLoader;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@SuppressWarnings({"CallToPrintStackTrace", "UseOfSystemOutOrSystemErr"})
|
@SuppressWarnings("UseOfSystemOutOrSystemErr")
|
||||||
public class Preloader {
|
public class Preloader {
|
||||||
public static final int DEFAULT_CLASS_NUMBER_ESTIMATE = 4096;
|
public static final int DEFAULT_CLASS_NUMBER_ESTIMATE = 4096;
|
||||||
|
|
||||||
@@ -87,14 +87,8 @@ public class Preloader {
|
|||||||
return new URLClassLoader(classpath, parent);
|
return new URLClassLoader(classpath, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({"AssignmentToForLoopParameter", "ConstantConditions"})
|
@SuppressWarnings("AssignmentToForLoopParameter")
|
||||||
private static Options parseOptions(String[] args) throws Exception {
|
private static Options parseOptions(String[] args) throws Exception {
|
||||||
// TODO: remove this temporary workaround as soon as the new command-line interface is bootstrapped
|
|
||||||
if (args.length >= 3 && "4096".equals(args[2])) {
|
|
||||||
//noinspection deprecation
|
|
||||||
return oldOptions(args);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<File> classpath = Collections.emptyList();
|
List<File> classpath = Collections.emptyList();
|
||||||
boolean measure = false;
|
boolean measure = false;
|
||||||
List<File> instrumenters = Collections.emptyList();
|
List<File> instrumenters = Collections.emptyList();
|
||||||
@@ -137,14 +131,6 @@ public class Preloader {
|
|||||||
return new Options(classpath, measure, instrumenters, estimate, mainClass, arguments);
|
return new Options(classpath, measure, instrumenters, estimate, mainClass, arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
private static Options oldOptions(String[] args) {
|
|
||||||
return new Options(
|
|
||||||
parseClassPath(args[0]), false, Collections.<File>emptyList(), 4096, args[1],
|
|
||||||
Arrays.asList(Arrays.copyOfRange(args, 4, args.length))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static List<File> parseClassPath(String classpath) {
|
private static List<File> parseClassPath(String classpath) {
|
||||||
String[] paths = classpath.split(File.pathSeparator);
|
String[] paths = classpath.split(File.pathSeparator);
|
||||||
List<File> files = new ArrayList<File>(paths.length);
|
List<File> files = new ArrayList<File>(paths.length);
|
||||||
|
|||||||
Reference in New Issue
Block a user