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

Commits on Jul 5, 2016

  1. [Truffle] Cleanup from removing Tuple.

    * Move methods to array.
    * copy_from is not a primitive.
    * Remove the only usages of #put.
    eregon committed Jul 5, 2016
    Copy the full SHA
    8b67cef View commit details
  2. Copy the full SHA
    5813433 View commit details
  3. Copy the full SHA
    06a7354 View commit details
Original file line number Diff line number Diff line change
@@ -1474,7 +1474,6 @@ public DynamicObjectFactory getHandleFactory() {

private static final String[] coreFiles = {
"/core/pre.rb",
"/core/tuple.rb",
"/core/lookuptable.rb",
"/core/basic_object.rb",
"/core/mirror.rb",
10 changes: 0 additions & 10 deletions truffle/src/main/java/org/jruby/truffle/core/array/ArrayNodes.java
Original file line number Diff line number Diff line change
@@ -2279,14 +2279,4 @@ protected static boolean fallback(DynamicObject array, DynamicObject other, Obje

}

@Primitive(name = "tuple_copy_from")
public static abstract class TupleCopyFromPrimitiveNode extends PrimitiveArrayArgumentsNode {

@Specialization
public Object tupleCopyFrom() {
return null;
}

}

}
17 changes: 11 additions & 6 deletions truffle/src/main/ruby/core/array.rb
Original file line number Diff line number Diff line change
@@ -1434,10 +1434,8 @@ def reverse!
return self unless size > 1

i = 0
while i < self.length / 2
temp = self[i]
self[i] = self[self.length - i - 1]
self[self.length - i - 1] = temp
while i < size / 2
swap i, size-i-1
i += 1
end

@@ -1487,7 +1485,7 @@ def slice!(start, length=undefined)

# Check for shift style.
if start == 0
put 0, nil
self[0] = nil
self.shift
else
delete_range(start, 1)
@@ -1520,7 +1518,7 @@ def delete_range(index, del_length)
reg_length = size - reg_start
if reg_start <= size
# copy tail
copy_from self, reg_start, reg_length, index
self[index, reg_length] = self[reg_start, reg_length]

self.pop(del_length)
end
@@ -1584,4 +1582,11 @@ def sort!(&block)
Truffle::Array.steal_storage(self, sort(&block))
end
public :sort!

def swap(a, b)
temp = at(a)
self[a] = at(b)
self[b] = temp
end
protected :swap
end
2 changes: 1 addition & 1 deletion truffle/src/main/ruby/core/identity_map.rb
Original file line number Diff line number Diff line change
@@ -318,7 +318,7 @@ def promote_row(row, index, item, item_hash, ordinal)

def enlarge_row(row, item, item_hash, ordinal)
new_row = Row.new row.size + ROW_GROWTH
new_row.copy_from row, 1, row.size-1, 1
new_row[0, row.size] = row

index = row[0]
new_row[0] = index + 3
86 changes: 0 additions & 86 deletions truffle/src/main/ruby/core/tuple.rb

This file was deleted.