Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: src/heap/heap.h

Issue 979003003: Only reference constant root list entries in the snapshot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix windows build Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm64/macro-assembler-arm64.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 V(Map, the_hole_map, TheHoleMap) \ 152 V(Map, the_hole_map, TheHoleMap) \
153 V(Map, null_map, NullMap) \ 153 V(Map, null_map, NullMap) \
154 V(Map, boolean_map, BooleanMap) \ 154 V(Map, boolean_map, BooleanMap) \
155 V(Map, uninitialized_map, UninitializedMap) \ 155 V(Map, uninitialized_map, UninitializedMap) \
156 V(Map, arguments_marker_map, ArgumentsMarkerMap) \ 156 V(Map, arguments_marker_map, ArgumentsMarkerMap) \
157 V(Map, no_interceptor_result_sentinel_map, NoInterceptorResultSentinelMap) \ 157 V(Map, no_interceptor_result_sentinel_map, NoInterceptorResultSentinelMap) \
158 V(Map, exception_map, ExceptionMap) \ 158 V(Map, exception_map, ExceptionMap) \
159 V(Map, termination_exception_map, TerminationExceptionMap) \ 159 V(Map, termination_exception_map, TerminationExceptionMap) \
160 V(Map, message_object_map, JSMessageObjectMap) \ 160 V(Map, message_object_map, JSMessageObjectMap) \
161 V(Map, foreign_map, ForeignMap) \ 161 V(Map, foreign_map, ForeignMap) \
162 V(Map, neander_map, NeanderMap) \
163 V(Map, external_map, ExternalMap) \
162 V(HeapNumber, nan_value, NanValue) \ 164 V(HeapNumber, nan_value, NanValue) \
163 V(HeapNumber, infinity_value, InfinityValue) \ 165 V(HeapNumber, infinity_value, InfinityValue) \
164 V(HeapNumber, minus_zero_value, MinusZeroValue) \ 166 V(HeapNumber, minus_zero_value, MinusZeroValue) \
165 V(Map, neander_map, NeanderMap) \
166 V(JSObject, message_listeners, MessageListeners) \ 167 V(JSObject, message_listeners, MessageListeners) \
167 V(UnseededNumberDictionary, code_stubs, CodeStubs) \ 168 V(UnseededNumberDictionary, code_stubs, CodeStubs) \
168 V(UnseededNumberDictionary, non_monomorphic_cache, NonMonomorphicCache) \ 169 V(UnseededNumberDictionary, non_monomorphic_cache, NonMonomorphicCache) \
169 V(PolymorphicCodeCache, polymorphic_code_cache, PolymorphicCodeCache) \ 170 V(PolymorphicCodeCache, polymorphic_code_cache, PolymorphicCodeCache) \
170 V(Code, js_entry_code, JsEntryCode) \ 171 V(Code, js_entry_code, JsEntryCode) \
171 V(Code, js_construct_entry_code, JsConstructEntryCode) \ 172 V(Code, js_construct_entry_code, JsConstructEntryCode) \
172 V(FixedArray, natives_source_cache, NativesSourceCache) \ 173 V(FixedArray, natives_source_cache, NativesSourceCache) \
173 V(Script, empty_script, EmptyScript) \ 174 V(Script, empty_script, EmptyScript) \
174 V(NameDictionary, intrinsic_function_names, IntrinsicFunctionNames) \ 175 V(NameDictionary, intrinsic_function_names, IntrinsicFunctionNames) \
175 V(Cell, undefined_cell, UndefineCell) \ 176 V(Cell, undefined_cell, UndefinedCell) \
176 V(JSObject, observation_state, ObservationState) \ 177 V(JSObject, observation_state, ObservationState) \
177 V(Map, external_map, ExternalMap) \
178 V(Object, symbol_registry, SymbolRegistry) \ 178 V(Object, symbol_registry, SymbolRegistry) \
179 V(SeededNumberDictionary, empty_slow_element_dictionary, \ 179 V(SeededNumberDictionary, empty_slow_element_dictionary, \
180 EmptySlowElementDictionary) \ 180 EmptySlowElementDictionary) \
181 V(FixedArray, materialized_objects, MaterializedObjects) \ 181 V(FixedArray, materialized_objects, MaterializedObjects) \
182 V(FixedArray, allocation_sites_scratchpad, AllocationSitesScratchpad) \ 182 V(FixedArray, allocation_sites_scratchpad, AllocationSitesScratchpad) \
183 V(FixedArray, microtask_queue, MicrotaskQueue) \ 183 V(FixedArray, microtask_queue, MicrotaskQueue) \
184 V(FixedArray, keyed_load_dummy_vector, KeyedLoadDummyVector) \ 184 V(FixedArray, keyed_load_dummy_vector, KeyedLoadDummyVector) \
185 V(FixedArray, detached_contexts, DetachedContexts) \ 185 V(FixedArray, detached_contexts, DetachedContexts) \
186 V(WeakHashTable, weak_object_to_code_table, WeakObjectToCodeTable) 186 V(WeakHashTable, weak_object_to_code_table, WeakObjectToCodeTable)
187 187
188 // Entries in this list are limited to Smis and are not visited during GC. 188 // Entries in this list are limited to Smis and are not visited during GC.
189 #define SMI_ROOT_LIST(V) \ 189 #define SMI_ROOT_LIST(V) \
190 V(Smi, stack_limit, StackLimit) \ 190 V(Smi, stack_limit, StackLimit) \
191 V(Smi, real_stack_limit, RealStackLimit) \ 191 V(Smi, real_stack_limit, RealStackLimit) \
192 V(Smi, last_script_id, LastScriptId) \ 192 V(Smi, last_script_id, LastScriptId) \
193 V(Smi, arguments_adaptor_deopt_pc_offset, ArgumentsAdaptorDeoptPCOffset) \ 193 V(Smi, arguments_adaptor_deopt_pc_offset, ArgumentsAdaptorDeoptPCOffset) \
194 V(Smi, construct_stub_deopt_pc_offset, ConstructStubDeoptPCOffset) \ 194 V(Smi, construct_stub_deopt_pc_offset, ConstructStubDeoptPCOffset) \
195 V(Smi, getter_stub_deopt_pc_offset, GetterStubDeoptPCOffset) \ 195 V(Smi, getter_stub_deopt_pc_offset, GetterStubDeoptPCOffset) \
196 V(Smi, setter_stub_deopt_pc_offset, SetterStubDeoptPCOffset) 196 V(Smi, setter_stub_deopt_pc_offset, SetterStubDeoptPCOffset)
197 197
198
198 #define ROOT_LIST(V) \ 199 #define ROOT_LIST(V) \
199 STRONG_ROOT_LIST(V) \ 200 STRONG_ROOT_LIST(V) \
200 SMI_ROOT_LIST(V) \ 201 SMI_ROOT_LIST(V) \
201 V(StringTable, string_table, StringTable) 202 V(StringTable, string_table, StringTable)
202 203
203 #define INTERNALIZED_STRING_LIST(V) \ 204 #define INTERNALIZED_STRING_LIST(V) \
204 V(Object_string, "Object") \ 205 V(Object_string, "Object") \
205 V(proto_string, "__proto__") \ 206 V(proto_string, "__proto__") \
206 V(arguments_string, "arguments") \ 207 V(arguments_string, "arguments") \
207 V(Arguments_string, "Arguments") \ 208 V(Arguments_string, "Arguments") \
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1593 int remembered_unmapped_pages_index_; 1594 int remembered_unmapped_pages_index_;
1594 Address remembered_unmapped_pages_[kRememberedUnmappedPages]; 1595 Address remembered_unmapped_pages_[kRememberedUnmappedPages];
1595 1596
1596 // Total length of the strings we failed to flatten since the last GC. 1597 // Total length of the strings we failed to flatten since the last GC.
1597 int unflattened_strings_length_; 1598 int unflattened_strings_length_;
1598 1599
1599 #define ROOT_ACCESSOR(type, name, camel_name) \ 1600 #define ROOT_ACCESSOR(type, name, camel_name) \
1600 inline void set_##name(type* value) { \ 1601 inline void set_##name(type* value) { \
1601 /* The deserializer makes use of the fact that these common roots are */ \ 1602 /* The deserializer makes use of the fact that these common roots are */ \
1602 /* never in new space and never on a page that is being compacted. */ \ 1603 /* never in new space and never on a page that is being compacted. */ \
1604 DCHECK(!deserialization_complete() || \
1605 RootCanBeWrittenAfterInitialization(k##camel_name##RootIndex)); \
1603 DCHECK(k##camel_name##RootIndex >= kOldSpaceRoots || !InNewSpace(value)); \ 1606 DCHECK(k##camel_name##RootIndex >= kOldSpaceRoots || !InNewSpace(value)); \
1604 roots_[k##camel_name##RootIndex] = value; \ 1607 roots_[k##camel_name##RootIndex] = value; \
1605 } 1608 }
1606 ROOT_LIST(ROOT_ACCESSOR) 1609 ROOT_LIST(ROOT_ACCESSOR)
1607 #undef ROOT_ACCESSOR 1610 #undef ROOT_ACCESSOR
1608 1611
1609 #ifdef DEBUG 1612 #ifdef DEBUG
1610 // If the --gc-interval flag is set to a positive value, this 1613 // If the --gc-interval flag is set to a positive value, this
1611 // variable holds the value indicating the number of allocations 1614 // variable holds the value indicating the number of allocations
1612 // remain until the next failure and garbage collection. 1615 // remain until the next failure and garbage collection.
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
2586 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2589 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2587 2590
2588 private: 2591 private:
2589 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2592 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2590 }; 2593 };
2591 #endif // DEBUG 2594 #endif // DEBUG
2592 } 2595 }
2593 } // namespace v8::internal 2596 } // namespace v8::internal
2594 2597
2595 #endif // V8_HEAP_HEAP_H_ 2598 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698