Skip to content

Commit

Permalink
[Truffle] Remove things we don't use in RubyInstanceConfig.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisseaton committed Jan 4, 2017
1 parent d872260 commit 2443df5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 281 deletions.
2 changes: 1 addition & 1 deletion truffle/src/main/java/org/jruby/truffle/Main.java
Expand Up @@ -69,7 +69,7 @@ public class Main {
public static void main(String[] args) {
printTruffleTimeMetric("before-main");

final RubyInstanceConfig config = new RubyInstanceConfig(false);
final RubyInstanceConfig config = new RubyInstanceConfig();

try {
config.processArguments(args);
Expand Down
Expand Up @@ -450,18 +450,11 @@ private void processArgument() {
config.setShouldPrintUsage(true);
config.setShouldRunInterpreter(false);
break;
} else if (argument.equals("--properties")) {
config.setShouldPrintProperties(true);
config.setShouldRunInterpreter(false);
break;
} else if (argument.equals("--version")) {
disallowedInRubyOpts(argument);
config.setShowVersion(true);
config.setShouldRunInterpreter(false);
break FOR;
} else if (argument.equals("--bytecode")) {
config.setShowBytecode(true);
break FOR;
} else if (argument.equals("--fast")) {
throw new UnsupportedOperationException();
} else if (argument.startsWith("--profile")) {
Expand Down Expand Up @@ -513,8 +506,6 @@ private void processArgument() {
break FOR;
} else if (dumpArg.equals("syntax")) {
config.setShouldCheckSyntax(true);
} else if (dumpArg.equals("insns")) {
config.setShowBytecode(true);
} else {
MainExitException mee = new MainExitException(1, error);
mee.setUsageError(true);
Expand Down Expand Up @@ -612,24 +603,6 @@ private void runBinScript() {
endOfArguments = true;
}

private String resolve(String path, String scriptName) {
if (RubyInstanceConfig.DEBUG_SCRIPT_RESOLUTION) {
config.getError().println("Trying path: " + path);
}
try {
File fullName = new File(path, scriptName);
if (fullName.exists() && fullName.isFile()) {
if (RubyInstanceConfig.DEBUG_SCRIPT_RESOLUTION) {
config.getError().println("Found: " + fullName.getAbsolutePath());
}
return fullName.getAbsolutePath();
}
} catch (Exception e) {
// keep going
}
return null;
}

public String resolveScript(String scriptName) {
// TODO CS 4-Jan-17 this never worked properly - it needs home before we've set up a context to determine it properly
throw new UnsupportedOperationException();
Expand Down Expand Up @@ -664,14 +637,6 @@ public String resolveScript(String scriptName) {
return null;*/
}

@Deprecated
public String resolveScriptUsingClassLoader(String scriptName) {
if (RubyInstanceConfig.defaultClassLoader().getResourceAsStream("bin/" + scriptName) != null){
return "classpath:/bin/" + scriptName;
}
return null;
}

private String grabValue(String errorMessage) {
return grabValue(errorMessage, true);
}
Expand Down

0 comments on commit 2443df5

Please sign in to comment.