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 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 global_pretenuring_feedback_->LookupOrInsert(site, | 503 global_pretenuring_feedback_->LookupOrInsert(site, |
504 ObjectHash(site->address())); | 504 ObjectHash(site->address())); |
505 } | 505 } |
506 } | 506 } |
507 } | 507 } |
508 | 508 |
509 | 509 |
510 class Heap::PretenuringScope { | 510 class Heap::PretenuringScope { |
511 public: | 511 public: |
512 explicit PretenuringScope(Heap* heap) : heap_(heap) { | 512 explicit PretenuringScope(Heap* heap) : heap_(heap) { |
513 heap_->global_pretenuring_feedback_ = new base::HashMap( | 513 heap_->global_pretenuring_feedback_ = |
514 base::HashMap::PointersMatch, kInitialFeedbackCapacity); | 514 new base::HashMap(kInitialFeedbackCapacity); |
515 } | 515 } |
516 | 516 |
517 ~PretenuringScope() { | 517 ~PretenuringScope() { |
518 delete heap_->global_pretenuring_feedback_; | 518 delete heap_->global_pretenuring_feedback_; |
519 heap_->global_pretenuring_feedback_ = nullptr; | 519 heap_->global_pretenuring_feedback_ = nullptr; |
520 } | 520 } |
521 | 521 |
522 private: | 522 private: |
523 Heap* heap_; | 523 Heap* heap_; |
524 }; | 524 }; |
(...skipping 6003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6528 } | 6528 } |
6529 | 6529 |
6530 | 6530 |
6531 // static | 6531 // static |
6532 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6532 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6533 return StaticVisitorBase::GetVisitorId(map); | 6533 return StaticVisitorBase::GetVisitorId(map); |
6534 } | 6534 } |
6535 | 6535 |
6536 } // namespace internal | 6536 } // namespace internal |
6537 } // namespace v8 | 6537 } // namespace v8 |
OLD | NEW |