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

Commits on Sep 2, 2015

  1. Copy the full SHA
    f188039 View commit details
  2. Copy the full SHA
    7508b77 View commit details
Showing with 188 additions and 211 deletions.
  1. +2 −2 truffle/src/main/java/org/jruby/truffle/nodes/RubyNode.java
  2. +1 −1 truffle/src/main/java/org/jruby/truffle/nodes/cast/ArrayCastNode.java
  3. +2 −2 truffle/src/main/java/org/jruby/truffle/nodes/core/BasicObjectNodes.java
  4. +3 −3 truffle/src/main/java/org/jruby/truffle/nodes/core/KernelNodes.java
  5. +1 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/array/ArrayBuilderNode.java
  6. +6 −6 truffle/src/main/java/org/jruby/truffle/nodes/core/array/ArrayNodes.java
  7. +2 −2 truffle/src/main/java/org/jruby/truffle/nodes/core/hash/HashLiteralNode.java
  8. +61 −90 truffle/src/main/java/org/jruby/truffle/nodes/core/hash/HashNodes.java
  9. +13 −13 truffle/src/main/java/org/jruby/truffle/nodes/core/hash/SetNode.java
  10. +2 −2 truffle/src/main/java/org/jruby/truffle/nodes/dispatch/CachedBoxedMethodMissingDispatchNode.java
  11. +3 −3 truffle/src/main/java/org/jruby/truffle/nodes/dispatch/UnresolvedDispatchNode.java
  12. +3 −3 truffle/src/main/java/org/jruby/truffle/nodes/methods/ExceptionTranslatingNode.java
  13. +2 −2 truffle/src/main/java/org/jruby/truffle/nodes/yield/CallBlockNode.java
  14. +1 −1 truffle/src/main/java/org/jruby/truffle/pack/nodes/control/NNode.java
  15. +17 −17 truffle/src/main/java/org/jruby/truffle/runtime/Options.java
  16. +11 −3 truffle/src/main/java/org/jruby/truffle/runtime/RubyContext.java
  17. +1 −1 truffle/src/main/java/org/jruby/truffle/runtime/backtrace/BacktraceFormatter.java
  18. +3 −5 truffle/src/main/java/org/jruby/truffle/runtime/core/CoreLibrary.java
  19. +11 −11 truffle/src/main/java/org/jruby/truffle/runtime/hash/BucketsStrategy.java
  20. +6 −5 truffle/src/main/java/org/jruby/truffle/runtime/hash/HashOperations.java
  21. +15 −16 truffle/src/main/java/org/jruby/truffle/runtime/hash/PackedArrayStrategy.java
  22. +19 −19 truffle/src/main/java/org/jruby/truffle/translator/BodyTranslator.java
  23. +3 −3 truffle/src/main/java/org/jruby/truffle/translator/ModuleTranslator.java
4 changes: 2 additions & 2 deletions truffle/src/main/java/org/jruby/truffle/nodes/RubyNode.java
Original file line number Diff line number Diff line change
@@ -172,8 +172,8 @@ protected NativeSockets nativeSockets() {
return getContext().getNativeSockets();
}

protected static int getCacheLimit() {
return Options.DISPATCH_POLYMORPHIC_MAX;
protected int getCacheLimit() {
return getContext().getOptions().DISPATCH_POLYMORPHIC_MAX;
}

// Helper methods for caching
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
import org.jruby.truffle.runtime.layouts.Layouts;

/*
* TODO(CS): could probably unify this with SplatCastNode with some final configuration options.
* TODO(CS): could probably unify this with SplatCastNode with some final configuration getContext().getOptions().
*/
@NodeChild("child")
public abstract class ArrayCastNode extends RubyNode {
Original file line number Diff line number Diff line change
@@ -235,10 +235,10 @@ public SendNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);

dispatchNode = new CallDispatchHeadNode(context, true,
Options.DISPATCH_METAPROGRAMMING_ALWAYS_INDIRECT,
getContext().getOptions().DISPATCH_METAPROGRAMMING_ALWAYS_INDIRECT,
MissingBehavior.CALL_METHOD_MISSING);

if ((boolean) Options.DISPATCH_METAPROGRAMMING_ALWAYS_UNCACHED) {
if ((boolean) getContext().getOptions().DISPATCH_METAPROGRAMMING_ALWAYS_UNCACHED) {
dispatchNode.forceUncached();
}
}
Original file line number Diff line number Diff line change
@@ -1432,10 +1432,10 @@ public PublicSendNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);

dispatchNode = new CallDispatchHeadNode(context, false,
Options.DISPATCH_METAPROGRAMMING_ALWAYS_INDIRECT,
getContext().getOptions().DISPATCH_METAPROGRAMMING_ALWAYS_INDIRECT,
MissingBehavior.CALL_METHOD_MISSING);

if ((boolean) Options.DISPATCH_METAPROGRAMMING_ALWAYS_UNCACHED) {
if ((boolean) getContext().getOptions().DISPATCH_METAPROGRAMMING_ALWAYS_UNCACHED) {
dispatchNode.forceUncached();
}
}
@@ -1611,7 +1611,7 @@ public RespondToNode(RubyContext context, SourceSection sourceSection) {
dispatch = new DoesRespondDispatchHeadNode(context, false, false, MissingBehavior.RETURN_MISSING, null);
dispatchIgnoreVisibility = new DoesRespondDispatchHeadNode(context, true, false, MissingBehavior.RETURN_MISSING, null);

if ((boolean) Options.DISPATCH_METAPROGRAMMING_ALWAYS_UNCACHED) {
if ((boolean) getContext().getOptions().DISPATCH_METAPROGRAMMING_ALWAYS_UNCACHED) {
dispatch.forceUncached();
dispatchIgnoreVisibility.forceUncached();
}
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@ public void resume(Object[] store) {
@Override
public Object start() {
CompilerDirectives.transferToInterpreter();
return new Object[Options.ARRAYS_UNINITIALIZED_SIZE];
return new Object[getContext().getOptions().ARRAYS_UNINITIALIZED_SIZE];
}

@Override
Original file line number Diff line number Diff line change
@@ -4191,9 +4191,9 @@ public DynamicObject sortVeryShortIntegerFixnum(VirtualFrame frame, DynamicObjec

// Selection sort - written very carefully to allow PE

for (int i = 0; i < Options.ARRAYS_SMALL; i++) {
for (int i = 0; i < getContext().getOptions().ARRAYS_SMALL; i++) {
if (i < size) {
for (int j = i + 1; j < Options.ARRAYS_SMALL; j++) {
for (int j = i + 1; j < getContext().getOptions().ARRAYS_SMALL; j++) {
if (j < size) {
if (castSortValue(compareDispatchNode.call(frame, store[j], "<=>", null, store[i])) < 0) {
final int temp = store[j];
@@ -4219,9 +4219,9 @@ public DynamicObject sortVeryShortLongFixnum(VirtualFrame frame, DynamicObject a

// Selection sort - written very carefully to allow PE

for (int i = 0; i < Options.ARRAYS_SMALL; i++) {
for (int i = 0; i < getContext().getOptions().ARRAYS_SMALL; i++) {
if (i < size) {
for (int j = i + 1; j < Options.ARRAYS_SMALL; j++) {
for (int j = i + 1; j < getContext().getOptions().ARRAYS_SMALL; j++) {
if (j < size) {
if (castSortValue(compareDispatchNode.call(frame, store[j], "<=>", null, store[i])) < 0) {
final long temp = store[j];
@@ -4281,8 +4281,8 @@ private int castSortValue(Object value) {
throw new RaiseException(getContext().getCoreLibrary().argumentError("expecting a Fixnum to sort", this));
}

protected static boolean isSmall(DynamicObject array) {
return Layouts.ARRAY.getSize(array) <= Options.ARRAYS_SMALL;
protected boolean isSmall(DynamicObject array) {
return Layouts.ARRAY.getSize(array) <= getContext().getOptions().ARRAYS_SMALL;
}

}
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ public RubyNode getValue(int index) {
public static HashLiteralNode create(RubyContext context, SourceSection sourceSection, RubyNode[] keyValues) {
if (keyValues.length == 0) {
return new EmptyHashLiteralNode(context, sourceSection);
} else if (keyValues.length <= Options.HASH_PACKED_ARRAY_MAX * 2) {
} else if (keyValues.length <= context.getOptions().HASH_PACKED_ARRAY_MAX * 2) {
return new SmallHashLiteralNode(context, sourceSection, keyValues);
} else {
return new GenericHashLiteralNode(context, sourceSection, keyValues);
@@ -102,7 +102,7 @@ public SmallHashLiteralNode(RubyContext context, SourceSection sourceSection, Ru
@ExplodeLoop
@Override
public Object execute(VirtualFrame frame) {
final Object[] store = PackedArrayStrategy.createStore();
final Object[] store = PackedArrayStrategy.createStore(getContext());

int size = 0;

Loading