Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 933cde5993b2
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cad8f5e4fe72
Choose a head ref
  • 1 commit
  • 7 files changed
  • 1 contributor

Commits on Aug 4, 2015

  1. Copy the full SHA
    cad8f5e View commit details
14 changes: 0 additions & 14 deletions core/src/main/java/org/jruby/util/cli/ArgumentProcessor.java
Original file line number Diff line number Diff line change
@@ -380,7 +380,6 @@ private void processArgument() {
} else if (extendedOption.equals("+C") || extendedOption.equals("+CIR")) {
config.setCompileMode(RubyInstanceConfig.CompileMode.FORCE);
} else if (extendedOption.equals("+T")) {
checkGraalVersion();
Options.PARSER_WARN_GROUPED_EXPRESSIONS.force(Boolean.FALSE.toString());
config.setCompileMode(RubyInstanceConfig.CompileMode.TRUFFLE);
config.setDisableGems(true);
@@ -711,19 +710,6 @@ private void logScriptResolutionFailure(String path) {
}
}

public static void checkGraalVersion() {
if (Options.TRUFFLE_RUNTIME_VERSION_CHECK.load()) {
final String graalVersion = System.getProperty("graal.version", "unknown");
final String expectedGraalVersion = "0.7";

if (graalVersion.equals("unknown")) {
return;
} else if (!graalVersion.equals(expectedGraalVersion)) {
throw new RuntimeException("This version of JRuby is built against Graal " + expectedGraalVersion + " but you are using it with version " + graalVersion + " - either update Graal or use with (-J)-original to disable Graal and ignore this error");
}
}
}

private void checkProperties() {
final Set<String> propertyNames = new HashSet<>();
propertyNames.addAll(Options.getPropertyNames());
5 changes: 0 additions & 5 deletions core/src/main/java/org/jruby/util/cli/Options.java
Original file line number Diff line number Diff line change
@@ -125,15 +125,11 @@ public class Options {
public static final Option<Boolean> IR_WRITING_DEBUG = bool(IR, "ir.writing.debug", false, "Debug writing JRuby IR file.");
public static final Option<String> IR_INLINE_COMPILER_PASSES = string(IR, "ir.inline_passes", "Specify comma delimeted list of passes to run after inlining a method.");

public static final Option<Boolean> TRUFFLE_RUNTIME_VERSION_CHECK = bool(TRUFFLE, "truffle.runtime.version_check", true, "Check the version of Truffle supplied by the JVM before starting.");

public static final Option<Integer> TRUFFLE_DISPATCH_POLYMORPHIC_MAX = integer(TRUFFLE, "truffle.dispatch.polymorphic.max", 8, "Maximum size of a polymorphic call site cache.");
public static final Option<Integer> TRUFFLE_ARRAYS_UNINITIALIZED_SIZE = integer(TRUFFLE, "truffle.arrays.uninitialized_size", 32, "How large an array to allocate when we have no other information to go on.");
public static final Option<Boolean> TRUFFLE_ARRAYS_OPTIMISTIC_LONG = bool(TRUFFLE, "truffle.arrays.optimistic.long", true, "If we allocate an int[] for an Array and it has been converted to a long[], directly allocate a long[] next time.");
public static final Option<Integer> TRUFFLE_ARRAYS_SMALL = integer(TRUFFLE, "truffle.arrays.small", 3, "Maximum size of an Array to consider small for optimisations.");
public static final Option<Integer> TRUFFLE_HASH_PACKED_ARRAY_MAX = integer(TRUFFLE, "truffle.hash.packed_array_max", 3, "Maximum size of a Hash to use with the packed array storage strategy.");

public static final Option<Boolean> TRUFFLE_YIELDS = bool(TRUFFLE, "truffle.yields", false, "Insert GIL yieldpoints");
public static final Option<Integer> TRUFFLE_INSTRUMENTATION_SERVER_PORT = integer(TRUFFLE, "truffle.instrumentation_server_port", 0, "Port number to run an HTTP server on that provides instrumentation services");
public static final Option<String> TRUFFLE_TRANSLATOR_PRINT_AST = string(TRUFFLE, "truffle.translator.print_asts", "", "Comma delimited list of method names to print the AST of after translation.");
public static final Option<String> TRUFFLE_TRANSLATOR_PRINT_FULL_AST = string(TRUFFLE, "truffle.translator.print_full_asts", "", "Comma delimited list of method names to print the full AST of after translation.");
@@ -158,7 +154,6 @@ public class Options {
public static final Option<TruffleContextInterface.BacktraceFormatter> TRUFFLE_BACKTRACE_DISPLAY_FORMAT = enumeration(TRUFFLE, "truffle.backtrace.display_format", TruffleContextInterface.BacktraceFormatter.class, TruffleContextInterface.BacktraceFormatter.MRI, "How to format backtraces displayed to the user.");
public static final Option<TruffleContextInterface.BacktraceFormatter> TRUFFLE_BACKTRACE_DEBUG_FORMAT = enumeration(TRUFFLE, "truffle.backtrace.debug_format", TruffleContextInterface.BacktraceFormatter.class, TruffleContextInterface.BacktraceFormatter.DEBUG, "How to format backtraces displayed using TruffleDebug.dump_call_stack.");
public static final Option<TruffleContextInterface.BacktraceFormatter> TRUFFLE_BACKTRACE_EXCEPTION_FORMAT = enumeration(TRUFFLE, "truffle.backtrace.exception_format", TruffleContextInterface.BacktraceFormatter.class, TruffleContextInterface.BacktraceFormatter.MRI, "How to format backtraces in Exception objects.");
public static final Option<TruffleContextInterface.BacktraceFormatter> TRUFFLE_BACKTRACE_PANIC_FORMAT = enumeration(TRUFFLE, "truffle.backtrace.panic_format", TruffleContextInterface.BacktraceFormatter.class, TruffleContextInterface.BacktraceFormatter.IMPL_DEBUG, "How to format backtraces in panics.");
public static final Option<Integer> TRUFFLE_BACKTRACE_MAX_VALUE_LENGTH = integer(TRUFFLE, "truffle.backtrace.max_value_length", 20, "Max length for values when displayed in a backtrace.");
public static final Option<Boolean> TRUFFLE_BACKTRACE_GENERATE = bool(TRUFFLE, "truffle.backtrace.generate", true, "Generate backtraces on exceptions.");

Original file line number Diff line number Diff line change
@@ -442,16 +442,13 @@ public RubyBasicObject main() {
@CoreMethod(names = "pass", onSingleton = true)
public abstract static class PassNode extends CoreMethodArrayArgumentsNode {

@Child ThreadPassNode threadPassNode;

public PassNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
threadPassNode = new ThreadPassNode(context, sourceSection);
}

@Specialization
public RubyBasicObject pass(VirtualFrame frame) {
threadPassNode.executeVoid(frame);
Thread.yield();
return nil();
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -2752,10 +2752,6 @@ private RubyNode visitWhileNode(org.jruby.ast.WhileNode node, boolean conditionI

final RubyNode loop;

if (YIELDS) {
body = SequenceNode.sequence(context, sourceSection, new ThreadPassNode(context, sourceSection), body);
}

if (node.evaluateAtStart()) {
loop = WhileNode.createWhile(context, sourceSection, condition, body);
} else {
Original file line number Diff line number Diff line change
@@ -31,7 +31,6 @@
import org.jruby.truffle.nodes.cast.ArrayCastNodeGen;
import org.jruby.truffle.nodes.control.IfNode;
import org.jruby.truffle.nodes.control.SequenceNode;
import org.jruby.truffle.nodes.core.ThreadPassNode;
import org.jruby.truffle.nodes.defined.DefinedWrapperNode;
import org.jruby.truffle.nodes.dispatch.RespondToNode;
import org.jruby.truffle.nodes.literal.LiteralNode;
@@ -167,10 +166,6 @@ public RubyNode compileFunctionNode(SourceSection sourceSection, String methodNa
}
}

if (YIELDS) {
body = SequenceNode.sequence(context, sourceSection, new ThreadPassNode(context, sourceSection), body);
}

body = SequenceNode.sequence(context, sourceSection, prelude, body);

if (environment.getFlipFlopStates().size() > 0) {
Original file line number Diff line number Diff line change
@@ -21,8 +21,6 @@

public abstract class Translator extends org.jruby.ast.visitor.AbstractNodeVisitor<RubyNode> {

protected static final boolean YIELDS = Options.TRUFFLE_YIELDS.load();

public static final Set<String> PRINT_AST_METHOD_NAMES = new HashSet<>(Arrays.asList(Options.TRUFFLE_TRANSLATOR_PRINT_AST.load().split(",")));
public static final Set<String> PRINT_FULL_AST_METHOD_NAMES = new HashSet<>(Arrays.asList(Options.TRUFFLE_TRANSLATOR_PRINT_FULL_AST.load().split(",")));
public static final Set<String> PRINT_PARSE_TREE_METHOD_NAMES = new HashSet<>(Arrays.asList(Options.TRUFFLE_TRANSLATOR_PRINT_PARSE_TREE.load().split(",")));