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

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: fix 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
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 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after
2375 ExtraICState GetExtraICState() const final { 2375 ExtraICState GetExtraICState() const final {
2376 return static_cast<ExtraICState>(minor_key_); 2376 return static_cast<ExtraICState>(minor_key_);
2377 } 2377 }
2378 2378
2379 protected: 2379 protected:
2380 StoreICState state() const { 2380 StoreICState state() const {
2381 return StoreICState(static_cast<ExtraICState>(minor_key_)); 2381 return StoreICState(static_cast<ExtraICState>(minor_key_));
2382 } 2382 }
2383 2383
2384 private: 2384 private:
2385 DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreICTrampoline); 2385 DEFINE_CALL_INTERFACE_DESCRIPTOR(Store);
2386 DEFINE_PLATFORM_CODE_STUB(StoreICTrampoline, PlatformCodeStub); 2386 DEFINE_PLATFORM_CODE_STUB(StoreICTrampoline, PlatformCodeStub);
2387 }; 2387 };
2388 2388
2389 class KeyedStoreICTrampolineStub : public StoreICTrampolineStub { 2389 class KeyedStoreICTrampolineStub : public StoreICTrampolineStub {
2390 public: 2390 public:
2391 KeyedStoreICTrampolineStub(Isolate* isolate, const StoreICState& state) 2391 KeyedStoreICTrampolineStub(Isolate* isolate, const StoreICState& state)
2392 : StoreICTrampolineStub(isolate, state) {} 2392 : StoreICTrampolineStub(isolate, state) {}
2393 2393
2394 Code::Kind GetCodeKind() const override { return Code::KEYED_STORE_IC; } 2394 Code::Kind GetCodeKind() const override { return Code::KEYED_STORE_IC; }
2395 2395
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
2489 } 2489 }
2490 2490
2491 void GenerateForTrampoline(MacroAssembler* masm); 2491 void GenerateForTrampoline(MacroAssembler* masm);
2492 2492
2493 Code::Kind GetCodeKind() const final { return Code::STORE_IC; } 2493 Code::Kind GetCodeKind() const final { return Code::STORE_IC; }
2494 2494
2495 ExtraICState GetExtraICState() const final { 2495 ExtraICState GetExtraICState() const final {
2496 return static_cast<ExtraICState>(minor_key_); 2496 return static_cast<ExtraICState>(minor_key_);
2497 } 2497 }
2498 2498
2499 DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreIC); 2499 DEFINE_CALL_INTERFACE_DESCRIPTOR(StoreWithVector);
2500 DEFINE_PLATFORM_CODE_STUB(StoreIC, PlatformCodeStub); 2500 DEFINE_PLATFORM_CODE_STUB(StoreIC, PlatformCodeStub);
2501 2501
2502 protected: 2502 protected:
2503 void GenerateImpl(MacroAssembler* masm, bool in_frame); 2503 void GenerateImpl(MacroAssembler* masm, bool in_frame);
2504 }; 2504 };
2505 2505
2506 class KeyedStoreICStub : public PlatformCodeStub { 2506 class KeyedStoreICStub : public PlatformCodeStub {
2507 public: 2507 public:
2508 KeyedStoreICStub(Isolate* isolate, const StoreICState& state) 2508 KeyedStoreICStub(Isolate* isolate, const StoreICState& state)
2509 : PlatformCodeStub(isolate) { 2509 : PlatformCodeStub(isolate) {
2510 minor_key_ = state.GetExtraICState(); 2510 minor_key_ = state.GetExtraICState();
2511 } 2511 }
2512 2512
2513 void GenerateForTrampoline(MacroAssembler* masm); 2513 void GenerateForTrampoline(MacroAssembler* masm);
2514 2514
2515 Code::Kind GetCodeKind() const final { return Code::KEYED_STORE_IC; } 2515 Code::Kind GetCodeKind() const final { return Code::KEYED_STORE_IC; }
2516 2516
2517 ExtraICState GetExtraICState() const final { 2517 ExtraICState GetExtraICState() const final {
2518 return static_cast<ExtraICState>(minor_key_); 2518 return static_cast<ExtraICState>(minor_key_);
2519 } 2519 }
2520 2520
2521 DEFINE_CALL_INTERFACE_DESCRIPTOR(VectorStoreIC); 2521 DEFINE_CALL_INTERFACE_DESCRIPTOR(StoreWithVector);
2522 DEFINE_PLATFORM_CODE_STUB(KeyedStoreIC, PlatformCodeStub); 2522 DEFINE_PLATFORM_CODE_STUB(KeyedStoreIC, PlatformCodeStub);
2523 2523
2524 protected: 2524 protected:
2525 void GenerateImpl(MacroAssembler* masm, bool in_frame); 2525 void GenerateImpl(MacroAssembler* masm, bool in_frame);
2526 }; 2526 };
2527 2527
2528 2528
2529 class DoubleToIStub : public PlatformCodeStub { 2529 class DoubleToIStub : public PlatformCodeStub {
2530 public: 2530 public:
2531 DoubleToIStub(Isolate* isolate, Register source, Register destination, 2531 DoubleToIStub(Isolate* isolate, Register source, Register destination,
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
2680 2680
2681 ElementsKind elements_kind() const { 2681 ElementsKind elements_kind() const {
2682 return ElementsKindBits::decode(sub_minor_key()); 2682 return ElementsKindBits::decode(sub_minor_key());
2683 } 2683 }
2684 2684
2685 KeyedAccessStoreMode store_mode() const { 2685 KeyedAccessStoreMode store_mode() const {
2686 return CommonStoreModeBits::decode(sub_minor_key()); 2686 return CommonStoreModeBits::decode(sub_minor_key());
2687 } 2687 }
2688 2688
2689 CallInterfaceDescriptor GetCallInterfaceDescriptor() const override { 2689 CallInterfaceDescriptor GetCallInterfaceDescriptor() const override {
2690 return VectorStoreICDescriptor(isolate()); 2690 return StoreWithVectorDescriptor(isolate());
2691 } 2691 }
2692 2692
2693 Code::Kind GetCodeKind() const override { return Code::HANDLER; } 2693 Code::Kind GetCodeKind() const override { return Code::HANDLER; }
2694 2694
2695 private: 2695 private:
2696 class ElementsKindBits : public BitField<ElementsKind, 3, 8> {}; 2696 class ElementsKindBits : public BitField<ElementsKind, 3, 8> {};
2697 class IsJSArrayBits : public BitField<bool, 11, 1> {}; 2697 class IsJSArrayBits : public BitField<bool, 11, 1> {};
2698 2698
2699 DEFINE_HYDROGEN_CODE_STUB(StoreFastElement, HydrogenCodeStub); 2699 DEFINE_HYDROGEN_CODE_STUB(StoreFastElement, HydrogenCodeStub);
2700 }; 2700 };
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
2877 KeyedAccessStoreMode mode) 2877 KeyedAccessStoreMode mode)
2878 : PlatformCodeStub(isolate) { 2878 : PlatformCodeStub(isolate) {
2879 // TODO(jkummerow): Rename this stub to StoreSlowElementStub, 2879 // TODO(jkummerow): Rename this stub to StoreSlowElementStub,
2880 // drop elements_kind parameter. 2880 // drop elements_kind parameter.
2881 DCHECK_EQ(DICTIONARY_ELEMENTS, elements_kind); 2881 DCHECK_EQ(DICTIONARY_ELEMENTS, elements_kind);
2882 minor_key_ = ElementsKindBits::encode(elements_kind) | 2882 minor_key_ = ElementsKindBits::encode(elements_kind) |
2883 CommonStoreModeBits::encode(mode); 2883 CommonStoreModeBits::encode(mode);
2884 } 2884 }
2885 2885
2886 CallInterfaceDescriptor GetCallInterfaceDescriptor() const override { 2886 CallInterfaceDescriptor GetCallInterfaceDescriptor() const override {
2887 return VectorStoreICDescriptor(isolate()); 2887 return StoreWithVectorDescriptor(isolate());
2888 } 2888 }
2889 2889
2890 Code::Kind GetCodeKind() const override { return Code::HANDLER; } 2890 Code::Kind GetCodeKind() const override { return Code::HANDLER; }
2891 2891
2892 private: 2892 private:
2893 ElementsKind elements_kind() const { 2893 ElementsKind elements_kind() const {
2894 return ElementsKindBits::decode(minor_key_); 2894 return ElementsKindBits::decode(minor_key_);
2895 } 2895 }
2896 2896
2897 class ElementsKindBits : public BitField<ElementsKind, 3, 8> {}; 2897 class ElementsKindBits : public BitField<ElementsKind, 3, 8> {};
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
3104 #undef DEFINE_HYDROGEN_CODE_STUB 3104 #undef DEFINE_HYDROGEN_CODE_STUB
3105 #undef DEFINE_CODE_STUB 3105 #undef DEFINE_CODE_STUB
3106 #undef DEFINE_CODE_STUB_BASE 3106 #undef DEFINE_CODE_STUB_BASE
3107 3107
3108 extern Representation RepresentationFromType(Type* type); 3108 extern Representation RepresentationFromType(Type* type);
3109 3109
3110 } // namespace internal 3110 } // namespace internal
3111 } // namespace v8 3111 } // namespace v8
3112 3112
3113 #endif // V8_CODE_STUBS_H_ 3113 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/code-factory.cc ('k') | src/code-stubs.cc » ('j') | src/interface-descriptors.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698