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

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

Issue 295383004: Refactor CallICStub to use a different stub for each customization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ports. Created 6 years, 6 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/arm64/code-stubs-arm64.cc ('k') | src/code-stubs.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 #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 "allocation.h" 8 #include "allocation.h"
9 #include "assembler.h" 9 #include "assembler.h"
10 #include "codegen.h" 10 #include "codegen.h"
(...skipping 12 matching lines...) Expand all
23 V(BinaryOpICWithAllocationSite) \ 23 V(BinaryOpICWithAllocationSite) \
24 V(BinaryOpWithAllocationSite) \ 24 V(BinaryOpWithAllocationSite) \
25 V(StringAdd) \ 25 V(StringAdd) \
26 V(SubString) \ 26 V(SubString) \
27 V(StringCompare) \ 27 V(StringCompare) \
28 V(Compare) \ 28 V(Compare) \
29 V(CompareIC) \ 29 V(CompareIC) \
30 V(CompareNilIC) \ 30 V(CompareNilIC) \
31 V(MathPow) \ 31 V(MathPow) \
32 V(CallIC) \ 32 V(CallIC) \
33 V(CallIC_Array) \
33 V(FunctionPrototype) \ 34 V(FunctionPrototype) \
34 V(RecordWrite) \ 35 V(RecordWrite) \
35 V(StoreBufferOverflow) \ 36 V(StoreBufferOverflow) \
36 V(RegExpExec) \ 37 V(RegExpExec) \
37 V(Instanceof) \ 38 V(Instanceof) \
38 V(ConvertToDouble) \ 39 V(ConvertToDouble) \
39 V(WriteInt32ToHeapNumber) \ 40 V(WriteInt32ToHeapNumber) \
40 V(StackCheck) \ 41 V(StackCheck) \
41 V(Interrupt) \ 42 V(Interrupt) \
42 V(FastNewClosure) \ 43 V(FastNewClosure) \
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 } 813 }
813 814
814 virtual ExtraICState GetExtraICState() V8_FINAL V8_OVERRIDE { 815 virtual ExtraICState GetExtraICState() V8_FINAL V8_OVERRIDE {
815 return state_.GetExtraICState(); 816 return state_.GetExtraICState();
816 } 817 }
817 818
818 protected: 819 protected:
819 virtual int MinorKey() { return GetExtraICState(); } 820 virtual int MinorKey() { return GetExtraICState(); }
820 virtual void PrintState(StringStream* stream) V8_FINAL V8_OVERRIDE; 821 virtual void PrintState(StringStream* stream) V8_FINAL V8_OVERRIDE;
821 822
822 private:
823 virtual CodeStub::Major MajorKey() { return CallIC; } 823 virtual CodeStub::Major MajorKey() { return CallIC; }
824 824
825 // Code generation helpers. 825 // Code generation helpers.
826 void GenerateMiss(MacroAssembler* masm); 826 void GenerateMiss(MacroAssembler* masm, IC::UtilityId id);
827 void Generate_CustomFeedbackCall(MacroAssembler* masm);
828 void Generate_MonomorphicArray(MacroAssembler* masm, Label* miss);
829 827
830 CallIC::State state_; 828 const CallIC::State state_;
831 }; 829 };
832 830
833 831
832 class CallIC_ArrayStub: public CallICStub {
833 public:
834 CallIC_ArrayStub(Isolate* isolate, const CallIC::State& state_in)
835 : CallICStub(isolate, state_in) {}
836
837 virtual void Generate(MacroAssembler* masm);
838
839 protected:
840 virtual void PrintState(StringStream* stream) V8_FINAL V8_OVERRIDE;
841
842 virtual CodeStub::Major MajorKey() { return CallIC_Array; }
843 };
844
845
834 class FunctionPrototypeStub: public ICStub { 846 class FunctionPrototypeStub: public ICStub {
835 public: 847 public:
836 FunctionPrototypeStub(Isolate* isolate, Code::Kind kind) 848 FunctionPrototypeStub(Isolate* isolate, Code::Kind kind)
837 : ICStub(isolate, kind) { } 849 : ICStub(isolate, kind) { }
838 virtual void Generate(MacroAssembler* masm); 850 virtual void Generate(MacroAssembler* masm);
839 851
840 private: 852 private:
841 virtual CodeStub::Major MajorKey() { return FunctionPrototype; } 853 virtual CodeStub::Major MajorKey() { return FunctionPrototype; }
842 }; 854 };
843 855
(...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after
2497 2509
2498 2510
2499 class CallDescriptors { 2511 class CallDescriptors {
2500 public: 2512 public:
2501 static void InitializeForIsolate(Isolate* isolate); 2513 static void InitializeForIsolate(Isolate* isolate);
2502 }; 2514 };
2503 2515
2504 } } // namespace v8::internal 2516 } } // namespace v8::internal
2505 2517
2506 #endif // V8_CODE_STUBS_H_ 2518 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698