Skip to content
Permalink
Browse files
[Truffle] Rename buckets entries.
  • Loading branch information
chrisseaton committed Dec 16, 2014
1 parent 35c1350 commit 96c8da62e6344b317bd99ead43626e7060e75440
Showing with 307 additions and 310 deletions.
  1. +3 −4 core/src/main/java/org/jruby/truffle/nodes/RubyNode.java
  2. +2 −3 core/src/main/java/org/jruby/truffle/nodes/RubyTypes.java
  3. +3 −3 core/src/main/java/org/jruby/truffle/nodes/core/HashGuards.java
  4. +60 −60 core/src/main/java/org/jruby/truffle/nodes/core/HashNodes.java
  5. +3 −3 core/src/main/java/org/jruby/truffle/nodes/core/KernelNodes.java
  6. +3 −3 core/src/main/java/org/jruby/truffle/nodes/core/SystemNode.java
  7. +15 −15 core/src/main/java/org/jruby/truffle/nodes/hash/{FindBucketNode.java → FindEntryNode.java}
  8. +3 −3 core/src/main/java/org/jruby/truffle/nodes/literal/HashLiteralNode.java
  9. +4 −4 core/src/main/java/org/jruby/truffle/nodes/methods/arguments/CheckArityNode.java
  10. +4 −4 core/src/main/java/org/jruby/truffle/nodes/methods/arguments/ReadKeywordArgumentNode.java
  11. +5 −5 core/src/main/java/org/jruby/truffle/nodes/methods/arguments/ReadKeywordRestArgumentNode.java
  12. +3 −3 core/src/main/java/org/jruby/truffle/runtime/core/CoreLibrary.java
  13. +14 −14 core/src/main/java/org/jruby/truffle/runtime/core/RubyHash.java
  14. +0 −72 core/src/main/java/org/jruby/truffle/runtime/hash/Bucket.java
  15. +0 −50 core/src/main/java/org/jruby/truffle/runtime/hash/BucketSearchResult.java
  16. +43 −5 core/src/main/java/org/jruby/truffle/runtime/hash/Entry.java
  17. +59 −59 core/src/main/java/org/jruby/truffle/runtime/hash/HashOperations.java
  18. +50 −0 core/src/main/java/org/jruby/truffle/runtime/hash/HashSearchResult.java
  19. +33 −0 core/src/main/java/org/jruby/truffle/runtime/hash/KeyValue.java
@@ -10,7 +10,6 @@
package org.jruby.truffle.nodes;

import com.oracle.truffle.api.CompilerAsserts;
import com.oracle.truffle.api.dsl.ImportGuards;
import com.oracle.truffle.api.source.SourceSection;
import com.oracle.truffle.api.dsl.TypeSystemReference;
import com.oracle.truffle.api.frame.VirtualFrame;
@@ -24,7 +23,7 @@
import org.jruby.truffle.runtime.core.RubyHash;
import org.jruby.truffle.runtime.core.RubyRange;
import org.jruby.truffle.runtime.core.RubyBasicObject;
import org.jruby.truffle.runtime.hash.BucketSearchResult;
import org.jruby.truffle.runtime.hash.HashSearchResult;
import org.jruby.truffle.runtime.rubinius.RubiniusByteArray;
import org.jruby.truffle.runtime.rubinius.RubiniusChannel;

@@ -192,8 +191,8 @@ public RubyEncodingConverter executeRubyEncodingConverter(VirtualFrame frame) th
return RubyTypesGen.RUBYTYPES.expectRubyEncodingConverter(execute(frame));
}

public BucketSearchResult executeBucketSearchResult(VirtualFrame frame) throws UnexpectedResultException {
return RubyTypesGen.RUBYTYPES.expectBucketSearchResult(execute(frame));
public HashSearchResult executeBucketSearchResult(VirtualFrame frame) throws UnexpectedResultException {

This comment has been minimized.

Copy link
@eregon

eregon Dec 16, 2014

Member

needs a rename here.

return RubyTypesGen.RUBYTYPES.expectHashSearchResult(execute(frame));
}

public Dispatch.DispatchAction executeDispatchAction(VirtualFrame frame) {
@@ -9,7 +9,6 @@
*/
package org.jruby.truffle.nodes;

import com.oracle.truffle.api.dsl.ImplicitCast;
import com.oracle.truffle.api.dsl.TypeSystem;
import org.jruby.truffle.nodes.dispatch.Dispatch;
import org.jruby.truffle.runtime.UndefinedPlaceholder;
@@ -18,7 +17,7 @@
import org.jruby.truffle.runtime.core.RubyHash;
import org.jruby.truffle.runtime.core.RubyRange;
import org.jruby.truffle.runtime.core.RubyBasicObject;
import org.jruby.truffle.runtime.hash.BucketSearchResult;
import org.jruby.truffle.runtime.hash.HashSearchResult;
import org.jruby.truffle.runtime.rubinius.RubiniusByteArray;
import org.jruby.truffle.runtime.rubinius.RubiniusChannel;
import org.jruby.truffle.runtime.LexicalScope;
@@ -62,7 +61,7 @@
RubiniusByteArray.class, //
RubyEncodingConverter.class, //
RubyBasicObject.class, //
BucketSearchResult.class, //
HashSearchResult.class, //
Object[].class})

public class RubyTypes {
@@ -10,7 +10,7 @@
package org.jruby.truffle.nodes.core;

import org.jruby.truffle.runtime.core.RubyHash;
import org.jruby.truffle.runtime.hash.Bucket;
import org.jruby.truffle.runtime.hash.Entry;

public class HashGuards {

@@ -20,11 +20,11 @@ public static boolean isNull(RubyHash hash) {

public static boolean isObjectArray(RubyHash hash) {
// Arrays are covariant in Java!
return hash.getStore() instanceof Object[] && !(hash.getStore() instanceof Bucket[]);
return hash.getStore() instanceof Object[] && !(hash.getStore() instanceof Entry[]);
}

public static boolean isBucketArray(RubyHash hash) {
return hash.getStore() instanceof Bucket[];
return hash.getStore() instanceof Entry[];

This comment has been minimized.

Copy link
@eregon

eregon Dec 16, 2014

Member

This looks funny but I guess it makes sense once you know this Entry is actually a chain of Entries, that is a bucket.

}

}

0 comments on commit 96c8da6

Please sign in to comment.