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 15 matching lines...) Expand all Loading... |
26 #include "test/cctest/compiler/graph-builder-tester.h" | 26 #include "test/cctest/compiler/graph-builder-tester.h" |
27 #include "test/cctest/compiler/value-helper.h" | 27 #include "test/cctest/compiler/value-helper.h" |
28 | 28 |
29 using namespace v8::internal; | 29 using namespace v8::internal; |
30 using namespace v8::internal::compiler; | 30 using namespace v8::internal::compiler; |
31 | 31 |
32 template <typename ReturnType> | 32 template <typename ReturnType> |
33 class SimplifiedLoweringTester : public GraphBuilderTester<ReturnType> { | 33 class SimplifiedLoweringTester : public GraphBuilderTester<ReturnType> { |
34 public: | 34 public: |
35 SimplifiedLoweringTester(MachineType p0 = kMachNone, | 35 SimplifiedLoweringTester(MachineType p0 = kMachNone, |
36 MachineType p1 = kMachNone, | 36 MachineType p1 = kMachNone) |
37 MachineType p2 = kMachNone, | 37 : GraphBuilderTester<ReturnType>(p0, p1), |
38 MachineType p3 = kMachNone, | |
39 MachineType p4 = kMachNone) | |
40 : GraphBuilderTester<ReturnType>(p0, p1, p2, p3, p4), | |
41 typer(this->isolate(), this->graph(), MaybeHandle<Context>()), | 38 typer(this->isolate(), this->graph(), MaybeHandle<Context>()), |
42 javascript(this->zone()), | 39 javascript(this->zone()), |
43 jsgraph(this->isolate(), this->graph(), this->common(), &javascript, | 40 jsgraph(this->isolate(), this->graph(), this->common(), &javascript, |
44 this->machine()), | 41 this->machine()), |
45 source_positions(jsgraph.graph()), | 42 source_positions(jsgraph.graph()), |
46 lowering(&jsgraph, this->zone(), &source_positions) {} | 43 lowering(&jsgraph, this->zone(), &source_positions) {} |
47 | 44 |
48 Typer typer; | 45 Typer typer; |
49 JSOperatorBuilder javascript; | 46 JSOperatorBuilder javascript; |
50 JSGraph jsgraph; | 47 JSGraph jsgraph; |
(...skipping 2039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2090 Bounds phi_bounds = Bounds::Either(Bounds(d.arg1), Bounds(d.arg2), z); | 2087 Bounds phi_bounds = Bounds::Either(Bounds(d.arg1), Bounds(d.arg2), z); |
2091 NodeProperties::SetBounds(phi, phi_bounds); | 2088 NodeProperties::SetBounds(phi, phi_bounds); |
2092 | 2089 |
2093 Node* use = t.Use(phi, d.use); | 2090 Node* use = t.Use(phi, d.use); |
2094 t.Return(use); | 2091 t.Return(use); |
2095 t.Lower(); | 2092 t.Lower(); |
2096 | 2093 |
2097 CHECK_EQ(d.expected, OpParameter<MachineType>(phi)); | 2094 CHECK_EQ(d.expected, OpParameter<MachineType>(phi)); |
2098 } | 2095 } |
2099 } | 2096 } |
OLD | NEW |