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: 5bac239a144d
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 82d87b6855b7
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Feb 2, 2016

  1. Copy the full SHA
    eae50f8 View commit details
  2. Copy the full SHA
    82d87b6 View commit details
Showing with 7 additions and 1 deletion.
  1. +7 −1 truffle/src/main/java/org/jruby/truffle/core/ExceptionNodes.java
Original file line number Diff line number Diff line change
@@ -14,6 +14,8 @@
import com.oracle.truffle.api.object.DynamicObject;
import com.oracle.truffle.api.source.SourceSection;
import org.jcodings.specific.UTF8Encoding;
import org.jruby.truffle.nodes.objects.AllocateObjectNode;
import org.jruby.truffle.nodes.objects.AllocateObjectNodeGen;
import org.jruby.truffle.nodes.objectstorage.ReadHeadObjectFieldNode;
import org.jruby.truffle.nodes.objectstorage.ReadHeadObjectFieldNodeGen;
import org.jruby.truffle.runtime.NotProvided;
@@ -113,6 +115,7 @@ public DynamicObject captureBacktrace(DynamicObject exception, NotProvided offse
return captureBacktrace(exception, 1);
}

@TruffleBoundary
@Specialization
public DynamicObject captureBacktrace(DynamicObject exception, int offset) {
Backtrace backtrace = RubyCallStack.getBacktrace(getContext(), this, offset);
@@ -145,13 +148,16 @@ public Object message(DynamicObject exception) {
@CoreMethod(names = "allocate", constructor = true)
public abstract static class AllocateNode extends CoreMethodArrayArgumentsNode {

@Child private AllocateObjectNode allocateObjectNode;

public AllocateNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
allocateObjectNode = AllocateObjectNodeGen.create(context, sourceSection, null, null);
}

@Specialization
public DynamicObject allocate(DynamicObject rubyClass) {
return createRubyException(rubyClass);
return allocateObjectNode.allocate(rubyClass, null, null);
}

}