Skip to content

Commit

Permalink
Showing 4 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion truffle/pom.rb
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
repository( :url => 'http://lafo.ssw.uni-linz.ac.at/nexus/content/repositories/snapshots/',
:id => 'truffle' )

truffle_version = 'e3c6cca3ef533b3ea4cf56e07e51473d0bb8006b-SNAPSHOT'
truffle_version = 'b5b0f3621f056eb27d534830daab98c731dc4acd-SNAPSHOT'
jar 'com.oracle.truffle:truffle-api:' + truffle_version
jar 'com.oracle.truffle:truffle-debug:' + truffle_version
jar 'com.oracle.truffle:truffle-dsl-processor:' + truffle_version, :scope => 'provided'
8 changes: 4 additions & 4 deletions truffle/pom.xml
Original file line number Diff line number Diff line change
@@ -31,23 +31,23 @@ DO NOT MODIFIY - GENERATED CODE
<dependency>
<groupId>com.oracle.truffle</groupId>
<artifactId>truffle-api</artifactId>
<version>e3c6cca3ef533b3ea4cf56e07e51473d0bb8006b-SNAPSHOT</version>
<version>b5b0f3621f056eb27d534830daab98c731dc4acd-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.oracle.truffle</groupId>
<artifactId>truffle-debug</artifactId>
<version>e3c6cca3ef533b3ea4cf56e07e51473d0bb8006b-SNAPSHOT</version>
<version>b5b0f3621f056eb27d534830daab98c731dc4acd-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.oracle.truffle</groupId>
<artifactId>truffle-dsl-processor</artifactId>
<version>e3c6cca3ef533b3ea4cf56e07e51473d0bb8006b-SNAPSHOT</version>
<version>b5b0f3621f056eb27d534830daab98c731dc4acd-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.oracle.truffle</groupId>
<artifactId>truffle-tck</artifactId>
<version>e3c6cca3ef533b3ea4cf56e07e51473d0bb8006b-SNAPSHOT</version>
<version>b5b0f3621f056eb27d534830daab98c731dc4acd-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
Original file line number Diff line number Diff line change
@@ -689,17 +689,17 @@ public ResolvedInteropExecuteAfterReadNode(RubyContext context, SourceSection so
super(context, sourceSection);
this.name = name;
this.head = new DispatchHeadNode(context, true, MissingBehavior.CALL_METHOD_MISSING, DispatchAction.CALL_METHOD);
this.arguments = new InteropArgumentsNode(context, sourceSection, arity); // [0] is label, [1] is the receiver
this.labelIndex = 0;
this.receiverIndex = 1;
this.arguments = new InteropArgumentsNode(context, sourceSection, arity); // [0] is receiver, [1] is the label
this.labelIndex = 1;
this.receiverIndex = 0;
}

@Override
public Object execute(VirtualFrame frame) {
if (name.equals(ForeignAccess.getArguments(frame).get(labelIndex))) {
if (name.equals(frame.getArguments()[labelIndex])) {
Object[] args = new Object[arguments.getCount(frame)];
arguments.executeFillObjectArray(frame, args);
return head.dispatch(frame, ForeignAccess.getArguments(frame).get(receiverIndex), ForeignAccess.getArguments(frame).get(labelIndex), null, args);
return head.dispatch(frame, frame.getArguments()[receiverIndex], frame.getArguments()[labelIndex], null, args);
} else {
CompilerDirectives.transferToInterpreter();
throw new IllegalStateException("Name changed");
@@ -732,7 +732,7 @@ public InteropArgumentsNode(RubyContext context, SourceSection sourceSection, in
// the arguments array looks like:
// label, a0 (which is the receiver), a1, a2, ...
for (int i = 2; i < 2 + arity - 1; i++) {
arguments[i - 2] = new InteropArgumentNode(context, sourceSection, i);
arguments[i - 2] = new InteropArgumentNode(context, sourceSection, i - 1);
}
}

9 changes: 8 additions & 1 deletion truffle/src/test/java/org/jruby/truffle/tck/RubyTckTest.java
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ protected TruffleVM prepareVM() throws Exception {
+ "def compound_object\n"
+ " object = Object.new\n"
+ " def object.fourtyTwo; 42; end\n"
+ " def object.plus; -> (a, b) { a + b }; end\n"
+ " def object.plus(a, b); a + b; end\n"
+ " def object.returnsNull; nil; end\n"
+ " def object.returnsThis; self; end\n"
+ " object\n"
@@ -113,4 +113,11 @@ protected String compoundObject() {
protected String identity() {
return "identity";
}

@Ignore
@Override
@Test
public void testPlusWithIntsOnCompoundObject() throws Exception {
super.testPlusWithIntsOnCompoundObject();
}
}

0 comments on commit 5f4a4b6

Please sign in to comment.