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_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
874 void set_array_buffers_list(Object* object) { array_buffers_list_ = object; } | 874 void set_array_buffers_list(Object* object) { array_buffers_list_ = object; } |
875 Object* array_buffers_list() const { return array_buffers_list_; } | 875 Object* array_buffers_list() const { return array_buffers_list_; } |
876 | 876 |
877 void set_last_array_buffer_in_list(Object* object) { | 877 void set_last_array_buffer_in_list(Object* object) { |
878 last_array_buffer_in_list_ = object; | 878 last_array_buffer_in_list_ = object; |
879 } | 879 } |
880 Object* last_array_buffer_in_list() const { | 880 Object* last_array_buffer_in_list() const { |
881 return last_array_buffer_in_list_; | 881 return last_array_buffer_in_list_; |
882 } | 882 } |
883 | 883 |
884 void set_new_array_buffer_views_list(Object* object) { | |
885 new_array_buffer_views_list_ = object; | |
886 } | |
887 Object* new_array_buffer_views_list() const { | |
888 return new_array_buffer_views_list_; | |
889 } | |
890 | |
891 void set_allocation_sites_list(Object* object) { | 884 void set_allocation_sites_list(Object* object) { |
892 allocation_sites_list_ = object; | 885 allocation_sites_list_ = object; |
893 } | 886 } |
894 Object* allocation_sites_list() { return allocation_sites_list_; } | 887 Object* allocation_sites_list() { return allocation_sites_list_; } |
895 | 888 |
896 // Used in CreateAllocationSiteStub and the (de)serializer. | 889 // Used in CreateAllocationSiteStub and the (de)serializer. |
897 Object** allocation_sites_list_address() { return &allocation_sites_list_; } | 890 Object** allocation_sites_list_address() { return &allocation_sites_list_; } |
898 | 891 |
899 void set_encountered_weak_collections(Object* weak_collection) { | 892 void set_encountered_weak_collections(Object* weak_collection) { |
900 encountered_weak_collections_ = weak_collection; | 893 encountered_weak_collections_ = weak_collection; |
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1673 // for all spaces. This is used to disable allocations in generated code. | 1666 // for all spaces. This is used to disable allocations in generated code. |
1674 bool inline_allocation_disabled_; | 1667 bool inline_allocation_disabled_; |
1675 | 1668 |
1676 // Weak list heads, threaded through the objects. | 1669 // Weak list heads, threaded through the objects. |
1677 // List heads are initialized lazily and contain the undefined_value at start. | 1670 // List heads are initialized lazily and contain the undefined_value at start. |
1678 Object* native_contexts_list_; | 1671 Object* native_contexts_list_; |
1679 Object* array_buffers_list_; | 1672 Object* array_buffers_list_; |
1680 Object* last_array_buffer_in_list_; | 1673 Object* last_array_buffer_in_list_; |
1681 Object* allocation_sites_list_; | 1674 Object* allocation_sites_list_; |
1682 | 1675 |
1683 // This is a global list of array buffer views in new space. When the views | |
1684 // get promoted, they are removed form the list and added to the corresponding | |
1685 // array buffer. | |
1686 Object* new_array_buffer_views_list_; | |
1687 | |
1688 // List of encountered weak collections (JSWeakMap and JSWeakSet) during | 1676 // List of encountered weak collections (JSWeakMap and JSWeakSet) during |
1689 // marking. It is initialized during marking, destroyed after marking and | 1677 // marking. It is initialized during marking, destroyed after marking and |
1690 // contains Smi(0) while marking is not active. | 1678 // contains Smi(0) while marking is not active. |
1691 Object* encountered_weak_collections_; | 1679 Object* encountered_weak_collections_; |
1692 | 1680 |
1693 Object* encountered_weak_cells_; | 1681 Object* encountered_weak_cells_; |
1694 | 1682 |
1695 StoreBufferRebuilder store_buffer_rebuilder_; | 1683 StoreBufferRebuilder store_buffer_rebuilder_; |
1696 | 1684 |
1697 struct StringTypeTable { | 1685 struct StringTypeTable { |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2008 | 1996 |
2009 // Performs a major collection in the whole heap. | 1997 // Performs a major collection in the whole heap. |
2010 void MarkCompact(); | 1998 void MarkCompact(); |
2011 | 1999 |
2012 // Code to be run before and after mark-compact. | 2000 // Code to be run before and after mark-compact. |
2013 void MarkCompactPrologue(); | 2001 void MarkCompactPrologue(); |
2014 void MarkCompactEpilogue(); | 2002 void MarkCompactEpilogue(); |
2015 | 2003 |
2016 void ProcessNativeContexts(WeakObjectRetainer* retainer); | 2004 void ProcessNativeContexts(WeakObjectRetainer* retainer); |
2017 void ProcessArrayBuffers(WeakObjectRetainer* retainer, bool stop_after_young); | 2005 void ProcessArrayBuffers(WeakObjectRetainer* retainer, bool stop_after_young); |
2018 void ProcessNewArrayBufferViews(WeakObjectRetainer* retainer); | |
2019 void ProcessAllocationSites(WeakObjectRetainer* retainer); | 2006 void ProcessAllocationSites(WeakObjectRetainer* retainer); |
2020 | 2007 |
2021 // Deopts all code that contains allocation instruction which are tenured or | 2008 // Deopts all code that contains allocation instruction which are tenured or |
2022 // not tenured. Moreover it clears the pretenuring allocation site statistics. | 2009 // not tenured. Moreover it clears the pretenuring allocation site statistics. |
2023 void ResetAllAllocationSitesDependentCode(PretenureFlag flag); | 2010 void ResetAllAllocationSitesDependentCode(PretenureFlag flag); |
2024 | 2011 |
2025 // Evaluates local pretenuring for the old space and calls | 2012 // Evaluates local pretenuring for the old space and calls |
2026 // ResetAllTenuredAllocationSitesDependentCode if too many objects died in | 2013 // ResetAllTenuredAllocationSitesDependentCode if too many objects died in |
2027 // the old space. | 2014 // the old space. |
2028 void EvaluateOldSpaceLocalPretenuring(uint64_t size_of_objects_before_gc); | 2015 void EvaluateOldSpaceLocalPretenuring(uint64_t size_of_objects_before_gc); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2170 base::Mutex relocation_mutex_; | 2157 base::Mutex relocation_mutex_; |
2171 | 2158 |
2172 int gc_callbacks_depth_; | 2159 int gc_callbacks_depth_; |
2173 | 2160 |
2174 bool deserialization_complete_; | 2161 bool deserialization_complete_; |
2175 | 2162 |
2176 bool concurrent_sweeping_enabled_; | 2163 bool concurrent_sweeping_enabled_; |
2177 | 2164 |
2178 // A migration failure indicates that a semi-space copy of an object during | 2165 // A migration failure indicates that a semi-space copy of an object during |
2179 // a scavenge failed and the object got promoted instead. | 2166 // a scavenge failed and the object got promoted instead. |
2180 bool migration_failure_; | 2167 bool migration_failure_; |
Hannes Payer (out of office)
2015/04/22 07:45:53
Since we are not using the list of new views anymo
| |
2181 | 2168 |
2182 // A migration failure happened in the previous scavenge. | 2169 // A migration failure happened in the previous scavenge. |
2183 bool previous_migration_failure_; | 2170 bool previous_migration_failure_; |
2184 | 2171 |
2185 friend class AlwaysAllocateScope; | 2172 friend class AlwaysAllocateScope; |
2186 friend class Deserializer; | 2173 friend class Deserializer; |
2187 friend class Factory; | 2174 friend class Factory; |
2188 friend class GCCallbacksScope; | 2175 friend class GCCallbacksScope; |
2189 friend class GCTracer; | 2176 friend class GCTracer; |
2190 friend class HeapIterator; | 2177 friend class HeapIterator; |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2636 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2623 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
2637 | 2624 |
2638 private: | 2625 private: |
2639 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2626 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2640 }; | 2627 }; |
2641 #endif // DEBUG | 2628 #endif // DEBUG |
2642 } | 2629 } |
2643 } // namespace v8::internal | 2630 } // namespace v8::internal |
2644 | 2631 |
2645 #endif // V8_HEAP_HEAP_H_ | 2632 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |