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

Commits on Apr 19, 2016

  1. Copy the full SHA
    135d1eb View commit details
  2. Copy the full SHA
    1f26812 View commit details
  3. Copy the full SHA
    b932df7 View commit details
  4. Copy the full SHA
    7f7656b View commit details
  5. [Truffle] Use ArrayMirror and cleanup for Array#{delete_at,each,each_…

    …with_index,fill,initialize}.
    eregon committed Apr 19, 2016
    Copy the full SHA
    db093e8 View commit details
Original file line number Diff line number Diff line change
@@ -34,8 +34,7 @@ public Object execute(VirtualFrame frame) {

if (isFrozenNode.executeIsFrozen(result)) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(coreExceptions().frozenError(
Layouts.MODULE.getFields(coreLibrary().getLogicalClass(result)).getName(), this));
throw new RaiseException(coreExceptions().frozenError(result, this));
}

return result;
Original file line number Diff line number Diff line change
@@ -23,13 +23,13 @@ public class ReturnEnumeratorIfNoBlockNode extends RubyNode {

@Child private RubyNode method;
@Child private CallDispatchHeadNode toEnumNode;
private final String methodName;
private final DynamicObject methodSymbol;
private final ConditionProfile noBlockProfile = ConditionProfile.createBinaryProfile();

public ReturnEnumeratorIfNoBlockNode(String methodName, RubyNode method) {
super(method.getContext(), method.getEncapsulatingSourceSection());
this.method = method;
this.methodName = methodName;
this.methodSymbol = getSymbol(methodName);
}

@Override
@@ -42,13 +42,10 @@ public Object execute(VirtualFrame frame) {
toEnumNode = insert(DispatchHeadNodeFactory.createMethodCall(getContext()));
}

final Object[] arguments = ArrayUtils.unshift(RubyArguments.getArguments(frame), getSymbol(methodName));
final Object[] arguments = ArrayUtils.unshift(RubyArguments.getArguments(frame), methodSymbol);
return toEnumNode.call(frame, RubyArguments.getSelf(frame), "to_enum", null, arguments);

} else {

return method.execute(frame);

}
}

Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@ public static int getSize(DynamicObject array) {
}

public static void setStoreAndSize(DynamicObject array, Object store, int size) {
assert !(store instanceof ArrayMirror);
Layouts.ARRAY.setStore(array, store);
Layouts.ARRAY.setSize(array, size);
}
Loading