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/compiler/generic-node-inl.h" | 5 #include "src/compiler/generic-node-inl.h" |
6 #include "src/compiler/js-graph.h" | 6 #include "src/compiler/js-graph.h" |
7 #include "src/compiler/machine-operator.h" | 7 #include "src/compiler/machine-operator.h" |
8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
9 #include "src/compiler/simplified-operator-reducer.h" | 9 #include "src/compiler/simplified-operator-reducer.h" |
10 | 10 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 break; | 92 break; |
93 } | 93 } |
94 default: | 94 default: |
95 break; | 95 break; |
96 } | 96 } |
97 return NoChange(); | 97 return NoChange(); |
98 } | 98 } |
99 | 99 |
100 | 100 |
101 Reduction SimplifiedOperatorReducer::Change(Node* node, Operator* op, Node* a) { | 101 Reduction SimplifiedOperatorReducer::Change(Node* node, Operator* op, Node* a) { |
102 graph()->ChangeOperator(node, op); | 102 node->set_op(op); |
103 node->ReplaceInput(0, a); | 103 node->ReplaceInput(0, a); |
104 return Changed(node); | 104 return Changed(node); |
105 } | 105 } |
106 | 106 |
107 | 107 |
108 Reduction SimplifiedOperatorReducer::ReplaceFloat64(double value) { | 108 Reduction SimplifiedOperatorReducer::ReplaceFloat64(double value) { |
109 return Replace(jsgraph()->Float64Constant(value)); | 109 return Replace(jsgraph()->Float64Constant(value)); |
110 } | 110 } |
111 | 111 |
112 | 112 |
(...skipping 15 matching lines...) Expand all Loading... |
128 Graph* SimplifiedOperatorReducer::graph() const { return jsgraph()->graph(); } | 128 Graph* SimplifiedOperatorReducer::graph() const { return jsgraph()->graph(); } |
129 | 129 |
130 | 130 |
131 Heap* SimplifiedOperatorReducer::heap() const { | 131 Heap* SimplifiedOperatorReducer::heap() const { |
132 return jsgraph()->isolate()->heap(); | 132 return jsgraph()->isolate()->heap(); |
133 } | 133 } |
134 | 134 |
135 } // namespace compiler | 135 } // namespace compiler |
136 } // namespace internal | 136 } // namespace internal |
137 } // namespace v8 | 137 } // namespace v8 |
OLD | NEW |