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

Commits on Jun 18, 2015

  1. [Truffle] add missing specializations to Interop builtins

    Matthias Grimmer committed Jun 18, 2015
    Copy the full SHA
    a06bccc View commit details

Commits on Jun 21, 2015

  1. Copy the full SHA
    be0d8bc View commit details
Showing with 8 additions and 2 deletions.
  1. +8 −2 truffle/src/main/java/org/jruby/truffle/nodes/core/TruffleInteropNodes.java
Original file line number Diff line number Diff line change
@@ -158,15 +158,21 @@ public ReadPropertyNode(RubyContext context, SourceSection sourceSection) {
public Object executeForeign(VirtualFrame frame, TruffleObject receiver, int identifier) {
return ForeignAccess.execute(node, frame, receiver, identifier);
}

@Specialization
public Object executeForeign(VirtualFrame frame, String receiver, int identifier) {
return receiver.charAt(identifier);
}

@Specialization
public Object executeForeign(VirtualFrame frame, String receiver, long identifier) {
return receiver.charAt((int) identifier);
}


@Specialization
public Object executeForeign(VirtualFrame frame, TruffleObject receiver, long identifier) {
return ForeignAccess.execute(node, frame, receiver, identifier);
return ForeignAccess.execute(node, frame, receiver, (int) identifier);
}

@CompilationFinal private String identifier;