@Override public double executeFloat(RubyBasicObject receiver) throws UnexpectedResultException { if (hasFloat && receiver.getRubyClass() == expectedClass && unmodifiedAssumption.isValid()) { return integerFixnumValue; } else { return next.executeFloat(receiver); } }
@Override public boolean executeBoolean(RubyBasicObject receiver) throws UnexpectedResultException { if (hasBoolean && receiver.getRubyClass() == expectedClass && unmodifiedAssumption.isValid()) { return booleanValue; } else { return next.executeBoolean(receiver); } }
@Override public long executeLongFixnum(RubyBasicObject receiver) throws UnexpectedResultException { if (hasLongFixnum && receiver.getRubyClass() == expectedClass && unmodifiedAssumption.isValid()) { return longFixnumValue; } else { return next.executeLongFixnum(receiver); } }
@Override public Object execute(RubyBasicObject receiver) { // TODO(CS): not sure trying next on invalid assumption is right... if (receiver.getRubyClass() == expectedClass && unmodifiedAssumption.isValid()) { return value; } else { return next.execute(receiver); } }