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

Side by Side Diff: src/type-feedback-vector-inl.h

Issue 2361043002: [Ignition] Use binary operation feedback from Ignition to Crankshaft. (Closed)
Patch Set: Removed iostream from type-info.cc Created 4 years, 2 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_TYPE_FEEDBACK_VECTOR_INL_H_ 5 #ifndef V8_TYPE_FEEDBACK_VECTOR_INL_H_
6 #define V8_TYPE_FEEDBACK_VECTOR_INL_H_ 6 #define V8_TYPE_FEEDBACK_VECTOR_INL_H_
7 7
8 #include "src/globals.h" 8 #include "src/globals.h"
9 #include "src/type-feedback-vector.h" 9 #include "src/type-feedback-vector.h"
10 10
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 117
118 void TypeFeedbackVector::Set(FeedbackVectorSlot slot, Object* value, 118 void TypeFeedbackVector::Set(FeedbackVectorSlot slot, Object* value,
119 WriteBarrierMode mode) { 119 WriteBarrierMode mode) {
120 set(GetIndex(slot), value, mode); 120 set(GetIndex(slot), value, mode);
121 } 121 }
122 122
123 // Helper function to transform the feedback to BinaryOperationHint. 123 // Helper function to transform the feedback to BinaryOperationHint.
124 BinaryOperationHint BinaryOperationHintFromFeedback(int type_feedback) { 124 BinaryOperationHint BinaryOperationHintFromFeedback(int type_feedback) {
125 switch (type_feedback) { 125 switch (type_feedback) {
126 case BinaryOperationFeedback::kNone:
127 return BinaryOperationHint::kNone;
126 case BinaryOperationFeedback::kSignedSmall: 128 case BinaryOperationFeedback::kSignedSmall:
127 return BinaryOperationHint::kSignedSmall; 129 return BinaryOperationHint::kSignedSmall;
128 case BinaryOperationFeedback::kNumber: 130 case BinaryOperationFeedback::kNumber:
129 return BinaryOperationHint::kNumberOrOddball; 131 return BinaryOperationHint::kNumberOrOddball;
130 case BinaryOperationFeedback::kAny: 132 case BinaryOperationFeedback::kAny:
131 default: 133 default:
132 return BinaryOperationHint::kAny; 134 return BinaryOperationHint::kAny;
133 } 135 }
134 UNREACHABLE(); 136 UNREACHABLE();
135 return BinaryOperationHint::kNone; 137 return BinaryOperationHint::kNone;
136 } 138 }
137 139
138 // Helper function to transform the feedback to CompareOperationHint. 140 // Helper function to transform the feedback to CompareOperationHint.
139 CompareOperationHint CompareOperationHintFromFeedback(int type_feedback) { 141 CompareOperationHint CompareOperationHintFromFeedback(int type_feedback) {
140 switch (type_feedback) { 142 switch (type_feedback) {
143 case CompareOperationFeedback::kNone:
144 return CompareOperationHint::kNone;
141 case CompareOperationFeedback::kSignedSmall: 145 case CompareOperationFeedback::kSignedSmall:
142 return CompareOperationHint::kSignedSmall; 146 return CompareOperationHint::kSignedSmall;
143 case CompareOperationFeedback::kNumber: 147 case CompareOperationFeedback::kNumber:
144 return CompareOperationHint::kNumber; 148 return CompareOperationHint::kNumber;
145 default: 149 default:
146 return CompareOperationHint::kAny; 150 return CompareOperationHint::kAny;
147 } 151 }
152 UNREACHABLE();
153 return CompareOperationHint::kNone;
148 } 154 }
149 155
150 void TypeFeedbackVector::ComputeCounts(int* with_type_info, int* generic, 156 void TypeFeedbackVector::ComputeCounts(int* with_type_info, int* generic,
151 int* vector_ic_count, 157 int* vector_ic_count,
152 bool code_is_interpreted) { 158 bool code_is_interpreted) {
153 Object* uninitialized_sentinel = 159 Object* uninitialized_sentinel =
154 TypeFeedbackVector::RawUninitializedSentinel(GetIsolate()); 160 TypeFeedbackVector::RawUninitializedSentinel(GetIsolate());
155 Object* megamorphic_sentinel = 161 Object* megamorphic_sentinel =
156 *TypeFeedbackVector::MegamorphicSentinel(GetIsolate()); 162 *TypeFeedbackVector::MegamorphicSentinel(GetIsolate());
157 int with = 0; 163 int with = 0;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 int index = vector()->GetIndex(slot()) + 1; 276 int index = vector()->GetIndex(slot()) + 1;
271 vector()->set(index, feedback_extra, mode); 277 vector()->set(index, feedback_extra, mode);
272 } 278 }
273 279
274 280
275 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); } 281 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); }
276 } // namespace internal 282 } // namespace internal
277 } // namespace v8 283 } // namespace v8
278 284
279 #endif // V8_TYPE_FEEDBACK_VECTOR_INL_H_ 285 #endif // V8_TYPE_FEEDBACK_VECTOR_INL_H_
OLDNEW
« no previous file with comments | « src/crankshaft/typing.cc ('k') | src/type-info.h » ('j') | src/type-info.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698