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/change-lowering.h" | 5 #include "src/compiler/change-lowering.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/compiler/diamond.h" | 8 #include "src/compiler/diamond.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 // else LoadHeapNumberValue(y) | 220 // else LoadHeapNumberValue(y) |
221 Node* const object = NodeProperties::GetValueInput(value, 0); | 221 Node* const object = NodeProperties::GetValueInput(value, 0); |
222 Node* const context = NodeProperties::GetContextInput(value); | 222 Node* const context = NodeProperties::GetContextInput(value); |
223 Node* const effect = NodeProperties::GetEffectInput(value); | 223 Node* const effect = NodeProperties::GetEffectInput(value); |
224 Node* const control = NodeProperties::GetControlInput(value); | 224 Node* const control = NodeProperties::GetControlInput(value); |
225 | 225 |
226 Diamond d1(graph(), common(), TestNotSmi(object), BranchHint::kFalse); | 226 Diamond d1(graph(), common(), TestNotSmi(object), BranchHint::kFalse); |
227 d1.Chain(control); | 227 d1.Chain(control); |
228 | 228 |
229 Node* number = | 229 Node* number = |
230 graph()->NewNode(value->op(), object, context, effect, d1.if_true); | 230 OperatorProperties::HasFrameStateInput(value->op()) |
| 231 ? graph()->NewNode(value->op(), object, context, |
| 232 NodeProperties::GetFrameStateInput(value), |
| 233 effect, d1.if_true) |
| 234 : graph()->NewNode(value->op(), object, context, effect, |
| 235 d1.if_true); |
231 Diamond d2(graph(), common(), TestNotSmi(number)); | 236 Diamond d2(graph(), common(), TestNotSmi(number)); |
232 d2.Nest(d1, true); | 237 d2.Nest(d1, true); |
233 Node* phi2 = d2.Phi(kMachFloat64, LoadHeapNumberValue(number, d2.if_true), | 238 Node* phi2 = d2.Phi(kMachFloat64, LoadHeapNumberValue(number, d2.if_true), |
234 ChangeSmiToFloat64(number)); | 239 ChangeSmiToFloat64(number)); |
235 | 240 |
236 Node* phi1 = d1.Phi(kMachFloat64, phi2, ChangeSmiToFloat64(object)); | 241 Node* phi1 = d1.Phi(kMachFloat64, phi2, ChangeSmiToFloat64(object)); |
237 Node* ephi1 = d1.EffectPhi(number, effect); | 242 Node* ephi1 = d1.EffectPhi(number, effect); |
238 | 243 |
239 for (Edge edge : value->use_edges()) { | 244 for (Edge edge : value->use_edges()) { |
240 if (NodeProperties::IsEffectEdge(edge)) { | 245 if (NodeProperties::IsEffectEdge(edge)) { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 } | 279 } |
275 | 280 |
276 | 281 |
277 MachineOperatorBuilder* ChangeLowering::machine() const { | 282 MachineOperatorBuilder* ChangeLowering::machine() const { |
278 return jsgraph()->machine(); | 283 return jsgraph()->machine(); |
279 } | 284 } |
280 | 285 |
281 } // namespace compiler | 286 } // namespace compiler |
282 } // namespace internal | 287 } // namespace internal |
283 } // namespace v8 | 288 } // namespace v8 |
OLD | NEW |