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() { | 502 void Heap::ClearAllKeyedStoreICs() { |
Hannes Payer (out of office)
2015/11/17 12:14:31
The heap does not need to know anymore about:
Type
mvstanton
2015/11/17 12:37:46
Done.
| |
503 if (FLAG_vector_stores) { | 503 TypeFeedbackVector::ClearAllKeyedStoreICs(isolate_); |
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 } | 504 } |
521 | 505 |
522 | 506 |
523 void Heap::RepairFreeListsAfterDeserialization() { | 507 void Heap::RepairFreeListsAfterDeserialization() { |
524 PagedSpaces spaces(this); | 508 PagedSpaces spaces(this); |
525 for (PagedSpace* space = spaces.next(); space != NULL; | 509 for (PagedSpace* space = spaces.next(); space != NULL; |
526 space = spaces.next()) { | 510 space = spaces.next()) { |
527 space->RepairFreeListsAfterDeserialization(); | 511 space->RepairFreeListsAfterDeserialization(); |
528 } | 512 } |
529 } | 513 } |
(...skipping 5642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6172 } | 6156 } |
6173 | 6157 |
6174 | 6158 |
6175 // static | 6159 // static |
6176 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6160 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6177 return StaticVisitorBase::GetVisitorId(map); | 6161 return StaticVisitorBase::GetVisitorId(map); |
6178 } | 6162 } |
6179 | 6163 |
6180 } // namespace internal | 6164 } // namespace internal |
6181 } // namespace v8 | 6165 } // namespace v8 |
OLD | NEW |