Skip to content

Commit

Permalink
Showing 9 changed files with 12 additions and 87 deletions.
2 changes: 2 additions & 0 deletions core/src/main/java/org/jruby/truffle/nodes/RubyRootNode.java
Original file line number Diff line number Diff line change
@@ -46,6 +46,8 @@ public RubyRootNode cloneRubyRootNode() {

@Override
public Object execute(VirtualFrame frame) {
context.getSafepointManager().poll();

return body.execute(frame);
}

Original file line number Diff line number Diff line change
@@ -50,6 +50,8 @@ public Object execute(VirtualFrame frame) {
try {
outer: while (true) {
while (true) {
getContext().getSafepointManager().poll();

if (CompilerDirectives.inInterpreter()) {
count++;
}
Original file line number Diff line number Diff line change
@@ -44,6 +44,8 @@ public TryNode(RubyContext context, SourceSection sourceSection, ExceptionTransl
@Override
public Object execute(VirtualFrame frame) {
while (true) {
getContext().getSafepointManager().poll();

try {
final Object result = tryPart.execute(frame);
elseProfile.enter();
Original file line number Diff line number Diff line change
@@ -24,8 +24,6 @@
*/
public class WhileNode extends RubyNode {



@Child protected BooleanCastNode condition;
@Child protected RubyNode body;

@@ -46,6 +44,8 @@ public Object execute(VirtualFrame frame) {
try {
outer: while (condition.executeBoolean(frame)) {
while (true) {
getContext().getSafepointManager().poll();

if (CompilerDirectives.inInterpreter()) {
count++;
}
Original file line number Diff line number Diff line change
@@ -22,13 +22,7 @@ public class RubyASTProber implements ASTProber {
private final List<RubyNodeProber> probers = new ArrayList<>();

public RubyASTProber() {
if ((boolean) Options.TRUFFLE_TRACE.load()) {
probers.add(new TraceProber());
}

if ((boolean) Options.TRUFFLE_OBJECTSPACE.load()) {
probers.add(new SafepointProber());
}
probers.add(new TraceProber());
}

@Override

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -30,6 +30,8 @@ public RedoableNode(RubyContext context, SourceSection sourceSection, RubyNode b
@Override
public Object execute(VirtualFrame frame) {
while (true) {
getContext().getSafepointManager().poll();

try {
return body.execute(frame);
} catch (RedoException e) {
4 changes: 1 addition & 3 deletions core/src/main/java/org/jruby/util/cli/Options.java
Original file line number Diff line number Diff line change
@@ -130,9 +130,7 @@ public class Options {
public static final Option<Boolean> TRUFFLE_PRINT_RUNTIME = bool(TRUFFLE, "truffle.printRuntime", false, "" +
"Print the name of the Truffle runtime on startup.");
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<Boolean> TRUFFLE_TRACE = bool(TRUFFLE, "truffle.trace", true, "Install trace probes needed for set_trace_func.");
public static final Option<Boolean> TRUFFLE_OBJECTSPACE = bool(TRUFFLE, "truffle.object_space", true, "Install safepoints needed for ObjectSpace.");
public static final Option<Boolean> TRUFFLE_PROC_BINDING = bool(TRUFFLE, "truffle.proc.binding", true, "Implements Proc#binding.");
public static final Option<Boolean> TRUFFLE_PROC_BINDING = bool(TRUFFLE, "truffle.proc.binding", true, "Enable Proc#binding.");
public static final Option<Boolean> TRUFFLE_EXCEPTIONS_PRINT_JAVA = bool(TRUFFLE, "truffle.exceptions.print_java", false, "Print Java exceptions at the point of translating them to Ruby exceptions.");
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.");

0 comments on commit ce10121

Please sign in to comment.