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

Commits on Jun 13, 2015

  1. Copy the full SHA
    313e7ec View commit details
  2. Copy the full SHA
    e4349e3 View commit details
  3. Copy the full SHA
    6afa15b View commit details
  4. Copy the full SHA
    1a6265d View commit details
Showing with 26 additions and 193 deletions.
  1. +0 −2 truffle/src/main/java/org/jruby/truffle/nodes/arguments/CheckArityNode.java
  2. +0 −2 truffle/src/main/java/org/jruby/truffle/nodes/arguments/ReadKeywordArgumentNode.java
  3. +0 −2 truffle/src/main/java/org/jruby/truffle/nodes/arguments/ReadKeywordRestArgumentNode.java
  4. +0 −2 truffle/src/main/java/org/jruby/truffle/nodes/control/TraceNode.java
  5. +0 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/ConditionVariableNodes.java
  6. +0 −2 truffle/src/main/java/org/jruby/truffle/nodes/core/KernelNodes.java
  7. +0 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/MutexNodes.java
  8. +0 −2 truffle/src/main/java/org/jruby/truffle/nodes/core/SymbolNodes.java
  9. +0 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/TruffleInteropNodes.java
  10. +3 −3 truffle/src/main/java/org/jruby/truffle/nodes/core/TrufflePrimitiveNodes.java
  11. +0 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/array/ArrayBuilderNode.java
  12. +0 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/fixnum/FixnumLowerNode.java
  13. +0 −2 truffle/src/main/java/org/jruby/truffle/nodes/core/hash/ConcatHashLiteralNode.java
  14. +0 −5 truffle/src/main/java/org/jruby/truffle/nodes/core/hash/HashLiteralNode.java
  15. +14 −17 truffle/src/main/java/org/jruby/truffle/nodes/core/hash/HashNodes.java
  16. +0 −1 truffle/src/main/java/org/jruby/truffle/nodes/dispatch/RubyCallNode.java
  17. +0 −1 truffle/src/main/java/org/jruby/truffle/nodes/rubinius/ModulePrimitiveNodes.java
  18. +0 −1 truffle/src/main/java/org/jruby/truffle/nodes/rubinius/RegexpPrimitiveNodes.java
  19. +4 −5 truffle/src/main/java/org/jruby/truffle/nodes/supercall/CallMethodNode.java
  20. +0 −1 truffle/src/main/java/org/jruby/truffle/nodes/supercall/GeneralSuperCallNode.java
  21. +0 −1 truffle/src/main/java/org/jruby/truffle/nodes/supercall/GeneralSuperReCallNode.java
  22. +5 −6 truffle/src/main/java/org/jruby/truffle/nodes/supercall/LookupSuperMethodNode.java
  23. +0 −1 truffle/src/main/java/org/jruby/truffle/pack/nodes/PackRootNode.java
  24. +0 −1 truffle/src/main/java/org/jruby/truffle/pack/nodes/type/ToLongNode.java
  25. +0 −1 truffle/src/main/java/org/jruby/truffle/runtime/ModuleOperations.java
  26. +0 −1 truffle/src/main/java/org/jruby/truffle/runtime/RubyContext.java
  27. +0 −6 truffle/src/main/java/org/jruby/truffle/runtime/core/CoreLibrary.java
  28. +0 −2 truffle/src/main/java/org/jruby/truffle/runtime/core/RubyBasicObject.java
  29. +0 −2 truffle/src/main/java/org/jruby/truffle/runtime/core/RubyBinding.java
  30. +0 −1 truffle/src/main/java/org/jruby/truffle/runtime/core/RubyMatchData.java
  31. +0 −82 truffle/src/main/java/org/jruby/truffle/runtime/hash/HashOperations.java
  32. +0 −33 truffle/src/main/java/org/jruby/truffle/runtime/hash/KeyValue.java
  33. +0 −2 truffle/src/main/java/org/jruby/truffle/runtime/subsystems/SafepointManager.java
  34. +0 −1 truffle/src/main/java/org/jruby/truffle/runtime/subsystems/ThreadManager.java
Original file line number Diff line number Diff line change
@@ -18,8 +18,6 @@
import org.jruby.truffle.runtime.RubyContext;
import org.jruby.truffle.runtime.control.RaiseException;
import org.jruby.truffle.runtime.core.RubyBasicObject;
import org.jruby.truffle.runtime.hash.HashOperations;
import org.jruby.truffle.runtime.hash.KeyValue;
import org.jruby.truffle.runtime.methods.Arity;

import java.util.Map;
Original file line number Diff line number Diff line change
@@ -20,8 +20,6 @@
import org.jruby.truffle.runtime.RubyArguments;
import org.jruby.truffle.runtime.RubyContext;
import org.jruby.truffle.runtime.core.RubyBasicObject;
import org.jruby.truffle.runtime.hash.HashOperations;
import org.jruby.truffle.runtime.hash.KeyValue;

import java.util.Map;

Original file line number Diff line number Diff line change
@@ -20,8 +20,6 @@
import org.jruby.truffle.runtime.RubyContext;
import org.jruby.truffle.runtime.core.RubyBasicObject;
import org.jruby.truffle.runtime.hash.BucketsStrategy;
import org.jruby.truffle.runtime.hash.HashOperations;
import org.jruby.truffle.runtime.hash.KeyValue;

import java.util.ArrayList;
import java.util.List;
Original file line number Diff line number Diff line change
@@ -10,14 +10,12 @@
package org.jruby.truffle.nodes.control;

import com.oracle.truffle.api.Assumption;
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
import com.oracle.truffle.api.Truffle;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.DirectCallNode;
import com.oracle.truffle.api.nodes.InvalidAssumptionException;
import com.oracle.truffle.api.source.SourceSection;

import org.jruby.truffle.nodes.RubyNode;
import org.jruby.truffle.runtime.RubyArguments;
import org.jruby.truffle.runtime.RubyContext;
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.object.*;
import com.oracle.truffle.api.source.SourceSection;

import org.jruby.truffle.nodes.objects.Allocator;
import org.jruby.truffle.runtime.NotProvided;
import org.jruby.truffle.runtime.RubyContext;
Original file line number Diff line number Diff line change
@@ -52,8 +52,6 @@
import org.jruby.truffle.runtime.control.RaiseException;
import org.jruby.truffle.runtime.core.*;
import org.jruby.truffle.runtime.core.RubyModule.MethodFilter;
import org.jruby.truffle.runtime.hash.HashOperations;
import org.jruby.truffle.runtime.hash.KeyValue;
import org.jruby.truffle.runtime.methods.InternalMethod;
import org.jruby.truffle.runtime.subsystems.FeatureManager;
import org.jruby.truffle.runtime.subsystems.ThreadManager.BlockingActionWithoutGlobalLock;
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.object.*;
import com.oracle.truffle.api.source.SourceSection;

import org.jruby.truffle.nodes.objects.Allocator;
import org.jruby.truffle.runtime.RubyContext;
import org.jruby.truffle.runtime.control.RaiseException;
Original file line number Diff line number Diff line change
@@ -21,7 +21,6 @@
import org.jruby.truffle.nodes.RubyRootNode;
import org.jruby.truffle.nodes.arguments.CheckArityNode;
import org.jruby.truffle.nodes.control.SequenceNode;
import org.jruby.truffle.nodes.core.array.ArrayNodes;
import org.jruby.truffle.nodes.methods.SymbolProcNode;
import org.jruby.truffle.runtime.RubyContext;
import org.jruby.truffle.runtime.core.RubyBasicObject;
@@ -33,7 +32,6 @@
import org.jruby.truffle.runtime.object.BasicObjectType;
import org.jruby.util.ByteList;

import java.util.Collection;
import java.util.EnumSet;

@CoreClass(name = "Symbol")
Original file line number Diff line number Diff line change
@@ -18,7 +18,6 @@
import com.oracle.truffle.api.source.SourceSection;
import com.oracle.truffle.interop.messages.*;
import com.oracle.truffle.interop.node.ForeignObjectAccessNode;

import org.jruby.truffle.runtime.RubyContext;
import org.jruby.truffle.runtime.core.RubyBasicObject;
import org.jruby.truffle.runtime.core.RubyString;
Original file line number Diff line number Diff line change
@@ -28,12 +28,12 @@
import org.jruby.truffle.runtime.control.RaiseException;
import org.jruby.truffle.runtime.core.*;
import org.jruby.truffle.runtime.hash.BucketsStrategy;
import org.jruby.truffle.runtime.hash.HashOperations;
import org.jruby.truffle.runtime.hash.KeyValue;
import org.jruby.truffle.runtime.subsystems.SimpleShell;
import org.jruby.util.Memo;

import java.util.*;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

@CoreClass(name = "Truffle::Primitive")
public abstract class TrufflePrimitiveNodes {
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
import com.oracle.truffle.api.nodes.Node;

import org.jruby.truffle.runtime.RubyContext;
import org.jruby.truffle.runtime.array.ArrayUtils;
import org.jruby.truffle.runtime.core.RubyArray;
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.UnexpectedResultException;

import org.jruby.truffle.nodes.RubyNode;
import org.jruby.truffle.runtime.NotProvided;
import org.jruby.truffle.runtime.core.CoreLibrary;
Original file line number Diff line number Diff line change
@@ -16,8 +16,6 @@
import org.jruby.truffle.nodes.RubyNode;
import org.jruby.truffle.runtime.RubyContext;
import org.jruby.truffle.runtime.hash.BucketsStrategy;
import org.jruby.truffle.runtime.hash.HashOperations;
import org.jruby.truffle.runtime.hash.KeyValue;

import java.util.ArrayList;
import java.util.List;
Original file line number Diff line number Diff line change
@@ -23,13 +23,8 @@
import org.jruby.truffle.runtime.core.RubyBasicObject;
import org.jruby.truffle.runtime.core.RubyString;
import org.jruby.truffle.runtime.hash.BucketsStrategy;
import org.jruby.truffle.runtime.hash.Entry;
import org.jruby.truffle.runtime.hash.KeyValue;
import org.jruby.truffle.runtime.hash.PackedArrayStrategy;

import java.util.ArrayList;
import java.util.List;

public abstract class HashLiteralNode extends RubyNode {

@Children protected final RubyNode[] keyValues;
Original file line number Diff line number Diff line change
@@ -24,7 +24,6 @@
import com.oracle.truffle.api.source.SourceSection;
import com.oracle.truffle.api.utilities.BranchProfile;
import com.oracle.truffle.api.utilities.ConditionProfile;

import org.jruby.truffle.nodes.RubyGuards;
import org.jruby.truffle.nodes.RubyNode;
import org.jruby.truffle.nodes.core.*;
@@ -39,7 +38,10 @@
import org.jruby.truffle.runtime.RubyContext;
import org.jruby.truffle.runtime.control.RaiseException;
import org.jruby.truffle.runtime.core.*;
import org.jruby.truffle.runtime.hash.*;
import org.jruby.truffle.runtime.hash.BucketsStrategy;
import org.jruby.truffle.runtime.hash.Entry;
import org.jruby.truffle.runtime.hash.HashLookupResult;
import org.jruby.truffle.runtime.hash.PackedArrayStrategy;
import org.jruby.truffle.runtime.methods.InternalMethod;
import org.jruby.truffle.runtime.object.BasicObjectType;

@@ -990,6 +992,7 @@ public abstract static class MergeNode extends YieldingCoreMethodNode {
@Child private CallDispatchHeadNode eqlNode;
@Child private CallDispatchHeadNode fallbackCallNode;
@Child private LookupEntryNode lookupEntryNode;
@Child private SetNode setNode;

private final BranchProfile nothingFromFirstProfile = BranchProfile.create();
private final BranchProfile considerNothingFromSecondProfile = BranchProfile.create();
@@ -1000,6 +1003,7 @@ public abstract static class MergeNode extends YieldingCoreMethodNode {
public MergeNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
eqlNode = DispatchHeadNodeFactory.createMethodCall(context);
setNode = SetNodeGen.create(context, sourceSection, null, null, null, null);
}

@Specialization(guards = {"isPackedHash(hash)", "isRubyHash(other)", "isNullHash(other)", "!isCompareByIdentity(hash)"})
@@ -1095,31 +1099,24 @@ public RubyBasicObject mergePackedArrayPackedArray(VirtualFrame frame, RubyBasic

CompilerDirectives.transferToInterpreter();

return mergeBucketsBuckets(hash, other, block);
return mergeBucketsBuckets(frame, hash, other, block);
}

// TODO CS 3-Mar-15 need negative guards on this
@Specialization(guards = {"!isCompareByIdentity(hash)", "isRubyHash(other)"})
public RubyBasicObject mergeBucketsBuckets(RubyBasicObject hash, RubyBasicObject other, NotProvided block) {
public RubyBasicObject mergeBucketsBuckets(VirtualFrame frame, RubyBasicObject hash, RubyBasicObject other, NotProvided block) {
CompilerDirectives.transferToInterpreter();

final RubyBasicObject merged = createHash(hash.getLogicalClass(), null, null, new Entry[BucketsStrategy.capacityGreaterThan(getSize(hash) + getSize(other))], 0, null, null);

int size = 0;

for (Map.Entry<Object, Object> keyValue : HashNodes.iterableKeyValues(hash)) {
HashOperations.verySlowSetInBuckets(merged, keyValue.getKey(), keyValue.getValue(), false);
size++;
setNode.executeSet(frame, merged, keyValue.getKey(), keyValue.getValue(), false);
}

for (Map.Entry<Object, Object> keyValue : HashNodes.iterableKeyValues(other)) {
if (HashOperations.verySlowSetInBuckets(merged, keyValue.getKey(), keyValue.getValue(), false)) {
size++;
}
setNode.executeSet(frame, merged, keyValue.getKey(), keyValue.getValue(), false);
}

setSize(merged, size);

assert verifyStore(hash);

return merged;
@@ -1134,7 +1131,7 @@ public RubyBasicObject merge(VirtualFrame frame, RubyBasicObject hash, RubyBasic
int size = 0;

for (Map.Entry<Object, Object> keyValue : HashNodes.iterableKeyValues(hash)) {
HashOperations.verySlowSetInBuckets(merged, keyValue.getKey(), keyValue.getValue(), false);
setNode.executeSet(frame, merged, keyValue.getKey(), keyValue.getValue(), false);
size++;
}

@@ -1147,14 +1144,14 @@ public RubyBasicObject merge(VirtualFrame frame, RubyBasicObject hash, RubyBasic
final HashLookupResult searchResult = lookupEntryNode.lookup(frame, merged, keyValue.getKey());

if (searchResult.getEntry() == null) {
HashOperations.verySlowSetInBuckets(merged, keyValue.getKey(), keyValue.getValue(), false);
setNode.executeSet(frame, merged, keyValue.getKey(), keyValue.getValue(), false);
size++;
} else {
final Object oldValue = searchResult.getEntry().getValue();
final Object newValue = keyValue.getValue();
final Object mergedValue = yield(frame, block, keyValue.getKey(), oldValue, newValue);
HashOperations.verySlowSetInBuckets(merged, keyValue.getKey(), mergedValue, false);

setNode.executeSet(frame, merged, keyValue.getKey(), mergedValue, false);
}
}

Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@
import com.oracle.truffle.api.nodes.ExplodeLoop;
import com.oracle.truffle.api.nodes.NodeUtil;
import com.oracle.truffle.api.source.SourceSection;

import org.jruby.truffle.nodes.RubyGuards;
import org.jruby.truffle.nodes.RubyNode;
import org.jruby.truffle.nodes.arguments.OptionalKeywordArgMissingNode;
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.source.SourceSection;

import org.jruby.truffle.runtime.RubyContext;
import org.jruby.truffle.runtime.core.RubyModule;
import org.jruby.truffle.runtime.core.RubyString;
Original file line number Diff line number Diff line change
@@ -27,7 +27,6 @@
import org.jruby.truffle.runtime.core.RubyString;
import org.jruby.util.ByteList;
import org.jruby.util.RegexpSupport;
import org.jruby.util.StringSupport;

/**
* Rubinius primitives associated with the Ruby {@code Regexp} class.
Original file line number Diff line number Diff line change
@@ -9,11 +9,6 @@
*/
package org.jruby.truffle.nodes.supercall;

import org.jruby.truffle.nodes.RubyNode;
import org.jruby.truffle.nodes.dispatch.DispatchNode;
import org.jruby.truffle.runtime.RubyContext;
import org.jruby.truffle.runtime.methods.InternalMethod;

import com.oracle.truffle.api.dsl.Cached;
import com.oracle.truffle.api.dsl.NodeChild;
import com.oracle.truffle.api.dsl.NodeChildren;
@@ -22,6 +17,10 @@
import com.oracle.truffle.api.nodes.DirectCallNode;
import com.oracle.truffle.api.nodes.IndirectCallNode;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.nodes.RubyNode;
import org.jruby.truffle.nodes.dispatch.DispatchNode;
import org.jruby.truffle.runtime.RubyContext;
import org.jruby.truffle.runtime.methods.InternalMethod;

@NodeChildren({
@NodeChild("method"),
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.ExplodeLoop;
import com.oracle.truffle.api.source.SourceSection;

import org.jruby.truffle.nodes.RubyNode;
import org.jruby.truffle.nodes.core.array.ArrayNodes;
import org.jruby.truffle.runtime.RubyArguments;
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.ExplodeLoop;
import com.oracle.truffle.api.source.SourceSection;

import org.jruby.truffle.nodes.RubyNode;
import org.jruby.truffle.nodes.core.array.ArrayNodes;
import org.jruby.truffle.runtime.RubyArguments;
Original file line number Diff line number Diff line change
@@ -9,6 +9,11 @@
*/
package org.jruby.truffle.nodes.supercall;

import com.oracle.truffle.api.dsl.Cached;
import com.oracle.truffle.api.dsl.NodeChild;
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.source.SourceSection;
import org.jruby.truffle.nodes.RubyNode;
import org.jruby.truffle.nodes.dispatch.DispatchNode;
import org.jruby.truffle.nodes.objects.MetaClassNode;
@@ -19,12 +24,6 @@
import org.jruby.truffle.runtime.core.RubyClass;
import org.jruby.truffle.runtime.methods.InternalMethod;

import com.oracle.truffle.api.dsl.Cached;
import com.oracle.truffle.api.dsl.NodeChild;
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.source.SourceSection;

@NodeChild("self")
public abstract class LookupSuperMethodNode extends RubyNode {

Original file line number Diff line number Diff line change
@@ -15,7 +15,6 @@
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.RootNode;
import com.oracle.truffle.api.source.NullSourceSection;

import org.jruby.truffle.pack.runtime.PackEncoding;
import org.jruby.truffle.pack.runtime.PackFrameDescriptor;
import org.jruby.truffle.pack.runtime.PackResult;
Original file line number Diff line number Diff line change
@@ -15,7 +15,6 @@
import com.oracle.truffle.api.dsl.NodeChildren;
import com.oracle.truffle.api.dsl.Specialization;
import com.oracle.truffle.api.frame.VirtualFrame;

import org.jruby.truffle.nodes.core.BignumNodes;
import org.jruby.truffle.nodes.dispatch.CallDispatchHeadNode;
import org.jruby.truffle.nodes.dispatch.DispatchHeadNodeFactory;
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@
import com.oracle.truffle.api.CompilerDirectives;
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
import com.oracle.truffle.api.nodes.Node;

import org.jruby.truffle.runtime.control.RaiseException;
import org.jruby.truffle.runtime.core.RubyClass;
import org.jruby.truffle.runtime.core.RubyModule;
Original file line number Diff line number Diff line change
@@ -48,7 +48,6 @@
import org.jruby.truffle.nodes.instrument.RubyDefaultASTProber;
import org.jruby.truffle.nodes.methods.SetMethodDeclarationContext;
import org.jruby.truffle.nodes.rubinius.RubiniusPrimitiveManager;
import org.jruby.truffle.runtime.backtrace.Backtrace;
import org.jruby.truffle.runtime.control.RaiseException;
import org.jruby.truffle.runtime.core.*;
import org.jruby.truffle.runtime.methods.InternalMethod;
Original file line number Diff line number Diff line change
@@ -16,9 +16,7 @@
import com.oracle.truffle.api.nodes.Node;
import com.oracle.truffle.api.source.Source;
import com.oracle.truffle.api.source.SourceSection;

import jnr.constants.platform.Errno;

import org.jcodings.Encoding;
import org.jcodings.EncodingDB;
import org.jcodings.transcode.EConvFlags;
@@ -45,8 +43,6 @@
import org.jruby.truffle.runtime.control.RaiseException;
import org.jruby.truffle.runtime.control.TruffleFatalException;
import org.jruby.truffle.runtime.hash.BucketsStrategy;
import org.jruby.truffle.runtime.hash.HashOperations;
import org.jruby.truffle.runtime.hash.KeyValue;
import org.jruby.truffle.runtime.methods.InternalMethod;
import org.jruby.truffle.runtime.rubinius.RubiniusTypes;
import org.jruby.truffle.runtime.signal.SignalOperations;
@@ -58,9 +54,7 @@
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CoreLibrary {
Loading