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

Commits on Oct 6, 2015

  1. Copy the full SHA
    8c52582 View commit details
  2. Copy the full SHA
    43278c6 View commit details
Original file line number Diff line number Diff line change
@@ -63,6 +63,7 @@ public static HashLiteralNode create(RubyContext context, SourceSection sourceSe
}
}

@ExplodeLoop
@Override
public void executeVoid(VirtualFrame frame) {
for (RubyNode child : keyValues) {
@@ -150,6 +151,7 @@ public GenericHashLiteralNode(RubyContext context, SourceSection sourceSection,
super(context, sourceSection, keyValues);
}

@ExplodeLoop
@Override
public Object execute(VirtualFrame frame) {
if (setNode == null) {
Original file line number Diff line number Diff line change
@@ -213,13 +213,13 @@ public Object setBucketsNotByIdentity(VirtualFrame frame, DynamicObject hash, Dy
return setBuckets(frame, hash, freezeAndDupIfNeeded(frame, key), value, byIdentity);
}

private DynamicObject freezeAndDupIfNeeded(VirtualFrame frame, DynamicObject key) {
private Object freezeAndDupIfNeeded(VirtualFrame frame, DynamicObject key) {
if (isFrozenNode == null) {
CompilerDirectives.transferToInterpreter();
isFrozenNode = insert(IsFrozenNodeGen.create(getContext(), getSourceSection(), null));
}

if (frozenProfile.profile(isFrozenNode.executeIsFrozen(key))) {
if (!frozenProfile.profile(isFrozenNode.executeIsFrozen(key))) {
if (dupNode == null) {
CompilerDirectives.transferToInterpreter();
dupNode = insert(DispatchHeadNodeFactory.createMethodCall(getContext()));
@@ -230,8 +230,7 @@ private DynamicObject freezeAndDupIfNeeded(VirtualFrame frame, DynamicObject key
freezeNode = insert(DispatchHeadNodeFactory.createMethodCall(getContext()));
}

final Object dupped = dupNode.call(frame, key, "dup", null);
return (DynamicObject) freezeNode.call(frame, dupped, "freeze", null);
return freezeNode.call(frame, dupNode.call(frame, key, "dup", null), "freeze", null);
} else {
return key;
}