Skip to content

Commit

Permalink
[Truffle] Fix n-body.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisseaton committed Feb 18, 2015
1 parent 8cd0203 commit 3b6362b
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,9 @@ public WriteNode(WriteNode prev) {
return ToSNodeFactory.create(getContext(), getSourceSection(), other);
}

@CompilerDirectives.TruffleBoundary
@Specialization
public int write(RubyString string) {
notDesignedForCompilation();

final ByteList byteList = string.getByteList();

final int offset = byteList.getBegin();
Expand Down

4 comments on commit 3b6362b

@nirvdrum
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. I may have gotten a bit overzealous here. The helper call already has a @TruffleBoundary on it, so we may not need it here.

I'm a bit surprised IO#write got hot, too.

@eregon
Copy link
Member

@eregon eregon commented on 3b6362b Feb 19, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is IO#write used in that benchmark?

@chrisseaton
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#puts -> #print -> #write to print the sample time. Not sure why only this benchmark compiles that code path.

@eregon
Copy link
Member

@eregon eregon commented on 3b6362b Feb 19, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, yeah that's weird.

Please sign in to comment.