Skip to content

Commit

Permalink
Drop old preloader command-line interface, use new one instead
Browse files Browse the repository at this point in the history
  • Loading branch information
udalov committed Aug 27, 2015
1 parent 2a93629 commit 59a1509
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
4 changes: 1 addition & 3 deletions build.xml
Expand Up @@ -415,11 +415,9 @@
<assertions>
<enable/>
</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="org.jetbrains.kotlin.serialization.builtins.BuiltinsPackage"/>
<arg value="4096"/>
<arg value="notime"/>
<arg value="${output}/builtins"/>
<arg value="core/builtins/native"/>
<arg value="core/builtins/src"/>
Expand Down
Expand Up @@ -26,7 +26,7 @@
import java.net.URLClassLoader;
import java.util.*;

@SuppressWarnings({"CallToPrintStackTrace", "UseOfSystemOutOrSystemErr"})
@SuppressWarnings("UseOfSystemOutOrSystemErr")
public class Preloader {
public static final int DEFAULT_CLASS_NUMBER_ESTIMATE = 4096;

Expand Down Expand Up @@ -87,14 +87,8 @@ private static ClassLoader createClassLoader(Options options) throws MalformedUR
return new URLClassLoader(classpath, parent);
}

@SuppressWarnings({"AssignmentToForLoopParameter", "ConstantConditions"})
@SuppressWarnings("AssignmentToForLoopParameter")
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();
boolean measure = false;
List<File> instrumenters = Collections.emptyList();
Expand Down Expand Up @@ -137,14 +131,6 @@ else if ("-measure".equals(arg)) {
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) {
String[] paths = classpath.split(File.pathSeparator);
List<File> files = new ArrayList<File>(paths.length);
Expand Down

0 comments on commit 59a1509

Please sign in to comment.