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

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

Issue 23702039: Use regular map-checks to guard string-length loading. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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/ast.cc ('k') | src/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 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 StringLengthStub(Code::Kind kind, bool support_wrapper) 833 explicit StringLengthStub(Code::Kind kind) : ICStub(kind) { }
834 : ICStub(kind), support_wrapper_(support_wrapper) { }
835 virtual void Generate(MacroAssembler* masm); 834 virtual void Generate(MacroAssembler* masm);
836 835
837 private: 836 private:
838 STATIC_ASSERT(KindBits::kSize == 4); 837 STATIC_ASSERT(KindBits::kSize == 4);
839 class WrapperModeBits: public BitField<bool, 4, 1> {}; 838 virtual CodeStub::Major MajorKey() { return StringLength; }
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_;
846 }; 839 };
847 840
848 841
849 class StoreICStub: public ICStub { 842 class StoreICStub: public ICStub {
850 public: 843 public:
851 StoreICStub(Code::Kind kind, StrictModeFlag strict_mode) 844 StoreICStub(Code::Kind kind, StrictModeFlag strict_mode)
852 : ICStub(kind), strict_mode_(strict_mode) { } 845 : ICStub(kind), strict_mode_(strict_mode) { }
853 846
854 protected: 847 protected:
855 virtual Code::ExtraICState GetExtraICState() { 848 virtual Code::ExtraICState GetExtraICState() {
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
2307 int MinorKey() { return 0; } 2300 int MinorKey() { return 0; }
2308 2301
2309 void Generate(MacroAssembler* masm); 2302 void Generate(MacroAssembler* masm);
2310 2303
2311 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 2304 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
2312 }; 2305 };
2313 2306
2314 } } // namespace v8::internal 2307 } } // namespace v8::internal
2315 2308
2316 #endif // V8_CODE_STUBS_H_ 2309 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698