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

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

Issue 411973002: Restructure the IC / Handler compilers (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
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 #ifndef V8_CODE_STUBS_H_ 5 #ifndef V8_CODE_STUBS_H_
6 #define V8_CODE_STUBS_H_ 6 #define V8_CODE_STUBS_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/assembler.h" 9 #include "src/assembler.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 protected: 893 protected:
894 virtual void PrintState(OStream& os) const V8_OVERRIDE; // NOLINT 894 virtual void PrintState(OStream& os) const V8_OVERRIDE; // NOLINT
895 895
896 virtual CodeStub::Major MajorKey() const { return CallIC_Array; } 896 virtual CodeStub::Major MajorKey() const { return CallIC_Array; }
897 }; 897 };
898 898
899 899
900 // TODO(verwaest): Translate to hydrogen code stub. 900 // TODO(verwaest): Translate to hydrogen code stub.
901 class FunctionPrototypeStub : public PlatformCodeStub { 901 class FunctionPrototypeStub : public PlatformCodeStub {
902 public: 902 public:
903 FunctionPrototypeStub(Isolate* isolate, Code::Kind kind) 903 explicit FunctionPrototypeStub(Isolate* isolate)
904 : PlatformCodeStub(isolate) { 904 : PlatformCodeStub(isolate) {}
905 bit_field_ = KindBits::encode(kind);
906 }
907 virtual void Generate(MacroAssembler* masm); 905 virtual void Generate(MacroAssembler* masm);
908 virtual Code::Kind GetCodeKind() const { return Code::HANDLER; } 906 virtual Code::Kind GetCodeKind() const { return Code::HANDLER; }
909 virtual InlineCacheState GetICState() { return MONOMORPHIC; }
910 virtual ExtraICState GetExtraICState() const { return kind(); }
911
912 protected:
913 class KindBits : public BitField<Code::Kind, 0, 4> {};
914 virtual Code::Kind kind() const { return KindBits::decode(bit_field_); }
915 907
916 private: 908 private:
917 virtual CodeStub::Major MajorKey() const { return FunctionPrototype; } 909 virtual CodeStub::Major MajorKey() const { return FunctionPrototype; }
918 virtual int MinorKey() const { return bit_field_; } 910 virtual int MinorKey() const { return 0; }
919 int bit_field_;
920 }; 911 };
921 912
922 913
923 class StoreICStub: public ICStub { 914 class StoreICStub: public ICStub {
924 public: 915 public:
925 StoreICStub(Isolate* isolate, Code::Kind kind, StrictMode strict_mode) 916 StoreICStub(Isolate* isolate, Code::Kind kind, StrictMode strict_mode)
926 : ICStub(isolate, kind), strict_mode_(strict_mode) { } 917 : ICStub(isolate, kind), strict_mode_(strict_mode) { }
927 918
928 protected: 919 protected:
929 virtual ExtraICState GetExtraICState() const { 920 virtual ExtraICState GetExtraICState() const {
(...skipping 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after
2538 2529
2539 2530
2540 class CallDescriptors { 2531 class CallDescriptors {
2541 public: 2532 public:
2542 static void InitializeForIsolate(Isolate* isolate); 2533 static void InitializeForIsolate(Isolate* isolate);
2543 }; 2534 };
2544 2535
2545 } } // namespace v8::internal 2536 } } // namespace v8::internal
2546 2537
2547 #endif // V8_CODE_STUBS_H_ 2538 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/code-stubs.cc » ('j') | src/ia32/stub-cache-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698