OLD | NEW |
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 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
823 explicit FunctionPrototypeStub(Code::Kind kind) : ICStub(kind) { } | 823 explicit FunctionPrototypeStub(Code::Kind kind) : ICStub(kind) { } |
824 virtual void Generate(MacroAssembler* masm); | 824 virtual void Generate(MacroAssembler* masm); |
825 | 825 |
826 private: | 826 private: |
827 virtual CodeStub::Major MajorKey() { return FunctionPrototype; } | 827 virtual CodeStub::Major MajorKey() { return FunctionPrototype; } |
828 }; | 828 }; |
829 | 829 |
830 | 830 |
831 class StringLengthStub: public ICStub { | 831 class StringLengthStub: public ICStub { |
832 public: | 832 public: |
833 explicit StringLengthStub(Code::Kind kind) : ICStub(kind) { } | 833 StringLengthStub(Code::Kind kind, bool support_wrapper) |
| 834 : ICStub(kind), support_wrapper_(support_wrapper) { } |
834 virtual void Generate(MacroAssembler* masm); | 835 virtual void Generate(MacroAssembler* masm); |
835 | 836 |
836 private: | 837 private: |
837 STATIC_ASSERT(KindBits::kSize == 4); | 838 STATIC_ASSERT(KindBits::kSize == 4); |
838 virtual CodeStub::Major MajorKey() { return StringLength; } | 839 class WrapperModeBits: public BitField<bool, 4, 1> {}; |
| 840 virtual CodeStub::Major MajorKey() { return StringLength; } |
| 841 virtual int MinorKey() { |
| 842 return KindBits::encode(kind()) | WrapperModeBits::encode(support_wrapper_); |
| 843 } |
| 844 |
| 845 bool support_wrapper_; |
839 }; | 846 }; |
840 | 847 |
841 | 848 |
842 class StoreICStub: public ICStub { | 849 class StoreICStub: public ICStub { |
843 public: | 850 public: |
844 StoreICStub(Code::Kind kind, StrictModeFlag strict_mode) | 851 StoreICStub(Code::Kind kind, StrictModeFlag strict_mode) |
845 : ICStub(kind), strict_mode_(strict_mode) { } | 852 : ICStub(kind), strict_mode_(strict_mode) { } |
846 | 853 |
847 protected: | 854 protected: |
848 virtual Code::ExtraICState GetExtraICState() { | 855 virtual Code::ExtraICState GetExtraICState() { |
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2300 int MinorKey() { return 0; } | 2307 int MinorKey() { return 0; } |
2301 | 2308 |
2302 void Generate(MacroAssembler* masm); | 2309 void Generate(MacroAssembler* masm); |
2303 | 2310 |
2304 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); | 2311 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); |
2305 }; | 2312 }; |
2306 | 2313 |
2307 } } // namespace v8::internal | 2314 } } // namespace v8::internal |
2308 | 2315 |
2309 #endif // V8_CODE_STUBS_H_ | 2316 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |