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

Commits on Nov 9, 2016

  1. Copy the full SHA
    47563e2 View commit details
  2. Copy the full SHA
    26485e8 View commit details
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@
import org.jruby.truffle.core.array.ArrayGuards;
import org.jruby.truffle.core.queue.LinkedBlockingQueueLocksConditions;
import org.jruby.truffle.language.objects.ShapeCachingGuards;
import org.jruby.truffle.util.BoundaryUtils.BoundaryIterable;

/**
* Share the internal field of an object, accessible by its Layout
@@ -67,7 +68,7 @@ protected void shareCachedQueue(DynamicObject object,
@Cached("createWriteBarrierNode()") WriteBarrierNode writeBarrierNode) {
LinkedBlockingQueueLocksConditions<Object> queue = Layouts.QUEUE.getQueue(object);
if (!profileEmpty.profile(queue.size() == 0)) {
for (Object e : queue) {
for (Object e : BoundaryIterable.wrap(queue)) {
writeBarrierNode.executeWriteBarrier(e);
}
}
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ public BoundaryIterable(Iterable<E> iterable) {

@Override
public BoundaryIterator<E> iterator() {
return new BoundaryIterator<E>(getIterator());
return new BoundaryIterator<>(getIterator());
}

@TruffleBoundary
@@ -59,6 +59,12 @@ public E next() {
return iterator.next();
}

@TruffleBoundary
@Override
public void remove() {
iterator.remove();
}

}

}