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 #include "src/heap/heap.h" | 5 #include "src/heap/heap.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 return "code_space"; | 492 return "code_space"; |
493 case LO_SPACE: | 493 case LO_SPACE: |
494 return "large_object_space"; | 494 return "large_object_space"; |
495 default: | 495 default: |
496 UNREACHABLE(); | 496 UNREACHABLE(); |
497 } | 497 } |
498 return nullptr; | 498 return nullptr; |
499 } | 499 } |
500 | 500 |
501 | 501 |
502 void Heap::ClearAllKeyedStoreICs() { | |
503 if (FLAG_vector_stores) { | |
504 TypeFeedbackVector::ClearAllKeyedStoreICs(isolate_); | |
505 return; | |
506 } | |
507 | |
508 // TODO(mvstanton): Remove this function when FLAG_vector_stores is turned on | |
509 // permanently, and divert all callers to KeyedStoreIC::ClearAllKeyedStoreICs. | |
510 HeapObjectIterator it(code_space()); | |
511 | |
512 for (Object* object = it.Next(); object != NULL; object = it.Next()) { | |
513 Code* code = Code::cast(object); | |
514 Code::Kind current_kind = code->kind(); | |
515 if (current_kind == Code::FUNCTION || | |
516 current_kind == Code::OPTIMIZED_FUNCTION) { | |
517 code->ClearInlineCaches(Code::KEYED_STORE_IC); | |
518 } | |
519 } | |
520 } | |
521 | |
522 | |
523 void Heap::RepairFreeListsAfterDeserialization() { | 502 void Heap::RepairFreeListsAfterDeserialization() { |
524 PagedSpaces spaces(this); | 503 PagedSpaces spaces(this); |
525 for (PagedSpace* space = spaces.next(); space != NULL; | 504 for (PagedSpace* space = spaces.next(); space != NULL; |
526 space = spaces.next()) { | 505 space = spaces.next()) { |
527 space->RepairFreeListsAfterDeserialization(); | 506 space->RepairFreeListsAfterDeserialization(); |
528 } | 507 } |
529 } | 508 } |
530 | 509 |
531 | 510 |
532 bool Heap::ProcessPretenuringFeedback() { | 511 bool Heap::ProcessPretenuringFeedback() { |
(...skipping 5639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6172 } | 6151 } |
6173 | 6152 |
6174 | 6153 |
6175 // static | 6154 // static |
6176 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6155 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6177 return StaticVisitorBase::GetVisitorId(map); | 6156 return StaticVisitorBase::GetVisitorId(map); |
6178 } | 6157 } |
6179 | 6158 |
6180 } // namespace internal | 6159 } // namespace internal |
6181 } // namespace v8 | 6160 } // namespace v8 |
OLD | NEW |