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/compiler-source-position-table.h" | 9 #include "src/compiler/compiler-source-position-table.h" |
10 #include "src/compiler/js-graph.h" | 10 #include "src/compiler/js-graph.h" |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 break; | 710 break; |
711 case IrOpcode::kCheckedTaggedToTaggedPointer: | 711 case IrOpcode::kCheckedTaggedToTaggedPointer: |
712 result = LowerCheckedTaggedToTaggedPointer(node, frame_state); | 712 result = LowerCheckedTaggedToTaggedPointer(node, frame_state); |
713 break; | 713 break; |
714 case IrOpcode::kTruncateTaggedToWord32: | 714 case IrOpcode::kTruncateTaggedToWord32: |
715 result = LowerTruncateTaggedToWord32(node); | 715 result = LowerTruncateTaggedToWord32(node); |
716 break; | 716 break; |
717 case IrOpcode::kCheckedTruncateTaggedToWord32: | 717 case IrOpcode::kCheckedTruncateTaggedToWord32: |
718 result = LowerCheckedTruncateTaggedToWord32(node, frame_state); | 718 result = LowerCheckedTruncateTaggedToWord32(node, frame_state); |
719 break; | 719 break; |
720 case IrOpcode::kObjectIsCallable: | 720 case IrOpcode::kObjectIsDetectableCallable: |
721 result = LowerObjectIsCallable(node); | 721 result = LowerObjectIsDetectableCallable(node); |
722 break; | 722 break; |
723 case IrOpcode::kObjectIsNonCallable: | 723 case IrOpcode::kObjectIsNonCallable: |
724 result = LowerObjectIsNonCallable(node); | 724 result = LowerObjectIsNonCallable(node); |
725 break; | 725 break; |
726 case IrOpcode::kObjectIsNumber: | 726 case IrOpcode::kObjectIsNumber: |
727 result = LowerObjectIsNumber(node); | 727 result = LowerObjectIsNumber(node); |
728 break; | 728 break; |
729 case IrOpcode::kObjectIsReceiver: | 729 case IrOpcode::kObjectIsReceiver: |
730 result = LowerObjectIsReceiver(node); | 730 result = LowerObjectIsReceiver(node); |
731 break; | 731 break; |
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1681 __ Bind(&if_not_smi); | 1681 __ Bind(&if_not_smi); |
1682 Node* number = BuildCheckedHeapNumberOrOddballToFloat64( | 1682 Node* number = BuildCheckedHeapNumberOrOddballToFloat64( |
1683 CheckTaggedInputMode::kNumberOrOddball, value, frame_state); | 1683 CheckTaggedInputMode::kNumberOrOddball, value, frame_state); |
1684 number = __ TruncateFloat64ToWord32(number); | 1684 number = __ TruncateFloat64ToWord32(number); |
1685 __ Goto(&done, number); | 1685 __ Goto(&done, number); |
1686 | 1686 |
1687 __ Bind(&done); | 1687 __ Bind(&done); |
1688 return done.PhiAt(0); | 1688 return done.PhiAt(0); |
1689 } | 1689 } |
1690 | 1690 |
1691 Node* EffectControlLinearizer::LowerObjectIsCallable(Node* node) { | 1691 Node* EffectControlLinearizer::LowerObjectIsDetectableCallable(Node* node) { |
1692 Node* value = node->InputAt(0); | 1692 Node* value = node->InputAt(0); |
1693 | 1693 |
1694 auto if_smi = __ MakeDeferredLabel<1>(); | 1694 auto if_smi = __ MakeDeferredLabel<1>(); |
1695 auto done = __ MakeLabel<2>(MachineRepresentation::kBit); | 1695 auto done = __ MakeLabel<2>(MachineRepresentation::kBit); |
1696 | 1696 |
1697 Node* check = ObjectIsSmi(value); | 1697 Node* check = ObjectIsSmi(value); |
1698 __ GotoIf(check, &if_smi); | 1698 __ GotoIf(check, &if_smi); |
1699 | 1699 |
1700 Node* value_map = __ LoadField(AccessBuilder::ForMap(), value); | 1700 Node* value_map = __ LoadField(AccessBuilder::ForMap(), value); |
1701 Node* value_bit_field = | 1701 Node* value_bit_field = |
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2786 return isolate()->factory(); | 2786 return isolate()->factory(); |
2787 } | 2787 } |
2788 | 2788 |
2789 Isolate* EffectControlLinearizer::isolate() const { | 2789 Isolate* EffectControlLinearizer::isolate() const { |
2790 return jsgraph()->isolate(); | 2790 return jsgraph()->isolate(); |
2791 } | 2791 } |
2792 | 2792 |
2793 } // namespace compiler | 2793 } // namespace compiler |
2794 } // namespace internal | 2794 } // namespace internal |
2795 } // namespace v8 | 2795 } // namespace v8 |
OLD | NEW |