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

Side by Side Diff: src/code-stubs.h

Issue 153913002: A64: Synchronize with r16756. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « src/checks.h ('k') | src/code-stubs-hydrogen.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 bool ReturnTrueFalseObject() const { 737 bool ReturnTrueFalseObject() const {
738 return (flags_ & kReturnTrueFalseObject) != 0; 738 return (flags_ & kReturnTrueFalseObject) != 0;
739 } 739 }
740 740
741 virtual void PrintName(StringStream* stream); 741 virtual void PrintName(StringStream* stream);
742 742
743 Flags flags_; 743 Flags flags_;
744 }; 744 };
745 745
746 746
747 enum AllocationSiteOverrideMode {
748 DONT_OVERRIDE,
749 DISABLE_ALLOCATION_SITES,
750 LAST_ALLOCATION_SITE_OVERRIDE_MODE = DISABLE_ALLOCATION_SITES
751 };
752
753
747 class ArrayConstructorStub: public PlatformCodeStub { 754 class ArrayConstructorStub: public PlatformCodeStub {
748 public: 755 public:
749 enum ArgumentCountKey { ANY, NONE, ONE, MORE_THAN_ONE }; 756 enum ArgumentCountKey { ANY, NONE, ONE, MORE_THAN_ONE };
750 ArrayConstructorStub(Isolate* isolate, int argument_count); 757 ArrayConstructorStub(Isolate* isolate, int argument_count);
751 explicit ArrayConstructorStub(Isolate* isolate); 758 explicit ArrayConstructorStub(Isolate* isolate);
752 759
753 void Generate(MacroAssembler* masm); 760 void Generate(MacroAssembler* masm);
754 761
755 private: 762 private:
763 void GenerateDispatchToArrayStub(MacroAssembler* masm,
764 AllocationSiteOverrideMode mode);
765
756 virtual CodeStub::Major MajorKey() { return ArrayConstructor; } 766 virtual CodeStub::Major MajorKey() { return ArrayConstructor; }
757 virtual int MinorKey() { return argument_count_; } 767 virtual int MinorKey() { return argument_count_; }
758 768
759 ArgumentCountKey argument_count_; 769 ArgumentCountKey argument_count_;
760 }; 770 };
761 771
762 772
763 class InternalArrayConstructorStub: public PlatformCodeStub { 773 class InternalArrayConstructorStub: public PlatformCodeStub {
764 public: 774 public:
765 explicit InternalArrayConstructorStub(Isolate* isolate); 775 explicit InternalArrayConstructorStub(Isolate* isolate);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
821 explicit FunctionPrototypeStub(Code::Kind kind) : ICStub(kind) { } 831 explicit FunctionPrototypeStub(Code::Kind kind) : ICStub(kind) { }
822 virtual void Generate(MacroAssembler* masm); 832 virtual void Generate(MacroAssembler* masm);
823 833
824 private: 834 private:
825 virtual CodeStub::Major MajorKey() { return FunctionPrototype; } 835 virtual CodeStub::Major MajorKey() { return FunctionPrototype; }
826 }; 836 };
827 837
828 838
829 class StringLengthStub: public ICStub { 839 class StringLengthStub: public ICStub {
830 public: 840 public:
831 StringLengthStub(Code::Kind kind, bool support_wrapper) 841 explicit StringLengthStub(Code::Kind kind) : ICStub(kind) { }
832 : ICStub(kind), support_wrapper_(support_wrapper) { }
833 virtual void Generate(MacroAssembler* masm); 842 virtual void Generate(MacroAssembler* masm);
834 843
835 private: 844 private:
836 STATIC_ASSERT(KindBits::kSize == 4); 845 STATIC_ASSERT(KindBits::kSize == 4);
837 class WrapperModeBits: public BitField<bool, 4, 1> {}; 846 virtual CodeStub::Major MajorKey() { return StringLength; }
838 virtual CodeStub::Major MajorKey() { return StringLength; }
839 virtual int MinorKey() {
840 return KindBits::encode(kind()) | WrapperModeBits::encode(support_wrapper_);
841 }
842
843 bool support_wrapper_;
844 }; 847 };
845 848
846 849
847 class StoreICStub: public ICStub { 850 class StoreICStub: public ICStub {
848 public: 851 public:
849 StoreICStub(Code::Kind kind, StrictModeFlag strict_mode) 852 StoreICStub(Code::Kind kind, StrictModeFlag strict_mode)
850 : ICStub(kind), strict_mode_(strict_mode) { } 853 : ICStub(kind), strict_mode_(strict_mode) { }
851 854
852 protected: 855 protected:
853 virtual Code::ExtraICState GetExtraICState() { 856 virtual Code::ExtraICState GetExtraICState() {
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1886 }; 1889 };
1887 1890
1888 1891
1889 enum ContextCheckMode { 1892 enum ContextCheckMode {
1890 CONTEXT_CHECK_REQUIRED, 1893 CONTEXT_CHECK_REQUIRED,
1891 CONTEXT_CHECK_NOT_REQUIRED, 1894 CONTEXT_CHECK_NOT_REQUIRED,
1892 LAST_CONTEXT_CHECK_MODE = CONTEXT_CHECK_NOT_REQUIRED 1895 LAST_CONTEXT_CHECK_MODE = CONTEXT_CHECK_NOT_REQUIRED
1893 }; 1896 };
1894 1897
1895 1898
1896 enum AllocationSiteOverrideMode {
1897 DONT_OVERRIDE,
1898 DISABLE_ALLOCATION_SITES,
1899 LAST_ALLOCATION_SITE_OVERRIDE_MODE = DISABLE_ALLOCATION_SITES
1900 };
1901
1902
1903 class ArrayConstructorStubBase : public HydrogenCodeStub { 1899 class ArrayConstructorStubBase : public HydrogenCodeStub {
1904 public: 1900 public:
1905 ArrayConstructorStubBase(ElementsKind kind, ContextCheckMode context_mode, 1901 ArrayConstructorStubBase(ElementsKind kind, ContextCheckMode context_mode,
1906 AllocationSiteOverrideMode override_mode) { 1902 AllocationSiteOverrideMode override_mode) {
1907 // It only makes sense to override local allocation site behavior 1903 // It only makes sense to override local allocation site behavior
1908 // if there is a difference between the global allocation site policy 1904 // if there is a difference between the global allocation site policy
1909 // for an ElementsKind and the desired usage of the stub. 1905 // for an ElementsKind and the desired usage of the stub.
1910 ASSERT(override_mode != DISABLE_ALLOCATION_SITES || 1906 ASSERT(!(FLAG_track_allocation_sites &&
1907 override_mode == DISABLE_ALLOCATION_SITES) ||
1911 AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE); 1908 AllocationSite::GetMode(kind) == TRACK_ALLOCATION_SITE);
1912 bit_field_ = ElementsKindBits::encode(kind) | 1909 bit_field_ = ElementsKindBits::encode(kind) |
1913 AllocationSiteOverrideModeBits::encode(override_mode) | 1910 AllocationSiteOverrideModeBits::encode(override_mode) |
1914 ContextCheckModeBits::encode(context_mode); 1911 ContextCheckModeBits::encode(context_mode);
1915 } 1912 }
1916 1913
1917 ElementsKind elements_kind() const { 1914 ElementsKind elements_kind() const {
1918 return ElementsKindBits::decode(bit_field_); 1915 return ElementsKindBits::decode(bit_field_);
1919 } 1916 }
1920 1917
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
2333 int MinorKey() { return 0; } 2330 int MinorKey() { return 0; }
2334 2331
2335 void Generate(MacroAssembler* masm); 2332 void Generate(MacroAssembler* masm);
2336 2333
2337 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 2334 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
2338 }; 2335 };
2339 2336
2340 } } // namespace v8::internal 2337 } } // namespace v8::internal
2341 2338
2342 #endif // V8_CODE_STUBS_H_ 2339 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/checks.h ('k') | src/code-stubs-hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698