OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/feedback-vector.h" | 5 #include "src/feedback-vector.h" |
6 #include "src/code-stubs.h" | 6 #include "src/code-stubs.h" |
7 #include "src/feedback-vector-inl.h" | 7 #include "src/feedback-vector-inl.h" |
8 #include "src/ic/ic-inl.h" | 8 #include "src/ic/ic-inl.h" |
9 #include "src/ic/ic-state.h" | 9 #include "src/ic/ic-state.h" |
10 #include "src/objects.h" | 10 #include "src/objects.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 case FeedbackSlotKind::kCompareOp: | 140 case FeedbackSlotKind::kCompareOp: |
141 return "INTERPRETER_COMPARE_IC"; | 141 return "INTERPRETER_COMPARE_IC"; |
142 case FeedbackSlotKind::kToBoolean: | 142 case FeedbackSlotKind::kToBoolean: |
143 return "TO_BOOLEAN_IC"; | 143 return "TO_BOOLEAN_IC"; |
144 case FeedbackSlotKind::kStoreDataPropertyInLiteral: | 144 case FeedbackSlotKind::kStoreDataPropertyInLiteral: |
145 return "STORE_DATA_PROPERTY_IN_LITERAL_IC"; | 145 return "STORE_DATA_PROPERTY_IN_LITERAL_IC"; |
146 case FeedbackSlotKind::kCreateClosure: | 146 case FeedbackSlotKind::kCreateClosure: |
147 return "kCreateClosure"; | 147 return "kCreateClosure"; |
148 case FeedbackSlotKind::kLiteral: | 148 case FeedbackSlotKind::kLiteral: |
149 return "LITERAL"; | 149 return "LITERAL"; |
| 150 case FeedbackSlotKind::kTypeProfile: |
| 151 return "TYPE_PROFILE"; |
150 case FeedbackSlotKind::kGeneral: | 152 case FeedbackSlotKind::kGeneral: |
151 return "STUB"; | 153 return "STUB"; |
152 case FeedbackSlotKind::kKindsNumber: | 154 case FeedbackSlotKind::kKindsNumber: |
153 break; | 155 break; |
154 } | 156 } |
155 UNREACHABLE(); | 157 UNREACHABLE(); |
156 return "?"; | 158 return "?"; |
157 } | 159 } |
158 | 160 |
159 FeedbackSlotKind FeedbackVector::GetKind(FeedbackSlot slot) const { | 161 FeedbackSlotKind FeedbackVector::GetKind(FeedbackSlot slot) const { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 extra_value = Smi::kZero; | 211 extra_value = Smi::kZero; |
210 break; | 212 break; |
211 case FeedbackSlotKind::kLoadProperty: | 213 case FeedbackSlotKind::kLoadProperty: |
212 case FeedbackSlotKind::kLoadKeyed: | 214 case FeedbackSlotKind::kLoadKeyed: |
213 case FeedbackSlotKind::kStorePropertySloppy: | 215 case FeedbackSlotKind::kStorePropertySloppy: |
214 case FeedbackSlotKind::kStorePropertyStrict: | 216 case FeedbackSlotKind::kStorePropertyStrict: |
215 case FeedbackSlotKind::kStoreKeyedSloppy: | 217 case FeedbackSlotKind::kStoreKeyedSloppy: |
216 case FeedbackSlotKind::kStoreKeyedStrict: | 218 case FeedbackSlotKind::kStoreKeyedStrict: |
217 case FeedbackSlotKind::kStoreDataPropertyInLiteral: | 219 case FeedbackSlotKind::kStoreDataPropertyInLiteral: |
218 case FeedbackSlotKind::kGeneral: | 220 case FeedbackSlotKind::kGeneral: |
| 221 case FeedbackSlotKind::kTypeProfile: |
219 array->set(index, *uninitialized_sentinel, SKIP_WRITE_BARRIER); | 222 array->set(index, *uninitialized_sentinel, SKIP_WRITE_BARRIER); |
220 break; | 223 break; |
221 | 224 |
222 case FeedbackSlotKind::kInvalid: | 225 case FeedbackSlotKind::kInvalid: |
223 case FeedbackSlotKind::kKindsNumber: | 226 case FeedbackSlotKind::kKindsNumber: |
224 UNREACHABLE(); | 227 UNREACHABLE(); |
225 array->set(index, Smi::kZero, SKIP_WRITE_BARRIER); | 228 array->set(index, Smi::kZero, SKIP_WRITE_BARRIER); |
226 break; | 229 break; |
227 } | 230 } |
228 for (int j = 1; j < entry_size; j++) { | 231 for (int j = 1; j < entry_size; j++) { |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 break; | 328 break; |
326 } | 329 } |
327 case FeedbackSlotKind::kBinaryOp: | 330 case FeedbackSlotKind::kBinaryOp: |
328 case FeedbackSlotKind::kCompareOp: { | 331 case FeedbackSlotKind::kCompareOp: { |
329 DCHECK(Get(slot)->IsSmi()); | 332 DCHECK(Get(slot)->IsSmi()); |
330 // don't clear these smi slots. | 333 // don't clear these smi slots. |
331 // Set(slot, Smi::kZero); | 334 // Set(slot, Smi::kZero); |
332 break; | 335 break; |
333 } | 336 } |
334 case FeedbackSlotKind::kCreateClosure: { | 337 case FeedbackSlotKind::kCreateClosure: { |
335 break; | 338 case FeedbackSlotKind::kTypeProfile: |
| 339 break; |
336 } | 340 } |
337 case FeedbackSlotKind::kGeneral: { | 341 case FeedbackSlotKind::kGeneral: { |
338 if (obj->IsHeapObject()) { | 342 if (obj->IsHeapObject()) { |
339 InstanceType instance_type = | 343 InstanceType instance_type = |
340 HeapObject::cast(obj)->map()->instance_type(); | 344 HeapObject::cast(obj)->map()->instance_type(); |
341 // AllocationSites are exempt from clearing. They don't store Maps | 345 // AllocationSites are exempt from clearing. They don't store Maps |
342 // or Code pointers which can cause memory leaks if not cleared | 346 // or Code pointers which can cause memory leaks if not cleared |
343 // regularly. | 347 // regularly. |
344 if (instance_type != ALLOCATION_SITE_TYPE) { | 348 if (instance_type != ALLOCATION_SITE_TYPE) { |
345 Set(slot, uninitialized_sentinel, SKIP_WRITE_BARRIER); | 349 Set(slot, uninitialized_sentinel, SKIP_WRITE_BARRIER); |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1010 void StoreDataPropertyInLiteralICNexus::ConfigureMonomorphic( | 1014 void StoreDataPropertyInLiteralICNexus::ConfigureMonomorphic( |
1011 Handle<Name> name, Handle<Map> receiver_map) { | 1015 Handle<Name> name, Handle<Map> receiver_map) { |
1012 Handle<WeakCell> cell = Map::WeakCellForMap(receiver_map); | 1016 Handle<WeakCell> cell = Map::WeakCellForMap(receiver_map); |
1013 | 1017 |
1014 SetFeedback(*cell); | 1018 SetFeedback(*cell); |
1015 SetFeedbackExtra(*name); | 1019 SetFeedbackExtra(*name); |
1016 } | 1020 } |
1017 | 1021 |
1018 } // namespace internal | 1022 } // namespace internal |
1019 } // namespace v8 | 1023 } // namespace v8 |
OLD | NEW |