| 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 #ifndef V8_HEAP_HEAP_INL_H_ | 5 #ifndef V8_HEAP_HEAP_INL_H_ |
| 6 #define V8_HEAP_HEAP_INL_H_ | 6 #define V8_HEAP_HEAP_INL_H_ |
| 7 | 7 |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 (*bit_cast<intptr_t*>(&e->value))++; | 709 (*bit_cast<intptr_t*>(&e->value))++; |
| 710 } | 710 } |
| 711 } | 711 } |
| 712 | 712 |
| 713 | 713 |
| 714 void Heap::RemoveAllocationSitePretenuringFeedback(AllocationSite* site) { | 714 void Heap::RemoveAllocationSitePretenuringFeedback(AllocationSite* site) { |
| 715 global_pretenuring_feedback_->Remove( | 715 global_pretenuring_feedback_->Remove( |
| 716 site, static_cast<uint32_t>(bit_cast<uintptr_t>(site))); | 716 site, static_cast<uint32_t>(bit_cast<uintptr_t>(site))); |
| 717 } | 717 } |
| 718 | 718 |
| 719 | 719 bool Heap::CollectGarbage(AllocationSpace space, |
| 720 bool Heap::CollectGarbage(AllocationSpace space, const char* gc_reason, | 720 GarbageCollectionReason gc_reason, |
| 721 const v8::GCCallbackFlags callbackFlags) { | 721 const v8::GCCallbackFlags callbackFlags) { |
| 722 const char* collector_reason = NULL; | 722 const char* collector_reason = NULL; |
| 723 GarbageCollector collector = SelectGarbageCollector(space, &collector_reason); | 723 GarbageCollector collector = SelectGarbageCollector(space, &collector_reason); |
| 724 return CollectGarbage(collector, gc_reason, collector_reason, callbackFlags); | 724 return CollectGarbage(collector, gc_reason, collector_reason, callbackFlags); |
| 725 } | 725 } |
| 726 | 726 |
| 727 | 727 |
| 728 Isolate* Heap::isolate() { | 728 Isolate* Heap::isolate() { |
| 729 return reinterpret_cast<Isolate*>( | 729 return reinterpret_cast<Isolate*>( |
| 730 reinterpret_cast<intptr_t>(this) - | 730 reinterpret_cast<intptr_t>(this) - |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 | 881 |
| 882 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { | 882 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { |
| 883 for (Object** current = start; current < end; current++) { | 883 for (Object** current = start; current < end; current++) { |
| 884 CHECK((*current)->IsSmi()); | 884 CHECK((*current)->IsSmi()); |
| 885 } | 885 } |
| 886 } | 886 } |
| 887 } // namespace internal | 887 } // namespace internal |
| 888 } // namespace v8 | 888 } // namespace v8 |
| 889 | 889 |
| 890 #endif // V8_HEAP_HEAP_INL_H_ | 890 #endif // V8_HEAP_HEAP_INL_H_ |
| OLD | NEW |