OLD | NEW |
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 2292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2303 | 2303 |
2304 ElementsKind from_kind_; | 2304 ElementsKind from_kind_; |
2305 ElementsKind to_kind_; | 2305 ElementsKind to_kind_; |
2306 bool is_jsarray_; | 2306 bool is_jsarray_; |
2307 KeyedAccessStoreMode store_mode_; | 2307 KeyedAccessStoreMode store_mode_; |
2308 | 2308 |
2309 DISALLOW_COPY_AND_ASSIGN(ElementsTransitionAndStoreStub); | 2309 DISALLOW_COPY_AND_ASSIGN(ElementsTransitionAndStoreStub); |
2310 }; | 2310 }; |
2311 | 2311 |
2312 | 2312 |
2313 // TODO(bmeurer) Remove this when compiled transitions is enabled | |
2314 class ElementsTransitionAndStorePlatformStub : public PlatformCodeStub { | |
2315 public: | |
2316 ElementsTransitionAndStorePlatformStub(ElementsKind from, | |
2317 ElementsKind to, | |
2318 bool is_jsarray, | |
2319 StrictModeFlag strict_mode, | |
2320 KeyedAccessStoreMode store_mode) | |
2321 : from_(from), | |
2322 to_(to), | |
2323 is_jsarray_(is_jsarray), | |
2324 strict_mode_(strict_mode), | |
2325 store_mode_(store_mode) {} | |
2326 | |
2327 private: | |
2328 class FromBits: public BitField<ElementsKind, 0, 8> {}; | |
2329 class ToBits: public BitField<ElementsKind, 8, 8> {}; | |
2330 class IsJSArrayBits: public BitField<bool, 16, 1> {}; | |
2331 class StrictModeBits: public BitField<StrictModeFlag, 17, 1> {}; | |
2332 class StoreModeBits: public BitField<KeyedAccessStoreMode, 18, 4> {}; | |
2333 | |
2334 Major MajorKey() { return ElementsTransitionAndStore; } | |
2335 int MinorKey() { | |
2336 return FromBits::encode(from_) | | |
2337 ToBits::encode(to_) | | |
2338 IsJSArrayBits::encode(is_jsarray_) | | |
2339 StrictModeBits::encode(strict_mode_) | | |
2340 StoreModeBits::encode(store_mode_); | |
2341 } | |
2342 | |
2343 void Generate(MacroAssembler* masm); | |
2344 | |
2345 ElementsKind from_; | |
2346 ElementsKind to_; | |
2347 bool is_jsarray_; | |
2348 StrictModeFlag strict_mode_; | |
2349 KeyedAccessStoreMode store_mode_; | |
2350 | |
2351 DISALLOW_COPY_AND_ASSIGN(ElementsTransitionAndStorePlatformStub); | |
2352 }; | |
2353 | |
2354 | |
2355 class StoreArrayLiteralElementStub : public PlatformCodeStub { | 2313 class StoreArrayLiteralElementStub : public PlatformCodeStub { |
2356 public: | 2314 public: |
2357 StoreArrayLiteralElementStub() | 2315 StoreArrayLiteralElementStub() |
2358 : fp_registers_(CanUseFPRegisters()) { } | 2316 : fp_registers_(CanUseFPRegisters()) { } |
2359 | 2317 |
2360 private: | 2318 private: |
2361 class FPRegisters: public BitField<bool, 0, 1> {}; | 2319 class FPRegisters: public BitField<bool, 0, 1> {}; |
2362 | 2320 |
2363 Major MajorKey() { return StoreArrayLiteralElement; } | 2321 Major MajorKey() { return StoreArrayLiteralElement; } |
2364 int MinorKey() { return FPRegisters::encode(fp_registers_); } | 2322 int MinorKey() { return FPRegisters::encode(fp_registers_); } |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2417 int MinorKey() { return 0; } | 2375 int MinorKey() { return 0; } |
2418 | 2376 |
2419 void Generate(MacroAssembler* masm); | 2377 void Generate(MacroAssembler* masm); |
2420 | 2378 |
2421 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); | 2379 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); |
2422 }; | 2380 }; |
2423 | 2381 |
2424 } } // namespace v8::internal | 2382 } } // namespace v8::internal |
2425 | 2383 |
2426 #endif // V8_CODE_STUBS_H_ | 2384 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |