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

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

Issue 1332563003: Vector ICs: No more patching for call ics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix x64 build break. Created 5 years, 3 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/arm64/code-stubs-arm64.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/codegen.h" 10 #include "src/codegen.h"
(...skipping 11 matching lines...) Expand all
22 /* PlatformCodeStubs */ \ 22 /* PlatformCodeStubs */ \
23 V(ArgumentsAccess) \ 23 V(ArgumentsAccess) \
24 V(ArrayConstructor) \ 24 V(ArrayConstructor) \
25 V(BinaryOpICWithAllocationSite) \ 25 V(BinaryOpICWithAllocationSite) \
26 V(CallApiFunction) \ 26 V(CallApiFunction) \
27 V(CallApiAccessor) \ 27 V(CallApiAccessor) \
28 V(CallApiGetter) \ 28 V(CallApiGetter) \
29 V(CallConstruct) \ 29 V(CallConstruct) \
30 V(CallFunction) \ 30 V(CallFunction) \
31 V(CallIC) \ 31 V(CallIC) \
32 V(CallIC_Array) \
33 V(CEntry) \ 32 V(CEntry) \
34 V(CompareIC) \ 33 V(CompareIC) \
35 V(DoubleToI) \ 34 V(DoubleToI) \
36 V(FunctionPrototype) \ 35 V(FunctionPrototype) \
37 V(InstanceOf) \ 36 V(InstanceOf) \
38 V(InternalArrayConstructor) \ 37 V(InternalArrayConstructor) \
39 V(JSEntry) \ 38 V(JSEntry) \
40 V(KeyedLoadICTrampoline) \ 39 V(KeyedLoadICTrampoline) \
41 V(LoadICTrampoline) \ 40 V(LoadICTrampoline) \
42 V(CallICTrampoline) \ 41 V(CallICTrampoline) \
43 V(CallIC_ArrayTrampoline) \
44 V(LoadIndexedInterceptor) \ 42 V(LoadIndexedInterceptor) \
45 V(LoadIndexedString) \ 43 V(LoadIndexedString) \
46 V(MathPow) \ 44 V(MathPow) \
47 V(ProfileEntryHook) \ 45 V(ProfileEntryHook) \
48 V(RecordWrite) \ 46 V(RecordWrite) \
49 V(RegExpExec) \ 47 V(RegExpExec) \
50 V(StoreArrayLiteralElement) \ 48 V(StoreArrayLiteralElement) \
51 V(StoreBufferOverflow) \ 49 V(StoreBufferOverflow) \
52 V(StoreElement) \ 50 V(StoreElement) \
53 V(StringCompare) \ 51 V(StringCompare) \
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 } 980 }
983 981
984 int arg_count() const { return state().arg_count(); } 982 int arg_count() const { return state().arg_count(); }
985 983
986 CallICState state() const { 984 CallICState state() const {
987 return CallICState(static_cast<ExtraICState>(minor_key_)); 985 return CallICState(static_cast<ExtraICState>(minor_key_));
988 } 986 }
989 987
990 // Code generation helpers. 988 // Code generation helpers.
991 void GenerateMiss(MacroAssembler* masm); 989 void GenerateMiss(MacroAssembler* masm);
990 void HandleArrayCase(MacroAssembler* masm, Label* miss);
992 991
993 private: 992 private:
994 void PrintState(std::ostream& os) const override; // NOLINT 993 void PrintState(std::ostream& os) const override; // NOLINT
995 994
996 DEFINE_CALL_INTERFACE_DESCRIPTOR(CallFunctionWithFeedbackAndVector); 995 DEFINE_CALL_INTERFACE_DESCRIPTOR(CallFunctionWithFeedbackAndVector);
997 DEFINE_PLATFORM_CODE_STUB(CallIC, PlatformCodeStub); 996 DEFINE_PLATFORM_CODE_STUB(CallIC, PlatformCodeStub);
998 }; 997 };
999 998
1000 999
1001 class CallIC_ArrayStub: public CallICStub {
1002 public:
1003 CallIC_ArrayStub(Isolate* isolate, const CallICState& state_in)
1004 : CallICStub(isolate, state_in) {}
1005
1006 InlineCacheState GetICState() const final { return MONOMORPHIC; }
1007
1008 private:
1009 void PrintState(std::ostream& os) const override; // NOLINT
1010
1011 DEFINE_PLATFORM_CODE_STUB(CallIC_Array, CallICStub);
1012 };
1013
1014
1015 // TODO(verwaest): Translate to hydrogen code stub. 1000 // TODO(verwaest): Translate to hydrogen code stub.
1016 class FunctionPrototypeStub : public PlatformCodeStub { 1001 class FunctionPrototypeStub : public PlatformCodeStub {
1017 public: 1002 public:
1018 explicit FunctionPrototypeStub(Isolate* isolate) 1003 explicit FunctionPrototypeStub(Isolate* isolate)
1019 : PlatformCodeStub(isolate) {} 1004 : PlatformCodeStub(isolate) {}
1020 1005
1021 Code::Kind GetCodeKind() const override { return Code::HANDLER; } 1006 Code::Kind GetCodeKind() const override { return Code::HANDLER; }
1022 1007
1023 // TODO(mvstanton): only the receiver register is accessed. When this is 1008 // TODO(mvstanton): only the receiver register is accessed. When this is
1024 // translated to a hydrogen code stub, a new CallInterfaceDescriptor 1009 // translated to a hydrogen code stub, a new CallInterfaceDescriptor
(...skipping 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after
2332 protected: 2317 protected:
2333 CallICState state() const { 2318 CallICState state() const {
2334 return CallICState(static_cast<ExtraICState>(minor_key_)); 2319 return CallICState(static_cast<ExtraICState>(minor_key_));
2335 } 2320 }
2336 2321
2337 DEFINE_CALL_INTERFACE_DESCRIPTOR(CallFunctionWithFeedback); 2322 DEFINE_CALL_INTERFACE_DESCRIPTOR(CallFunctionWithFeedback);
2338 DEFINE_PLATFORM_CODE_STUB(CallICTrampoline, PlatformCodeStub); 2323 DEFINE_PLATFORM_CODE_STUB(CallICTrampoline, PlatformCodeStub);
2339 }; 2324 };
2340 2325
2341 2326
2342 class CallIC_ArrayTrampolineStub : public CallICTrampolineStub {
2343 public:
2344 CallIC_ArrayTrampolineStub(Isolate* isolate, const CallICState& state)
2345 : CallICTrampolineStub(isolate, state) {}
2346
2347 private:
2348 DEFINE_PLATFORM_CODE_STUB(CallIC_ArrayTrampoline, CallICTrampolineStub);
2349 };
2350
2351
2352 class LoadICStub : public PlatformCodeStub { 2327 class LoadICStub : public PlatformCodeStub {
2353 public: 2328 public:
2354 explicit LoadICStub(Isolate* isolate, const LoadICState& state) 2329 explicit LoadICStub(Isolate* isolate, const LoadICState& state)
2355 : PlatformCodeStub(isolate) { 2330 : PlatformCodeStub(isolate) {
2356 minor_key_ = state.GetExtraICState(); 2331 minor_key_ = state.GetExtraICState();
2357 } 2332 }
2358 2333
2359 void GenerateForTrampoline(MacroAssembler* masm); 2334 void GenerateForTrampoline(MacroAssembler* masm);
2360 2335
2361 Code::Kind GetCodeKind() const override { return Code::LOAD_IC; } 2336 Code::Kind GetCodeKind() const override { return Code::LOAD_IC; }
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
3098 #undef DEFINE_PLATFORM_CODE_STUB 3073 #undef DEFINE_PLATFORM_CODE_STUB
3099 #undef DEFINE_HANDLER_CODE_STUB 3074 #undef DEFINE_HANDLER_CODE_STUB
3100 #undef DEFINE_HYDROGEN_CODE_STUB 3075 #undef DEFINE_HYDROGEN_CODE_STUB
3101 #undef DEFINE_CODE_STUB 3076 #undef DEFINE_CODE_STUB
3102 #undef DEFINE_CODE_STUB_BASE 3077 #undef DEFINE_CODE_STUB_BASE
3103 3078
3104 extern Representation RepresentationFromType(Type* type); 3079 extern Representation RepresentationFromType(Type* type);
3105 } } // namespace v8::internal 3080 } } // namespace v8::internal
3106 3081
3107 #endif // V8_CODE_STUBS_H_ 3082 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698