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

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

Issue 1987183002: [stubs] Convert Internal/ArraySingleArgumentsConstructor to a TurboFan stub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review feedback Created 4 years, 7 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-stub-assembler.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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 V(StringToNumber) \ 50 V(StringToNumber) \
51 V(ToString) \ 51 V(ToString) \
52 V(ToName) \ 52 V(ToName) \
53 V(ToObject) \ 53 V(ToObject) \
54 V(VectorStoreICTrampoline) \ 54 V(VectorStoreICTrampoline) \
55 V(VectorKeyedStoreICTrampoline) \ 55 V(VectorKeyedStoreICTrampoline) \
56 V(VectorStoreIC) \ 56 V(VectorStoreIC) \
57 V(VectorKeyedStoreIC) \ 57 V(VectorKeyedStoreIC) \
58 /* HydrogenCodeStubs */ \ 58 /* HydrogenCodeStubs */ \
59 V(ArrayNArgumentsConstructor) \ 59 V(ArrayNArgumentsConstructor) \
60 V(ArraySingleArgumentConstructor) \
61 V(BinaryOpIC) \ 60 V(BinaryOpIC) \
62 V(BinaryOpWithAllocationSite) \ 61 V(BinaryOpWithAllocationSite) \
63 V(CreateAllocationSite) \ 62 V(CreateAllocationSite) \
64 V(CreateWeakCell) \ 63 V(CreateWeakCell) \
65 V(ElementsTransitionAndStore) \ 64 V(ElementsTransitionAndStore) \
66 V(FastArrayPush) \ 65 V(FastArrayPush) \
67 V(FastCloneRegExp) \ 66 V(FastCloneRegExp) \
68 V(FastCloneShallowArray) \ 67 V(FastCloneShallowArray) \
69 V(FastNewClosure) \ 68 V(FastNewClosure) \
70 V(FastNewContext) \ 69 V(FastNewContext) \
71 V(FastNewObject) \ 70 V(FastNewObject) \
72 V(FastNewRestParameter) \ 71 V(FastNewRestParameter) \
73 V(FastNewSloppyArguments) \ 72 V(FastNewSloppyArguments) \
74 V(FastNewStrictArguments) \ 73 V(FastNewStrictArguments) \
75 V(GrowArrayElements) \ 74 V(GrowArrayElements) \
76 V(InternalArrayNArgumentsConstructor) \ 75 V(InternalArrayNArgumentsConstructor) \
77 V(InternalArraySingleArgumentConstructor) \
78 V(KeyedLoadGeneric) \ 76 V(KeyedLoadGeneric) \
79 V(LoadGlobalViaContext) \ 77 V(LoadGlobalViaContext) \
80 V(LoadScriptContextField) \ 78 V(LoadScriptContextField) \
81 V(LoadDictionaryElement) \ 79 V(LoadDictionaryElement) \
82 V(NameDictionaryLookup) \ 80 V(NameDictionaryLookup) \
83 V(NumberToString) \ 81 V(NumberToString) \
84 V(Typeof) \ 82 V(Typeof) \
85 V(RegExpConstructResult) \ 83 V(RegExpConstructResult) \
86 V(StoreFastElement) \ 84 V(StoreFastElement) \
87 V(StoreGlobalViaContext) \ 85 V(StoreGlobalViaContext) \
88 V(StoreScriptContextField) \ 86 V(StoreScriptContextField) \
89 V(StringAdd) \ 87 V(StringAdd) \
90 V(ToBooleanIC) \ 88 V(ToBooleanIC) \
91 V(TransitionElementsKind) \ 89 V(TransitionElementsKind) \
92 V(KeyedLoadIC) \ 90 V(KeyedLoadIC) \
93 V(LoadIC) \ 91 V(LoadIC) \
94 /* TurboFanCodeStubs */ \ 92 /* TurboFanCodeStubs */ \
95 V(AllocateHeapNumber) \ 93 V(AllocateHeapNumber) \
96 V(AllocateFloat32x4) \ 94 V(AllocateFloat32x4) \
97 V(AllocateInt32x4) \ 95 V(AllocateInt32x4) \
98 V(AllocateUint32x4) \ 96 V(AllocateUint32x4) \
99 V(AllocateBool32x4) \ 97 V(AllocateBool32x4) \
100 V(AllocateInt16x8) \ 98 V(AllocateInt16x8) \
101 V(AllocateUint16x8) \ 99 V(AllocateUint16x8) \
102 V(AllocateBool16x8) \ 100 V(AllocateBool16x8) \
103 V(AllocateInt8x16) \ 101 V(AllocateInt8x16) \
104 V(AllocateUint8x16) \ 102 V(AllocateUint8x16) \
105 V(AllocateBool8x16) \ 103 V(AllocateBool8x16) \
106 V(ArrayNoArgumentConstructor) \ 104 V(ArrayNoArgumentConstructor) \
105 V(ArraySingleArgumentConstructor) \
107 V(StringLength) \ 106 V(StringLength) \
108 V(Add) \ 107 V(Add) \
109 V(Subtract) \ 108 V(Subtract) \
110 V(Multiply) \ 109 V(Multiply) \
111 V(Divide) \ 110 V(Divide) \
112 V(Modulus) \ 111 V(Modulus) \
113 V(ShiftRight) \ 112 V(ShiftRight) \
114 V(ShiftRightLogical) \ 113 V(ShiftRightLogical) \
115 V(ShiftLeft) \ 114 V(ShiftLeft) \
116 V(BitwiseAnd) \ 115 V(BitwiseAnd) \
117 V(BitwiseOr) \ 116 V(BitwiseOr) \
118 V(BitwiseXor) \ 117 V(BitwiseXor) \
119 V(Inc) \ 118 V(Inc) \
120 V(InternalArrayNoArgumentConstructor) \ 119 V(InternalArrayNoArgumentConstructor) \
120 V(InternalArraySingleArgumentConstructor) \
121 V(Dec) \ 121 V(Dec) \
122 V(FastCloneShallowObject) \ 122 V(FastCloneShallowObject) \
123 V(InstanceOf) \ 123 V(InstanceOf) \
124 V(LessThan) \ 124 V(LessThan) \
125 V(LessThanOrEqual) \ 125 V(LessThanOrEqual) \
126 V(GreaterThan) \ 126 V(GreaterThan) \
127 V(GreaterThanOrEqual) \ 127 V(GreaterThanOrEqual) \
128 V(Equal) \ 128 V(Equal) \
129 V(NotEqual) \ 129 V(NotEqual) \
130 V(StrictEqual) \ 130 V(StrictEqual) \
(...skipping 2773 matching lines...) Expand 10 before | Expand all | Expand 10 after
2904 private: 2904 private:
2905 void PrintName(std::ostream& os) const override { // NOLINT 2905 void PrintName(std::ostream& os) const override { // NOLINT
2906 os << "InternalArrayNoArgumentConstructorStub"; 2906 os << "InternalArrayNoArgumentConstructorStub";
2907 } 2907 }
2908 2908
2909 DEFINE_CALL_INTERFACE_DESCRIPTOR(ArrayNoArgumentConstructor); 2909 DEFINE_CALL_INTERFACE_DESCRIPTOR(ArrayNoArgumentConstructor);
2910 DEFINE_TURBOFAN_CODE_STUB(InternalArrayNoArgumentConstructor, 2910 DEFINE_TURBOFAN_CODE_STUB(InternalArrayNoArgumentConstructor,
2911 CommonArrayConstructorStub); 2911 CommonArrayConstructorStub);
2912 }; 2912 };
2913 2913
2914 class ArraySingleArgumentConstructorStub : public ArrayConstructorStubBase { 2914 class ArraySingleArgumentConstructorStub : public CommonArrayConstructorStub {
2915 public: 2915 public:
2916 ArraySingleArgumentConstructorStub( 2916 ArraySingleArgumentConstructorStub(
2917 Isolate* isolate, 2917 Isolate* isolate, ElementsKind kind,
2918 ElementsKind kind,
2919 AllocationSiteOverrideMode override_mode = DONT_OVERRIDE) 2918 AllocationSiteOverrideMode override_mode = DONT_OVERRIDE)
2920 : ArrayConstructorStubBase(isolate, kind, override_mode) { 2919 : CommonArrayConstructorStub(isolate, kind, override_mode) {}
2921 }
2922 2920
2923 private: 2921 private:
2924 void PrintName(std::ostream& os) const override { // NOLINT 2922 void PrintName(std::ostream& os) const override { // NOLINT
2925 BasePrintName(os, "ArraySingleArgumentConstructorStub"); 2923 os << "ArraySingleArgumentConstructorStub";
2926 } 2924 }
2927 2925
2928 DEFINE_CALL_INTERFACE_DESCRIPTOR(ArrayConstructor); 2926 DEFINE_CALL_INTERFACE_DESCRIPTOR(ArraySingleArgumentConstructor);
2929 DEFINE_HYDROGEN_CODE_STUB(ArraySingleArgumentConstructor, 2927 DEFINE_TURBOFAN_CODE_STUB(ArraySingleArgumentConstructor,
2930 ArrayConstructorStubBase); 2928 CommonArrayConstructorStub);
2931 }; 2929 };
2932 2930
2931 class InternalArraySingleArgumentConstructorStub
2932 : public CommonArrayConstructorStub {
2933 public:
2934 InternalArraySingleArgumentConstructorStub(Isolate* isolate,
2935 ElementsKind kind)
2936 : CommonArrayConstructorStub(isolate, kind, DONT_OVERRIDE) {}
2937
2938 private:
2939 void PrintName(std::ostream& os) const override { // NOLINT
2940 os << "InternalArraySingleArgumentConstructorStub";
2941 }
2942
2943 DEFINE_CALL_INTERFACE_DESCRIPTOR(ArraySingleArgumentConstructor);
2944 DEFINE_TURBOFAN_CODE_STUB(InternalArraySingleArgumentConstructor,
2945 CommonArrayConstructorStub);
2946 };
2933 2947
2934 class ArrayNArgumentsConstructorStub : public ArrayConstructorStubBase { 2948 class ArrayNArgumentsConstructorStub : public ArrayConstructorStubBase {
2935 public: 2949 public:
2936 ArrayNArgumentsConstructorStub( 2950 ArrayNArgumentsConstructorStub(
2937 Isolate* isolate, 2951 Isolate* isolate,
2938 ElementsKind kind, 2952 ElementsKind kind,
2939 AllocationSiteOverrideMode override_mode = DONT_OVERRIDE) 2953 AllocationSiteOverrideMode override_mode = DONT_OVERRIDE)
2940 : ArrayConstructorStubBase(isolate, kind, override_mode) { 2954 : ArrayConstructorStubBase(isolate, kind, override_mode) {
2941 } 2955 }
2942 2956
(...skipping 24 matching lines...) Expand all
2967 return ElementsKindBits::decode(sub_minor_key()); 2981 return ElementsKindBits::decode(sub_minor_key());
2968 } 2982 }
2969 2983
2970 private: 2984 private:
2971 class ElementsKindBits : public BitField<ElementsKind, 0, 8> {}; 2985 class ElementsKindBits : public BitField<ElementsKind, 0, 8> {};
2972 2986
2973 DEFINE_CODE_STUB_BASE(InternalArrayConstructorStubBase, HydrogenCodeStub); 2987 DEFINE_CODE_STUB_BASE(InternalArrayConstructorStubBase, HydrogenCodeStub);
2974 }; 2988 };
2975 2989
2976 2990
2977 class InternalArraySingleArgumentConstructorStub : public
2978 InternalArrayConstructorStubBase {
2979 public:
2980 InternalArraySingleArgumentConstructorStub(Isolate* isolate,
2981 ElementsKind kind)
2982 : InternalArrayConstructorStubBase(isolate, kind) { }
2983
2984 DEFINE_CALL_INTERFACE_DESCRIPTOR(InternalArrayConstructor);
2985 DEFINE_HYDROGEN_CODE_STUB(InternalArraySingleArgumentConstructor,
2986 InternalArrayConstructorStubBase);
2987 };
2988
2989
2990 class InternalArrayNArgumentsConstructorStub : public 2991 class InternalArrayNArgumentsConstructorStub : public
2991 InternalArrayConstructorStubBase { 2992 InternalArrayConstructorStubBase {
2992 public: 2993 public:
2993 InternalArrayNArgumentsConstructorStub(Isolate* isolate, ElementsKind kind) 2994 InternalArrayNArgumentsConstructorStub(Isolate* isolate, ElementsKind kind)
2994 : InternalArrayConstructorStubBase(isolate, kind) { } 2995 : InternalArrayConstructorStubBase(isolate, kind) { }
2995 2996
2996 DEFINE_CALL_INTERFACE_DESCRIPTOR(InternalArrayConstructor); 2997 DEFINE_CALL_INTERFACE_DESCRIPTOR(InternalArrayConstructor);
2997 DEFINE_HYDROGEN_CODE_STUB(InternalArrayNArgumentsConstructor, 2998 DEFINE_HYDROGEN_CODE_STUB(InternalArrayNArgumentsConstructor,
2998 InternalArrayConstructorStubBase); 2999 InternalArrayConstructorStubBase);
2999 }; 3000 };
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
3260 #undef DEFINE_HYDROGEN_CODE_STUB 3261 #undef DEFINE_HYDROGEN_CODE_STUB
3261 #undef DEFINE_CODE_STUB 3262 #undef DEFINE_CODE_STUB
3262 #undef DEFINE_CODE_STUB_BASE 3263 #undef DEFINE_CODE_STUB_BASE
3263 3264
3264 extern Representation RepresentationFromType(Type* type); 3265 extern Representation RepresentationFromType(Type* type);
3265 3266
3266 } // namespace internal 3267 } // namespace internal
3267 } // namespace v8 3268 } // namespace v8
3268 3269
3269 #endif // V8_CODE_STUBS_H_ 3270 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/code-stub-assembler.cc ('k') | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698