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/ast/context-slot-cache.h" | 9 #include "src/ast/context-slot-cache.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 global_pretenuring_feedback_->LookupOrInsert(site, | 518 global_pretenuring_feedback_->LookupOrInsert(site, |
519 ObjectHash(site->address())); | 519 ObjectHash(site->address())); |
520 } | 520 } |
521 } | 521 } |
522 } | 522 } |
523 | 523 |
524 | 524 |
525 class Heap::PretenuringScope { | 525 class Heap::PretenuringScope { |
526 public: | 526 public: |
527 explicit PretenuringScope(Heap* heap) : heap_(heap) { | 527 explicit PretenuringScope(Heap* heap) : heap_(heap) { |
528 heap_->global_pretenuring_feedback_ = new base::HashMap( | 528 heap_->global_pretenuring_feedback_ = |
529 base::HashMap::PointersMatch, kInitialFeedbackCapacity); | 529 new base::HashMap(kInitialFeedbackCapacity); |
530 } | 530 } |
531 | 531 |
532 ~PretenuringScope() { | 532 ~PretenuringScope() { |
533 delete heap_->global_pretenuring_feedback_; | 533 delete heap_->global_pretenuring_feedback_; |
534 heap_->global_pretenuring_feedback_ = nullptr; | 534 heap_->global_pretenuring_feedback_ = nullptr; |
535 } | 535 } |
536 | 536 |
537 private: | 537 private: |
538 Heap* heap_; | 538 Heap* heap_; |
539 }; | 539 }; |
(...skipping 6000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6540 } | 6540 } |
6541 | 6541 |
6542 | 6542 |
6543 // static | 6543 // static |
6544 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6544 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6545 return StaticVisitorBase::GetVisitorId(map); | 6545 return StaticVisitorBase::GetVisitorId(map); |
6546 } | 6546 } |
6547 | 6547 |
6548 } // namespace internal | 6548 } // namespace internal |
6549 } // namespace v8 | 6549 } // namespace v8 |
OLD | NEW |