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

Commits on Apr 1, 2016

  1. Copy the full SHA
    7a327d9 View commit details
  2. Copy the full SHA
    ece6e40 View commit details
Showing with 7 additions and 2 deletions.
  1. +7 −2 truffle/src/main/java/org/jruby/truffle/core/hash/SetNode.java
Original file line number Diff line number Diff line change
@@ -66,7 +66,12 @@ public SetNode(RubyContext context, SourceSection sourceSection) {

@Specialization(guards = { "isNullHash(hash)", "!isRubyString(key)" })
public Object setNull(VirtualFrame frame, DynamicObject hash, Object key, Object value, boolean byIdentity) {
Object store = PackedArrayStrategy.createStore(getContext(), hashNode.hash(frame, key), key, value);
int hashed = 0;
if (!byIdentityProfile.profile(byIdentity)) {
hashed = hashNode.hash(frame, key);
}

Object store = PackedArrayStrategy.createStore(getContext(), hashed, key, value);
assert HashOperations.verifyStore(getContext(), store, 1, null, null);
Layouts.HASH.setStore(hash, store);
Layouts.HASH.setSize(hash, 1);
@@ -95,7 +100,7 @@ public Object setPackedArray(VirtualFrame frame, DynamicObject hash, Object key,
boolean profiledByIdentity = byIdentityProfile.profile(byIdentity);

int hashed = 0;
if (profiledByIdentity) {
if (!profiledByIdentity) {
hashed = hashNode.hash(frame, key);
}