Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(691)

Unified Diff: test/unittests/compiler/js-typed-lowering-unittest.cc

Issue 2121113002: [unittests] Remove spurious language mode test dimension. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_turbofan-checkpoint-typed-lowering-3
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/js-typed-lowering-unittest.cc
diff --git a/test/unittests/compiler/js-typed-lowering-unittest.cc b/test/unittests/compiler/js-typed-lowering-unittest.cc
index fd6a6ea86c19a9f21cd942db25479bb60ff3808a..609b443fe1eeea7fa35ab700b7868de8fefb7700 100644
--- a/test/unittests/compiler/js-typed-lowering-unittest.cc
+++ b/test/unittests/compiler/js-typed-lowering-unittest.cc
@@ -823,43 +823,39 @@ TEST_F(JSTypedLoweringTest, JSLoadNamedStringLength) {
TEST_F(JSTypedLoweringTest, JSAddWithString) {
BinaryOperationHints const hints = BinaryOperationHints::Any();
- Node* lhs = Parameter(Type::String(), 0);
- Node* rhs = Parameter(Type::String(), 1);
- Node* context = Parameter(Type::Any(), 2);
- Node* frame_state = EmptyFrameState();
- Node* effect = graph()->start();
- Node* control = graph()->start();
- Reduction r =
- Reduce(graph()->NewNode(javascript()->Add(hints), lhs, rhs, context,
- frame_state, effect, control));
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(),
- IsCall(_, IsHeapConstant(
- CodeFactory::StringAdd(
- isolate(), STRING_ADD_CHECK_NONE, NOT_TENURED)
- .code()),
- lhs, rhs, context, frame_state, effect, control));
+ Node* lhs = Parameter(Type::String(), 0);
+ Node* rhs = Parameter(Type::String(), 1);
+ Node* context = Parameter(Type::Any(), 2);
+ Node* frame_state = EmptyFrameState();
+ Node* effect = graph()->start();
+ Node* control = graph()->start();
+ Reduction r = Reduce(graph()->NewNode(javascript()->Add(hints), lhs, rhs,
+ context, frame_state, effect, control));
+ ASSERT_TRUE(r.Changed());
+ EXPECT_THAT(r.replacement(),
+ IsCall(_, IsHeapConstant(
+ CodeFactory::StringAdd(
+ isolate(), STRING_ADD_CHECK_NONE, NOT_TENURED)
+ .code()),
+ lhs, rhs, context, frame_state, effect, control));
}
TEST_F(JSTypedLoweringTest, JSAddSmis) {
BinaryOperationHints const hints(BinaryOperationHints::kSignedSmall,
BinaryOperationHints::kSignedSmall,
BinaryOperationHints::kSignedSmall);
- TRACED_FOREACH(LanguageMode, language_mode, kLanguageModes) {
- Node* lhs = Parameter(Type::Number(), 0);
- Node* rhs = Parameter(Type::Number(), 1);
- Node* context = Parameter(Type::Any(), 2);
- Node* frame_state = EmptyFrameState();
- Node* effect = graph()->start();
- Node* control = graph()->start();
- Reduction r =
- Reduce(graph()->NewNode(javascript()->Add(hints), lhs, rhs, context,
- frame_state, effect, control));
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(),
- IsSpeculativeNumberAdd(BinaryOperationHints::kSignedSmall, lhs,
- rhs, effect, control));
- }
+ Node* lhs = Parameter(Type::Number(), 0);
+ Node* rhs = Parameter(Type::Number(), 1);
+ Node* context = Parameter(Type::Any(), 2);
+ Node* frame_state = EmptyFrameState();
+ Node* effect = graph()->start();
+ Node* control = graph()->start();
+ Reduction r = Reduce(graph()->NewNode(javascript()->Add(hints), lhs, rhs,
+ context, frame_state, effect, control));
+ ASSERT_TRUE(r.Changed());
+ EXPECT_THAT(r.replacement(),
+ IsSpeculativeNumberAdd(BinaryOperationHints::kSignedSmall, lhs,
+ rhs, effect, control));
}
// -----------------------------------------------------------------------------
@@ -869,21 +865,18 @@ TEST_F(JSTypedLoweringTest, JSSubtractSmis) {
BinaryOperationHints const hints(BinaryOperationHints::kSignedSmall,
BinaryOperationHints::kSignedSmall,
BinaryOperationHints::kSignedSmall);
- TRACED_FOREACH(LanguageMode, language_mode, kLanguageModes) {
- Node* lhs = Parameter(Type::Number(), 0);
- Node* rhs = Parameter(Type::Number(), 1);
- Node* context = Parameter(Type::Any(), 2);
- Node* frame_state = EmptyFrameState();
- Node* effect = graph()->start();
- Node* control = graph()->start();
- Reduction r =
- Reduce(graph()->NewNode(javascript()->Subtract(hints), lhs, rhs,
- context, frame_state, effect, control));
- ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(),
- IsSpeculativeNumberSubtract(BinaryOperationHints::kSignedSmall,
- lhs, rhs, effect, control));
- }
+ Node* lhs = Parameter(Type::Number(), 0);
+ Node* rhs = Parameter(Type::Number(), 1);
+ Node* context = Parameter(Type::Any(), 2);
+ Node* frame_state = EmptyFrameState();
+ Node* effect = graph()->start();
+ Node* control = graph()->start();
+ Reduction r = Reduce(graph()->NewNode(javascript()->Subtract(hints), lhs, rhs,
+ context, frame_state, effect, control));
+ ASSERT_TRUE(r.Changed());
+ EXPECT_THAT(r.replacement(),
+ IsSpeculativeNumberSubtract(BinaryOperationHints::kSignedSmall,
+ lhs, rhs, effect, control));
}
// -----------------------------------------------------------------------------
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698