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

Commits on Jul 1, 2016

  1. Copy the full SHA
    5212575 View commit details
  2. Copy the full SHA
    50a82c2 View commit details
Showing with 15 additions and 17 deletions.
  1. +5 −3 tool/jruby_eclipse
  2. +10 −14 truffle/src/main/java/org/jruby/truffle/core/array/ArrayNodes.java
8 changes: 5 additions & 3 deletions tool/jruby_eclipse
Original file line number Diff line number Diff line change
@@ -2,9 +2,13 @@
# A JRuby launcher, in Ruby, and using the class files from Eclipse
# Currently needs the core and stdlib jar, so build them again when they change.

JRUBY = File.expand_path('../..', __FILE__)

M2REPO = "#{Dir.home}/.m2/repository"

TRUFFLE_VERSION = "0.13"
TRUFFLE_VERSION = File.foreach("#{JRUBY}/truffle/pom.rb") { |line|
break $1 if /'truffle\.version' => '(\d+\.\d+|\h+-SNAPSHOT)'/ =~ line
}

TRUFFLEJARS = %W[
com/oracle/truffle/truffle-api/#{TRUFFLE_VERSION}/truffle-api-#{TRUFFLE_VERSION}.jar
@@ -17,8 +21,6 @@ JLINE = "#{M2REPO}/jline/jline/2.11/jline-2.11.jar"

GRAAL_OPTIONS_PREFIX = "graal."

JRUBY = File.expand_path('../..', __FILE__)

VERIFY_JRUBY = false

java = ENV["JAVACMD"] || "java"
24 changes: 10 additions & 14 deletions truffle/src/main/java/org/jruby/truffle/core/array/ArrayNodes.java
Original file line number Diff line number Diff line change
@@ -723,40 +723,36 @@ public Object delete(VirtualFrame frame, DynamicObject array, Object value, Obje
final ArrayMirror store = strategy.newMirror(array);

Object found = nil();
boolean isFound = false;

int i = 0;
int n = 0;
for (; n < getSize(array); n++) {
while (n < getSize(array)) {
final Object stored = store.get(n);

if (equalNode.executeSameOrEqual(frame, stored, value)) {
checkFrozen(array);
found = stored;
isFound = true;
continue;
}
n++;
} else {
if (i != n) {
store.set(i, store.get(n));
}

if (i != n) {
store.set(i, store.get(n));
i++;
n++;
}

i++;
}

if (i != n) {
setStoreAndSize(array, store.getArray(), i);
}

if(!isFound){
return found;
} else {
if (maybeBlock == NotProvided.INSTANCE) {
return nil();
} else {
return yield(frame, (DynamicObject) maybeBlock, value);
}
}

return found;
}

public void checkFrozen(Object object) {