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

Commits on Jul 7, 2016

  1. Copy the full SHA
    86a262b View commit details
  2. [Truffle] InvokePrimitiveNode should still invoke the primitive even …

    …if its result is not used.
    
    * For potential side effects.
    eregon committed Jul 7, 2016
    Copy the full SHA
    6be9e23 View commit details
Showing with 3 additions and 6 deletions.
  1. +3 −6 truffle/src/main/java/org/jruby/truffle/builtins/InvokePrimitiveNode.java
Original file line number Diff line number Diff line change
@@ -28,21 +28,18 @@ public InvokePrimitiveNode(RubyContext context, SourceSection sourceSection, Rub

@Override
public void executeVoid(VirtualFrame frame) {
primitive.execute(frame);
}

@Override
public Object execute(VirtualFrame frame) {
final Object value = primitive.execute(frame);

if (primitiveSucceededCondition.profile(value != null)) {
// If the primitive didn't fail its value is produced

return value;
} else {
return nil();
}

// Primitives may return null to indicate that they have failed, in which case we continue with the fallback

return nil();
}

}