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

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

Issue 1129853002: Removing FLAG_vector_ics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment response. Created 5 years, 7 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
« no previous file with comments | « src/code-factory.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 "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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 V(FastCloneShallowObject) \ 69 V(FastCloneShallowObject) \
70 V(FastNewClosure) \ 70 V(FastNewClosure) \
71 V(FastNewContext) \ 71 V(FastNewContext) \
72 V(GrowArrayElements) \ 72 V(GrowArrayElements) \
73 V(InternalArrayNArgumentsConstructor) \ 73 V(InternalArrayNArgumentsConstructor) \
74 V(InternalArrayNoArgumentConstructor) \ 74 V(InternalArrayNoArgumentConstructor) \
75 V(InternalArraySingleArgumentConstructor) \ 75 V(InternalArraySingleArgumentConstructor) \
76 V(KeyedLoadGeneric) \ 76 V(KeyedLoadGeneric) \
77 V(LoadScriptContextField) \ 77 V(LoadScriptContextField) \
78 V(LoadDictionaryElement) \ 78 V(LoadDictionaryElement) \
79 V(MegamorphicLoad) \
80 V(NameDictionaryLookup) \ 79 V(NameDictionaryLookup) \
81 V(NumberToString) \ 80 V(NumberToString) \
82 V(Typeof) \ 81 V(Typeof) \
83 V(RegExpConstructResult) \ 82 V(RegExpConstructResult) \
84 V(StoreFastElement) \ 83 V(StoreFastElement) \
85 V(StoreScriptContextField) \ 84 V(StoreScriptContextField) \
86 V(StringAdd) \ 85 V(StringAdd) \
87 V(ToBoolean) \ 86 V(ToBoolean) \
88 V(TransitionElementsKind) \ 87 V(TransitionElementsKind) \
89 V(VectorRawKeyedLoad) \ 88 V(VectorRawKeyedLoad) \
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 public: 979 public:
981 explicit FunctionPrototypeStub(Isolate* isolate) 980 explicit FunctionPrototypeStub(Isolate* isolate)
982 : PlatformCodeStub(isolate) {} 981 : PlatformCodeStub(isolate) {}
983 982
984 Code::Kind GetCodeKind() const override { return Code::HANDLER; } 983 Code::Kind GetCodeKind() const override { return Code::HANDLER; }
985 984
986 // TODO(mvstanton): only the receiver register is accessed. When this is 985 // TODO(mvstanton): only the receiver register is accessed. When this is
987 // translated to a hydrogen code stub, a new CallInterfaceDescriptor 986 // translated to a hydrogen code stub, a new CallInterfaceDescriptor
988 // should be created that just uses that register for more efficient code. 987 // should be created that just uses that register for more efficient code.
989 CallInterfaceDescriptor GetCallInterfaceDescriptor() override { 988 CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
990 if (FLAG_vector_ics) { 989 return VectorLoadICDescriptor(isolate());
991 return VectorLoadICDescriptor(isolate());
992 }
993 return LoadDescriptor(isolate());
994 } 990 }
995 991
996 DEFINE_PLATFORM_CODE_STUB(FunctionPrototype, PlatformCodeStub); 992 DEFINE_PLATFORM_CODE_STUB(FunctionPrototype, PlatformCodeStub);
997 }; 993 };
998 994
999 995
1000 // TODO(mvstanton): Translate to hydrogen code stub. 996 // TODO(mvstanton): Translate to hydrogen code stub.
1001 class LoadIndexedInterceptorStub : public PlatformCodeStub { 997 class LoadIndexedInterceptorStub : public PlatformCodeStub {
1002 public: 998 public:
1003 explicit LoadIndexedInterceptorStub(Isolate* isolate) 999 explicit LoadIndexedInterceptorStub(Isolate* isolate)
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
2074 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); 2070 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator);
2075 }; 2071 };
2076 2072
2077 2073
2078 class LoadDictionaryElementStub : public HydrogenCodeStub { 2074 class LoadDictionaryElementStub : public HydrogenCodeStub {
2079 public: 2075 public:
2080 explicit LoadDictionaryElementStub(Isolate* isolate) 2076 explicit LoadDictionaryElementStub(Isolate* isolate)
2081 : HydrogenCodeStub(isolate) {} 2077 : HydrogenCodeStub(isolate) {}
2082 2078
2083 CallInterfaceDescriptor GetCallInterfaceDescriptor() override { 2079 CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
2084 if (FLAG_vector_ics) { 2080 return VectorLoadICDescriptor(isolate());
2085 return VectorLoadICDescriptor(isolate());
2086 }
2087 return LoadDescriptor(isolate());
2088 } 2081 }
2089 2082
2090 DEFINE_HYDROGEN_CODE_STUB(LoadDictionaryElement, HydrogenCodeStub); 2083 DEFINE_HYDROGEN_CODE_STUB(LoadDictionaryElement, HydrogenCodeStub);
2091 }; 2084 };
2092 2085
2093 2086
2094 class KeyedLoadGenericStub : public HydrogenCodeStub { 2087 class KeyedLoadGenericStub : public HydrogenCodeStub {
2095 public: 2088 public:
2096 explicit KeyedLoadGenericStub(Isolate* isolate) : HydrogenCodeStub(isolate) {} 2089 explicit KeyedLoadGenericStub(Isolate* isolate) : HydrogenCodeStub(isolate) {}
2097 2090
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
2171 class CallIC_ArrayTrampolineStub : public CallICTrampolineStub { 2164 class CallIC_ArrayTrampolineStub : public CallICTrampolineStub {
2172 public: 2165 public:
2173 CallIC_ArrayTrampolineStub(Isolate* isolate, const CallICState& state) 2166 CallIC_ArrayTrampolineStub(Isolate* isolate, const CallICState& state)
2174 : CallICTrampolineStub(isolate, state) {} 2167 : CallICTrampolineStub(isolate, state) {}
2175 2168
2176 private: 2169 private:
2177 DEFINE_PLATFORM_CODE_STUB(CallIC_ArrayTrampoline, CallICTrampolineStub); 2170 DEFINE_PLATFORM_CODE_STUB(CallIC_ArrayTrampoline, CallICTrampolineStub);
2178 }; 2171 };
2179 2172
2180 2173
2181 class MegamorphicLoadStub : public HydrogenCodeStub {
2182 public:
2183 MegamorphicLoadStub(Isolate* isolate, const LoadICState& state)
2184 : HydrogenCodeStub(isolate) {
2185 set_sub_minor_key(state.GetExtraICState());
2186 }
2187
2188 Code::Kind GetCodeKind() const override { return Code::LOAD_IC; }
2189
2190 InlineCacheState GetICState() const final { return MEGAMORPHIC; }
2191
2192 ExtraICState GetExtraICState() const final {
2193 return static_cast<ExtraICState>(sub_minor_key());
2194 }
2195
2196 CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
2197 if (FLAG_vector_ics) {
2198 return VectorLoadICDescriptor(isolate());
2199 }
2200 return LoadDescriptor(isolate());
2201 }
2202
2203 DEFINE_HYDROGEN_CODE_STUB(MegamorphicLoad, HydrogenCodeStub);
2204 };
2205
2206
2207 class VectorRawLoadStub : public PlatformCodeStub { 2174 class VectorRawLoadStub : public PlatformCodeStub {
2208 public: 2175 public:
2209 explicit VectorRawLoadStub(Isolate* isolate, const LoadICState& state) 2176 explicit VectorRawLoadStub(Isolate* isolate, const LoadICState& state)
2210 : PlatformCodeStub(isolate) { 2177 : PlatformCodeStub(isolate) {
2211 minor_key_ = state.GetExtraICState(); 2178 minor_key_ = state.GetExtraICState();
2212 } 2179 }
2213 2180
2214 void GenerateForTrampoline(MacroAssembler* masm); 2181 void GenerateForTrampoline(MacroAssembler* masm);
2215 2182
2216 virtual Code::Kind GetCodeKind() const override { return Code::LOAD_IC; } 2183 virtual Code::Kind GetCodeKind() const override { return Code::LOAD_IC; }
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
2889 2856
2890 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR 2857 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR
2891 #undef DEFINE_PLATFORM_CODE_STUB 2858 #undef DEFINE_PLATFORM_CODE_STUB
2892 #undef DEFINE_HANDLER_CODE_STUB 2859 #undef DEFINE_HANDLER_CODE_STUB
2893 #undef DEFINE_HYDROGEN_CODE_STUB 2860 #undef DEFINE_HYDROGEN_CODE_STUB
2894 #undef DEFINE_CODE_STUB 2861 #undef DEFINE_CODE_STUB
2895 #undef DEFINE_CODE_STUB_BASE 2862 #undef DEFINE_CODE_STUB_BASE
2896 } } // namespace v8::internal 2863 } } // namespace v8::internal
2897 2864
2898 #endif // V8_CODE_STUBS_H_ 2865 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698