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

Unified Diff: test/cctest/compiler/test-simplified-lowering.cc

Issue 1369313004: [turbofan] Make string comparisons effectful. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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
Index: test/cctest/compiler/test-simplified-lowering.cc
diff --git a/test/cctest/compiler/test-simplified-lowering.cc b/test/cctest/compiler/test-simplified-lowering.cc
index 934f958f00598242965f2a5a5eedc450e92b8f3f..54ffe8528837068e70f217be7c576af1b39e0a7e 100644
--- a/test/cctest/compiler/test-simplified-lowering.cc
+++ b/test/cctest/compiler/test-simplified-lowering.cc
@@ -698,6 +698,13 @@ class TestingGraph : public HandleAndZoneScope, public GraphAndBuilders {
CHECK_EQ(expected, node->opcode());
}
+ void CheckLoweringStringBinop(IrOpcode::Value expected, const Operator* op) {
+ Node* node = Return(
+ graph()->NewNode(op, p0, p1, graph()->start(), graph()->start()));
+ Lower();
+ CHECK_EQ(expected, node->opcode());
+ }
+
void CheckLoweringTruncatedBinop(IrOpcode::Value expected, const Operator* op,
const Operator* trunc) {
Node* node = graph()->NewNode(op, p0, p1);
@@ -1173,9 +1180,10 @@ TEST(LowerStringOps_to_call_and_compare) {
static_cast<IrOpcode::Value>(t.machine()->IntLessThan()->opcode());
IrOpcode::Value compare_le = static_cast<IrOpcode::Value>(
t.machine()->IntLessThanOrEqual()->opcode());
- t.CheckLoweringBinop(compare_eq, t.simplified()->StringEqual());
- t.CheckLoweringBinop(compare_lt, t.simplified()->StringLessThan());
- t.CheckLoweringBinop(compare_le, t.simplified()->StringLessThanOrEqual());
+ t.CheckLoweringStringBinop(compare_eq, t.simplified()->StringEqual());
+ t.CheckLoweringStringBinop(compare_lt, t.simplified()->StringLessThan());
+ t.CheckLoweringStringBinop(compare_le,
+ t.simplified()->StringLessThanOrEqual());
}
« no previous file with comments | « test/cctest/compiler/test-js-typed-lowering.cc ('k') | test/unittests/compiler/simplified-operator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698