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

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

Issue 1838283003: Migrate FastCloneShallowObjectStub to TurboFan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment Created 4 years, 8 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 | « no previous file | 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 V(ArrayNoArgumentConstructor) \ 63 V(ArrayNoArgumentConstructor) \
64 V(ArraySingleArgumentConstructor) \ 64 V(ArraySingleArgumentConstructor) \
65 V(BinaryOpIC) \ 65 V(BinaryOpIC) \
66 V(BinaryOpWithAllocationSite) \ 66 V(BinaryOpWithAllocationSite) \
67 V(CreateAllocationSite) \ 67 V(CreateAllocationSite) \
68 V(CreateWeakCell) \ 68 V(CreateWeakCell) \
69 V(ElementsTransitionAndStore) \ 69 V(ElementsTransitionAndStore) \
70 V(FastArrayPush) \ 70 V(FastArrayPush) \
71 V(FastCloneRegExp) \ 71 V(FastCloneRegExp) \
72 V(FastCloneShallowArray) \ 72 V(FastCloneShallowArray) \
73 V(FastCloneShallowObject) \
74 V(FastNewClosure) \ 73 V(FastNewClosure) \
75 V(FastNewContext) \ 74 V(FastNewContext) \
76 V(FastNewObject) \ 75 V(FastNewObject) \
77 V(FastNewRestParameter) \ 76 V(FastNewRestParameter) \
78 V(FastNewSloppyArguments) \ 77 V(FastNewSloppyArguments) \
79 V(FastNewStrictArguments) \ 78 V(FastNewStrictArguments) \
80 V(GrowArrayElements) \ 79 V(GrowArrayElements) \
81 V(InternalArrayNArgumentsConstructor) \ 80 V(InternalArrayNArgumentsConstructor) \
82 V(InternalArrayNoArgumentConstructor) \ 81 V(InternalArrayNoArgumentConstructor) \
83 V(InternalArraySingleArgumentConstructor) \ 82 V(InternalArraySingleArgumentConstructor) \
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 V(Subtract) \ 114 V(Subtract) \
116 V(Multiply) \ 115 V(Multiply) \
117 V(Divide) \ 116 V(Divide) \
118 V(Modulus) \ 117 V(Modulus) \
119 V(ShiftRight) \ 118 V(ShiftRight) \
120 V(ShiftRightLogical) \ 119 V(ShiftRightLogical) \
121 V(ShiftLeft) \ 120 V(ShiftLeft) \
122 V(BitwiseAnd) \ 121 V(BitwiseAnd) \
123 V(BitwiseOr) \ 122 V(BitwiseOr) \
124 V(BitwiseXor) \ 123 V(BitwiseXor) \
124 V(FastCloneShallowObject) \
125 V(LessThan) \ 125 V(LessThan) \
126 V(LessThanOrEqual) \ 126 V(LessThanOrEqual) \
127 V(GreaterThan) \ 127 V(GreaterThan) \
128 V(GreaterThanOrEqual) \ 128 V(GreaterThanOrEqual) \
129 V(Equal) \ 129 V(Equal) \
130 V(NotEqual) \ 130 V(NotEqual) \
131 V(StrictEqual) \ 131 V(StrictEqual) \
132 V(StrictNotEqual) \ 132 V(StrictNotEqual) \
133 V(StringEqual) \ 133 V(StringEqual) \
134 V(StringNotEqual) \ 134 V(StringNotEqual) \
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 return AllocationSiteModeBits::decode(sub_minor_key()); 1099 return AllocationSiteModeBits::decode(sub_minor_key());
1100 } 1100 }
1101 1101
1102 private: 1102 private:
1103 class AllocationSiteModeBits: public BitField<AllocationSiteMode, 0, 1> {}; 1103 class AllocationSiteModeBits: public BitField<AllocationSiteMode, 0, 1> {};
1104 1104
1105 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastCloneShallowArray); 1105 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastCloneShallowArray);
1106 DEFINE_HYDROGEN_CODE_STUB(FastCloneShallowArray, HydrogenCodeStub); 1106 DEFINE_HYDROGEN_CODE_STUB(FastCloneShallowArray, HydrogenCodeStub);
1107 }; 1107 };
1108 1108
1109 1109 class FastCloneShallowObjectStub : public TurboFanCodeStub {
1110 class FastCloneShallowObjectStub : public HydrogenCodeStub {
1111 public: 1110 public:
1112 // Maximum number of properties in copied object. 1111 // Maximum number of properties in copied object.
1113 static const int kMaximumClonedProperties = 6; 1112 static const int kMaximumClonedProperties = 6;
1114 1113
1115 FastCloneShallowObjectStub(Isolate* isolate, int length) 1114 FastCloneShallowObjectStub(Isolate* isolate, int length)
1116 : HydrogenCodeStub(isolate) { 1115 : TurboFanCodeStub(isolate) {
1117 DCHECK_GE(length, 0); 1116 DCHECK_GE(length, 0);
1118 DCHECK_LE(length, kMaximumClonedProperties); 1117 DCHECK_LE(length, kMaximumClonedProperties);
1119 set_sub_minor_key(LengthBits::encode(length)); 1118 minor_key_ = LengthBits::encode(LengthBits::encode(length));
1120 } 1119 }
1121 1120
1122 int length() const { return LengthBits::decode(sub_minor_key()); } 1121 int length() const { return LengthBits::decode(minor_key_); }
1123 1122
1124 private: 1123 private:
1125 class LengthBits : public BitField<int, 0, 4> {}; 1124 class LengthBits : public BitField<int, 0, 4> {};
1126 1125
1127 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastCloneShallowObject); 1126 DEFINE_CALL_INTERFACE_DESCRIPTOR(FastCloneShallowObject);
1128 DEFINE_HYDROGEN_CODE_STUB(FastCloneShallowObject, HydrogenCodeStub); 1127 DEFINE_TURBOFAN_CODE_STUB(FastCloneShallowObject, TurboFanCodeStub);
1129 }; 1128 };
1130 1129
1131 1130
1132 class CreateAllocationSiteStub : public HydrogenCodeStub { 1131 class CreateAllocationSiteStub : public HydrogenCodeStub {
1133 public: 1132 public:
1134 explicit CreateAllocationSiteStub(Isolate* isolate) 1133 explicit CreateAllocationSiteStub(Isolate* isolate)
1135 : HydrogenCodeStub(isolate) { } 1134 : HydrogenCodeStub(isolate) { }
1136 1135
1137 static void GenerateAheadOfTime(Isolate* isolate); 1136 static void GenerateAheadOfTime(Isolate* isolate);
1138 1137
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after
3164 #undef DEFINE_HYDROGEN_CODE_STUB 3163 #undef DEFINE_HYDROGEN_CODE_STUB
3165 #undef DEFINE_CODE_STUB 3164 #undef DEFINE_CODE_STUB
3166 #undef DEFINE_CODE_STUB_BASE 3165 #undef DEFINE_CODE_STUB_BASE
3167 3166
3168 extern Representation RepresentationFromType(Type* type); 3167 extern Representation RepresentationFromType(Type* type);
3169 3168
3170 } // namespace internal 3169 } // namespace internal
3171 } // namespace v8 3170 } // namespace v8
3172 3171
3173 #endif // V8_CODE_STUBS_H_ 3172 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « no previous file | src/code-stubs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698