Commit b4712d52 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

Revert "Remove obsolete kNumber binop feedback."

This reverts commit 1169f55b.

Reason for revert: http://crbug.com/758994

Original change's description:
> Remove obsolete kNumber binop feedback.
> 
> With the removal of Crankshaft, kNumber has become obsolete as
> BinaryOperationFeedback. Turbofan uses kNumberOrOddball.
> 
> Bug: 
> Change-Id: If577f5efcc81d7c08f43908f2764ff0ec6f8747c
> Reviewed-on: https://chromium-review.googlesource.com/628376
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Mythri Alle <mythria@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#47555}

TBR=jkummerow@chromium.org,jarin@chromium.org,neis@chromium.org,mythria@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I1b33f572f3e6865e00d2468bffcce2ea466814b3
Reviewed-on: https://chromium-review.googlesource.com/637711Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47642}
parent c6579212
......@@ -602,6 +602,7 @@ struct JSOperatorGlobalCache final {
Name##Operator<BinaryOperationHint::kSignedSmallInputs> \
k##Name##SignedSmallInputsOperator; \
Name##Operator<BinaryOperationHint::kSigned32> k##Name##Signed32Operator; \
Name##Operator<BinaryOperationHint::kNumber> k##Name##NumberOperator; \
Name##Operator<BinaryOperationHint::kNumberOrOddball> \
k##Name##NumberOrOddballOperator; \
Name##Operator<BinaryOperationHint::kString> k##Name##StringOperator; \
......@@ -657,6 +658,8 @@ CACHED_OP_LIST(CACHED_OP)
return &cache_.k##Name##SignedSmallInputsOperator; \
case BinaryOperationHint::kSigned32: \
return &cache_.k##Name##Signed32Operator; \
case BinaryOperationHint::kNumber: \
return &cache_.k##Name##NumberOperator; \
case BinaryOperationHint::kNumberOrOddball: \
return &cache_.k##Name##NumberOrOddballOperator; \
case BinaryOperationHint::kString: \
......
......@@ -29,6 +29,9 @@ bool BinaryOperationHintToNumberOperationHint(
case BinaryOperationHint::kSigned32:
*number_hint = NumberOperationHint::kSigned32;
return true;
case BinaryOperationHint::kNumber:
*number_hint = NumberOperationHint::kNumber;
return true;
case BinaryOperationHint::kNumberOrOddball:
*number_hint = NumberOperationHint::kNumberOrOddball;
return true;
......
......@@ -183,6 +183,8 @@ BinaryOperationHint BinaryOperationHintFromFeedback(int type_feedback) {
return BinaryOperationHint::kSignedSmall;
case BinaryOperationFeedback::kSignedSmallInputs:
return BinaryOperationHint::kSignedSmallInputs;
case BinaryOperationFeedback::kNumber:
return BinaryOperationHint::kNumber;
case BinaryOperationFeedback::kNumberOrOddball:
return BinaryOperationHint::kNumberOrOddball;
case BinaryOperationFeedback::kString:
......
......@@ -1254,17 +1254,23 @@ inline uint32_t ObjectHash(Address address) {
// Type feedback is encoded in such a way that, we can combine the feedback
// at different points by performing an 'OR' operation. Type feedback moves
// to a more generic type when we combine feedback.
// kSignedSmall -> kSignedSmallInputs -> kNumberOrOddball -> kAny
// kSignedSmall -> kSignedSmallInputs -> kNumber -> kNumberOrOddball -> kAny
// kString -> kAny
// TODO(mythria): Remove kNumber type when crankshaft can handle Oddballs
// similar to Numbers. We don't need kNumber feedback for Turbofan. Extra
// information about Number might reduce few instructions but causes more
// deopts. We collect Number only because crankshaft does not handle all
// cases of oddballs.
class BinaryOperationFeedback {
public:
enum {
kNone = 0x0,
kSignedSmall = 0x1,
kSignedSmallInputs = 0x3,
kNumberOrOddball = 0x5,
kString = 0x8,
kAny = 0x1F
kNumber = 0x7,
kNumberOrOddball = 0xF,
kString = 0x10,
kAny = 0x3F
};
};
......@@ -1275,6 +1281,7 @@ class BinaryOperationFeedback {
// kInternalizedString -> kString -> kAny
// kSymbol -> kAny
// kReceiver -> kAny
// TODO(epertoso): consider unifying this with BinaryOperationFeedback.
class CompareOperationFeedback {
public:
enum {
......
......@@ -122,8 +122,7 @@ Node* BinaryOpAssembler::Generate_AddWithFeedback(Node* context, Node* lhs,
BIND(&do_fadd);
{
var_type_feedback.Bind(
SmiConstant(BinaryOperationFeedback::kNumberOrOddball));
var_type_feedback.Bind(SmiConstant(BinaryOperationFeedback::kNumber));
Node* value = Float64Add(var_fadd_lhs.value(), var_fadd_rhs.value());
Node* result = AllocateHeapNumberWithValue(value);
var_result.Bind(result);
......@@ -294,8 +293,7 @@ Node* BinaryOpAssembler::Generate_BinaryOperationWithFeedback(
BIND(&do_float_operation);
{
var_type_feedback.Bind(
SmiConstant(BinaryOperationFeedback::kNumberOrOddball));
var_type_feedback.Bind(SmiConstant(BinaryOperationFeedback::kNumber));
Node* lhs_value = var_float_lhs.value();
Node* rhs_value = var_float_rhs.value();
Node* value = floatOperation(lhs_value, rhs_value);
......@@ -412,8 +410,7 @@ Node* BinaryOpAssembler::Generate_SubtractWithFeedback(Node* context, Node* lhs,
BIND(&if_overflow);
{
var_type_feedback->Bind(
SmiConstant(BinaryOperationFeedback::kNumberOrOddball));
var_type_feedback->Bind(SmiConstant(BinaryOperationFeedback::kNumber));
Node* value = Float64Sub(SmiToFloat64(lhs), SmiToFloat64(rhs));
var_result.Bind(AllocateHeapNumberWithValue(value));
Goto(&end);
......@@ -439,7 +436,7 @@ Node* BinaryOpAssembler::Generate_MultiplyWithFeedback(Node* context, Node* lhs,
Node* result = SmiMul(lhs, rhs);
var_type_feedback->Bind(SelectSmiConstant(
TaggedIsSmi(result), BinaryOperationFeedback::kSignedSmall,
BinaryOperationFeedback::kNumberOrOddball));
BinaryOperationFeedback::kNumber));
return result;
};
auto floatFunction = [=](Node* lhs, Node* rhs) {
......@@ -491,7 +488,7 @@ Node* BinaryOpAssembler::Generate_ModulusWithFeedback(
Node* result = SmiMod(lhs, rhs);
var_type_feedback->Bind(SelectSmiConstant(
TaggedIsSmi(result), BinaryOperationFeedback::kSignedSmall,
BinaryOperationFeedback::kNumberOrOddball));
BinaryOperationFeedback::kNumber));
return result;
};
auto floatFunction = [=](Node* lhs, Node* rhs) {
......
......@@ -1254,7 +1254,7 @@ Node* InterpreterAssembler::TruncateTaggedToWord32WithFeedback(
var_result.Bind(TruncateHeapNumberValueToWord32(value));
var_type_feedback->Bind(
SmiOr(var_type_feedback->value(),
SmiConstant(BinaryOperationFeedback::kNumberOrOddball)));
SmiConstant(BinaryOperationFeedback::kNumber)));
Goto(&done_loop);
}
......
......@@ -1017,9 +1017,9 @@ class InterpreterBitwiseBinaryOpAssembler : public InterpreterAssembler {
UNREACHABLE();
}
Node* result_type = SelectSmiConstant(
TaggedIsSmi(result), BinaryOperationFeedback::kSignedSmall,
BinaryOperationFeedback::kNumberOrOddball);
Node* result_type = SelectSmiConstant(TaggedIsSmi(result),
BinaryOperationFeedback::kSignedSmall,
BinaryOperationFeedback::kNumber);
if (FLAG_debug_code) {
Label ok(this);
......@@ -1108,9 +1108,9 @@ IGNITION_HANDLER(BitwiseOrSmi, InterpreterAssembler) {
Node* rhs_value = SmiToWord32(right);
Node* value = Word32Or(lhs_value, rhs_value);
Node* result = ChangeInt32ToTagged(value);
Node* result_type = SelectSmiConstant(
TaggedIsSmi(result), BinaryOperationFeedback::kSignedSmall,
BinaryOperationFeedback::kNumberOrOddball);
Node* result_type = SelectSmiConstant(TaggedIsSmi(result),
BinaryOperationFeedback::kSignedSmall,
BinaryOperationFeedback::kNumber);
Node* function = LoadRegister(Register::function_closure());
UpdateFeedback(SmiOr(result_type, var_lhs_type_feedback.value()),
feedback_vector, slot_index, function);
......@@ -1134,9 +1134,9 @@ IGNITION_HANDLER(BitwiseXorSmi, InterpreterAssembler) {
Node* rhs_value = SmiToWord32(right);
Node* value = Word32Xor(lhs_value, rhs_value);
Node* result = ChangeInt32ToTagged(value);
Node* result_type = SelectSmiConstant(
TaggedIsSmi(result), BinaryOperationFeedback::kSignedSmall,
BinaryOperationFeedback::kNumberOrOddball);
Node* result_type = SelectSmiConstant(TaggedIsSmi(result),
BinaryOperationFeedback::kSignedSmall,
BinaryOperationFeedback::kNumber);
Node* function = LoadRegister(Register::function_closure());
UpdateFeedback(SmiOr(result_type, var_lhs_type_feedback.value()),
feedback_vector, slot_index, function);
......@@ -1160,9 +1160,9 @@ IGNITION_HANDLER(BitwiseAndSmi, InterpreterAssembler) {
Node* rhs_value = SmiToWord32(right);
Node* value = Word32And(lhs_value, rhs_value);
Node* result = ChangeInt32ToTagged(value);
Node* result_type = SelectSmiConstant(
TaggedIsSmi(result), BinaryOperationFeedback::kSignedSmall,
BinaryOperationFeedback::kNumberOrOddball);
Node* result_type = SelectSmiConstant(TaggedIsSmi(result),
BinaryOperationFeedback::kSignedSmall,
BinaryOperationFeedback::kNumber);
Node* function = LoadRegister(Register::function_closure());
UpdateFeedback(SmiOr(result_type, var_lhs_type_feedback.value()),
feedback_vector, slot_index, function);
......@@ -1189,9 +1189,9 @@ IGNITION_HANDLER(ShiftLeftSmi, InterpreterAssembler) {
Node* shift_count = Word32And(rhs_value, Int32Constant(0x1f));
Node* value = Word32Shl(lhs_value, shift_count);
Node* result = ChangeInt32ToTagged(value);
Node* result_type = SelectSmiConstant(
TaggedIsSmi(result), BinaryOperationFeedback::kSignedSmall,
BinaryOperationFeedback::kNumberOrOddball);
Node* result_type = SelectSmiConstant(TaggedIsSmi(result),
BinaryOperationFeedback::kSignedSmall,
BinaryOperationFeedback::kNumber);
Node* function = LoadRegister(Register::function_closure());
UpdateFeedback(SmiOr(result_type, var_lhs_type_feedback.value()),
feedback_vector, slot_index, function);
......@@ -1218,9 +1218,9 @@ IGNITION_HANDLER(ShiftRightSmi, InterpreterAssembler) {
Node* shift_count = Word32And(rhs_value, Int32Constant(0x1f));
Node* value = Word32Sar(lhs_value, shift_count);
Node* result = ChangeInt32ToTagged(value);
Node* result_type = SelectSmiConstant(
TaggedIsSmi(result), BinaryOperationFeedback::kSignedSmall,
BinaryOperationFeedback::kNumberOrOddball);
Node* result_type = SelectSmiConstant(TaggedIsSmi(result),
BinaryOperationFeedback::kSignedSmall,
BinaryOperationFeedback::kNumber);
Node* function = LoadRegister(Register::function_closure());
UpdateFeedback(SmiOr(result_type, var_lhs_type_feedback.value()),
feedback_vector, slot_index, function);
......@@ -1247,9 +1247,9 @@ IGNITION_HANDLER(ShiftRightLogicalSmi, InterpreterAssembler) {
Node* shift_count = Word32And(rhs_value, Int32Constant(0x1f));
Node* value = Word32Shr(lhs_value, shift_count);
Node* result = ChangeUint32ToTagged(value);
Node* result_type = SelectSmiConstant(
TaggedIsSmi(result), BinaryOperationFeedback::kSignedSmall,
BinaryOperationFeedback::kNumberOrOddball);
Node* result_type = SelectSmiConstant(TaggedIsSmi(result),
BinaryOperationFeedback::kSignedSmall,
BinaryOperationFeedback::kNumber);
Node* function = LoadRegister(Register::function_closure());
UpdateFeedback(SmiOr(result_type, var_lhs_type_feedback.value()),
feedback_vector, slot_index, function);
......@@ -1294,8 +1294,7 @@ IGNITION_HANDLER(ToNumber, InterpreterAssembler) {
BIND(&if_objectisnumber);
{
var_result.Bind(object);
var_type_feedback.Bind(
SmiConstant(BinaryOperationFeedback::kNumberOrOddball));
var_type_feedback.Bind(SmiConstant(BinaryOperationFeedback::kNumber));
Goto(&if_done);
}
......@@ -1444,7 +1443,7 @@ IGNITION_HANDLER(Inc, InterpreterAssembler) {
Node* finc_result = Float64Add(finc_value, one);
var_type_feedback.Bind(
SmiOr(var_type_feedback.value(),
SmiConstant(BinaryOperationFeedback::kNumberOrOddball)));
SmiConstant(BinaryOperationFeedback::kNumber)));
result_var.Bind(AllocateHeapNumberWithValue(finc_result));
Goto(&end);
}
......@@ -1569,7 +1568,7 @@ IGNITION_HANDLER(Dec, InterpreterAssembler) {
Node* fdec_result = Float64Sub(fdec_value, one);
var_type_feedback.Bind(
SmiOr(var_type_feedback.value(),
SmiConstant(BinaryOperationFeedback::kNumberOrOddball)));
SmiConstant(BinaryOperationFeedback::kNumber)));
result_var.Bind(AllocateHeapNumberWithValue(fdec_result));
Goto(&end);
}
......
......@@ -17,6 +17,8 @@ std::ostream& operator<<(std::ostream& os, BinaryOperationHint hint) {
return os << "SignedSmallInputs";
case BinaryOperationHint::kSigned32:
return os << "Signed32";
case BinaryOperationHint::kNumber:
return os << "Number";
case BinaryOperationHint::kNumberOrOddball:
return os << "NumberOrOddball";
case BinaryOperationHint::kString:
......
......@@ -17,6 +17,7 @@ enum class BinaryOperationHint : uint8_t {
kSignedSmall,
kSignedSmallInputs,
kSigned32,
kNumber,
kNumberOrOddball,
kString,
kAny
......
......@@ -559,14 +559,14 @@ TEST(InterpreterBinaryOpTypeFeedback) {
{Token::Value::ADD, ast_factory.NewSmi(Smi::kMaxValue),
ast_factory.NewSmi(1),
isolate->factory()->NewHeapNumber(Smi::kMaxValue + 1.0),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::ADD, ast_factory.NewNumber(3.1415), ast_factory.NewSmi(3),
isolate->factory()->NewHeapNumber(3.1415 + 3),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::ADD, ast_factory.NewNumber(3.1415),
ast_factory.NewNumber(1.4142),
isolate->factory()->NewHeapNumber(3.1415 + 1.4142),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::ADD,
ast_factory.NewString(ast_factory.GetOneByteString("foo")),
ast_factory.NewString(ast_factory.GetOneByteString("bar")),
......@@ -584,14 +584,14 @@ TEST(InterpreterBinaryOpTypeFeedback) {
ast_factory.NewSmi(static_cast<uint32_t>(Smi::kMinValue)),
ast_factory.NewSmi(1),
isolate->factory()->NewHeapNumber(Smi::kMinValue - 1.0),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::SUB, ast_factory.NewNumber(3.1415), ast_factory.NewSmi(3),
isolate->factory()->NewHeapNumber(3.1415 - 3),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::SUB, ast_factory.NewNumber(3.1415),
ast_factory.NewNumber(1.4142),
isolate->factory()->NewHeapNumber(3.1415 - 1.4142),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::SUB, ast_factory.NewSmi(2),
ast_factory.NewString(ast_factory.GetOneByteString("1")),
Handle<Smi>(Smi::FromInt(1), isolate), BinaryOperationFeedback::kAny},
......@@ -603,14 +603,14 @@ TEST(InterpreterBinaryOpTypeFeedback) {
ast_factory.NewSmi(static_cast<uint32_t>(Smi::kMinValue)),
ast_factory.NewSmi(2),
isolate->factory()->NewHeapNumber(Smi::kMinValue * 2.0),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::MUL, ast_factory.NewNumber(3.1415), ast_factory.NewSmi(3),
isolate->factory()->NewHeapNumber(3 * 3.1415),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::MUL, ast_factory.NewNumber(3.1415),
ast_factory.NewNumber(1.4142),
isolate->factory()->NewHeapNumber(3.1415 * 1.4142),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::MUL, ast_factory.NewSmi(2),
ast_factory.NewString(ast_factory.GetOneByteString("1")),
Handle<Smi>(Smi::FromInt(2), isolate), BinaryOperationFeedback::kAny},
......@@ -623,11 +623,11 @@ TEST(InterpreterBinaryOpTypeFeedback) {
BinaryOperationFeedback::kSignedSmallInputs},
{Token::Value::DIV, ast_factory.NewNumber(3.1415), ast_factory.NewSmi(3),
isolate->factory()->NewHeapNumber(3.1415 / 3),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::DIV, ast_factory.NewNumber(3.1415),
ast_factory.NewNumber(-std::numeric_limits<double>::infinity()),
isolate->factory()->NewHeapNumber(-0.0),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::DIV, ast_factory.NewSmi(2),
ast_factory.NewString(ast_factory.GetOneByteString("1")),
Handle<Smi>(Smi::FromInt(2), isolate), BinaryOperationFeedback::kAny},
......@@ -637,14 +637,14 @@ TEST(InterpreterBinaryOpTypeFeedback) {
BinaryOperationFeedback::kSignedSmall},
{Token::Value::MOD, ast_factory.NewSmi(static_cast<uint32_t>(-4)),
ast_factory.NewSmi(2), isolate->factory()->NewHeapNumber(-0.0),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::MOD, ast_factory.NewNumber(3.1415), ast_factory.NewSmi(3),
isolate->factory()->NewHeapNumber(fmod(3.1415, 3.0)),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::MOD, ast_factory.NewNumber(-3.1415),
ast_factory.NewNumber(-1.4142),
isolate->factory()->NewHeapNumber(fmod(-3.1415, -1.4142)),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::MOD, ast_factory.NewSmi(3),
ast_factory.NewString(ast_factory.GetOneByteString("-2")),
Handle<Smi>(Smi::FromInt(1), isolate), BinaryOperationFeedback::kAny}};
......@@ -701,10 +701,10 @@ TEST(InterpreterBinaryOpSmiTypeFeedback) {
BinaryOperationFeedback::kSignedSmall},
{Token::Value::ADD, ast_factory.NewSmi(2), Smi::kMaxValue,
isolate->factory()->NewHeapNumber(Smi::kMaxValue + 2.0),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::ADD, ast_factory.NewNumber(3.1415), 2,
isolate->factory()->NewHeapNumber(3.1415 + 2.0),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::ADD,
ast_factory.NewString(ast_factory.GetOneByteString("2")), 2,
isolate->factory()->NewStringFromAsciiChecked("22"),
......@@ -716,10 +716,10 @@ TEST(InterpreterBinaryOpSmiTypeFeedback) {
{Token::Value::SUB,
ast_factory.NewSmi(static_cast<uint32_t>(Smi::kMinValue)), 1,
isolate->factory()->NewHeapNumber(Smi::kMinValue - 1.0),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::SUB, ast_factory.NewNumber(3.1415), 2,
isolate->factory()->NewHeapNumber(3.1415 - 2.0),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::SUB,
ast_factory.NewString(ast_factory.GetOneByteString("2")), 2,
Handle<Smi>(Smi::kZero, isolate), BinaryOperationFeedback::kAny},
......@@ -729,7 +729,7 @@ TEST(InterpreterBinaryOpSmiTypeFeedback) {
BinaryOperationFeedback::kSignedSmall},
{Token::Value::BIT_OR, ast_factory.NewNumber(3.1415), 8,
Handle<Smi>(Smi::FromInt(11), isolate),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::BIT_OR,
ast_factory.NewString(ast_factory.GetOneByteString("2")), 1,
Handle<Smi>(Smi::FromInt(3), isolate), BinaryOperationFeedback::kAny},
......@@ -738,8 +738,7 @@ TEST(InterpreterBinaryOpSmiTypeFeedback) {
Handle<Smi>(Smi::FromInt(1), isolate),
BinaryOperationFeedback::kSignedSmall},
{Token::Value::BIT_AND, ast_factory.NewNumber(3.1415), 2,
Handle<Smi>(Smi::FromInt(2), isolate),
BinaryOperationFeedback::kNumberOrOddball},
Handle<Smi>(Smi::FromInt(2), isolate), BinaryOperationFeedback::kNumber},
{Token::Value::BIT_AND,
ast_factory.NewString(ast_factory.GetOneByteString("2")), 1,
Handle<Smi>(Smi::kZero, isolate), BinaryOperationFeedback::kAny},
......@@ -749,7 +748,7 @@ TEST(InterpreterBinaryOpSmiTypeFeedback) {
BinaryOperationFeedback::kSignedSmall},
{Token::Value::SHL, ast_factory.NewNumber(3.1415), 2,
Handle<Smi>(Smi::FromInt(12), isolate),
BinaryOperationFeedback::kNumberOrOddball},
BinaryOperationFeedback::kNumber},
{Token::Value::SHL,
ast_factory.NewString(ast_factory.GetOneByteString("2")), 1,
Handle<Smi>(Smi::FromInt(4), isolate), BinaryOperationFeedback::kAny},
......@@ -758,8 +757,7 @@ TEST(InterpreterBinaryOpSmiTypeFeedback) {
Handle<Smi>(Smi::FromInt(1), isolate),
BinaryOperationFeedback::kSignedSmall},
{Token::Value::SAR, ast_factory.NewNumber(3.1415), 2,
Handle<Smi>(Smi::kZero, isolate),
BinaryOperationFeedback::kNumberOrOddball},
Handle<Smi>(Smi::kZero, isolate), BinaryOperationFeedback::kNumber},
{Token::Value::SAR,
ast_factory.NewString(ast_factory.GetOneByteString("2")), 1,
Handle<Smi>(Smi::FromInt(1), isolate), BinaryOperationFeedback::kAny}};
......@@ -856,12 +854,12 @@ TEST(InterpreterUnaryOpFeedback) {
Object* feedback1 = callable.vector()->Get(slot1);
CHECK(feedback1->IsSmi());
CHECK_EQ(BinaryOperationFeedback::kNumberOrOddball,
CHECK_EQ(BinaryOperationFeedback::kNumber,
static_cast<Smi*>(feedback1)->value());
Object* feedback2 = callable.vector()->Get(slot2);
CHECK(feedback2->IsSmi());
CHECK_EQ(BinaryOperationFeedback::kNumberOrOddball,
CHECK_EQ(BinaryOperationFeedback::kNumber,
static_cast<Smi*>(feedback2)->value());
Object* feedback3 = callable.vector()->Get(slot3);
......@@ -917,7 +915,7 @@ TEST(InterpreterBitwiseTypeFeedback) {
Object* feedback1 = callable.vector()->Get(slot1);
CHECK(feedback1->IsSmi());
CHECK_EQ(BinaryOperationFeedback::kNumberOrOddball,
CHECK_EQ(BinaryOperationFeedback::kNumber,
static_cast<Smi*>(feedback1)->value());
Object* feedback2 = callable.vector()->Get(slot2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment