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

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

Issue 2147043002: Cleanup interface descriptors to reflect that vectors are part of stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@rename-store-ic
Patch Set: Rebasing Created 4 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/code-stub-assembler.h" 10 #include "src/code-stub-assembler.h"
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 959
960 class StoreInterceptorStub : public TurboFanCodeStub { 960 class StoreInterceptorStub : public TurboFanCodeStub {
961 public: 961 public:
962 explicit StoreInterceptorStub(Isolate* isolate) : TurboFanCodeStub(isolate) {} 962 explicit StoreInterceptorStub(Isolate* isolate) : TurboFanCodeStub(isolate) {}
963 963
964 void GenerateAssembly(CodeStubAssembler* assember) const override; 964 void GenerateAssembly(CodeStubAssembler* assember) const override;
965 965
966 Code::Kind GetCodeKind() const override { return Code::HANDLER; } 966 Code::Kind GetCodeKind() const override { return Code::HANDLER; }
967 ExtraICState GetExtraICState() const override { return Code::STORE_IC; } 967 ExtraICState GetExtraICState() const override { return Code::STORE_IC; }
968 968
969 DEFINE_CALL_INTERFACE_DESCRIPTOR(Store); 969 DEFINE_CALL_INTERFACE_DESCRIPTOR(StoreWithVector);
970 DEFINE_CODE_STUB(StoreInterceptor, TurboFanCodeStub); 970 DEFINE_CODE_STUB(StoreInterceptor, TurboFanCodeStub);
971 }; 971 };
972 972
973 class LoadIndexedInterceptorStub : public TurboFanCodeStub { 973 class LoadIndexedInterceptorStub : public TurboFanCodeStub {
974 public: 974 public:
975 explicit LoadIndexedInterceptorStub(Isolate* isolate) 975 explicit LoadIndexedInterceptorStub(Isolate* isolate)
976 : TurboFanCodeStub(isolate) {} 976 : TurboFanCodeStub(isolate) {}
977 977
978 Code::Kind GetCodeKind() const override { return Code::HANDLER; } 978 Code::Kind GetCodeKind() const override { return Code::HANDLER; }
979 ExtraICState GetExtraICState() const override { return Code::KEYED_LOAD_IC; } 979 ExtraICState GetExtraICState() const override { return Code::KEYED_LOAD_IC; }
(...skipping 1396 matching lines...) Expand 10 before | Expand all | Expand 10 after
2376 ExtraICState GetExtraICState() const final { 2376 ExtraICState GetExtraICState() const final {
2377 return static_cast<ExtraICState>(minor_key_); 2377 return static_cast<ExtraICState>(minor_key_);
2378 } 2378 }
2379 2379
2380 protected: 2380 protected:
2381 StoreICState state() const { 2381 StoreICState state() const {
2382 return StoreICState(static_cast<ExtraICState>(minor_key_)); 2382 return StoreICState(static_cast<ExtraICState>(minor_key_));
2383 } 2383 }
2384 2384
2385 private: 2385 private:
2386 DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreICTrampoline); 2386 DEFINE_CALL_INTERFACE_DESCRIPTOR(Store);
2387 DEFINE_PLATFORM_CODE_STUB(StoreICTrampoline, PlatformCodeStub); 2387 DEFINE_PLATFORM_CODE_STUB(StoreICTrampoline, PlatformCodeStub);
2388 }; 2388 };
2389 2389
2390 class KeyedStoreICTrampolineStub : public StoreICTrampolineStub { 2390 class KeyedStoreICTrampolineStub : public StoreICTrampolineStub {
2391 public: 2391 public:
2392 KeyedStoreICTrampolineStub(Isolate* isolate, const StoreICState& state) 2392 KeyedStoreICTrampolineStub(Isolate* isolate, const StoreICState& state)
2393 : StoreICTrampolineStub(isolate, state) {} 2393 : StoreICTrampolineStub(isolate, state) {}
2394 2394
2395 Code::Kind GetCodeKind() const override { return Code::KEYED_STORE_IC; } 2395 Code::Kind GetCodeKind() const override { return Code::KEYED_STORE_IC; }
2396 2396
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
2490 } 2490 }
2491 2491
2492 void GenerateForTrampoline(MacroAssembler* masm); 2492 void GenerateForTrampoline(MacroAssembler* masm);
2493 2493
2494 Code::Kind GetCodeKind() const final { return Code::STORE_IC; } 2494 Code::Kind GetCodeKind() const final { return Code::STORE_IC; }
2495 2495
2496 ExtraICState GetExtraICState() const final { 2496 ExtraICState GetExtraICState() const final {
2497 return static_cast<ExtraICState>(minor_key_); 2497 return static_cast<ExtraICState>(minor_key_);
2498 } 2498 }
2499 2499
2500 DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreIC); 2500 DEFINE_CALL_INTERFACE_DESCRIPTOR(StoreWithVector);
2501 DEFINE_PLATFORM_CODE_STUB(StoreIC, PlatformCodeStub); 2501 DEFINE_PLATFORM_CODE_STUB(StoreIC, PlatformCodeStub);
2502 2502
2503 protected: 2503 protected:
2504 void GenerateImpl(MacroAssembler* masm, bool in_frame); 2504 void GenerateImpl(MacroAssembler* masm, bool in_frame);
2505 }; 2505 };
2506 2506
2507 class KeyedStoreICStub : public PlatformCodeStub { 2507 class KeyedStoreICStub : public PlatformCodeStub {
2508 public: 2508 public:
2509 KeyedStoreICStub(Isolate* isolate, const StoreICState& state) 2509 KeyedStoreICStub(Isolate* isolate, const StoreICState& state)
2510 : PlatformCodeStub(isolate) { 2510 : PlatformCodeStub(isolate) {
2511 minor_key_ = state.GetExtraICState(); 2511 minor_key_ = state.GetExtraICState();
2512 } 2512 }
2513 2513
2514 void GenerateForTrampoline(MacroAssembler* masm); 2514 void GenerateForTrampoline(MacroAssembler* masm);
2515 2515
2516 Code::Kind GetCodeKind() const final { return Code::KEYED_STORE_IC; } 2516 Code::Kind GetCodeKind() const final { return Code::KEYED_STORE_IC; }
2517 2517
2518 ExtraICState GetExtraICState() const final { 2518 ExtraICState GetExtraICState() const final {
2519 return static_cast<ExtraICState>(minor_key_); 2519 return static_cast<ExtraICState>(minor_key_);
2520 } 2520 }
2521 2521
2522 DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreIC); 2522 DEFINE_CALL_INTERFACE_DESCRIPTOR(StoreWithVector);
2523 DEFINE_PLATFORM_CODE_STUB(KeyedStoreIC, PlatformCodeStub); 2523 DEFINE_PLATFORM_CODE_STUB(KeyedStoreIC, PlatformCodeStub);
2524 2524
2525 protected: 2525 protected:
2526 void GenerateImpl(MacroAssembler* masm, bool in_frame); 2526 void GenerateImpl(MacroAssembler* masm, bool in_frame);
2527 }; 2527 };
2528 2528
2529 2529
2530 class DoubleToIStub : public PlatformCodeStub { 2530 class DoubleToIStub : public PlatformCodeStub {
2531 public: 2531 public:
2532 DoubleToIStub(Isolate* isolate, Register source, Register destination, 2532 DoubleToIStub(Isolate* isolate, Register source, Register destination,
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
2681 2681
2682 ElementsKind elements_kind() const { 2682 ElementsKind elements_kind() const {
2683 return ElementsKindBits::decode(sub_minor_key()); 2683 return ElementsKindBits::decode(sub_minor_key());
2684 } 2684 }
2685 2685
2686 KeyedAccessStoreMode store_mode() const { 2686 KeyedAccessStoreMode store_mode() const {
2687 return CommonStoreModeBits::decode(sub_minor_key()); 2687 return CommonStoreModeBits::decode(sub_minor_key());
2688 } 2688 }
2689 2689
2690 CallInterfaceDescriptor GetCallInterfaceDescriptor() const override { 2690 CallInterfaceDescriptor GetCallInterfaceDescriptor() const override {
2691 return VectorStoreICDescriptor(isolate()); 2691 return StoreWithVectorDescriptor(isolate());
2692 } 2692 }
2693 2693
2694 Code::Kind GetCodeKind() const override { return Code::HANDLER; } 2694 Code::Kind GetCodeKind() const override { return Code::HANDLER; }
2695 2695
2696 private: 2696 private:
2697 class ElementsKindBits : public BitField<ElementsKind, 3, 8> {}; 2697 class ElementsKindBits : public BitField<ElementsKind, 3, 8> {};
2698 class IsJSArrayBits : public BitField<bool, 11, 1> {}; 2698 class IsJSArrayBits : public BitField<bool, 11, 1> {};
2699 2699
2700 DEFINE_HYDROGEN_CODE_STUB(StoreFastElement, HydrogenCodeStub); 2700 DEFINE_HYDROGEN_CODE_STUB(StoreFastElement, HydrogenCodeStub);
2701 }; 2701 };
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
2878 KeyedAccessStoreMode mode) 2878 KeyedAccessStoreMode mode)
2879 : PlatformCodeStub(isolate) { 2879 : PlatformCodeStub(isolate) {
2880 // TODO(jkummerow): Rename this stub to StoreSlowElementStub, 2880 // TODO(jkummerow): Rename this stub to StoreSlowElementStub,
2881 // drop elements_kind parameter. 2881 // drop elements_kind parameter.
2882 DCHECK_EQ(DICTIONARY_ELEMENTS, elements_kind); 2882 DCHECK_EQ(DICTIONARY_ELEMENTS, elements_kind);
2883 minor_key_ = ElementsKindBits::encode(elements_kind) | 2883 minor_key_ = ElementsKindBits::encode(elements_kind) |
2884 CommonStoreModeBits::encode(mode); 2884 CommonStoreModeBits::encode(mode);
2885 } 2885 }
2886 2886
2887 CallInterfaceDescriptor GetCallInterfaceDescriptor() const override { 2887 CallInterfaceDescriptor GetCallInterfaceDescriptor() const override {
2888 return VectorStoreICDescriptor(isolate()); 2888 return StoreWithVectorDescriptor(isolate());
2889 } 2889 }
2890 2890
2891 Code::Kind GetCodeKind() const override { return Code::HANDLER; } 2891 Code::Kind GetCodeKind() const override { return Code::HANDLER; }
2892 2892
2893 private: 2893 private:
2894 ElementsKind elements_kind() const { 2894 ElementsKind elements_kind() const {
2895 return ElementsKindBits::decode(minor_key_); 2895 return ElementsKindBits::decode(minor_key_);
2896 } 2896 }
2897 2897
2898 class ElementsKindBits : public BitField<ElementsKind, 3, 8> {}; 2898 class ElementsKindBits : public BitField<ElementsKind, 3, 8> {};
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
3105 #undef DEFINE_HYDROGEN_CODE_STUB 3105 #undef DEFINE_HYDROGEN_CODE_STUB
3106 #undef DEFINE_CODE_STUB 3106 #undef DEFINE_CODE_STUB
3107 #undef DEFINE_CODE_STUB_BASE 3107 #undef DEFINE_CODE_STUB_BASE
3108 3108
3109 extern Representation RepresentationFromType(Type* type); 3109 extern Representation RepresentationFromType(Type* type);
3110 3110
3111 } // namespace internal 3111 } // namespace internal
3112 } // namespace v8 3112 } // namespace v8
3113 3113
3114 #endif // V8_CODE_STUBS_H_ 3114 #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