Commit ee2d06e6 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[unittests] Remove spurious language mode test dimension.

This just removes some left-overs from when the {JSTypedLoweringTest}
covered strong mode and an iteration over all language modes was used
for testing all binary operations. The language mode in question has
been removed since then.

R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2121113002
Cr-Commit-Position: refs/heads/master@{#37526}
parent 84124ce2
...@@ -823,43 +823,39 @@ TEST_F(JSTypedLoweringTest, JSLoadNamedStringLength) { ...@@ -823,43 +823,39 @@ TEST_F(JSTypedLoweringTest, JSLoadNamedStringLength) {
TEST_F(JSTypedLoweringTest, JSAddWithString) { TEST_F(JSTypedLoweringTest, JSAddWithString) {
BinaryOperationHints const hints = BinaryOperationHints::Any(); BinaryOperationHints const hints = BinaryOperationHints::Any();
Node* lhs = Parameter(Type::String(), 0); Node* lhs = Parameter(Type::String(), 0);
Node* rhs = Parameter(Type::String(), 1); Node* rhs = Parameter(Type::String(), 1);
Node* context = Parameter(Type::Any(), 2); Node* context = Parameter(Type::Any(), 2);
Node* frame_state = EmptyFrameState(); Node* frame_state = EmptyFrameState();
Node* effect = graph()->start(); Node* effect = graph()->start();
Node* control = graph()->start(); Node* control = graph()->start();
Reduction r = Reduction r = Reduce(graph()->NewNode(javascript()->Add(hints), lhs, rhs,
Reduce(graph()->NewNode(javascript()->Add(hints), lhs, rhs, context, context, frame_state, effect, control));
frame_state, effect, control)); ASSERT_TRUE(r.Changed());
ASSERT_TRUE(r.Changed()); EXPECT_THAT(r.replacement(),
EXPECT_THAT(r.replacement(), IsCall(_, IsHeapConstant(
IsCall(_, IsHeapConstant( CodeFactory::StringAdd(
CodeFactory::StringAdd( isolate(), STRING_ADD_CHECK_NONE, NOT_TENURED)
isolate(), STRING_ADD_CHECK_NONE, NOT_TENURED) .code()),
.code()), lhs, rhs, context, frame_state, effect, control));
lhs, rhs, context, frame_state, effect, control));
} }
TEST_F(JSTypedLoweringTest, JSAddSmis) { TEST_F(JSTypedLoweringTest, JSAddSmis) {
BinaryOperationHints const hints(BinaryOperationHints::kSignedSmall, BinaryOperationHints const hints(BinaryOperationHints::kSignedSmall,
BinaryOperationHints::kSignedSmall, BinaryOperationHints::kSignedSmall,
BinaryOperationHints::kSignedSmall); BinaryOperationHints::kSignedSmall);
TRACED_FOREACH(LanguageMode, language_mode, kLanguageModes) { Node* lhs = Parameter(Type::Number(), 0);
Node* lhs = Parameter(Type::Number(), 0); Node* rhs = Parameter(Type::Number(), 1);
Node* rhs = Parameter(Type::Number(), 1); Node* context = Parameter(Type::Any(), 2);
Node* context = Parameter(Type::Any(), 2); Node* frame_state = EmptyFrameState();
Node* frame_state = EmptyFrameState(); Node* effect = graph()->start();
Node* effect = graph()->start(); Node* control = graph()->start();
Node* control = graph()->start(); Reduction r = Reduce(graph()->NewNode(javascript()->Add(hints), lhs, rhs,
Reduction r = context, frame_state, effect, control));
Reduce(graph()->NewNode(javascript()->Add(hints), lhs, rhs, context, ASSERT_TRUE(r.Changed());
frame_state, effect, control)); EXPECT_THAT(r.replacement(),
ASSERT_TRUE(r.Changed()); IsSpeculativeNumberAdd(BinaryOperationHints::kSignedSmall, lhs,
EXPECT_THAT(r.replacement(), rhs, effect, control));
IsSpeculativeNumberAdd(BinaryOperationHints::kSignedSmall, lhs,
rhs, effect, control));
}
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
...@@ -869,21 +865,18 @@ TEST_F(JSTypedLoweringTest, JSSubtractSmis) { ...@@ -869,21 +865,18 @@ TEST_F(JSTypedLoweringTest, JSSubtractSmis) {
BinaryOperationHints const hints(BinaryOperationHints::kSignedSmall, BinaryOperationHints const hints(BinaryOperationHints::kSignedSmall,
BinaryOperationHints::kSignedSmall, BinaryOperationHints::kSignedSmall,
BinaryOperationHints::kSignedSmall); BinaryOperationHints::kSignedSmall);
TRACED_FOREACH(LanguageMode, language_mode, kLanguageModes) { Node* lhs = Parameter(Type::Number(), 0);
Node* lhs = Parameter(Type::Number(), 0); Node* rhs = Parameter(Type::Number(), 1);
Node* rhs = Parameter(Type::Number(), 1); Node* context = Parameter(Type::Any(), 2);
Node* context = Parameter(Type::Any(), 2); Node* frame_state = EmptyFrameState();
Node* frame_state = EmptyFrameState(); Node* effect = graph()->start();
Node* effect = graph()->start(); Node* control = graph()->start();
Node* control = graph()->start(); Reduction r = Reduce(graph()->NewNode(javascript()->Subtract(hints), lhs, rhs,
Reduction r = context, frame_state, effect, control));
Reduce(graph()->NewNode(javascript()->Subtract(hints), lhs, rhs, ASSERT_TRUE(r.Changed());
context, frame_state, effect, control)); EXPECT_THAT(r.replacement(),
ASSERT_TRUE(r.Changed()); IsSpeculativeNumberSubtract(BinaryOperationHints::kSignedSmall,
EXPECT_THAT(r.replacement(), lhs, rhs, effect, control));
IsSpeculativeNumberSubtract(BinaryOperationHints::kSignedSmall,
lhs, rhs, effect, control));
}
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
......
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