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

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

Issue 1164743002: [turbofan] Enable typed lowering of string addition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix tests. Created 5 years, 6 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
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/compiler/access-builder.h" 7 #include "src/compiler/access-builder.h"
8 #include "src/compiler/change-lowering.h" 8 #include "src/compiler/change-lowering.h"
9 #include "src/compiler/control-builders.h" 9 #include "src/compiler/control-builders.h"
10 #include "src/compiler/graph-reducer.h" 10 #include "src/compiler/graph-reducer.h"
(...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1259 TestingGraph t(Type::String(), Type::String()); 1259 TestingGraph t(Type::String(), Type::String());
1260 IrOpcode::Value compare_eq = 1260 IrOpcode::Value compare_eq =
1261 static_cast<IrOpcode::Value>(t.machine()->WordEqual()->opcode()); 1261 static_cast<IrOpcode::Value>(t.machine()->WordEqual()->opcode());
1262 IrOpcode::Value compare_lt = 1262 IrOpcode::Value compare_lt =
1263 static_cast<IrOpcode::Value>(t.machine()->IntLessThan()->opcode()); 1263 static_cast<IrOpcode::Value>(t.machine()->IntLessThan()->opcode());
1264 IrOpcode::Value compare_le = static_cast<IrOpcode::Value>( 1264 IrOpcode::Value compare_le = static_cast<IrOpcode::Value>(
1265 t.machine()->IntLessThanOrEqual()->opcode()); 1265 t.machine()->IntLessThanOrEqual()->opcode());
1266 t.CheckLoweringBinop(compare_eq, t.simplified()->StringEqual()); 1266 t.CheckLoweringBinop(compare_eq, t.simplified()->StringEqual());
1267 t.CheckLoweringBinop(compare_lt, t.simplified()->StringLessThan()); 1267 t.CheckLoweringBinop(compare_lt, t.simplified()->StringLessThan());
1268 t.CheckLoweringBinop(compare_le, t.simplified()->StringLessThanOrEqual()); 1268 t.CheckLoweringBinop(compare_le, t.simplified()->StringLessThanOrEqual());
1269 t.CheckLoweringBinop(IrOpcode::kCall, t.simplified()->StringAdd());
1270 } 1269 }
1271 } 1270 }
1272 1271
1273 1272
1274 void CheckChangeInsertion(IrOpcode::Value expected, MachineType from, 1273 void CheckChangeInsertion(IrOpcode::Value expected, MachineType from,
1275 MachineType to) { 1274 MachineType to) {
1276 TestingGraph t(Type::Any()); 1275 TestingGraph t(Type::Any());
1277 Node* in = t.ExampleWithOutput(from); 1276 Node* in = t.ExampleWithOutput(from);
1278 Node* use = t.Use(in, to); 1277 Node* use = t.Use(in, to);
1279 t.Return(use); 1278 t.Return(use);
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
2087 Bounds phi_bounds = Bounds::Either(Bounds(d.arg1), Bounds(d.arg2), z); 2086 Bounds phi_bounds = Bounds::Either(Bounds(d.arg1), Bounds(d.arg2), z);
2088 NodeProperties::SetBounds(phi, phi_bounds); 2087 NodeProperties::SetBounds(phi, phi_bounds);
2089 2088
2090 Node* use = t.Use(phi, d.use); 2089 Node* use = t.Use(phi, d.use);
2091 t.Return(use); 2090 t.Return(use);
2092 t.Lower(); 2091 t.Lower();
2093 2092
2094 CHECK_EQ(d.expected, OpParameter<MachineType>(phi)); 2093 CHECK_EQ(d.expected, OpParameter<MachineType>(phi));
2095 } 2094 }
2096 } 2095 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/simplified-graph-builder.h ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698