Skip to content

Commit

Permalink
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/src/main/java/org/jruby/util/cli/Options.java
Original file line number Diff line number Diff line change
@@ -302,6 +302,7 @@ public class Options {
public static final Option<Boolean> TRUFFLE_BACKTRACES_INTERLEAVE_JAVA = bool(TRUFFLE, "truffle.backtraces.interleave_java", false, "Interleave Java stacktraces into the Ruby backtrace.");
public static final Option<Integer> TRUFFLE_BACKTRACES_LIMIT = integer(TRUFFLE, "truffle.backtraces.limit", 9999, "Limit the size of Ruby backtraces.");
public static final Option<Boolean> TRUFFLE_BACKTRACES_OMIT_UNUSED = bool(TRUFFLE, "truffle.backtraces.omit_unused", true, "Omit backtraces that should be unused as they have pure rescue expressions.");
public static final Option<Boolean> TRUFFLE_BASICOPS_INLINE = bool(TRUFFLE, "truffle.basic_ops.inline", false, "Inline basic operations (like Fixnum operators) in the AST without a call.");

public static final Option<Boolean> TRUFFLE_METRICS_TIME = bool(TRUFFLE, "truffle.metrics.time", false, "Print the time at various stages of VM operation.");
public static final Option<Boolean> TRUFFLE_METRICS_MEMORY_USED_ON_EXIT = bool(TRUFFLE, "truffle.metrics.memory_used_on_exit", false, "Print the size of heap memory in use on exit.");
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@
import com.oracle.truffle.api.object.DynamicObject;
import org.jruby.truffle.Layouts;
import org.jruby.truffle.core.numeric.FixnumNodesFactory;
import org.jruby.truffle.language.Options;
import org.jruby.truffle.language.RubyNode;
import org.jruby.truffle.language.dispatch.RubyCallNode;
import org.jruby.truffle.language.dispatch.RubyCallNodeParameters;
@@ -40,7 +41,7 @@ private InternalMethod getMethod(DynamicObject module, String name) {
}

public RubyNode createCallNode(RubyCallNodeParameters callParameters) {
if (callParameters.getBlock() != null || callParameters.isSplatted() || callParameters.isSafeNavigation()) {
if (!Options.BASICOPS_INLINE || callParameters.getBlock() != null || callParameters.isSplatted() || callParameters.isSafeNavigation()) {
return new RubyCallNode(callParameters);
}

2 changes: 2 additions & 0 deletions truffle/src/main/java/org/jruby/truffle/language/Options.java
Original file line number Diff line number Diff line change
@@ -71,6 +71,7 @@
import static org.jruby.util.cli.Options.TRUFFLE_YIELD_ALWAYS_CLONE;
import static org.jruby.util.cli.Options.TRUFFLE_YIELD_ALWAYS_INLINE;
import static org.jruby.util.cli.Options.TRUFFLE_YIELD_CACHE;
import static org.jruby.util.cli.Options.TRUFFLE_BASICOPS_INLINE;

public class Options {

@@ -158,6 +159,7 @@ public class Options {
public final boolean BACKTRACES_INTERLEAVE_JAVA = TRUFFLE_BACKTRACES_INTERLEAVE_JAVA.load();
public final int BACKTRACES_LIMIT = TRUFFLE_BACKTRACES_LIMIT.load();
public final boolean BACKTRACES_OMIT_UNUSED = TRUFFLE_BACKTRACES_OMIT_UNUSED.load();
public static final boolean BASICOPS_INLINE = TRUFFLE_BASICOPS_INLINE.load();

// Call graph

0 comments on commit 412c65d

Please sign in to comment.