OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/crankshaft/hydrogen-instructions.h" | 5 #include "src/crankshaft/hydrogen-instructions.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/base/safe_math.h" | 8 #include "src/base/safe_math.h" |
9 #include "src/crankshaft/hydrogen-infer-representation.h" | 9 #include "src/crankshaft/hydrogen-infer-representation.h" |
10 #include "src/double.h" | 10 #include "src/double.h" |
(...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 case HValue::kInnerAllocatedObject: | 804 case HValue::kInnerAllocatedObject: |
805 case HValue::kInstanceOf: | 805 case HValue::kInstanceOf: |
806 case HValue::kIsConstructCallAndBranch: | 806 case HValue::kIsConstructCallAndBranch: |
807 case HValue::kHasInPrototypeChainAndBranch: | 807 case HValue::kHasInPrototypeChainAndBranch: |
808 case HValue::kIsSmiAndBranch: | 808 case HValue::kIsSmiAndBranch: |
809 case HValue::kIsStringAndBranch: | 809 case HValue::kIsStringAndBranch: |
810 case HValue::kIsUndetectableAndBranch: | 810 case HValue::kIsUndetectableAndBranch: |
811 case HValue::kLeaveInlined: | 811 case HValue::kLeaveInlined: |
812 case HValue::kLoadFieldByIndex: | 812 case HValue::kLoadFieldByIndex: |
813 case HValue::kLoadGlobalGeneric: | 813 case HValue::kLoadGlobalGeneric: |
814 case HValue::kLoadGlobalViaContext: | |
815 case HValue::kLoadNamedField: | 814 case HValue::kLoadNamedField: |
816 case HValue::kLoadNamedGeneric: | 815 case HValue::kLoadNamedGeneric: |
817 case HValue::kLoadRoot: | 816 case HValue::kLoadRoot: |
818 case HValue::kMapEnumLength: | 817 case HValue::kMapEnumLength: |
819 case HValue::kMathMinMax: | 818 case HValue::kMathMinMax: |
820 case HValue::kParameter: | 819 case HValue::kParameter: |
821 case HValue::kPhi: | 820 case HValue::kPhi: |
822 case HValue::kPushArguments: | 821 case HValue::kPushArguments: |
823 case HValue::kRegExpLiteral: | 822 case HValue::kRegExpLiteral: |
824 case HValue::kReturn: | 823 case HValue::kReturn: |
825 case HValue::kSeqStringGetChar: | 824 case HValue::kSeqStringGetChar: |
826 case HValue::kStoreCodeEntry: | 825 case HValue::kStoreCodeEntry: |
827 case HValue::kStoreFrameContext: | 826 case HValue::kStoreFrameContext: |
828 case HValue::kStoreGlobalViaContext: | |
829 case HValue::kStoreKeyed: | 827 case HValue::kStoreKeyed: |
830 case HValue::kStoreNamedField: | 828 case HValue::kStoreNamedField: |
831 case HValue::kStoreNamedGeneric: | 829 case HValue::kStoreNamedGeneric: |
832 case HValue::kStringCharCodeAt: | 830 case HValue::kStringCharCodeAt: |
833 case HValue::kStringCharFromCode: | 831 case HValue::kStringCharFromCode: |
834 case HValue::kThisFunction: | 832 case HValue::kThisFunction: |
835 case HValue::kTypeofIsAndBranch: | 833 case HValue::kTypeofIsAndBranch: |
836 case HValue::kUnknownOSRValue: | 834 case HValue::kUnknownOSRValue: |
837 case HValue::kUseConst: | 835 case HValue::kUseConst: |
838 return false; | 836 return false; |
(...skipping 2719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3558 | 3556 |
3559 | 3557 |
3560 std::ostream& HStoreNamedGeneric::PrintDataTo( | 3558 std::ostream& HStoreNamedGeneric::PrintDataTo( |
3561 std::ostream& os) const { // NOLINT | 3559 std::ostream& os) const { // NOLINT |
3562 Handle<String> n = Handle<String>::cast(name()); | 3560 Handle<String> n = Handle<String>::cast(name()); |
3563 return os << NameOf(object()) << "." << n->ToCString().get() << " = " | 3561 return os << NameOf(object()) << "." << n->ToCString().get() << " = " |
3564 << NameOf(value()); | 3562 << NameOf(value()); |
3565 } | 3563 } |
3566 | 3564 |
3567 | 3565 |
3568 std::ostream& HStoreGlobalViaContext::PrintDataTo( | |
3569 std::ostream& os) const { // NOLINT | |
3570 return os << " depth:" << depth() << " slot:" << slot_index() << " = " | |
3571 << NameOf(value()); | |
3572 } | |
3573 | |
3574 | |
3575 std::ostream& HStoreNamedField::PrintDataTo(std::ostream& os) const { // NOLINT | 3566 std::ostream& HStoreNamedField::PrintDataTo(std::ostream& os) const { // NOLINT |
3576 os << NameOf(object()) << access_ << " = " << NameOf(value()); | 3567 os << NameOf(object()) << access_ << " = " << NameOf(value()); |
3577 if (NeedsWriteBarrier()) os << " (write-barrier)"; | 3568 if (NeedsWriteBarrier()) os << " (write-barrier)"; |
3578 if (has_transition()) os << " (transition map " << *transition_map() << ")"; | 3569 if (has_transition()) os << " (transition map " << *transition_map() << ")"; |
3579 return os; | 3570 return os; |
3580 } | 3571 } |
3581 | 3572 |
3582 | 3573 |
3583 std::ostream& HStoreKeyed::PrintDataTo(std::ostream& os) const { // NOLINT | 3574 std::ostream& HStoreKeyed::PrintDataTo(std::ostream& os) const { // NOLINT |
3584 if (!is_fixed_typed_array()) { | 3575 if (!is_fixed_typed_array()) { |
(...skipping 30 matching lines...) Expand all Loading... |
3615 return os; | 3606 return os; |
3616 } | 3607 } |
3617 | 3608 |
3618 | 3609 |
3619 std::ostream& HLoadGlobalGeneric::PrintDataTo( | 3610 std::ostream& HLoadGlobalGeneric::PrintDataTo( |
3620 std::ostream& os) const { // NOLINT | 3611 std::ostream& os) const { // NOLINT |
3621 return os << name()->ToCString().get() << " "; | 3612 return os << name()->ToCString().get() << " "; |
3622 } | 3613 } |
3623 | 3614 |
3624 | 3615 |
3625 std::ostream& HLoadGlobalViaContext::PrintDataTo( | |
3626 std::ostream& os) const { // NOLINT | |
3627 return os << "depth:" << depth() << " slot:" << slot_index(); | |
3628 } | |
3629 | |
3630 | |
3631 std::ostream& HInnerAllocatedObject::PrintDataTo( | 3616 std::ostream& HInnerAllocatedObject::PrintDataTo( |
3632 std::ostream& os) const { // NOLINT | 3617 std::ostream& os) const { // NOLINT |
3633 os << NameOf(base_object()) << " offset "; | 3618 os << NameOf(base_object()) << " offset "; |
3634 return offset()->PrintTo(os); | 3619 return offset()->PrintTo(os); |
3635 } | 3620 } |
3636 | 3621 |
3637 | 3622 |
3638 std::ostream& HLoadContextSlot::PrintDataTo(std::ostream& os) const { // NOLINT | 3623 std::ostream& HLoadContextSlot::PrintDataTo(std::ostream& os) const { // NOLINT |
3639 return os << NameOf(value()) << "[" << slot_index() << "]"; | 3624 return os << NameOf(value()) << "[" << slot_index() << "]"; |
3640 } | 3625 } |
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4706 case HObjectAccess::kExternalMemory: | 4691 case HObjectAccess::kExternalMemory: |
4707 os << "[external-memory]"; | 4692 os << "[external-memory]"; |
4708 break; | 4693 break; |
4709 } | 4694 } |
4710 | 4695 |
4711 return os << "@" << access.offset(); | 4696 return os << "@" << access.offset(); |
4712 } | 4697 } |
4713 | 4698 |
4714 } // namespace internal | 4699 } // namespace internal |
4715 } // namespace v8 | 4700 } // namespace v8 |
OLD | NEW |