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

Side by Side Diff: test/cctest/compiler/test-simplified-lowering.cc

Issue 1761823002: [compiler] Introduce StringEqualStub and StringNotEqualStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address feedback. Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <limits> 5 #include <limits>
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler/access-builder.h" 8 #include "src/compiler/access-builder.h"
9 #include "src/compiler/change-lowering.h" 9 #include "src/compiler/change-lowering.h"
10 #include "src/compiler/control-builders.h" 10 #include "src/compiler/control-builders.h"
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 TestingGraph t(Type::Any(), Type::Any()); 1137 TestingGraph t(Type::Any(), Type::Any());
1138 IrOpcode::Value opcode = 1138 IrOpcode::Value opcode =
1139 static_cast<IrOpcode::Value>(t.machine()->WordEqual()->opcode()); 1139 static_cast<IrOpcode::Value>(t.machine()->WordEqual()->opcode());
1140 t.CheckLoweringBinop(opcode, t.simplified()->ReferenceEqual(Type::Any())); 1140 t.CheckLoweringBinop(opcode, t.simplified()->ReferenceEqual(Type::Any()));
1141 } 1141 }
1142 1142
1143 1143
1144 TEST(LowerStringOps_to_call_and_compare) { 1144 TEST(LowerStringOps_to_call_and_compare) {
1145 // These tests need linkage for the calls. 1145 // These tests need linkage for the calls.
1146 TestingGraph t(Type::String(), Type::String()); 1146 TestingGraph t(Type::String(), Type::String());
1147 IrOpcode::Value compare_eq =
1148 static_cast<IrOpcode::Value>(t.machine()->WordEqual()->opcode());
1149 IrOpcode::Value compare_lt = 1147 IrOpcode::Value compare_lt =
1150 static_cast<IrOpcode::Value>(t.machine()->IntLessThan()->opcode()); 1148 static_cast<IrOpcode::Value>(t.machine()->IntLessThan()->opcode());
1151 IrOpcode::Value compare_le = static_cast<IrOpcode::Value>( 1149 IrOpcode::Value compare_le = static_cast<IrOpcode::Value>(
1152 t.machine()->IntLessThanOrEqual()->opcode()); 1150 t.machine()->IntLessThanOrEqual()->opcode());
1153 t.CheckLoweringStringBinop(compare_eq, t.simplified()->StringEqual());
1154 t.CheckLoweringStringBinop(compare_lt, t.simplified()->StringLessThan()); 1151 t.CheckLoweringStringBinop(compare_lt, t.simplified()->StringLessThan());
1155 t.CheckLoweringStringBinop(compare_le, 1152 t.CheckLoweringStringBinop(compare_le,
1156 t.simplified()->StringLessThanOrEqual()); 1153 t.simplified()->StringLessThanOrEqual());
1157 } 1154 }
1158 1155
1159 1156
1160 void CheckChangeInsertion(IrOpcode::Value expected, MachineType from, 1157 void CheckChangeInsertion(IrOpcode::Value expected, MachineType from,
1161 MachineType to, Type* type = Type::Any()) { 1158 MachineType to, Type* type = Type::Any()) {
1162 TestingGraph t(Type::Any()); 1159 TestingGraph t(Type::Any());
1163 Node* in = t.ExampleWithOutput(from); 1160 Node* in = t.ExampleWithOutput(from);
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
1963 t.Return(use); 1960 t.Return(use);
1964 t.Lower(); 1961 t.Lower();
1965 1962
1966 CHECK_EQ(d.expected, PhiRepresentationOf(phi->op())); 1963 CHECK_EQ(d.expected, PhiRepresentationOf(phi->op()));
1967 } 1964 }
1968 } 1965 }
1969 1966
1970 } // namespace compiler 1967 } // namespace compiler
1971 } // namespace internal 1968 } // namespace internal
1972 } // namespace v8 1969 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698