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

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

Issue 2523473002: [cleanup] Drop handwritten KeyedStoreIC code (Closed)
Patch Set: rebased Created 4 years 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/codegen.h » ('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 26 matching lines...) Expand all
37 V(InternalArrayConstructor) \ 37 V(InternalArrayConstructor) \
38 V(JSEntry) \ 38 V(JSEntry) \
39 V(LoadIndexedString) \ 39 V(LoadIndexedString) \
40 V(MathPow) \ 40 V(MathPow) \
41 V(ProfileEntryHook) \ 41 V(ProfileEntryHook) \
42 V(RecordWrite) \ 42 V(RecordWrite) \
43 V(RegExpExec) \ 43 V(RegExpExec) \
44 V(StoreBufferOverflow) \ 44 V(StoreBufferOverflow) \
45 V(StoreElement) \ 45 V(StoreElement) \
46 V(SubString) \ 46 V(SubString) \
47 V(KeyedStoreIC) \
48 V(LoadGlobalIC) \ 47 V(LoadGlobalIC) \
49 V(FastNewObject) \ 48 V(FastNewObject) \
50 V(FastNewRestParameter) \ 49 V(FastNewRestParameter) \
51 V(FastNewSloppyArguments) \ 50 V(FastNewSloppyArguments) \
52 V(FastNewStrictArguments) \ 51 V(FastNewStrictArguments) \
53 V(NameDictionaryLookup) \ 52 V(NameDictionaryLookup) \
54 /* This can be removed once there are no */ \ 53 /* This can be removed once there are no */ \
55 /* more deopting Hydrogen stubs. */ \ 54 /* more deopting Hydrogen stubs. */ \
56 V(StubFailureTrampoline) \ 55 V(StubFailureTrampoline) \
57 /* These are only called from FCG */ \ 56 /* These are only called from FCG */ \
58 /* They can be removed when only the TF */ \ 57 /* They can be removed when only the TF */ \
59 /* version of the corresponding stub is */ \ 58 /* version of the corresponding stub is */ \
60 /* used universally */ \ 59 /* used universally */ \
61 V(CallICTrampoline) \ 60 V(CallICTrampoline) \
62 V(KeyedStoreICTrampoline) \
63 /* --- HydrogenCodeStubs --- */ \ 61 /* --- HydrogenCodeStubs --- */ \
64 /* These builtins w/ JS linkage are */ \ 62 /* These builtins w/ JS linkage are */ \
65 /* just fast-cases of C++ builtins. They */ \ 63 /* just fast-cases of C++ builtins. They */ \
66 /* require varg support from TF */ \ 64 /* require varg support from TF */ \
67 V(FastArrayPush) \ 65 V(FastArrayPush) \
68 V(FastFunctionBind) \ 66 V(FastFunctionBind) \
69 /* These will be ported/eliminated */ \ 67 /* These will be ported/eliminated */ \
70 /* as part of the new IC system, ask */ \ 68 /* as part of the new IC system, ask */ \
71 /* ishell before doing anything */ \ 69 /* ishell before doing anything */ \
72 V(LoadConstant) \ 70 V(LoadConstant) \
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after
1992 return static_cast<ExtraICState>(minor_key_); 1990 return static_cast<ExtraICState>(minor_key_);
1993 } 1991 }
1994 1992
1995 protected: 1993 protected:
1996 StoreICState state() const { return StoreICState(GetExtraICState()); } 1994 StoreICState state() const { return StoreICState(GetExtraICState()); }
1997 1995
1998 DEFINE_CALL_INTERFACE_DESCRIPTOR(Store); 1996 DEFINE_CALL_INTERFACE_DESCRIPTOR(Store);
1999 DEFINE_TURBOFAN_CODE_STUB(StoreICTrampoline, TurboFanCodeStub); 1997 DEFINE_TURBOFAN_CODE_STUB(StoreICTrampoline, TurboFanCodeStub);
2000 }; 1998 };
2001 1999
2002 class KeyedStoreICTrampolineStub : public PlatformCodeStub {
2003 public:
2004 KeyedStoreICTrampolineStub(Isolate* isolate, const StoreICState& state)
2005 : PlatformCodeStub(isolate) {
2006 minor_key_ = state.GetExtraICState();
2007 }
2008
2009 Code::Kind GetCodeKind() const override { return Code::KEYED_STORE_IC; }
2010
2011 ExtraICState GetExtraICState() const final {
2012 return static_cast<ExtraICState>(minor_key_);
2013 }
2014
2015 protected:
2016 StoreICState state() const { return StoreICState(GetExtraICState()); }
2017
2018 private:
2019 DEFINE_CALL_INTERFACE_DESCRIPTOR(Store);
2020 DEFINE_PLATFORM_CODE_STUB(KeyedStoreICTrampoline, PlatformCodeStub);
2021 };
2022
2023 class KeyedStoreICTrampolineTFStub : public StoreICTrampolineStub { 2000 class KeyedStoreICTrampolineTFStub : public StoreICTrampolineStub {
2024 public: 2001 public:
2025 KeyedStoreICTrampolineTFStub(Isolate* isolate, const StoreICState& state) 2002 KeyedStoreICTrampolineTFStub(Isolate* isolate, const StoreICState& state)
2026 : StoreICTrampolineStub(isolate, state) {} 2003 : StoreICTrampolineStub(isolate, state) {}
2027 2004
2028 Code::Kind GetCodeKind() const override { return Code::KEYED_STORE_IC; } 2005 Code::Kind GetCodeKind() const override { return Code::KEYED_STORE_IC; }
2029 2006
2030 LanguageMode language_mode() const { 2007 LanguageMode language_mode() const {
2031 return StoreICState(GetExtraICState()).language_mode(); 2008 return StoreICState(GetExtraICState()).language_mode();
2032 } 2009 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
2135 } 2112 }
2136 2113
2137 ExtraICState GetExtraICState() const final { 2114 ExtraICState GetExtraICState() const final {
2138 return static_cast<ExtraICState>(minor_key_); 2115 return static_cast<ExtraICState>(minor_key_);
2139 } 2116 }
2140 2117
2141 DEFINE_CALL_INTERFACE_DESCRIPTOR(StoreWithVector); 2118 DEFINE_CALL_INTERFACE_DESCRIPTOR(StoreWithVector);
2142 DEFINE_TURBOFAN_CODE_STUB(StoreIC, TurboFanCodeStub); 2119 DEFINE_TURBOFAN_CODE_STUB(StoreIC, TurboFanCodeStub);
2143 }; 2120 };
2144 2121
2145 class KeyedStoreICStub : public PlatformCodeStub {
2146 public:
2147 KeyedStoreICStub(Isolate* isolate, const StoreICState& state)
2148 : PlatformCodeStub(isolate) {
2149 minor_key_ = state.GetExtraICState();
2150 }
2151
2152 void GenerateForTrampoline(MacroAssembler* masm);
2153
2154 Code::Kind GetCodeKind() const final { return Code::KEYED_STORE_IC; }
2155
2156 ExtraICState GetExtraICState() const final {
2157 return static_cast<ExtraICState>(minor_key_);
2158 }
2159
2160 DEFINE_CALL_INTERFACE_DESCRIPTOR(StoreWithVector);
2161 DEFINE_PLATFORM_CODE_STUB(KeyedStoreIC, PlatformCodeStub);
2162
2163 protected:
2164 void GenerateImpl(MacroAssembler* masm, bool in_frame);
2165 };
2166
2167 class KeyedStoreICTFStub : public StoreICStub { 2122 class KeyedStoreICTFStub : public StoreICStub {
2168 public: 2123 public:
2169 KeyedStoreICTFStub(Isolate* isolate, const StoreICState& state) 2124 KeyedStoreICTFStub(Isolate* isolate, const StoreICState& state)
2170 : StoreICStub(isolate, state) {} 2125 : StoreICStub(isolate, state) {}
2171 2126
2172 Code::Kind GetCodeKind() const override { return Code::KEYED_STORE_IC; } 2127 Code::Kind GetCodeKind() const override { return Code::KEYED_STORE_IC; }
2173 2128
2174 LanguageMode language_mode() const { 2129 LanguageMode language_mode() const {
2175 return StoreICState(GetExtraICState()).language_mode(); 2130 return StoreICState(GetExtraICState()).language_mode();
2176 } 2131 }
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
2703 #undef DEFINE_PLATFORM_CODE_STUB 2658 #undef DEFINE_PLATFORM_CODE_STUB
2704 #undef DEFINE_HANDLER_CODE_STUB 2659 #undef DEFINE_HANDLER_CODE_STUB
2705 #undef DEFINE_HYDROGEN_CODE_STUB 2660 #undef DEFINE_HYDROGEN_CODE_STUB
2706 #undef DEFINE_CODE_STUB 2661 #undef DEFINE_CODE_STUB
2707 #undef DEFINE_CODE_STUB_BASE 2662 #undef DEFINE_CODE_STUB_BASE
2708 2663
2709 } // namespace internal 2664 } // namespace internal
2710 } // namespace v8 2665 } // namespace v8
2711 2666
2712 #endif // V8_CODE_STUBS_H_ 2667 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/code-factory.cc ('k') | src/codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698