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

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

Issue 1189153002: Revert of [strong] Implement strong mode restrictions on property access (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« 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 2096 matching lines...) Expand 10 before | Expand all | Expand 10 after
2107 private: 2107 private:
2108 StringCharCodeAtGenerator char_code_at_generator_; 2108 StringCharCodeAtGenerator char_code_at_generator_;
2109 StringCharFromCodeGenerator char_from_code_generator_; 2109 StringCharFromCodeGenerator char_from_code_generator_;
2110 2110
2111 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator); 2111 DISALLOW_COPY_AND_ASSIGN(StringCharAtGenerator);
2112 }; 2112 };
2113 2113
2114 2114
2115 class LoadDictionaryElementStub : public HydrogenCodeStub { 2115 class LoadDictionaryElementStub : public HydrogenCodeStub {
2116 public: 2116 public:
2117 explicit LoadDictionaryElementStub(Isolate* isolate, const LoadICState& state) 2117 explicit LoadDictionaryElementStub(Isolate* isolate)
2118 : HydrogenCodeStub(isolate) { 2118 : HydrogenCodeStub(isolate) {}
2119 minor_key_ = state.GetExtraICState();
2120 }
2121 2119
2122 CallInterfaceDescriptor GetCallInterfaceDescriptor() override { 2120 CallInterfaceDescriptor GetCallInterfaceDescriptor() override {
2123 return LoadWithVectorDescriptor(isolate()); 2121 return LoadWithVectorDescriptor(isolate());
2124 } 2122 }
2125 2123
2126 LanguageMode language_mode() const {
2127 return LoadICState::GetLanguageMode(MinorKey());
2128 }
2129
2130 DEFINE_HYDROGEN_CODE_STUB(LoadDictionaryElement, HydrogenCodeStub); 2124 DEFINE_HYDROGEN_CODE_STUB(LoadDictionaryElement, HydrogenCodeStub);
2131 }; 2125 };
2132 2126
2133 2127
2134 class KeyedLoadGenericStub : public HydrogenCodeStub { 2128 class KeyedLoadGenericStub : public HydrogenCodeStub {
2135 public: 2129 public:
2136 explicit KeyedLoadGenericStub(Isolate* isolate, const LoadICState& state) 2130 explicit KeyedLoadGenericStub(Isolate* isolate) : HydrogenCodeStub(isolate) {}
2137 : HydrogenCodeStub(isolate) {
2138 minor_key_ = state.GetExtraICState();
2139 }
2140 2131
2141 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } 2132 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
2142 InlineCacheState GetICState() const override { return GENERIC; } 2133 InlineCacheState GetICState() const override { return GENERIC; }
2143 2134
2144 LanguageMode language_mode() const {
2145 return LoadICState::GetLanguageMode(MinorKey());
2146 }
2147
2148 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load); 2135 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
2149 2136
2150 DEFINE_HYDROGEN_CODE_STUB(KeyedLoadGeneric, HydrogenCodeStub); 2137 DEFINE_HYDROGEN_CODE_STUB(KeyedLoadGeneric, HydrogenCodeStub);
2151 }; 2138 };
2152 2139
2153 2140
2154 class LoadICTrampolineStub : public PlatformCodeStub { 2141 class LoadICTrampolineStub : public PlatformCodeStub {
2155 public: 2142 public:
2156 LoadICTrampolineStub(Isolate* isolate, const LoadICState& state) 2143 LoadICTrampolineStub(Isolate* isolate, const LoadICState& state)
2157 : PlatformCodeStub(isolate) { 2144 : PlatformCodeStub(isolate) {
2158 minor_key_ = state.GetExtraICState(); 2145 minor_key_ = state.GetExtraICState();
2159 } 2146 }
2160 2147
2161 Code::Kind GetCodeKind() const override { return Code::LOAD_IC; } 2148 Code::Kind GetCodeKind() const override { return Code::LOAD_IC; }
2162 2149
2163 InlineCacheState GetICState() const final { return DEFAULT; } 2150 InlineCacheState GetICState() const final { return DEFAULT; }
2164 2151
2165 ExtraICState GetExtraICState() const final { 2152 ExtraICState GetExtraICState() const final {
2166 return static_cast<ExtraICState>(minor_key_); 2153 return static_cast<ExtraICState>(minor_key_);
2167 } 2154 }
2168 2155
2169 protected: 2156 private:
2170 LoadICState state() const { 2157 LoadICState state() const {
2171 return LoadICState(static_cast<ExtraICState>(minor_key_)); 2158 return LoadICState(static_cast<ExtraICState>(minor_key_));
2172 } 2159 }
2173 2160
2174 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load); 2161 DEFINE_CALL_INTERFACE_DESCRIPTOR(Load);
2175 DEFINE_PLATFORM_CODE_STUB(LoadICTrampoline, PlatformCodeStub); 2162 DEFINE_PLATFORM_CODE_STUB(LoadICTrampoline, PlatformCodeStub);
2176 }; 2163 };
2177 2164
2178 2165
2179 class KeyedLoadICTrampolineStub : public LoadICTrampolineStub { 2166 class KeyedLoadICTrampolineStub : public LoadICTrampolineStub {
2180 public: 2167 public:
2181 explicit KeyedLoadICTrampolineStub(Isolate* isolate, const LoadICState& state) 2168 explicit KeyedLoadICTrampolineStub(Isolate* isolate)
2182 : LoadICTrampolineStub(isolate, state) {} 2169 : LoadICTrampolineStub(isolate, LoadICState(0)) {}
2183 2170
2184 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } 2171 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
2185 2172
2186 DEFINE_PLATFORM_CODE_STUB(KeyedLoadICTrampoline, LoadICTrampolineStub); 2173 DEFINE_PLATFORM_CODE_STUB(KeyedLoadICTrampoline, LoadICTrampolineStub);
2187 }; 2174 };
2188 2175
2189 2176
2190 class VectorStoreICTrampolineStub : public PlatformCodeStub { 2177 class VectorStoreICTrampolineStub : public PlatformCodeStub {
2191 public: 2178 public:
2192 VectorStoreICTrampolineStub(Isolate* isolate, const StoreICState& state) 2179 VectorStoreICTrampolineStub(Isolate* isolate, const StoreICState& state)
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
2278 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); 2265 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
2279 DEFINE_PLATFORM_CODE_STUB(LoadIC, PlatformCodeStub); 2266 DEFINE_PLATFORM_CODE_STUB(LoadIC, PlatformCodeStub);
2280 2267
2281 protected: 2268 protected:
2282 void GenerateImpl(MacroAssembler* masm, bool in_frame); 2269 void GenerateImpl(MacroAssembler* masm, bool in_frame);
2283 }; 2270 };
2284 2271
2285 2272
2286 class KeyedLoadICStub : public PlatformCodeStub { 2273 class KeyedLoadICStub : public PlatformCodeStub {
2287 public: 2274 public:
2288 explicit KeyedLoadICStub(Isolate* isolate, const LoadICState& state) 2275 explicit KeyedLoadICStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
2289 : PlatformCodeStub(isolate) {
2290 minor_key_ = state.GetExtraICState();
2291 }
2292 2276
2293 void GenerateForTrampoline(MacroAssembler* masm); 2277 void GenerateForTrampoline(MacroAssembler* masm);
2294 2278
2295 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; } 2279 Code::Kind GetCodeKind() const override { return Code::KEYED_LOAD_IC; }
2296 InlineCacheState GetICState() const final { return DEFAULT; } 2280 InlineCacheState GetICState() const final { return DEFAULT; }
2297 ExtraICState GetExtraICState() const final {
2298 return static_cast<ExtraICState>(minor_key_);
2299 }
2300 2281
2301 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector); 2282 DEFINE_CALL_INTERFACE_DESCRIPTOR(LoadWithVector);
2302 DEFINE_PLATFORM_CODE_STUB(KeyedLoadIC, PlatformCodeStub); 2283 DEFINE_PLATFORM_CODE_STUB(KeyedLoadIC, PlatformCodeStub);
2303 2284
2304 protected: 2285 protected:
2305 void GenerateImpl(MacroAssembler* masm, bool in_frame); 2286 void GenerateImpl(MacroAssembler* masm, bool in_frame);
2306 }; 2287 };
2307 2288
2308 2289
2309 class VectorStoreICStub : public PlatformCodeStub { 2290 class VectorStoreICStub : public PlatformCodeStub {
(...skipping 23 matching lines...) Expand all
2333 public: 2314 public:
2334 VectorKeyedStoreICStub(Isolate* isolate, const StoreICState& state) 2315 VectorKeyedStoreICStub(Isolate* isolate, const StoreICState& state)
2335 : PlatformCodeStub(isolate) { 2316 : PlatformCodeStub(isolate) {
2336 minor_key_ = state.GetExtraICState(); 2317 minor_key_ = state.GetExtraICState();
2337 } 2318 }
2338 2319
2339 void GenerateForTrampoline(MacroAssembler* masm); 2320 void GenerateForTrampoline(MacroAssembler* masm);
2340 2321
2341 Code::Kind GetCodeKind() const final { return Code::KEYED_STORE_IC; } 2322 Code::Kind GetCodeKind() const final { return Code::KEYED_STORE_IC; }
2342 InlineCacheState GetICState() const final { return DEFAULT; } 2323 InlineCacheState GetICState() const final { return DEFAULT; }
2343 virtual ExtraICState GetExtraICState() const final {
2344 return static_cast<ExtraICState>(minor_key_);
2345 }
2346 2324
2347 DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreIC); 2325 DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreIC);
2348 DEFINE_PLATFORM_CODE_STUB(VectorKeyedStoreIC, PlatformCodeStub); 2326 DEFINE_PLATFORM_CODE_STUB(VectorKeyedStoreIC, PlatformCodeStub);
2349 2327
2350 protected: 2328 protected:
2351 void GenerateImpl(MacroAssembler* masm, bool in_frame); 2329 void GenerateImpl(MacroAssembler* masm, bool in_frame);
2352 }; 2330 };
2353 2331
2354 2332
2355 class DoubleToIStub : public PlatformCodeStub { 2333 class DoubleToIStub : public PlatformCodeStub {
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
2991 2969
2992 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR 2970 #undef DEFINE_CALL_INTERFACE_DESCRIPTOR
2993 #undef DEFINE_PLATFORM_CODE_STUB 2971 #undef DEFINE_PLATFORM_CODE_STUB
2994 #undef DEFINE_HANDLER_CODE_STUB 2972 #undef DEFINE_HANDLER_CODE_STUB
2995 #undef DEFINE_HYDROGEN_CODE_STUB 2973 #undef DEFINE_HYDROGEN_CODE_STUB
2996 #undef DEFINE_CODE_STUB 2974 #undef DEFINE_CODE_STUB
2997 #undef DEFINE_CODE_STUB_BASE 2975 #undef DEFINE_CODE_STUB_BASE
2998 } } // namespace v8::internal 2976 } } // namespace v8::internal
2999 2977
3000 #endif // V8_CODE_STUBS_H_ 2978 #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