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

Commits on Dec 29, 2014

  1. [Truffle] Always call block parameters 'block' so they aren't confuse…

    …d with final parameters that just happen to take a RubyProc.
    chrisseaton committed Dec 29, 2014
    Copy the full SHA
    c1ed261 View commit details

Commits on Dec 30, 2014

  1. Copy the full SHA
    af77cd9 View commit details
Showing with 10 additions and 10 deletions.
  1. +10 −10 core/src/main/java/org/jruby/truffle/nodes/core/ArrayNodes.java
20 changes: 10 additions & 10 deletions core/src/main/java/org/jruby/truffle/nodes/core/ArrayNodes.java
Original file line number Diff line number Diff line change
@@ -3458,15 +3458,15 @@ public SortNode(SortNode prev) {
}

@Specialization(guards = "isNull")
public RubyArray sortNull(RubyArray array, UndefinedPlaceholder compare) {
public RubyArray sortNull(RubyArray array, UndefinedPlaceholder block) {
notDesignedForCompilation();

return new RubyArray(getContext().getCoreLibrary().getArrayClass());
}

@ExplodeLoop
@Specialization(guards = {"isIntegerFixnum", "isSmall"})
public RubyArray sortVeryShortIntegerFixnum(VirtualFrame frame, RubyArray array, UndefinedPlaceholder compare) {
public RubyArray sortVeryShortIntegerFixnum(VirtualFrame frame, RubyArray array, UndefinedPlaceholder block) {
final int[] store = (int[]) array.getStore();

final int size = array.getSize();
@@ -3491,7 +3491,7 @@ public RubyArray sortVeryShortIntegerFixnum(VirtualFrame frame, RubyArray array,
}

@Specialization(guards = "isIntegerFixnum")
public RubyArray sortIntegerFixnum(VirtualFrame frame, RubyArray array, UndefinedPlaceholder compare) {
public RubyArray sortIntegerFixnum(VirtualFrame frame, RubyArray array, UndefinedPlaceholder block) {
notDesignedForCompilation();

final Object[] boxed = ArrayUtils.box((int[]) array.getStore());
@@ -3502,7 +3502,7 @@ public RubyArray sortIntegerFixnum(VirtualFrame frame, RubyArray array, Undefine

@ExplodeLoop
@Specialization(guards = {"isLongFixnum", "isSmall"})
public RubyArray sortVeryShortLongFixnum(VirtualFrame frame, RubyArray array, UndefinedPlaceholder compare) {
public RubyArray sortVeryShortLongFixnum(VirtualFrame frame, RubyArray array, UndefinedPlaceholder block) {
final long[] store = (long[]) array.getStore();

final int size = array.getSize();
@@ -3527,7 +3527,7 @@ public RubyArray sortVeryShortLongFixnum(VirtualFrame frame, RubyArray array, Un
}

@Specialization(guards = "isLongFixnum")
public RubyArray sortLongFixnum(VirtualFrame frame, RubyArray array, UndefinedPlaceholder compare) {
public RubyArray sortLongFixnum(VirtualFrame frame, RubyArray array, UndefinedPlaceholder block) {
notDesignedForCompilation();

final Object[] boxed = ArrayUtils.box((long[]) array.getStore());
@@ -3537,7 +3537,7 @@ public RubyArray sortLongFixnum(VirtualFrame frame, RubyArray array, UndefinedPl
}

@Specialization(guards = "isFloat")
public RubyArray sortDouble(VirtualFrame frame, RubyArray array, UndefinedPlaceholder compare) {
public RubyArray sortDouble(VirtualFrame frame, RubyArray array, UndefinedPlaceholder block) {
notDesignedForCompilation();

final Object[] boxed = ArrayUtils.box((double[]) array.getStore());
@@ -3547,7 +3547,7 @@ public RubyArray sortDouble(VirtualFrame frame, RubyArray array, UndefinedPlaceh
}

@Specialization(guards = {"isObject", "isSmall"})
public RubyArray sortVeryShortObject(VirtualFrame frame, RubyArray array, UndefinedPlaceholder compare) {
public RubyArray sortVeryShortObject(VirtualFrame frame, RubyArray array, UndefinedPlaceholder block) {
final Object[] store = (Object[]) array.getStore();

// Insertion sort
@@ -3569,7 +3569,7 @@ public RubyArray sortVeryShortObject(VirtualFrame frame, RubyArray array, Undefi
}

@Specialization(guards = "isObject")
public RubyArray sortObject(VirtualFrame frame, RubyArray array, UndefinedPlaceholder compare) {
public RubyArray sortObject(VirtualFrame frame, RubyArray array, UndefinedPlaceholder block) {
notDesignedForCompilation();

final Object[] store = Arrays.copyOf((Object[]) array.getStore(), array.getSize());
@@ -3578,11 +3578,11 @@ public RubyArray sortObject(VirtualFrame frame, RubyArray array, UndefinedPlaceh
}

@Specialization(guards = "isObject")
public RubyArray sortWithCompareBlock(VirtualFrame frame, RubyArray array, RubyProc compare) {
public RubyArray sortWithCompareBlock(VirtualFrame frame, RubyArray array, RubyProc block) {
notDesignedForCompilation();

final Object[] store = Arrays.copyOf((Object[]) array.getStore(), array.getSize());
sort(frame, store, compare);
sort(frame, store, block);
return new RubyArray(getContext().getCoreLibrary().getArrayClass(), store, array.getSize());
}