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

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

Issue 1199983002: [strong] Implement strong property access semantics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add TODOs Created 5 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
« 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 2087 matching lines...) Expand 10 before | Expand all | Expand 10 after
2098 private: 2098 private:
2099 StringCharCodeAtGenerator char_code_at_generator_; 2099 StringCharCodeAtGenerator char_code_at_generator_;
2100 StringCharFromCodeGenerator char_from_code_generator_; 2100 StringCharFromCodeGenerator char_from_code_generator_;
2101 2101
2102 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); 2102 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator);
2103 }; 2103 };
2104 2104
2105 2105
2106 class LoadDictionaryElementStub : public HydrogenCodeStub { 2106 class LoadDictionaryElementStub : public HydrogenCodeStub {
2107 public: 2107 public:
2108 explicit LoadDictionaryElementStub(Isolate* isolate) 2108 explicit LoadDictionaryElementStub(Isolate* isolate, const LoadICState& state)
2109 : HydrogenCodeStub(isolate) {} 2109 : HydrogenCodeStub(isolate) {
2110 minor_key_ = state.GetExtraICState();
2111 }
2110 2112
2111 CallInterfaceDescriptor GetCallInterfaceDescriptor() override { 2113 CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
2112 return LoadWithVectorDescriptor(isolate()); 2114 return LoadWithVectorDescriptor(isolate());
2113 } 2115 }
2114 2116
2117 LanguageMode language_mode() const {
2118 return LoadICState::GetLanguageMode(MinorKey());
2119 }
2120
2115 DEFINE_HYDROGEN_CODE_STUB(LoadDictionaryElement, HydrogenCodeStub); 2121 DEFINE_HYDROGEN_CODE_STUB(LoadDictionaryElement, HydrogenCodeStub);
2116 }; 2122 };
2117 2123
2118 2124
2119 class KeyedLoadGenericStub : public HydrogenCodeStub { 2125 class KeyedLoadGenericStub : public HydrogenCodeStub {
2120 public: 2126 public:
2121 explicit KeyedLoadGenericStub(Isolate* isolate) : HydrogenCodeStub(isolate) {} 2127 explicit KeyedLoadGenericStub(Isolate* isolate, const LoadICState& state)
2128 : HydrogenCodeStub(isolate) {
2129 minor_key_ = state.GetExtraICState();
2130 }
2122 2131
2123 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } 2132 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
2124 InlineCacheState GetICState() const override { return GENERIC; } 2133 InlineCacheState GetICState() const override { return GENERIC; }
2125 2134
2135 LanguageMode language_mode() const {
2136 return LoadICState::GetLanguageMode(MinorKey());
2137 }
2138
2126 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load); 2139 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
2127 2140
2128 DEFINE_HYDROGEN_CODE_STUB(KeyedLoadGeneric, HydrogenCodeStub); 2141 DEFINE_HYDROGEN_CODE_STUB(KeyedLoadGeneric, HydrogenCodeStub);
2129 }; 2142 };
2130 2143
2131 2144
2132 class LoadICTrampolineStub : public PlatformCodeStub { 2145 class LoadICTrampolineStub : public PlatformCodeStub {
2133 public: 2146 public:
2134 LoadICTrampolineStub(Isolate* isolate, const LoadICState& state) 2147 LoadICTrampolineStub(Isolate* isolate, const LoadICState& state)
2135 : PlatformCodeStub(isolate) { 2148 : PlatformCodeStub(isolate) {
2136 minor_key_ = state.GetExtraICState(); 2149 minor_key_ = state.GetExtraICState();
2137 } 2150 }
2138 2151
2139 Code::Kind GetCodeKind() const override { return Code::LOAD_IC; } 2152 Code::Kind GetCodeKind() const override { return Code::LOAD_IC; }
2140 2153
2141 InlineCacheState GetICState() const final { return DEFAULT; } 2154 InlineCacheState GetICState() const final { return DEFAULT; }
2142 2155
2143 ExtraICState GetExtraICState() const final { 2156 ExtraICState GetExtraICState() const final {
2144 return static_cast<ExtraICState>(minor_key_); 2157 return static_cast<ExtraICState>(minor_key_);
2145 } 2158 }
2146 2159
2147 private: 2160 protected:
2148 LoadICState state() const { 2161 LoadICState state() const {
2149 return LoadICState(static_cast<ExtraICState>(minor_key_)); 2162 return LoadICState(static_cast<ExtraICState>(minor_key_));
2150 } 2163 }
2151 2164
2152 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load); 2165 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
2153 DEFINE_PLATFORM_CODE_STUB(LoadICTrampoline, PlatformCodeStub); 2166 DEFINE_PLATFORM_CODE_STUB(LoadICTrampoline, PlatformCodeStub);
2154 }; 2167 };
2155 2168
2156 2169
2157 class KeyedLoadICTrampolineStub : public LoadICTrampolineStub { 2170 class KeyedLoadICTrampolineStub : public LoadICTrampolineStub {
2158 public: 2171 public:
2159 explicit KeyedLoadICTrampolineStub(Isolate* isolate) 2172 explicit KeyedLoadICTrampolineStub(Isolate* isolate, const LoadICState& state)
2160 : LoadICTrampolineStub(isolate, LoadICState(0)) {} 2173 : LoadICTrampolineStub(isolate, state) {}
2161 2174
2162 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } 2175 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
2163 2176
2164 DEFINE_PLATFORM_CODE_STUB(KeyedLoadICTrampoline, LoadICTrampolineStub); 2177 DEFINE_PLATFORM_CODE_STUB(KeyedLoadICTrampoline, LoadICTrampolineStub);
2165 }; 2178 };
2166 2179
2167 2180
2168 class VectorStoreICTrampolineStub : public PlatformCodeStub { 2181 class VectorStoreICTrampolineStub : public PlatformCodeStub {
2169 public: 2182 public:
2170 VectorStoreICTrampolineStub(Isolate* isolate, const StoreICState& state) 2183 VectorStoreICTrampolineStub(Isolate* isolate, const StoreICState& state)
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
2256 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); 2269 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
2257 DEFINE_PLATFORM_CODE_STUB(LoadIC, PlatformCodeStub); 2270 DEFINE_PLATFORM_CODE_STUB(LoadIC, PlatformCodeStub);
2258 2271
2259 protected: 2272 protected:
2260 void GenerateImpl(MacroAssembler* masm, bool in_frame); 2273 void GenerateImpl(MacroAssembler* masm, bool in_frame);
2261 }; 2274 };
2262 2275
2263 2276
2264 class KeyedLoadICStub : public PlatformCodeStub { 2277 class KeyedLoadICStub : public PlatformCodeStub {
2265 public: 2278 public:
2266 explicit KeyedLoadICStub(Isolate* isolate) : PlatformCodeStub(isolate) {} 2279 explicit KeyedLoadICStub(Isolate* isolate, const LoadICState& state)
2280 : PlatformCodeStub(isolate) {
2281 minor_key_ = state.GetExtraICState();
2282 }
2267 2283
2268 void GenerateForTrampoline(MacroAssembler* masm); 2284 void GenerateForTrampoline(MacroAssembler* masm);
2269 2285
2270 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } 2286 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
2271 InlineCacheState GetICState() const final { return DEFAULT; } 2287 InlineCacheState GetICState() const final { return DEFAULT; }
2288 ExtraICState GetExtraICState() const final {
2289 return static_cast<ExtraICState>(minor_key_);
2290 }
2272 2291
2273 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); 2292 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
2274 DEFINE_PLATFORM_CODE_STUB(KeyedLoadIC, PlatformCodeStub); 2293 DEFINE_PLATFORM_CODE_STUB(KeyedLoadIC, PlatformCodeStub);
2275 2294
2276 protected: 2295 protected:
2277 void GenerateImpl(MacroAssembler* masm, bool in_frame); 2296 void GenerateImpl(MacroAssembler* masm, bool in_frame);
2278 }; 2297 };
2279 2298
2280 2299
2281 class VectorStoreICStub : public PlatformCodeStub { 2300 class VectorStoreICStub : public PlatformCodeStub {
(...skipping 23 matching lines...) Expand all
2305 public: 2324 public:
2306 VectorKeyedStoreICStub(Isolate* isolate, const StoreICState& state) 2325 VectorKeyedStoreICStub(Isolate* isolate, const StoreICState& state)
2307 : PlatformCodeStub(isolate) { 2326 : PlatformCodeStub(isolate) {
2308 minor_key_ = state.GetExtraICState(); 2327 minor_key_ = state.GetExtraICState();
2309 } 2328 }
2310 2329
2311 void GenerateForTrampoline(MacroAssembler* masm); 2330 void GenerateForTrampoline(MacroAssembler* masm);
2312 2331
2313 Code::Kind GetCodeKind() const final { return Code::KEYED_STORE_IC; } 2332 Code::Kind GetCodeKind() const final { return Code::KEYED_STORE_IC; }
2314 InlineCacheState GetICState() const final { return DEFAULT; } 2333 InlineCacheState GetICState() const final { return DEFAULT; }
2334 virtual ExtraICState GetExtraICState() const final {
2335 return static_cast<ExtraICState>(minor_key_);
2336 }
2315 2337
2316 DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreIC); 2338 DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreIC);
2317 DEFINE_PLATFORM_CODE_STUB(VectorKeyedStoreIC, PlatformCodeStub); 2339 DEFINE_PLATFORM_CODE_STUB(VectorKeyedStoreIC, PlatformCodeStub);
2318 2340
2319 protected: 2341 protected:
2320 void GenerateImpl(MacroAssembler* masm, bool in_frame); 2342 void GenerateImpl(MacroAssembler* masm, bool in_frame);
2321 }; 2343 };
2322 2344
2323 2345
2324 class DoubleToIStub : public PlatformCodeStub { 2346 class DoubleToIStub : public PlatformCodeStub {
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
2961 #undef DEFINE_PLATFORM_CODE_STUB 2983 #undef DEFINE_PLATFORM_CODE_STUB
2962 #undef DEFINE_HANDLER_CODE_STUB 2984 #undef DEFINE_HANDLER_CODE_STUB
2963 #undef DEFINE_HYDROGEN_CODE_STUB 2985 #undef DEFINE_HYDROGEN_CODE_STUB
2964 #undef DEFINE_CODE_STUB 2986 #undef DEFINE_CODE_STUB
2965 #undef DEFINE_CODE_STUB_BASE 2987 #undef DEFINE_CODE_STUB_BASE
2966 2988
2967 extern Representation RepresentationFromType(Type* type); 2989 extern Representation RepresentationFromType(Type* type);
2968 } } // namespace v8::internal 2990 } } // namespace v8::internal
2969 2991
2970 #endif // V8_CODE_STUBS_H_ 2992 #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