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

Commits on Feb 2, 2016

  1. Copy the full SHA
    a37727b View commit details
  2. Copy the full SHA
    522044e View commit details
Original file line number Diff line number Diff line change
@@ -327,7 +327,7 @@ public DynamicObject callerLocations(int omit, NotProvided length) {
public DynamicObject callerLocations(int omit, int length) {
final DynamicObject threadBacktraceLocationClass = getContext().getCoreLibrary().getThreadBacktraceLocationClass();

final Backtrace backtrace = RubyCallStack.getBacktrace(getContext(), this, 1 + omit, true);
final Backtrace backtrace = RubyCallStack.getBacktrace(getContext(), this, 1 + omit, true, null);

int locationsCount = backtrace.getActivations().size();

Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
*/
package org.jruby.truffle.language.control;

import com.oracle.truffle.api.nodes.ControlFlowException;
import com.oracle.truffle.api.object.DynamicObject;

/**
@@ -17,7 +18,7 @@
* to throw them. The error messages match MRI. Note that throwing is different to raising in Ruby,
* which is the reason we have both {@link ThrowException} and {@link RaiseException}.
*/
public class RaiseException extends RuntimeException {
public class RaiseException extends ControlFlowException {

// TODO CS 1-Mar-15 shouldn't this be a ControlFlowException?

Original file line number Diff line number Diff line change
@@ -51,9 +51,6 @@ public Object execute(VirtualFrame frame) {

try {
result = tryPart.execute(frame);
} catch (ControlFlowException exception) {
controlFlowProfile.enter();
throw exception;
} catch (RaiseException exception) {
raiseExceptionProfile.enter();

@@ -63,6 +60,9 @@ public Object execute(VirtualFrame frame) {
getContext().getSafepointManager().poll(this);
continue;
}
} catch (ControlFlowException exception) {
controlFlowProfile.enter();
throw exception;
}

elseProfile.enter();
Original file line number Diff line number Diff line change
@@ -55,12 +55,12 @@ public Object execute(VirtualFrame frame) {
} catch (TruffleFatalException | ThreadExitException exception) {
CompilerDirectives.transferToInterpreter();
throw exception;
} catch (ControlFlowException exception) {
controlProfile.enter();
throw exception;
} catch (RaiseException exception) {
rethrowProfile.enter();
throw exception;
} catch (ControlFlowException exception) {
controlProfile.enter();
throw exception;
} catch (MainExitException exception) {
CompilerDirectives.transferToInterpreter();
throw exception;