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

Unified Diff: test/cctest/interpreter/test-interpreter.cc

Issue 2609013002: [turbofan] Use InternalizedString feedback abstract/strict equality comparisons. (Closed)
Patch Set: Created 3 years, 12 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 | « src/type-info.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/interpreter/test-interpreter.cc
diff --git a/test/cctest/interpreter/test-interpreter.cc b/test/cctest/interpreter/test-interpreter.cc
index 135e20fcb3329259f391807d2e8aad3987a407f8..dc17cf0f8d9d56a0fae568660a157c68dd7c60a0 100644
--- a/test/cctest/interpreter/test-interpreter.cc
+++ b/test/cctest/interpreter/test-interpreter.cc
@@ -1798,9 +1798,9 @@ TEST(InterpreterStringComparisons) {
BytecodeArrayBuilder builder(isolate, handles.main_zone(), 0, 0, 1);
Register r0(0);
- builder.LoadLiteral(factory->NewStringFromAsciiChecked(lhs))
+ builder.LoadLiteral(factory->InternalizeUtf8String(lhs))
.StoreAccumulatorInRegister(r0)
- .LoadLiteral(factory->NewStringFromAsciiChecked(rhs))
+ .LoadLiteral(factory->InternalizeUtf8String(rhs))
.CompareOperation(comparison, r0, vector->GetIndex(slot))
.Return();
@@ -1813,8 +1813,11 @@ TEST(InterpreterStringComparisons) {
CompareC(comparison, inputs[i], inputs[j]));
Object* feedback = vector->Get(slot);
CHECK(feedback->IsSmi());
- CHECK_EQ(CompareOperationFeedback::kString,
- static_cast<Smi*>(feedback)->value());
+ int const expected_feedback =
+ Token::IsOrderedRelationalCompareOp(comparison)
+ ? CompareOperationFeedback::kString
+ : CompareOperationFeedback::kInternalizedString;
+ CHECK_EQ(expected_feedback, static_cast<Smi*>(feedback)->value());
}
}
}
« no previous file with comments | « src/type-info.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698