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: 212a907922a6
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6b2e3dc78c83
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Mar 3, 2015

  1. Copy the full SHA
    f616f4b View commit details
  2. Copy the full SHA
    5a3295c View commit details
  3. Copy the full SHA
    6b2e3dc View commit details
Original file line number Diff line number Diff line change
@@ -1987,7 +1987,6 @@ public RubyString packLStar(RubyArray array, RubyString format) {
return new RubyString(getContext().getCoreLibrary().getStringClass(), new ByteList(bytes));
}

@CompilerDirectives.TruffleBoundary
@Specialization
public RubyString pack(VirtualFrame frame, RubyArray array, RubyString format) {
notDesignedForCompilation();
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@
import com.oracle.truffle.api.nodes.ControlFlowException;
import com.oracle.truffle.api.source.SourceSection;
import com.oracle.truffle.api.utilities.BranchProfile;

import org.jruby.truffle.nodes.RubyNode;
import org.jruby.truffle.runtime.DebugOperations;
import org.jruby.truffle.runtime.RubyContext;
@@ -29,6 +30,9 @@

public class ExceptionTranslatingNode extends RubyNode {

private static final boolean PRINT_JAVA_EXCEPTIONS = Options.TRUFFLE_EXCEPTIONS_PRINT_JAVA.load();
private static final boolean PANIC_ON_JAVA_ASSERT = Options.TRUFFLE_PANIC_ON_JAVA_ASSERT.load();

private final UnsupportedOperationBehavior unsupportedOperationBehavior;

@Child private RubyNode child;
@@ -75,15 +79,15 @@ public Object execute(VirtualFrame frame) {
}

private RubyException translate(ArithmeticException exception) {
if (Options.TRUFFLE_EXCEPTIONS_PRINT_JAVA.load()) {
if (PRINT_JAVA_EXCEPTIONS) {
exception.printStackTrace();
}

return getContext().getCoreLibrary().zeroDivisionError(this);
}

private RubyException translate(UnsupportedSpecializationException exception) {
if (Options.TRUFFLE_EXCEPTIONS_PRINT_JAVA.load()) {
if (PRINT_JAVA_EXCEPTIONS) {
exception.printStackTrace();
}

@@ -146,14 +150,11 @@ private RubyException translate(UnsupportedSpecializationException exception) {
}

public RubyException translate(Throwable throwable) {
try {
if (Options.TRUFFLE_EXCEPTIONS_PRINT_JAVA.load()) {
throwable.printStackTrace();
}
} catch (NullPointerException e) {
if (PRINT_JAVA_EXCEPTIONS) {
throwable.printStackTrace();
}

if (Options.TRUFFLE_PANIC_ON_JAVA_ASSERT.load() && throwable instanceof AssertionError) {
if (PANIC_ON_JAVA_ASSERT && throwable instanceof AssertionError) {
DebugOperations.panic(getContext(), this, throwable.toString());
}

Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ public synchronized Source forFileBestFuzzily(final String path) {

// TODO CS 28-Feb-15 only need the max value - don't need a full sort, but no convenient API?

matches.sort(new Comparator<Map.Entry<String, Source>>() {
Collections.sort(matches, new Comparator<Map.Entry<String, Source>>() {

@Override
public int compare(Map.Entry<String, Source> a, Map.Entry<String, Source> b) {