Skip to content

Commit

Permalink
[Truffle] The new Hash#values brings some other stuff onto the fast p…
Browse files Browse the repository at this point in the history
…ath.
  • Loading branch information
chrisseaton committed Mar 4, 2015
1 parent d282630 commit 8bdf5bc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
Expand Up @@ -555,16 +555,12 @@ public EachNode(EachNode prev) {

@Specialization(guards = "isNull")
public RubyHash eachNull(RubyHash hash, RubyProc block) {
notDesignedForCompilation();

return hash;
}

@ExplodeLoop
@Specialization(guards = {"!isNull", "!isBuckets"})
public RubyHash eachPackedArray(VirtualFrame frame, RubyHash hash, RubyProc block) {
notDesignedForCompilation();

final Object[] store = (Object[]) hash.getStore();
final int size = hash.getSize();

Expand Down
Expand Up @@ -1009,21 +1009,19 @@ public InstanceVariableSetNode(RubyContext context, SourceSection sourceSection)
public InstanceVariableSetNode(InstanceVariableSetNode prev) {
super(prev);
}

// TODO CS 4-Mar-15 this badly needs to be cached

@TruffleBoundary
@Specialization
public Object isInstanceVariableSet(RubyBasicObject object, RubyString name, Object value) {
notDesignedForCompilation();

notDesignedForCompilation();
public Object instanceVariableSet(RubyBasicObject object, RubyString name, Object value) {
object.getOperations().setInstanceVariable(object, RubyContext.checkInstanceVariableName(getContext(), name.toString(), this), value);
return value;
}

@TruffleBoundary
@Specialization
public Object isInstanceVariableSet(RubyBasicObject object, RubySymbol name, Object value) {
notDesignedForCompilation();

notDesignedForCompilation();
public Object instanceVariableSet(RubyBasicObject object, RubySymbol name, Object value) {
object.getOperations().setInstanceVariable(object, RubyContext.checkInstanceVariableName(getContext(), name.toString(), this), value);
return value;
}
Expand Down
Expand Up @@ -295,8 +295,6 @@ public ToSNode(ToSNode prev) {

@Specialization
public RubyString toS(RubySymbol symbol) {
notDesignedForCompilation();

return getContext().makeString(symbol.getSymbolBytes().dup());
}

Expand Down

0 comments on commit 8bdf5bc

Please sign in to comment.