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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 if (m.HasValue()) return ReplaceNumber(FastUI2D(m.Value())); | 95 if (m.HasValue()) return ReplaceNumber(FastUI2D(m.Value())); |
96 break; | 96 break; |
97 } | 97 } |
98 default: | 98 default: |
99 break; | 99 break; |
100 } | 100 } |
101 return NoChange(); | 101 return NoChange(); |
102 } | 102 } |
103 | 103 |
104 | 104 |
105 Reduction SimplifiedOperatorReducer::Change(Node* node, Operator* op, Node* a) { | 105 Reduction SimplifiedOperatorReducer::Change(Node* node, const Operator* op, |
| 106 Node* a) { |
106 node->set_op(op); | 107 node->set_op(op); |
107 node->ReplaceInput(0, a); | 108 node->ReplaceInput(0, a); |
108 return Changed(node); | 109 return Changed(node); |
109 } | 110 } |
110 | 111 |
111 | 112 |
112 Reduction SimplifiedOperatorReducer::ReplaceFloat64(double value) { | 113 Reduction SimplifiedOperatorReducer::ReplaceFloat64(double value) { |
113 return Replace(jsgraph()->Float64Constant(value)); | 114 return Replace(jsgraph()->Float64Constant(value)); |
114 } | 115 } |
115 | 116 |
(...skipping 16 matching lines...) Expand all Loading... |
132 Graph* SimplifiedOperatorReducer::graph() const { return jsgraph()->graph(); } | 133 Graph* SimplifiedOperatorReducer::graph() const { return jsgraph()->graph(); } |
133 | 134 |
134 | 135 |
135 Factory* SimplifiedOperatorReducer::factory() const { | 136 Factory* SimplifiedOperatorReducer::factory() const { |
136 return jsgraph()->isolate()->factory(); | 137 return jsgraph()->isolate()->factory(); |
137 } | 138 } |
138 | 139 |
139 } // namespace compiler | 140 } // namespace compiler |
140 } // namespace internal | 141 } // namespace internal |
141 } // namespace v8 | 142 } // namespace v8 |
OLD | NEW |