| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/effect-control-linearizer.h" | 5 #include "src/compiler/effect-control-linearizer.h" |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/compiler/access-builder.h" | 8 #include "src/compiler/access-builder.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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 break; | 451 break; |
| 452 case IrOpcode::kObjectIsUndetectable: | 452 case IrOpcode::kObjectIsUndetectable: |
| 453 state = LowerObjectIsUndetectable(node, *effect, *control); | 453 state = LowerObjectIsUndetectable(node, *effect, *control); |
| 454 break; | 454 break; |
| 455 case IrOpcode::kStringFromCharCode: | 455 case IrOpcode::kStringFromCharCode: |
| 456 state = LowerStringFromCharCode(node, *effect, *control); | 456 state = LowerStringFromCharCode(node, *effect, *control); |
| 457 break; | 457 break; |
| 458 case IrOpcode::kCheckIf: | 458 case IrOpcode::kCheckIf: |
| 459 state = LowerCheckIf(node, frame_state, *effect, *control); | 459 state = LowerCheckIf(node, frame_state, *effect, *control); |
| 460 break; | 460 break; |
| 461 case IrOpcode::kCheckUnless: | |
| 462 state = LowerCheckUnless(node, frame_state, *effect, *control); | |
| 463 break; | |
| 464 case IrOpcode::kCheckFloat64Hole: | 461 case IrOpcode::kCheckFloat64Hole: |
| 465 state = LowerCheckFloat64Hole(node, frame_state, *effect, *control); | 462 state = LowerCheckFloat64Hole(node, frame_state, *effect, *control); |
| 466 break; | 463 break; |
| 467 case IrOpcode::kCheckTaggedHole: | 464 case IrOpcode::kCheckTaggedHole: |
| 468 state = LowerCheckTaggedHole(node, frame_state, *effect, *control); | 465 state = LowerCheckTaggedHole(node, frame_state, *effect, *control); |
| 469 break; | 466 break; |
| 470 case IrOpcode::kPlainPrimitiveToNumber: | 467 case IrOpcode::kPlainPrimitiveToNumber: |
| 471 state = LowerPlainPrimitiveToNumber(node, *effect, *control); | 468 state = LowerPlainPrimitiveToNumber(node, *effect, *control); |
| 472 break; | 469 break; |
| 473 case IrOpcode::kPlainPrimitiveToWord32: | 470 case IrOpcode::kPlainPrimitiveToWord32: |
| (...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1328 Node* effect, Node* control) { | 1325 Node* effect, Node* control) { |
| 1329 NodeProperties::ReplaceEffectInput(node, effect); | 1326 NodeProperties::ReplaceEffectInput(node, effect); |
| 1330 NodeProperties::ReplaceControlInput(node, control); | 1327 NodeProperties::ReplaceControlInput(node, control); |
| 1331 DCHECK_NOT_NULL(frame_state); | 1328 DCHECK_NOT_NULL(frame_state); |
| 1332 node->InsertInput(graph()->zone(), 1, frame_state); | 1329 node->InsertInput(graph()->zone(), 1, frame_state); |
| 1333 NodeProperties::ChangeOp(node, common()->DeoptimizeIf()); | 1330 NodeProperties::ChangeOp(node, common()->DeoptimizeIf()); |
| 1334 return ValueEffectControl(node, node, node); | 1331 return ValueEffectControl(node, node, node); |
| 1335 } | 1332 } |
| 1336 | 1333 |
| 1337 EffectControlLinearizer::ValueEffectControl | 1334 EffectControlLinearizer::ValueEffectControl |
| 1338 EffectControlLinearizer::LowerCheckUnless(Node* node, Node* frame_state, | |
| 1339 Node* effect, Node* control) { | |
| 1340 NodeProperties::ReplaceEffectInput(node, effect); | |
| 1341 NodeProperties::ReplaceControlInput(node, control); | |
| 1342 DCHECK_NOT_NULL(frame_state); | |
| 1343 node->InsertInput(graph()->zone(), 1, frame_state); | |
| 1344 NodeProperties::ChangeOp(node, common()->DeoptimizeUnless()); | |
| 1345 return ValueEffectControl(node, node, node); | |
| 1346 } | |
| 1347 | |
| 1348 EffectControlLinearizer::ValueEffectControl | |
| 1349 EffectControlLinearizer::LowerCheckFloat64Hole(Node* node, Node* frame_state, | 1335 EffectControlLinearizer::LowerCheckFloat64Hole(Node* node, Node* frame_state, |
| 1350 Node* effect, Node* control) { | 1336 Node* effect, Node* control) { |
| 1351 // If we reach this point w/o eliminating the {node} that's marked | 1337 // If we reach this point w/o eliminating the {node} that's marked |
| 1352 // with allow-return-hole, we cannot do anything, so just deoptimize | 1338 // with allow-return-hole, we cannot do anything, so just deoptimize |
| 1353 // in case of the hole NaN (similar to Crankshaft). | 1339 // in case of the hole NaN (similar to Crankshaft). |
| 1354 Node* value = node->InputAt(0); | 1340 Node* value = node->InputAt(0); |
| 1355 Node* check = graph()->NewNode( | 1341 Node* check = graph()->NewNode( |
| 1356 machine()->Word32Equal(), | 1342 machine()->Word32Equal(), |
| 1357 graph()->NewNode(machine()->Float64ExtractHighWord32(), value), | 1343 graph()->NewNode(machine()->Float64ExtractHighWord32(), value), |
| 1358 jsgraph()->Int32Constant(kHoleNanUpper32)); | 1344 jsgraph()->Int32Constant(kHoleNanUpper32)); |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1588 isolate(), graph()->zone(), callable.descriptor(), 0, flags, | 1574 isolate(), graph()->zone(), callable.descriptor(), 0, flags, |
| 1589 Operator::kNoThrow); | 1575 Operator::kNoThrow); |
| 1590 to_number_operator_.set(common()->Call(desc)); | 1576 to_number_operator_.set(common()->Call(desc)); |
| 1591 } | 1577 } |
| 1592 return to_number_operator_.get(); | 1578 return to_number_operator_.get(); |
| 1593 } | 1579 } |
| 1594 | 1580 |
| 1595 } // namespace compiler | 1581 } // namespace compiler |
| 1596 } // namespace internal | 1582 } // namespace internal |
| 1597 } // namespace v8 | 1583 } // namespace v8 |
| OLD | NEW |