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

Commits on Dec 3, 2015

  1. Copy the full SHA
    ea89594 View commit details
  2. [Truffle] Keep digging ...

    eregon committed Dec 3, 2015
    Copy the full SHA
    2e1c73c View commit details
Original file line number Diff line number Diff line change
@@ -61,16 +61,17 @@ public Object execute(VirtualFrame frame) {

if (AttachmentsManager.ATTACHMENT_SOURCE == source) {
SourceSection sourceSection;
DynamicObject block = null;
try {
sourceSection = (SourceSection) frame.getArguments()[0];
block = (DynamicObject) frame.getArguments()[1];
} catch (ClassCastException e) {
CompilerDirectives.transferToInterpreter();
for (Object arg : frame.getArguments()) {
System.out.println(arg.getClass() + " " + arg);
}
sourceSection = SourceSection.createUnavailable("attachment", "attachment");
}
final DynamicObject block = (DynamicObject) frame.getArguments()[1];

final RootNode rootNode = new AttachmentsManager.AttachmentRootNode(RubyLanguage.class, cachedContext, sourceSection, null, block);
final CallTarget callTarget = Truffle.getRuntime().createCallTarget(rootNode);
Original file line number Diff line number Diff line change
@@ -100,7 +100,7 @@ public static class AttachmentRootNode extends RootNode {

@Child private DirectCallNode callNode;

public AttachmentRootNode(Class<? extends TruffleLanguage> language, RubyContext context, SourceSection sourceSection, FrameDescriptor frameDescriptor, DynamicObject block) {
public AttachmentRootNode(Class<? extends TruffleLanguage<?>> language, RubyContext context, SourceSection sourceSection, FrameDescriptor frameDescriptor, DynamicObject block) {
super(language, sourceSection, frameDescriptor);
this.context = context;
this.block = block;