| 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 "src/base/utils/random-number-generator.h" | 5 #include "src/base/utils/random-number-generator.h" |
| 6 #include "src/codegen.h" | 6 #include "src/codegen.h" |
| 7 #include "src/compiler/js-graph.h" | 7 #include "src/compiler/js-graph.h" |
| 8 #include "src/compiler/machine-operator-reducer.h" | 8 #include "src/compiler/machine-operator-reducer.h" |
| 9 #include "src/compiler/operator-properties.h" | 9 #include "src/compiler/operator-properties.h" |
| 10 #include "src/compiler/typer.h" | 10 #include "src/compiler/typer.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 explicit ReducerTester(int num_parameters = 0, | 76 explicit ReducerTester(int num_parameters = 0, |
| 77 MachineOperatorBuilder::Flags flags = | 77 MachineOperatorBuilder::Flags flags = |
| 78 MachineOperatorBuilder::kAllOptionalOps) | 78 MachineOperatorBuilder::kAllOptionalOps) |
| 79 : isolate(main_isolate()), | 79 : isolate(main_isolate()), |
| 80 binop(NULL), | 80 binop(NULL), |
| 81 unop(NULL), | 81 unop(NULL), |
| 82 machine(main_zone(), MachineType::PointerRepresentation(), flags), | 82 machine(main_zone(), MachineType::PointerRepresentation(), flags), |
| 83 common(main_zone()), | 83 common(main_zone()), |
| 84 graph(main_zone()), | 84 graph(main_zone()), |
| 85 javascript(main_zone()), | 85 javascript(main_zone()), |
| 86 typer(isolate, &graph), | |
| 87 jsgraph(isolate, &graph, &common, &javascript, nullptr, &machine), | 86 jsgraph(isolate, &graph, &common, &javascript, nullptr, &machine), |
| 88 maxuint32(Constant<int32_t>(kMaxUInt32)) { | 87 maxuint32(Constant<int32_t>(kMaxUInt32)) { |
| 89 Node* s = graph.NewNode(common.Start(num_parameters)); | 88 Node* s = graph.NewNode(common.Start(num_parameters)); |
| 90 graph.SetStart(s); | 89 graph.SetStart(s); |
| 91 } | 90 } |
| 92 | 91 |
| 93 Isolate* isolate; | 92 Isolate* isolate; |
| 94 const Operator* binop; | 93 const Operator* binop; |
| 95 const Operator* unop; | 94 const Operator* unop; |
| 96 MachineOperatorBuilder machine; | 95 MachineOperatorBuilder machine; |
| 97 CommonOperatorBuilder common; | 96 CommonOperatorBuilder common; |
| 98 Graph graph; | 97 Graph graph; |
| 99 JSOperatorBuilder javascript; | 98 JSOperatorBuilder javascript; |
| 100 Typer typer; | |
| 101 JSGraph jsgraph; | 99 JSGraph jsgraph; |
| 102 Node* maxuint32; | 100 Node* maxuint32; |
| 103 | 101 |
| 104 template <typename T> | 102 template <typename T> |
| 105 Node* Constant(volatile T value) { | 103 Node* Constant(volatile T value) { |
| 106 return graph.NewNode(NewConstantOperator<T>(&common, value)); | 104 return graph.NewNode(NewConstantOperator<T>(&common, value)); |
| 107 } | 105 } |
| 108 | 106 |
| 109 template <typename T> | 107 template <typename T> |
| 110 const T ValueOf(const Operator* op) { | 108 const T ValueOf(const Operator* op) { |
| (...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 897 // TODO(titzer): test MachineOperatorReducer for Float64Compare | 895 // TODO(titzer): test MachineOperatorReducer for Float64Compare |
| 898 // TODO(titzer): test MachineOperatorReducer for Float64Add | 896 // TODO(titzer): test MachineOperatorReducer for Float64Add |
| 899 // TODO(titzer): test MachineOperatorReducer for Float64Sub | 897 // TODO(titzer): test MachineOperatorReducer for Float64Sub |
| 900 // TODO(titzer): test MachineOperatorReducer for Float64Mul | 898 // TODO(titzer): test MachineOperatorReducer for Float64Mul |
| 901 // TODO(titzer): test MachineOperatorReducer for Float64Div | 899 // TODO(titzer): test MachineOperatorReducer for Float64Div |
| 902 // TODO(titzer): test MachineOperatorReducer for Float64Mod | 900 // TODO(titzer): test MachineOperatorReducer for Float64Mod |
| 903 | 901 |
| 904 } // namespace compiler | 902 } // namespace compiler |
| 905 } // namespace internal | 903 } // namespace internal |
| 906 } // namespace v8 | 904 } // namespace v8 |
| OLD | NEW |