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

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

Issue 19214002: Revert 15635: Turn ElementsTransitionAndStore stub into a HydrogenCodeStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/code-stubs-arm.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2227 matching lines...) Expand 10 before | Expand all | Expand 10 after
2238 Major MajorKey() { return ToBoolean; } 2238 Major MajorKey() { return ToBoolean; }
2239 int NotMissMinorKey() { return GetExtraICState(); } 2239 int NotMissMinorKey() { return GetExtraICState(); }
2240 2240
2241 explicit ToBooleanStub(InitializationState init_state) : 2241 explicit ToBooleanStub(InitializationState init_state) :
2242 HydrogenCodeStub(init_state) {} 2242 HydrogenCodeStub(init_state) {}
2243 2243
2244 Types types_; 2244 Types types_;
2245 }; 2245 };
2246 2246
2247 2247
2248 class ElementsTransitionAndStoreStub : public HydrogenCodeStub { 2248 class ElementsTransitionAndStoreStub : public PlatformCodeStub {
2249 public: 2249 public:
2250 ElementsTransitionAndStoreStub(ElementsKind from, 2250 ElementsTransitionAndStoreStub(ElementsKind from,
2251 ElementsKind to, 2251 ElementsKind to,
2252 bool is_jsarray, 2252 bool is_jsarray,
2253 StrictModeFlag strict_mode,
2253 KeyedAccessStoreMode store_mode) 2254 KeyedAccessStoreMode store_mode)
2254 : from_(from), 2255 : from_(from),
2255 to_(to), 2256 to_(to),
2256 is_jsarray_(is_jsarray), 2257 is_jsarray_(is_jsarray),
2257 store_mode_(store_mode) { 2258 strict_mode_(strict_mode),
2258 ASSERT(!IsFastHoleyElementsKind(from) || IsFastHoleyElementsKind(to)); 2259 store_mode_(store_mode) {}
2260
2261 private:
2262 class FromBits: public BitField<ElementsKind, 0, 8> {};
2263 class ToBits: public BitField<ElementsKind, 8, 8> {};
2264 class IsJSArrayBits: public BitField<bool, 16, 1> {};
2265 class StrictModeBits: public BitField<StrictModeFlag, 17, 1> {};
2266 class StoreModeBits: public BitField<KeyedAccessStoreMode, 18, 4> {};
2267
2268 Major MajorKey() { return ElementsTransitionAndStore; }
2269 int MinorKey() {
2270 return FromBits::encode(from_) |
2271 ToBits::encode(to_) |
2272 IsJSArrayBits::encode(is_jsarray_) |
2273 StrictModeBits::encode(strict_mode_) |
2274 StoreModeBits::encode(store_mode_);
2259 } 2275 }
2260 2276
2261 ElementsKind from() const { return from_; } 2277 void Generate(MacroAssembler* masm);
2262 ElementsKind to() const { return to_; }
2263 bool is_jsarray() const { return is_jsarray_; }
2264 KeyedAccessStoreMode store_mode() const { return store_mode_; }
2265
2266 Handle<Code> GenerateCode();
2267
2268 void InitializeInterfaceDescriptor(
2269 Isolate* isolate,
2270 CodeStubInterfaceDescriptor* descriptor);
2271
2272 private:
2273 class FromBits: public BitField<ElementsKind, 0, 8> {};
2274 class ToBits: public BitField<ElementsKind, 8, 8> {};
2275 class IsJSArrayBits: public BitField<bool, 16, 1> {};
2276 class StoreModeBits: public BitField<KeyedAccessStoreMode, 17, 4> {};
2277
2278 Major MajorKey() { return ElementsTransitionAndStore; }
2279 int NotMissMinorKey() {
2280 return FromBits::encode(from()) |
2281 ToBits::encode(to()) |
2282 IsJSArrayBits::encode(is_jsarray()) |
2283 StoreModeBits::encode(store_mode());
2284 }
2285 2278
2286 ElementsKind from_; 2279 ElementsKind from_;
2287 ElementsKind to_; 2280 ElementsKind to_;
2288 bool is_jsarray_; 2281 bool is_jsarray_;
2282 StrictModeFlag strict_mode_;
2289 KeyedAccessStoreMode store_mode_; 2283 KeyedAccessStoreMode store_mode_;
2290 2284
2291 DISALLOW_COPY_AND_ASSIGN(ElementsTransitionAndStoreStub); 2285 DISALLOW_COPY_AND_ASSIGN(ElementsTransitionAndStoreStub);
2292 }; 2286 };
2293 2287
2294 2288
2295 class StoreArrayLiteralElementStub : public PlatformCodeStub { 2289 class StoreArrayLiteralElementStub : public PlatformCodeStub {
2296 public: 2290 public:
2297 StoreArrayLiteralElementStub() 2291 StoreArrayLiteralElementStub()
2298 : fp_registers_(CanUseFPRegisters()) { } 2292 : fp_registers_(CanUseFPRegisters()) { }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
2357 int MinorKey() { return 0; } 2351 int MinorKey() { return 0; }
2358 2352
2359 void Generate(MacroAssembler* masm); 2353 void Generate(MacroAssembler* masm);
2360 2354
2361 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 2355 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
2362 }; 2356 };
2363 2357
2364 } } // namespace v8::internal 2358 } } // namespace v8::internal
2365 2359
2366 #endif // V8_CODE_STUBS_H_ 2360 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698