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

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

Issue 2418513002: [stubs] Drop LoadICStub and LoadICTrampolineStub (the non-TurboFan implementations of LoadIC dispatc (Closed)
Patch Set: Created 4 years, 2 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/flag-definitions.h » ('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/code-stub-assembler.h" 10 #include "src/code-stub-assembler.h"
(...skipping 28 matching lines...) Expand all
39 V(MathPow) \ 39 V(MathPow) \
40 V(ProfileEntryHook) \ 40 V(ProfileEntryHook) \
41 V(RecordWrite) \ 41 V(RecordWrite) \
42 V(RegExpExec) \ 42 V(RegExpExec) \
43 V(StoreBufferOverflow) \ 43 V(StoreBufferOverflow) \
44 V(StoreElement) \ 44 V(StoreElement) \
45 V(SubString) \ 45 V(SubString) \
46 V(StoreIC) \ 46 V(StoreIC) \
47 V(KeyedStoreIC) \ 47 V(KeyedStoreIC) \
48 V(KeyedLoadIC) \ 48 V(KeyedLoadIC) \
49 V(LoadIC) \
50 V(LoadGlobalIC) \ 49 V(LoadGlobalIC) \
51 V(FastNewObject) \ 50 V(FastNewObject) \
52 V(FastNewRestParameter) \ 51 V(FastNewRestParameter) \
53 V(FastNewSloppyArguments) \ 52 V(FastNewSloppyArguments) \
54 V(FastNewStrictArguments) \ 53 V(FastNewStrictArguments) \
55 V(NameDictionaryLookup) \ 54 V(NameDictionaryLookup) \
56 /* This can be removed once there are no */ \ 55 /* This can be removed once there are no */ \
57 /* more deopting Hydrogen stubs. */ \ 56 /* more deopting Hydrogen stubs. */ \
58 V(StubFailureTrampoline) \ 57 V(StubFailureTrampoline) \
59 /* These are only called from FCG */ \ 58 /* These are only called from FCG */ \
60 /* They can be removed when only the TF */ \ 59 /* They can be removed when only the TF */ \
61 /* version of the corresponding stub is */ \ 60 /* version of the corresponding stub is */ \
62 /* used universally */ \ 61 /* used universally */ \
63 V(CallICTrampoline) \ 62 V(CallICTrampoline) \
64 V(LoadICTrampoline) \
65 V(KeyedLoadICTrampoline) \ 63 V(KeyedLoadICTrampoline) \
66 V(KeyedStoreICTrampoline) \ 64 V(KeyedStoreICTrampoline) \
67 V(StoreICTrampoline) \ 65 V(StoreICTrampoline) \
68 /* --- HydrogenCodeStubs --- */ \ 66 /* --- HydrogenCodeStubs --- */ \
69 V(StringAdd) \ 67 V(StringAdd) \
70 /* These builtins w/ JS linkage are */ \ 68 /* These builtins w/ JS linkage are */ \
71 /* just fast-cases of C++ builtins. They */ \ 69 /* just fast-cases of C++ builtins. They */ \
72 /* require varg support from TF */ \ 70 /* require varg support from TF */ \
73 V(FastArrayPush) \ 71 V(FastArrayPush) \
74 V(FastFunctionBind) \ 72 V(FastFunctionBind) \
(...skipping 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after
2044 public: 2042 public:
2045 explicit KeyedLoadGenericStub(Isolate* isolate) : HydrogenCodeStub(isolate) {} 2043 explicit KeyedLoadGenericStub(Isolate* isolate) : HydrogenCodeStub(isolate) {}
2046 2044
2047 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } 2045 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
2048 2046
2049 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); 2047 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
2050 DEFINE_HYDROGEN_CODE_STUB(KeyedLoadGeneric, HydrogenCodeStub); 2048 DEFINE_HYDROGEN_CODE_STUB(KeyedLoadGeneric, HydrogenCodeStub);
2051 }; 2049 };
2052 2050
2053 2051
2054 class LoadICTrampolineStub : public PlatformCodeStub {
2055 public:
2056 explicit LoadICTrampolineStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
2057
2058 Code::Kind GetCodeKind() const override { return Code::LOAD_IC; }
2059
2060 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
2061 DEFINE_PLATFORM_CODE_STUB(LoadICTrampoline, PlatformCodeStub);
2062 };
2063
2064 class LoadICTrampolineTFStub : public TurboFanCodeStub { 2052 class LoadICTrampolineTFStub : public TurboFanCodeStub {
2065 public: 2053 public:
2066 explicit LoadICTrampolineTFStub(Isolate* isolate) 2054 explicit LoadICTrampolineTFStub(Isolate* isolate)
2067 : TurboFanCodeStub(isolate) {} 2055 : TurboFanCodeStub(isolate) {}
2068 2056
2069 void GenerateAssembly(CodeStubAssembler* assembler) const override; 2057 void GenerateAssembly(CodeStubAssembler* assembler) const override;
2070 2058
2071 Code::Kind GetCodeKind() const override { return Code::LOAD_IC; } 2059 Code::Kind GetCodeKind() const override { return Code::LOAD_IC; }
2072 2060
2073 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load); 2061 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
(...skipping 13 matching lines...) Expand all
2087 Code::Kind GetCodeKind() const override { return Code::LOAD_GLOBAL_IC; } 2075 Code::Kind GetCodeKind() const override { return Code::LOAD_GLOBAL_IC; }
2088 2076
2089 ExtraICState GetExtraICState() const final { 2077 ExtraICState GetExtraICState() const final {
2090 return static_cast<ExtraICState>(minor_key_); 2078 return static_cast<ExtraICState>(minor_key_);
2091 } 2079 }
2092 2080
2093 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadGlobal); 2081 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadGlobal);
2094 DEFINE_CODE_STUB(LoadGlobalICTrampoline, TurboFanCodeStub); 2082 DEFINE_CODE_STUB(LoadGlobalICTrampoline, TurboFanCodeStub);
2095 }; 2083 };
2096 2084
2097 class KeyedLoadICTrampolineStub : public LoadICTrampolineStub { 2085 class KeyedLoadICTrampolineStub : public PlatformCodeStub {
2098 public: 2086 public:
2099 explicit KeyedLoadICTrampolineStub(Isolate* isolate) 2087 explicit KeyedLoadICTrampolineStub(Isolate* isolate)
2100 : LoadICTrampolineStub(isolate) {} 2088 : PlatformCodeStub(isolate) {}
2101 2089
2102 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } 2090 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
2103 2091
2104 DEFINE_PLATFORM_CODE_STUB(KeyedLoadICTrampoline, LoadICTrampolineStub); 2092 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
2093 DEFINE_PLATFORM_CODE_STUB(KeyedLoadICTrampoline, PlatformCodeStub);
2105 }; 2094 };
2106 2095
2107 class KeyedLoadICTrampolineTFStub : public LoadICTrampolineTFStub { 2096 class KeyedLoadICTrampolineTFStub : public LoadICTrampolineTFStub {
2108 public: 2097 public:
2109 explicit KeyedLoadICTrampolineTFStub(Isolate* isolate) 2098 explicit KeyedLoadICTrampolineTFStub(Isolate* isolate)
2110 : LoadICTrampolineTFStub(isolate) {} 2099 : LoadICTrampolineTFStub(isolate) {}
2111 2100
2112 void GenerateAssembly(CodeStubAssembler* assembler) const override; 2101 void GenerateAssembly(CodeStubAssembler* assembler) const override;
2113 2102
2114 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } 2103 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
2184 2173
2185 protected: 2174 protected:
2186 CallICState state() const { 2175 CallICState state() const {
2187 return CallICState(static_cast<ExtraICState>(minor_key_)); 2176 return CallICState(static_cast<ExtraICState>(minor_key_));
2188 } 2177 }
2189 2178
2190 DEFINE_CALL_INTERFACE_DESCRIPTOR(CallFunctionWithFeedback); 2179 DEFINE_CALL_INTERFACE_DESCRIPTOR(CallFunctionWithFeedback);
2191 DEFINE_PLATFORM_CODE_STUB(CallICTrampoline, PlatformCodeStub); 2180 DEFINE_PLATFORM_CODE_STUB(CallICTrampoline, PlatformCodeStub);
2192 }; 2181 };
2193 2182
2194
2195 class LoadICStub : public PlatformCodeStub {
2196 public:
2197 explicit LoadICStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
2198
2199 void GenerateForTrampoline(MacroAssembler* masm);
2200
2201 Code::Kind GetCodeKind() const override { return Code::LOAD_IC; }
2202
2203 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
2204 DEFINE_PLATFORM_CODE_STUB(LoadIC, PlatformCodeStub);
2205
2206 protected:
2207 void GenerateImpl(MacroAssembler* masm, bool in_frame);
2208 };
2209
2210 class LoadICTFStub : public TurboFanCodeStub { 2183 class LoadICTFStub : public TurboFanCodeStub {
2211 public: 2184 public:
2212 explicit LoadICTFStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} 2185 explicit LoadICTFStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
2213 2186
2214 void GenerateAssembly(CodeStubAssembler* assembler) const override; 2187 void GenerateAssembly(CodeStubAssembler* assembler) const override;
2215 2188
2216 Code::Kind GetCodeKind() const override { return Code::LOAD_IC; } 2189 Code::Kind GetCodeKind() const override { return Code::LOAD_IC; }
2217 2190
2218 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); 2191 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
2219 DEFINE_CODE_STUB(LoadICTF, TurboFanCodeStub); 2192 DEFINE_CODE_STUB(LoadICTF, TurboFanCodeStub);
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
2892 #undef DEFINE_HYDROGEN_CODE_STUB 2865 #undef DEFINE_HYDROGEN_CODE_STUB
2893 #undef DEFINE_CODE_STUB 2866 #undef DEFINE_CODE_STUB
2894 #undef DEFINE_CODE_STUB_BASE 2867 #undef DEFINE_CODE_STUB_BASE
2895 2868
2896 extern Representation RepresentationFromMachineType(MachineType type); 2869 extern Representation RepresentationFromMachineType(MachineType type);
2897 2870
2898 } // namespace internal 2871 } // namespace internal
2899 } // namespace v8 2872 } // namespace v8
2900 2873
2901 #endif // V8_CODE_STUBS_H_ 2874 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/code-factory.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698