OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |