Skip to content

Commit 8bdf5bc

Browse files
committed
[Truffle] The new Hash#values brings some other stuff onto the fast path.
1 parent d282630 commit 8bdf5bc

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

truffle/src/main/java/org/jruby/truffle/nodes/core/HashNodes.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -555,16 +555,12 @@ public EachNode(EachNode prev) {
555555

556556
@Specialization(guards = "isNull")
557557
public RubyHash eachNull(RubyHash hash, RubyProc block) {
558-
notDesignedForCompilation();
559-
560558
return hash;
561559
}
562560

563561
@ExplodeLoop
564562
@Specialization(guards = {"!isNull", "!isBuckets"})
565563
public RubyHash eachPackedArray(VirtualFrame frame, RubyHash hash, RubyProc block) {
566-
notDesignedForCompilation();
567-
568564
final Object[] store = (Object[]) hash.getStore();
569565
final int size = hash.getSize();
570566

truffle/src/main/java/org/jruby/truffle/nodes/core/KernelNodes.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,21 +1009,19 @@ public InstanceVariableSetNode(RubyContext context, SourceSection sourceSection)
10091009
public InstanceVariableSetNode(InstanceVariableSetNode prev) {
10101010
super(prev);
10111011
}
1012+
1013+
// TODO CS 4-Mar-15 this badly needs to be cached
10121014

1015+
@TruffleBoundary
10131016
@Specialization
1014-
public Object isInstanceVariableSet(RubyBasicObject object, RubyString name, Object value) {
1015-
notDesignedForCompilation();
1016-
1017-
notDesignedForCompilation();
1017+
public Object instanceVariableSet(RubyBasicObject object, RubyString name, Object value) {
10181018
object.getOperations().setInstanceVariable(object, RubyContext.checkInstanceVariableName(getContext(), name.toString(), this), value);
10191019
return value;
10201020
}
10211021

1022+
@TruffleBoundary
10221023
@Specialization
1023-
public Object isInstanceVariableSet(RubyBasicObject object, RubySymbol name, Object value) {
1024-
notDesignedForCompilation();
1025-
1026-
notDesignedForCompilation();
1024+
public Object instanceVariableSet(RubyBasicObject object, RubySymbol name, Object value) {
10271025
object.getOperations().setInstanceVariable(object, RubyContext.checkInstanceVariableName(getContext(), name.toString(), this), value);
10281026
return value;
10291027
}

truffle/src/main/java/org/jruby/truffle/nodes/core/SymbolNodes.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,6 @@ public ToSNode(ToSNode prev) {
295295

296296
@Specialization
297297
public RubyString toS(RubySymbol symbol) {
298-
notDesignedForCompilation();
299-
300298
return getContext().makeString(symbol.getSymbolBytes().dup());
301299
}
302300

0 commit comments

Comments
 (0)