OLD | NEW |
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_FEEDBACK_VECTOR_INL_H_ | 5 #ifndef V8_FEEDBACK_VECTOR_INL_H_ |
6 #define V8_FEEDBACK_VECTOR_INL_H_ | 6 #define V8_FEEDBACK_VECTOR_INL_H_ |
7 | 7 |
8 #include "src/factory.h" | 8 #include "src/factory.h" |
9 #include "src/feedback-vector.h" | 9 #include "src/feedback-vector.h" |
10 #include "src/globals.h" | 10 #include "src/globals.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 case FeedbackSlotKind::kCall: | 59 case FeedbackSlotKind::kCall: |
60 case FeedbackSlotKind::kLoadProperty: | 60 case FeedbackSlotKind::kLoadProperty: |
61 case FeedbackSlotKind::kLoadGlobalInsideTypeof: | 61 case FeedbackSlotKind::kLoadGlobalInsideTypeof: |
62 case FeedbackSlotKind::kLoadGlobalNotInsideTypeof: | 62 case FeedbackSlotKind::kLoadGlobalNotInsideTypeof: |
63 case FeedbackSlotKind::kLoadKeyed: | 63 case FeedbackSlotKind::kLoadKeyed: |
64 case FeedbackSlotKind::kStorePropertySloppy: | 64 case FeedbackSlotKind::kStorePropertySloppy: |
65 case FeedbackSlotKind::kStorePropertyStrict: | 65 case FeedbackSlotKind::kStorePropertyStrict: |
66 case FeedbackSlotKind::kStoreKeyedSloppy: | 66 case FeedbackSlotKind::kStoreKeyedSloppy: |
67 case FeedbackSlotKind::kStoreKeyedStrict: | 67 case FeedbackSlotKind::kStoreKeyedStrict: |
68 case FeedbackSlotKind::kStoreDataPropertyInLiteral: | 68 case FeedbackSlotKind::kStoreDataPropertyInLiteral: |
| 69 case FeedbackSlotKind::kTypeProfile: |
69 return 2; | 70 return 2; |
70 | 71 |
71 case FeedbackSlotKind::kInvalid: | 72 case FeedbackSlotKind::kInvalid: |
72 case FeedbackSlotKind::kKindsNumber: | 73 case FeedbackSlotKind::kKindsNumber: |
73 UNREACHABLE(); | 74 UNREACHABLE(); |
74 break; | 75 break; |
75 } | 76 } |
76 return 1; | 77 return 1; |
77 } | 78 } |
78 | 79 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 switch (kind) { | 178 switch (kind) { |
178 case FeedbackSlotKind::kCall: | 179 case FeedbackSlotKind::kCall: |
179 case FeedbackSlotKind::kLoadProperty: | 180 case FeedbackSlotKind::kLoadProperty: |
180 case FeedbackSlotKind::kLoadGlobalInsideTypeof: | 181 case FeedbackSlotKind::kLoadGlobalInsideTypeof: |
181 case FeedbackSlotKind::kLoadGlobalNotInsideTypeof: | 182 case FeedbackSlotKind::kLoadGlobalNotInsideTypeof: |
182 case FeedbackSlotKind::kLoadKeyed: | 183 case FeedbackSlotKind::kLoadKeyed: |
183 case FeedbackSlotKind::kStorePropertySloppy: | 184 case FeedbackSlotKind::kStorePropertySloppy: |
184 case FeedbackSlotKind::kStorePropertyStrict: | 185 case FeedbackSlotKind::kStorePropertyStrict: |
185 case FeedbackSlotKind::kStoreKeyedSloppy: | 186 case FeedbackSlotKind::kStoreKeyedSloppy: |
186 case FeedbackSlotKind::kStoreKeyedStrict: | 187 case FeedbackSlotKind::kStoreKeyedStrict: |
187 case FeedbackSlotKind::kStoreDataPropertyInLiteral: { | 188 case FeedbackSlotKind::kStoreDataPropertyInLiteral: |
| 189 case FeedbackSlotKind::kTypeProfile: { |
188 if (obj->IsWeakCell() || obj->IsFixedArray() || obj->IsString()) { | 190 if (obj->IsWeakCell() || obj->IsFixedArray() || obj->IsString()) { |
189 with++; | 191 with++; |
190 } else if (obj == megamorphic_sentinel) { | 192 } else if (obj == megamorphic_sentinel) { |
191 gen++; | 193 gen++; |
192 if (code_is_interpreted) with++; | 194 if (code_is_interpreted) with++; |
193 } | 195 } |
194 total++; | 196 total++; |
195 break; | 197 break; |
196 } | 198 } |
197 case FeedbackSlotKind::kBinaryOp: | 199 case FeedbackSlotKind::kBinaryOp: |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 #endif | 304 #endif |
303 int index = vector()->GetIndex(slot()) + 1; | 305 int index = vector()->GetIndex(slot()) + 1; |
304 vector()->set(index, feedback_extra, mode); | 306 vector()->set(index, feedback_extra, mode); |
305 } | 307 } |
306 | 308 |
307 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); } | 309 Isolate* FeedbackNexus::GetIsolate() const { return vector()->GetIsolate(); } |
308 } // namespace internal | 310 } // namespace internal |
309 } // namespace v8 | 311 } // namespace v8 |
310 | 312 |
311 #endif // V8_FEEDBACK_VECTOR_INL_H_ | 313 #endif // V8_FEEDBACK_VECTOR_INL_H_ |
OLD | NEW |