Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: src/hydrogen-instructions.cc

Issue 1228113008: Crankshaft part of the 'loads and stores to global vars through property cell shortcuts' feature. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments + regression test Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/double.h" 8 #include "src/double.h"
9 #include "src/elements.h" 9 #include "src/elements.h"
10 #include "src/factory.h" 10 #include "src/factory.h"
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 case HValue::kInstanceOf: 813 case HValue::kInstanceOf:
814 case HValue::kInstanceOfKnownGlobal: 814 case HValue::kInstanceOfKnownGlobal:
815 case HValue::kIsConstructCallAndBranch: 815 case HValue::kIsConstructCallAndBranch:
816 case HValue::kIsObjectAndBranch: 816 case HValue::kIsObjectAndBranch:
817 case HValue::kIsSmiAndBranch: 817 case HValue::kIsSmiAndBranch:
818 case HValue::kIsStringAndBranch: 818 case HValue::kIsStringAndBranch:
819 case HValue::kIsUndetectableAndBranch: 819 case HValue::kIsUndetectableAndBranch:
820 case HValue::kLeaveInlined: 820 case HValue::kLeaveInlined:
821 case HValue::kLoadFieldByIndex: 821 case HValue::kLoadFieldByIndex:
822 case HValue::kLoadGlobalGeneric: 822 case HValue::kLoadGlobalGeneric:
823 case HValue::kLoadGlobalViaContext:
823 case HValue::kLoadNamedField: 824 case HValue::kLoadNamedField:
824 case HValue::kLoadNamedGeneric: 825 case HValue::kLoadNamedGeneric:
825 case HValue::kLoadRoot: 826 case HValue::kLoadRoot:
826 case HValue::kMapEnumLength: 827 case HValue::kMapEnumLength:
827 case HValue::kMathMinMax: 828 case HValue::kMathMinMax:
828 case HValue::kParameter: 829 case HValue::kParameter:
829 case HValue::kPhi: 830 case HValue::kPhi:
830 case HValue::kPushArguments: 831 case HValue::kPushArguments:
831 case HValue::kRegExpLiteral: 832 case HValue::kRegExpLiteral:
832 case HValue::kReturn: 833 case HValue::kReturn:
833 case HValue::kSeqStringGetChar: 834 case HValue::kSeqStringGetChar:
834 case HValue::kStoreCodeEntry: 835 case HValue::kStoreCodeEntry:
835 case HValue::kStoreFrameContext: 836 case HValue::kStoreFrameContext:
837 case HValue::kStoreGlobalViaContext:
836 case HValue::kStoreKeyed: 838 case HValue::kStoreKeyed:
837 case HValue::kStoreNamedField: 839 case HValue::kStoreNamedField:
838 case HValue::kStoreNamedGeneric: 840 case HValue::kStoreNamedGeneric:
839 case HValue::kStringCharCodeAt: 841 case HValue::kStringCharCodeAt:
840 case HValue::kStringCharFromCode: 842 case HValue::kStringCharFromCode:
841 case HValue::kThisFunction: 843 case HValue::kThisFunction:
842 case HValue::kTypeofIsAndBranch: 844 case HValue::kTypeofIsAndBranch:
843 case HValue::kUnknownOSRValue: 845 case HValue::kUnknownOSRValue:
844 case HValue::kUseConst: 846 case HValue::kUseConst:
845 return false; 847 return false;
(...skipping 2729 matching lines...) Expand 10 before | Expand all | Expand 10 after
3575 3577
3576 3578
3577 std::ostream& HStoreNamedGeneric::PrintDataTo( 3579 std::ostream& HStoreNamedGeneric::PrintDataTo(
3578 std::ostream& os) const { // NOLINT 3580 std::ostream& os) const { // NOLINT
3579 Handle<String> n = Handle<String>::cast(name()); 3581 Handle<String> n = Handle<String>::cast(name());
3580 return os << NameOf(object()) << "." << n->ToCString().get() << " = " 3582 return os << NameOf(object()) << "." << n->ToCString().get() << " = "
3581 << NameOf(value()); 3583 << NameOf(value());
3582 } 3584 }
3583 3585
3584 3586
3587 std::ostream& HStoreGlobalViaContext::PrintDataTo(
3588 std::ostream& os) const { // NOLINT
3589 return os << name()->ToCString().get() << " = " << NameOf(value())
3590 << " depth:" << depth() << " slot:" << slot_index();
3591 }
3592
3593
3585 std::ostream& HStoreNamedField::PrintDataTo(std::ostream& os) const { // NOLINT 3594 std::ostream& HStoreNamedField::PrintDataTo(std::ostream& os) const { // NOLINT
3586 os << NameOf(object()) << access_ << " = " << NameOf(value()); 3595 os << NameOf(object()) << access_ << " = " << NameOf(value());
3587 if (NeedsWriteBarrier()) os << " (write-barrier)"; 3596 if (NeedsWriteBarrier()) os << " (write-barrier)";
3588 if (has_transition()) os << " (transition map " << *transition_map() << ")"; 3597 if (has_transition()) os << " (transition map " << *transition_map() << ")";
3589 return os; 3598 return os;
3590 } 3599 }
3591 3600
3592 3601
3593 std::ostream& HStoreKeyed::PrintDataTo(std::ostream& os) const { // NOLINT 3602 std::ostream& HStoreKeyed::PrintDataTo(std::ostream& os) const { // NOLINT
3594 if (!is_external()) { 3603 if (!is_external()) {
(...skipping 30 matching lines...) Expand all
3625 return os; 3634 return os;
3626 } 3635 }
3627 3636
3628 3637
3629 std::ostream& HLoadGlobalGeneric::PrintDataTo( 3638 std::ostream& HLoadGlobalGeneric::PrintDataTo(
3630 std::ostream& os) const { // NOLINT 3639 std::ostream& os) const { // NOLINT
3631 return os << name()->ToCString().get() << " "; 3640 return os << name()->ToCString().get() << " ";
3632 } 3641 }
3633 3642
3634 3643
3644 std::ostream& HLoadGlobalViaContext::PrintDataTo(
3645 std::ostream& os) const { // NOLINT
3646 return os << name()->ToCString().get() << " "
3647 << "depth:" << depth() << " slot:" << slot_index();
3648 }
3649
3650
3635 std::ostream& HInnerAllocatedObject::PrintDataTo( 3651 std::ostream& HInnerAllocatedObject::PrintDataTo(
3636 std::ostream& os) const { // NOLINT 3652 std::ostream& os) const { // NOLINT
3637 os << NameOf(base_object()) << " offset "; 3653 os << NameOf(base_object()) << " offset ";
3638 return offset()->PrintTo(os); 3654 return offset()->PrintTo(os);
3639 } 3655 }
3640 3656
3641 3657
3642 std::ostream& HLoadContextSlot::PrintDataTo(std::ostream& os) const { // NOLINT 3658 std::ostream& HLoadContextSlot::PrintDataTo(std::ostream& os) const { // NOLINT
3643 return os << NameOf(value()) << "[" << slot_index() << "]"; 3659 return os << NameOf(value()) << "[" << slot_index() << "]";
3644 } 3660 }
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
4711 case HObjectAccess::kExternalMemory: 4727 case HObjectAccess::kExternalMemory:
4712 os << "[external-memory]"; 4728 os << "[external-memory]";
4713 break; 4729 break;
4714 } 4730 }
4715 4731
4716 return os << "@" << access.offset(); 4732 return os << "@" << access.offset();
4717 } 4733 }
4718 4734
4719 } // namespace internal 4735 } // namespace internal
4720 } // namespace v8 4736 } // namespace v8
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698