5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_
28 #define STRONG_ROOT_LIST(V) \
29 V(Map, byte_array_map, ByteArrayMap) \
30 V(Map, free_space_map, FreeSpaceMap) \
31 V(Map, one_pointer_filler_map, OnePointerFillerMap) \
32 V(Map, two_pointer_filler_map, TwoPointerFillerMap) \
34 V(Smi, store_buffer_top, StoreBufferTop) \
35 V(Oddball, undefined_value, UndefinedValue) \
36 V(Oddball, the_hole_value, TheHoleValue) \
37 V(Oddball, null_value, NullValue) \
38 V(Oddball, true_value, TrueValue) \
39 V(Oddball, false_value, FalseValue) \
40 V(Oddball, uninitialized_value, UninitializedValue) \
41 V(Oddball, exception, Exception) \
42 V(Map, cell_map, CellMap) \
43 V(Map, global_property_cell_map, GlobalPropertyCellMap) \
44 V(Map, shared_function_info_map, SharedFunctionInfoMap) \
45 V(Map, meta_map, MetaMap) \
46 V(Map, heap_number_map, HeapNumberMap) \
47 V(Map, mutable_heap_number_map, MutableHeapNumberMap) \
48 V(Map, native_context_map, NativeContextMap) \
49 V(Map, fixed_array_map, FixedArrayMap) \
50 V(Map, code_map, CodeMap) \
51 V(Map, scope_info_map, ScopeInfoMap) \
52 V(Map, fixed_cow_array_map, FixedCOWArrayMap) \
53 V(Map, fixed_double_array_map, FixedDoubleArrayMap) \
54 V(Map, constant_pool_array_map, ConstantPoolArrayMap) \
55 V(Oddball, no_interceptor_result_sentinel, NoInterceptorResultSentinel) \
56 V(Map, hash_table_map, HashTableMap) \
57 V(Map, ordered_hash_table_map, OrderedHashTableMap) \
58 V(FixedArray, empty_fixed_array, EmptyFixedArray) \
59 V(ByteArray, empty_byte_array, EmptyByteArray) \
60 V(DescriptorArray, empty_descriptor_array, EmptyDescriptorArray) \
61 V(ConstantPoolArray, empty_constant_pool_array, EmptyConstantPoolArray) \
62 V(Oddball, arguments_marker, ArgumentsMarker) \
66 V(FixedArray, number_string_cache, NumberStringCache) \
67 V(Object, instanceof_cache_function, InstanceofCacheFunction) \
68 V(Object, instanceof_cache_map, InstanceofCacheMap) \
69 V(Object, instanceof_cache_answer, InstanceofCacheAnswer) \
70 V(FixedArray, single_character_string_cache, SingleCharacterStringCache) \
71 V(FixedArray, string_split_cache, StringSplitCache) \
72 V(FixedArray, regexp_multiple_cache, RegExpMultipleCache) \
73 V(Oddball, termination_exception, TerminationException) \
74 V(Smi, hash_seed, HashSeed) \
75 V(Map, symbol_map, SymbolMap) \
76 V(Map, string_map, StringMap) \
77 V(Map, one_byte_string_map, OneByteStringMap) \
78 V(Map, cons_string_map, ConsStringMap) \
79 V(Map, cons_one_byte_string_map, ConsOneByteStringMap) \
80 V(Map, sliced_string_map, SlicedStringMap) \
81 V(Map, sliced_one_byte_string_map, SlicedOneByteStringMap) \
82 V(Map, external_string_map, ExternalStringMap) \
83 V(Map, external_string_with_one_byte_data_map, \
84 ExternalStringWithOneByteDataMap) \
85 V(Map, external_one_byte_string_map, ExternalOneByteStringMap) \
86 V(Map, short_external_string_map, ShortExternalStringMap) \
87 V(Map, short_external_string_with_one_byte_data_map, \
88 ShortExternalStringWithOneByteDataMap) \
89 V(Map, internalized_string_map, InternalizedStringMap) \
90 V(Map, one_byte_internalized_string_map, OneByteInternalizedStringMap) \
91 V(Map, external_internalized_string_map, ExternalInternalizedStringMap) \
92 V(Map, external_internalized_string_with_one_byte_data_map, \
93 ExternalInternalizedStringWithOneByteDataMap) \
94 V(Map, external_one_byte_internalized_string_map, \
95 ExternalOneByteInternalizedStringMap) \
96 V(Map, short_external_internalized_string_map, \
97 ShortExternalInternalizedStringMap) \
98 V(Map, short_external_internalized_string_with_one_byte_data_map, \
99 ShortExternalInternalizedStringWithOneByteDataMap) \
100 V(Map, short_external_one_byte_internalized_string_map, \
101 ShortExternalOneByteInternalizedStringMap) \
102 V(Map, short_external_one_byte_string_map, ShortExternalOneByteStringMap) \
103 V(Map, undetectable_string_map, UndetectableStringMap) \
104 V(Map, undetectable_one_byte_string_map, UndetectableOneByteStringMap) \
105 V(Map, external_int8_array_map, ExternalInt8ArrayMap) \
106 V(Map, external_uint8_array_map, ExternalUint8ArrayMap) \
107 V(Map, external_int16_array_map, ExternalInt16ArrayMap) \
108 V(Map, external_uint16_array_map, ExternalUint16ArrayMap) \
109 V(Map, external_int32_array_map, ExternalInt32ArrayMap) \
110 V(Map, external_uint32_array_map, ExternalUint32ArrayMap) \
111 V(Map, external_float32_array_map, ExternalFloat32ArrayMap) \
112 V(Map, external_float64_array_map, ExternalFloat64ArrayMap) \
113 V(Map, external_uint8_clamped_array_map, ExternalUint8ClampedArrayMap) \
114 V(ExternalArray, empty_external_int8_array, EmptyExternalInt8Array) \
115 V(ExternalArray, empty_external_uint8_array, EmptyExternalUint8Array) \
116 V(ExternalArray, empty_external_int16_array, EmptyExternalInt16Array) \
117 V(ExternalArray, empty_external_uint16_array, EmptyExternalUint16Array) \
118 V(ExternalArray, empty_external_int32_array, EmptyExternalInt32Array) \
119 V(ExternalArray, empty_external_uint32_array, EmptyExternalUint32Array) \
120 V(ExternalArray, empty_external_float32_array, EmptyExternalFloat32Array) \
121 V(ExternalArray, empty_external_float64_array, EmptyExternalFloat64Array) \
122 V(ExternalArray, empty_external_uint8_clamped_array, \
123 EmptyExternalUint8ClampedArray) \
124 V(Map, fixed_uint8_array_map, FixedUint8ArrayMap) \
125 V(Map, fixed_int8_array_map, FixedInt8ArrayMap) \
126 V(Map, fixed_uint16_array_map, FixedUint16ArrayMap) \
127 V(Map, fixed_int16_array_map, FixedInt16ArrayMap) \
128 V(Map, fixed_uint32_array_map, FixedUint32ArrayMap) \
129 V(Map, fixed_int32_array_map, FixedInt32ArrayMap) \
130 V(Map, fixed_float32_array_map, FixedFloat32ArrayMap) \
131 V(Map, fixed_float64_array_map, FixedFloat64ArrayMap) \
132 V(Map, fixed_uint8_clamped_array_map, FixedUint8ClampedArrayMap) \
133 V(FixedTypedArrayBase, empty_fixed_uint8_array, EmptyFixedUint8Array) \
134 V(FixedTypedArrayBase, empty_fixed_int8_array, EmptyFixedInt8Array) \
135 V(FixedTypedArrayBase, empty_fixed_uint16_array, EmptyFixedUint16Array) \
136 V(FixedTypedArrayBase, empty_fixed_int16_array, EmptyFixedInt16Array) \
137 V(FixedTypedArrayBase, empty_fixed_uint32_array, EmptyFixedUint32Array) \
138 V(FixedTypedArrayBase, empty_fixed_int32_array, EmptyFixedInt32Array) \
139 V(FixedTypedArrayBase, empty_fixed_float32_array, EmptyFixedFloat32Array) \
140 V(FixedTypedArrayBase, empty_fixed_float64_array, EmptyFixedFloat64Array) \
141 V(FixedTypedArrayBase, empty_fixed_uint8_clamped_array, \
142 EmptyFixedUint8ClampedArray) \
143 V(Map, sloppy_arguments_elements_map, SloppyArgumentsElementsMap) \
144 V(Map, function_context_map, FunctionContextMap) \
145 V(Map, catch_context_map, CatchContextMap) \
146 V(Map, with_context_map, WithContextMap) \
147 V(Map, block_context_map, BlockContextMap) \
148 V(Map, module_context_map, ModuleContextMap) \
149 V(Map, global_context_map, GlobalContextMap) \
150 V(Map, undefined_map, UndefinedMap) \
151 V(Map, the_hole_map, TheHoleMap) \
152 V(Map, null_map, NullMap) \
153 V(Map, boolean_map, BooleanMap) \
154 V(Map, uninitialized_map, UninitializedMap) \
155 V(Map, arguments_marker_map, ArgumentsMarkerMap) \
156 V(Map, no_interceptor_result_sentinel_map, NoInterceptorResultSentinelMap) \
157 V(Map, exception_map, ExceptionMap) \
158 V(Map, termination_exception_map, TerminationExceptionMap) \
159 V(Map, message_object_map, JSMessageObjectMap) \
160 V(Map, foreign_map, ForeignMap) \
161 V(HeapNumber, nan_value, NanValue) \
162 V(HeapNumber, infinity_value, InfinityValue) \
163 V(HeapNumber, minus_zero_value, MinusZeroValue) \
164 V(Map, neander_map, NeanderMap) \
165 V(JSObject, message_listeners, MessageListeners) \
166 V(UnseededNumberDictionary, code_stubs, CodeStubs) \
167 V(UnseededNumberDictionary, non_monomorphic_cache, NonMonomorphicCache) \
168 V(PolymorphicCodeCache, polymorphic_code_cache, PolymorphicCodeCache) \
169 V(Code, js_entry_code, JsEntryCode) \
170 V(Code, js_construct_entry_code, JsConstructEntryCode) \
171 V(FixedArray, natives_source_cache, NativesSourceCache) \
172 V(Script, empty_script, EmptyScript) \
173 V(NameDictionary, intrinsic_function_names, IntrinsicFunctionNames) \
174 V(Cell, undefined_cell, UndefineCell) \
175 V(JSObject, observation_state, ObservationState) \
176 V(Map, external_map, ExternalMap) \
177 V(Object, symbol_registry, SymbolRegistry) \
178 V(Symbol, frozen_symbol, FrozenSymbol) \
179 V(Symbol, nonexistent_symbol, NonExistentSymbol) \
180 V(Symbol, elements_transition_symbol, ElementsTransitionSymbol) \
181 V(SeededNumberDictionary, empty_slow_element_dictionary, \
182 EmptySlowElementDictionary) \
183 V(Symbol, observed_symbol, ObservedSymbol) \
184 V(Symbol, uninitialized_symbol, UninitializedSymbol) \
185 V(Symbol, megamorphic_symbol, MegamorphicSymbol) \
186 V(Symbol, premonomorphic_symbol, PremonomorphicSymbol) \
187 V(Symbol, generic_symbol, GenericSymbol) \
188 V(Symbol, stack_trace_symbol, StackTraceSymbol) \
189 V(Symbol, detailed_stack_trace_symbol, DetailedStackTraceSymbol) \
190 V(Symbol, normal_ic_symbol, NormalICSymbol) \
191 V(Symbol, home_object_symbol, HomeObjectSymbol) \
192 V(FixedArray, materialized_objects, MaterializedObjects) \
193 V(FixedArray, allocation_sites_scratchpad, AllocationSitesScratchpad) \
194 V(FixedArray, microtask_queue, MicrotaskQueue)
197 #define SMI_ROOT_LIST(V) \
198 V(Smi, stack_limit, StackLimit) \
199 V(Smi, real_stack_limit, RealStackLimit) \
200 V(Smi, last_script_id, LastScriptId) \
201 V(Smi, arguments_adaptor_deopt_pc_offset, ArgumentsAdaptorDeoptPCOffset) \
202 V(Smi, construct_stub_deopt_pc_offset, ConstructStubDeoptPCOffset) \
203 V(Smi, getter_stub_deopt_pc_offset, GetterStubDeoptPCOffset) \
204 V(Smi, setter_stub_deopt_pc_offset, SetterStubDeoptPCOffset)
206 #define ROOT_LIST(V) \
207 STRONG_ROOT_LIST(V) \
209 V(StringTable, string_table, StringTable)
213 #define IMMORTAL_IMMOVABLE_ROOT_LIST(V) \
216 V(one_pointer_filler_map) \
217 V(two_pointer_filler_map) \
223 V(uninitialized_value) \
225 V(global_property_cell_map) \
226 V(shared_function_info_map) \
229 V(mutable_heap_number_map) \
230 V(native_context_map) \
234 V(fixed_cow_array_map) \
235 V(fixed_double_array_map) \
236 V(constant_pool_array_map) \
237 V(no_interceptor_result_sentinel) \
239 V(ordered_hash_table_map) \
240 V(empty_fixed_array) \
241 V(empty_byte_array) \
242 V(empty_descriptor_array) \
243 V(empty_constant_pool_array) \
244 V(arguments_marker) \
246 V(sloppy_arguments_elements_map) \
247 V(function_context_map) \
248 V(catch_context_map) \
249 V(with_context_map) \
250 V(block_context_map) \
251 V(module_context_map) \
252 V(global_context_map) \
257 V(uninitialized_map) \
258 V(message_object_map) \
262 #define INTERNALIZED_STRING_LIST(V) \
263 V(Object_string, "Object") \
264 V(proto_string, "__proto__") \
265 V(arguments_string, "arguments") \
266 V(Arguments_string, "Arguments") \
267 V(caller_string, "caller") \
268 V(boolean_string, "boolean") \
269 V(Boolean_string, "Boolean") \
270 V(callee_string, "callee") \
271 V(constructor_string, "constructor") \
272 V(dot_result_string, ".result") \
273 V(dot_for_string, ".for.") \
274 V(eval_string, "eval") \
275 V(empty_string, "") \
276 V(function_string, "function") \
277 V(Function_string, "Function") \
278 V(length_string, "length") \
279 V(name_string, "name") \
280 V(null_string, "null") \
281 V(number_string, "number") \
282 V(Number_string, "Number") \
283 V(nan_string, "NaN") \
284 V(source_string, "source") \
285 V(source_url_string, "source_url") \
286 V(source_mapping_url_string, "source_mapping_url") \
287 V(global_string, "global") \
288 V(ignore_case_string, "ignoreCase") \
289 V(multiline_string, "multiline") \
290 V(sticky_string, "sticky") \
291 V(harmony_regexps_string, "harmony_regexps") \
292 V(input_string, "input") \
293 V(index_string, "index") \
294 V(last_index_string, "lastIndex") \
295 V(object_string, "object") \
296 V(prototype_string, "prototype") \
297 V(string_string, "string") \
298 V(String_string, "String") \
299 V(symbol_string, "symbol") \
300 V(Symbol_string, "Symbol") \
301 V(Map_string, "Map") \
302 V(Set_string, "Set") \
303 V(WeakMap_string, "WeakMap") \
304 V(WeakSet_string, "WeakSet") \
305 V(for_string, "for") \
306 V(for_api_string, "for_api") \
307 V(for_intern_string, "for_intern") \
308 V(private_api_string, "private_api") \
309 V(private_intern_string, "private_intern") \
310 V(Date_string, "Date") \
311 V(char_at_string, "CharAt") \
312 V(undefined_string, "undefined") \
313 V(value_of_string, "valueOf") \
314 V(stack_string, "stack") \
315 V(toJSON_string, "toJSON") \
316 V(KeyedLoadMonomorphic_string, "KeyedLoadMonomorphic") \
317 V(KeyedStoreMonomorphic_string, "KeyedStoreMonomorphic") \
318 V(stack_overflow_string, "kStackOverflowBoilerplate") \
319 V(illegal_access_string, "illegal access") \
320 V(cell_value_string, "%cell_value") \
321 V(illegal_argument_string, "illegal argument") \
322 V(identity_hash_string, "v8::IdentityHash") \
323 V(closure_string, "(closure)") \
325 V(compare_ic_string, "==") \
326 V(strict_compare_ic_string, "===") \
327 V(infinity_string, "Infinity") \
328 V(minus_infinity_string, "-Infinity") \
329 V(query_colon_string, "(?:)") \
330 V(Generator_string, "Generator") \
331 V(throw_string, "throw") \
332 V(done_string, "done") \
333 V(value_string, "value") \
334 V(next_string, "next") \
335 V(byte_length_string, "byteLength") \
336 V(byte_offset_string, "byteOffset") \
337 V(intl_initialized_marker_string, "v8::intl_initialized_marker") \
338 V(intl_impl_object_string, "v8::intl_object")
343 class WeakObjectRetainer;
346 typedef String* (*ExternalStringTableUpdaterCallback)(
Heap* heap,
389 return Page::FromAllocationTop(
reinterpret_cast<Address>(
rear_));
393 limit_ =
reinterpret_cast<intptr_t*
>(limit);
411 return reinterpret_cast<intptr_t*
>(to_space_top) <=
rear_;
521 bool ConfigureHeap(
int max_semi_space_size,
int max_old_space_size,
522 int max_executable_size,
size_t code_range_size);
663 template <
typename T>
703 template<Heap::InvocationMode mode>
741 if (FLAG_gc_verbose) {
748 if (FLAG_gc_verbose) {
756 GCType gc_type_filter,
bool pass_isolate =
true);
760 GCType gc_type_filter,
bool pass_isolate =
true);
767 #define ROOT_ACCESSOR(type, name, camel_name) \
768 type* name() { return type::cast(roots_[k##camel_name##RootIndex]); } \
769 type* raw_unchecked_##name() { \
770 return reinterpret_cast<type*>(roots_[k##camel_name##RootIndex]); \
776 #define STRUCT_MAP_ACCESSOR(NAME, Name, name) \
777 Map* name##_map() { return Map::cast(roots_[k##Name##MapRootIndex]); }
779 #undef STRUCT_MAP_ACCESSOR
781 #define STRING_ACCESSOR(name, str) \
782 String* name() { return String::cast(roots_[k##name##RootIndex]); }
784 #undef STRING_ACCESSOR
868 roots_[kCodeStubsRootIndex] = value;
880 roots_[kNonMonomorphicCacheRootIndex] = value;
884 roots_[kEmptyScriptRootIndex] = script;
888 roots_[kStoreBufferTopRootIndex] =
reinterpret_cast<Smi*
>(top);
892 roots_[kMaterializedObjectsRootIndex] = objects;
899 return reinterpret_cast<Address*
>(&
roots_[kStoreBufferTopRootIndex]);
907 bool weak_embedded_objects_verification_enabled() {
908 return no_weak_object_verification_scope_depth_ == 0;
916 void OldPointerSpaceCheckStoreBuffer();
917 void MapSpaceCheckStoreBuffer();
918 void LargeObjectSpaceCheckStoreBuffer();
921 void ReportHeapStatistics(
const char* title);
922 void ReportCodeStatistics(
const char* title);
931 return FLAG_verify_heap;
960 void set_allocation_timeout(
int timeout) { allocation_timeout_ = timeout; }
962 void TracePathToObjectFrom(
Object* target,
Object* root);
963 void TracePathToObject(
Object* target);
964 void TracePathToGlobal();
972 static inline void ScavengeObject(HeapObject** p, HeapObject*
object);
999 if (total < 0)
return 0;
1000 return static_cast<intptr_t
>(total);
1041 int freed_global_handles);
1055 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex,
1057 #undef ROOT_INDEX_DECLARATION
1059 #define STRING_INDEX_DECLARATION(name, str) k##name##RootIndex,
1061 #undef STRING_DECLARATION
1064 #define DECLARE_STRUCT_MAP(NAME, Name, name) k##Name##MapRootIndex,
1066 #undef DECLARE_STRUCT_MAP
1069 #define ROOT_INDEX_DECLARATION(type, name, camel_name) k##camel_name##RootIndex,
1071 #undef ROOT_INDEX_DECLARATION
1136 if (FLAG_gc_global)
return true;
1138 if (FLAG_stress_compaction && (
gc_count_ & 1) != 0)
return true;
1140 intptr_t adjusted_allocation_limit =
1177 if (is_crankshafted) {
1186 double marking_time);
1239 DCHECK(FLAG_randomize_hashes || seed == 0);
1245 set_arguments_adaptor_deopt_pc_offset(
Smi::FromInt(pc_offset));
1250 set_construct_stub_deopt_pc_offset(
Smi::FromInt(pc_offset));
1255 set_getter_stub_deopt_pc_offset(
Smi::FromInt(pc_offset));
1260 set_setter_stub_deopt_pc_offset(
Smi::FromInt(pc_offset));
1308 int code_age_index =
1355 bool take_snapshot =
false);
1389 bool alloc_props =
true,
1492 #define ROOT_ACCESSOR(type, name, camel_name) \
1493 inline void set_##name(type* value) { \
1496 DCHECK(k##camel_name##RootIndex >= kOldSpaceRoots || !InNewSpace(value)); \
1497 roots_[k##camel_name##RootIndex] = value; \
1500 #undef ROOT_ACCESSOR
1506 int allocation_timeout_;
1619 const char** reason);
1635 const char* collector_reason,
1721 template <
bool is_one_
byte,
typename T>
1725 template <
typename T>
1765 const ConstantPoolArray::NumberOfEntries& small);
1768 const ConstantPoolArray::NumberOfEntries& small,
1769 const ConstantPoolArray::NumberOfEntries& extended);
1997 int no_weak_object_verification_scope_depth_;
2034 friend class NoWeakObjectVerificationScope;
2090 class NoWeakObjectVerificationScope {
2092 inline NoWeakObjectVerificationScope();
2093 inline ~NoWeakObjectVerificationScope();
2318 if (
name->IsUniqueName()) {
2349 return (source_hash ^ name_hash) %
kLength;
2416 uintptr_t map_word =
object->map_word().ToRawValue();
2417 object->set_map_word(MapWord::FromRawValue(map_word |
kNotMarkedBit));
2422 uintptr_t map_word =
object->map_word().ToRawValue();
2423 object->set_map_word(MapWord::FromRawValue(map_word & ~
kNotMarkedBit));
2428 uintptr_t map_word =
object->map_word().ToRawValue();
2429 return MapWord::FromRawValue(map_word |
kNotMarkedBit).ToMap();
2454 static const int kMarkTag = 2;
2459 PathTracer(
Object* search_target, WhatToFind what_to_find,
2461 : search_target_(search_target),
2462 found_target_(
false),
2463 found_target_in_trace_(
false),
2464 what_to_find_(what_to_find),
2465 visit_mode_(visit_mode),
2469 virtual void VisitPointers(
Object** start,
Object** end);
2472 void TracePathFrom(
Object** root);
2474 bool found()
const {
return found_target_; }
2476 static Object*
const kAnyGlobalObject;
2480 class UnmarkVisitor;
2482 void MarkRecursively(
Object** p, MarkVisitor* mark_visitor);
2483 void UnmarkRecursively(
Object** p, UnmarkVisitor* unmark_visitor);
2484 virtual void ProcessResults();
2488 bool found_target_in_trace_;
2489 WhatToFind what_to_find_;
2491 List<Object*> object_stack_;
Interface for iterating through all external resources in the heap.
void(* GCEpilogueCallback)(Isolate *isolate, GCType type, GCCallbackFlags flags)
void(* GCPrologueCallback)(Isolate *isolate, GCType type, GCCallbackFlags flags)
A JavaScript object (ECMA-262, 4.3.3)
AlwaysAllocateScope(Isolate *isolate)
DisallowAllocationFailure daf_
HeapObjectsFiltering filtering_
HeapObject * NextObject()
MakeHeapIterableHelper make_heap_iterable_helper_
HeapIterator(Heap *heap, HeapObjectsFiltering filtering)
SpaceIterator * space_iterator_
ObjectIterator * object_iterator_
DisallowHeapAllocation no_heap_allocation_
HeapObjectsFilter * filter_
static int Hash(Object *source, Name *name)
DISALLOW_COPY_AND_ASSIGN(DescriptorLookupCache)
int Lookup(Map *source, Name *name)
void Update(Map *source, Name *name, int result)
void Iterate(ObjectVisitor *v)
void AddOldString(String *string)
void AddString(String *string)
DISALLOW_COPY_AND_ASSIGN(ExternalStringTable)
ExternalStringTable(Heap *heap)
List< Object * > old_space_strings_
void ShrinkNewStrings(int position)
List< Object * > new_space_strings_
GCCallbacksScope(Heap *heap)
intptr_t * code_space_size
intptr_t * map_space_size
intptr_t * map_space_capacity
int * near_death_global_handle_count
static const int kStartMarker
intptr_t * code_space_capacity
intptr_t * memory_allocator_capacity
intptr_t * old_data_space_size
intptr_t * cell_space_size
intptr_t * old_pointer_space_size
static const int kEndMarker
int * global_handle_count
int * pending_global_handle_count
intptr_t * memory_allocator_size
intptr_t * old_data_space_capacity
int * weak_global_handle_count
intptr_t * property_cell_space_capacity
int * free_global_handle_count
intptr_t * old_pointer_space_capacity
intptr_t * property_cell_space_size
intptr_t * cell_space_capacity
RelocationLock(Heap *heap)
int64_t amount_of_external_allocated_memory_
size_t CommittedPhysicalMemory()
MUST_USE_RESULT AllocationResult CopyFixedArray(FixedArray *src)
List< GCPrologueCallbackPair > gc_prologue_callbacks_
MUST_USE_RESULT AllocationResult CopyJSObject(JSObject *source, AllocationSite *site=NULL)
bool flush_monomorphic_ics_
intptr_t MaxOldGenerationSize()
MUST_USE_RESULT AllocationResult AllocateRawOneByteString(int length, PretenureFlag pretenure)
void AdvanceIdleIncrementalMarking(intptr_t step_size)
ExternalStringTable external_string_table_
bool Contains(Address addr)
intptr_t max_old_generation_size_
Address remembered_unmapped_pages_[kRememberedUnmappedPages]
static const int kIdleScavengeThreshold
void EnsureFillerObjectAtTop()
static const int kAllocationSiteScratchpadSize
void IterateRoots(ObjectVisitor *v, VisitMode mode)
int nodes_copied_in_new_space_
void IncrementSemiSpaceCopiedObjectSize(int object_size)
static int GcSafeSizeOfOldObject(HeapObject *object)
void set_array_buffers_list(Object *object)
static const int kMaxSemiSpaceSizeHighMemoryDevice
Address * store_buffer_top_address()
OldSpace * old_pointer_space()
StoreBuffer store_buffer_
MUST_USE_RESULT AllocationResult AllocateEmptyFixedTypedArray(ExternalArrayType array_type)
void RecordCodeSubTypeStats(int code_sub_type, int code_age, size_t size)
FixedTypedArrayBase * EmptyFixedTypedArrayForMap(Map *map)
void VisitExternalResources(v8::ExternalResourceVisitor *visitor)
OldSpace * TargetSpace(HeapObject *object)
static void ScavengeObject(HeapObject **p, HeapObject *object)
void AddWeakObjectToCodeDependency(Handle< Object > obj, Handle< DependentCode > dep)
void DeoptMarkedAllocationSites()
void SetGetterStubDeoptPCOffset(int pc_offset)
RootListIndex RootIndexForEmptyFixedTypedArray(ElementsKind kind)
friend class HeapIterator
static const int kReduceMemoryFootprintMask
static const int kStrictArgumentsObjectSize
MarkCompactCollector mark_compact_collector_
MUST_USE_RESULT AllocationResult CopyConstantPoolArrayWithMap(ConstantPoolArray *src, Map *map)
static const ConstantStringTable constant_string_table[]
bool OldGenerationAllocationLimitReached()
void UpdateAllocationsHash(HeapObject *object)
static const int kSloppyArgumentsObjectSize
MUST_USE_RESULT AllocationResult InternalizeStringWithKey(HashTableKey *key)
int initial_semispace_size_
static const int kInitialStringTableSize
void ReserveSpace(int *sizes, Address *addresses)
StoreBufferRebuilder store_buffer_rebuilder_
unsigned int maximum_size_scavenges_
Address * OldPointerSpaceAllocationLimitAddress()
MUST_USE_RESULT AllocationResult AllocateEmptyConstantPoolArray()
PropertyCellSpace * property_cell_space()
intptr_t CommittedMemoryExecutable()
void MoveElements(FixedArray *array, int dst_index, int src_index, int len)
Object * allocation_sites_list_
INLINE(void RecordWrite(Address address, int offset))
RootListIndex RootIndexForExternalArrayType(ExternalArrayType array_type)
uint32_t dump_allocations_hash_countdown_
MUST_USE_RESULT AllocationResult AllocateForeign(Address address, PretenureFlag pretenure=NOT_TENURED)
uint32_t raw_allocations_hash_
void MarkCompactPrologue()
MUST_USE_RESULT AllocationResult AllocateCell(Object *value)
int64_t amount_of_external_allocated_memory()
MUST_USE_RESULT AllocationResult AllocatePartialMap(InstanceType instance_type, int instance_size)
ExternalStringTable * external_string_table()
void ClearObjectStats(bool clear_last_time_stats=false)
PagedSpace * paged_space(int idx)
GCIdleTimeHandler gc_idle_time_handler_
MUST_USE_RESULT AllocationResult CopyFixedArrayWithMap(FixedArray *src, Map *map)
void ProcessPretenuringFeedback()
static const int kRememberedUnmappedPages
Address DoScavenge(ObjectVisitor *scavenge_visitor, Address new_space_front)
void InitializeJSObjectFromMap(JSObject *obj, FixedArray *properties, Map *map)
Address * NewSpaceAllocationLimitAddress()
Address * NewSpaceAllocationTopAddress()
void RemoveGCPrologueCallback(v8::Isolate::GCPrologueCallback callback)
intptr_t MaximumCommittedMemory()
uint32_t allocations_count()
intptr_t max_executable_size_
MUST_USE_RESULT AllocationResult AllocateEmptyExternalArray(ExternalArrayType array_type)
void GarbageCollectionEpilogue()
List< GCEpilogueCallbackPair > gc_epilogue_callbacks_
MUST_USE_RESULT AllocationResult AllocateCode(int object_size, bool immovable)
int scan_on_scavenge_pages_
MUST_USE_RESULT AllocationResult AllocateUninitializedFixedArray(int length)
Object * native_contexts_list() const
void CheckNewSpaceExpansionCriteria()
LargeObjectSpace * lo_space()
void SelectScavengingVisitorsTable()
void QueueMemoryChunkForFree(MemoryChunk *chunk)
int gcs_since_last_deopt_
void ClearInstanceofCache()
Object * allocation_sites_list()
MUST_USE_RESULT AllocationResult AllocateUninitializedFixedDoubleArray(int length, PretenureFlag pretenure=NOT_TENURED)
void CheckpointObjectStats()
static const int kMaxOldSpaceSizeHighMemoryDevice
void ResetAllAllocationSitesDependentCode(PretenureFlag flag)
bool InOldDataSpace(Address address)
Object * native_contexts_list_
void public_set_non_monomorphic_cache(UnseededNumberDictionary *value)
void public_set_store_buffer_top(Address *top)
static const int kInitialNumberStringCacheSize
void DoScavengeObject(Map *map, HeapObject **slot, HeapObject *obj)
static String * UpdateNewSpaceReferenceInExternalStringTableEntry(Heap *heap, Object **pointer)
void IncrementCodeGeneratedBytes(bool is_crankshafted, int size)
int survived_since_last_expansion_
size_t object_counts_[OBJECT_STATS_COUNT]
void OnAllocationEvent(HeapObject *object, int size_in_bytes)
DISALLOW_COPY_AND_ASSIGN(Heap)
void InitializeWeakObjectToCodeTable()
void AddGCPrologueCallback(v8::Isolate::GCPrologueCallback callback, GCType gc_type_filter, bool pass_isolate=true)
void CreateInitialObjects()
PromotionQueue * promotion_queue()
bool WorthActivatingIncrementalMarking()
void ProcessWeakReferences(WeakObjectRetainer *retainer)
static const int kMaxExecutableSizeHighMemoryDevice
static const int kYoungSurvivalRateAllowedDeviation
MUST_USE_RESULT AllocationResult AllocateInternalizedStringFromUtf8(Vector< const char > str, int chars, uint32_t hash_field)
STATIC_ASSERT(kTrueValueRootIndex==Internals::kTrueValueRootIndex)
MUST_USE_RESULT AllocationResult AllocateInternalizedStringImpl(T t, int chars, uint32_t hash_field)
void RememberUnmappedPage(Address page, bool compacted)
void ReportStatisticsAfterGC()
void ProcessNativeContexts(WeakObjectRetainer *retainer)
bool inline_allocation_disabled()
static const int kMaxOldSpaceSizeMediumMemoryDevice
intptr_t old_generation_allocation_limit_
void FinalizeExternalString(String *string)
double get_max_gc_pause()
intptr_t MaxExecutableSize()
bool InNewSpace(Object *object)
int unflattened_strings_length_
void IterateSmiRoots(ObjectVisitor *v)
bool PerformGarbageCollection(GarbageCollector collector, const GCCallbackFlags gc_callback_flags=kNoGCCallbackFlags)
static const int kArgumentsCalleeIndex
MUST_USE_RESULT AllocationResult AllocateByteArray(int length, PretenureFlag pretenure=NOT_TENURED)
Address * OldPointerSpaceAllocationTopAddress()
void GarbageCollectionPrologue()
void TearDownArrayBuffers()
uint32_t allocations_count_
ExternalArray * EmptyExternalArrayForMap(Map *map)
static const int kMakeHeapIterableMask
size_t crankshaft_codegen_bytes_generated_
void public_set_materialized_objects(FixedArray *objects)
void CreateFillerObjectAt(Address addr, int size)
void public_set_code_stubs(UnseededNumberDictionary *value)
HeapObjectCallback GcSafeSizeOfOldObjectFunction()
void InitializeAllocationMemento(AllocationMemento *memento, AllocationSite *allocation_site)
intptr_t OldGenerationSpaceAvailable()
double total_regexp_code_generated_
static bool IsOneByte(T t, int chars)
bool AllowedToBeMigrated(HeapObject *object, AllocationSpace dest)
size_t object_sizes_last_time_[OBJECT_STATS_COUNT]
Object * ToBoolean(bool condition)
void CallGCPrologueCallbacks(GCType gc_type, GCCallbackFlags flags)
Object * encountered_weak_collections() const
MUST_USE_RESULT AllocationResult AllocateFixedArray(int length, PretenureFlag pretenure=NOT_TENURED)
void SetSetterStubDeoptPCOffset(int pc_offset)
NO_INLINE(void CreateJSEntryStub())
static const int kAbortIncrementalMarkingMask
MUST_USE_RESULT AllocationResult AllocateConstantPoolArray(const ConstantPoolArray::NumberOfEntries &small)
Object ** roots_array_start()
MUST_USE_RESULT AllocationResult AllocateRawFixedDoubleArray(int length, PretenureFlag pretenure)
Object * weak_object_to_code_table()
static const intptr_t kMinimumOldGenerationAllocationLimit
MUST_USE_RESULT AllocationResult AllocateRaw(int size_in_bytes, AllocationSpace space, AllocationSpace retry_space)
int always_allocate_scope_depth_
void UpdateCumulativeGCStatistics(double duration, double spent_in_mutator, double marking_time)
bool IsHighSurvivalRate()
StoreBuffer * store_buffer()
static const StringTypeTable string_type_table[]
Object * roots_[kRootListLength]
void increment_scan_on_scavenge_pages()
void UpdateOldSpaceLimits()
int allocation_sites_scratchpad_length_
int FullSizeNumberStringCacheLength()
void set_allocation_sites_list(Object *object)
void SetConstructStubDeoptPCOffset(int pc_offset)
static const int kMaxMarkCompactsInIdleRound
static const int kOldSpaceRoots
double get_min_in_mutator()
static void MoveBlock(Address dst, Address src, int byte_size)
void AddGCEpilogueCallback(v8::Isolate::GCEpilogueCallback callback, GCType gc_type_filter, bool pass_isolate=true)
Map * MapForExternalArrayType(ExternalArrayType array_type)
MUST_USE_RESULT AllocationResult CopyConstantPoolArray(ConstantPoolArray *src)
int64_t amount_of_external_allocated_memory_at_last_global_gc_
static const StructTable struct_table[]
bool ConfigureHeap(int max_semi_space_size, int max_old_space_size, int max_executable_size, size_t code_range_size)
bool RootCanBeTreatedAsConstant(RootListIndex root_index)
void ClearAllICsByKind(Code::Kind kind)
static const int kInitialEvalCacheSize
MUST_USE_RESULT AllocationResult CopyFixedDoubleArray(FixedDoubleArray *src)
MUST_USE_RESULT AllocationResult CopyAndTenureFixedCOWArray(FixedArray *src)
static void UpdateAllocationSiteFeedback(HeapObject *object, ScratchpadSlotMode mode)
MUST_USE_RESULT AllocationResult InternalizeString(String *str)
void ClearJSFunctionResultCaches()
MUST_USE_RESULT AllocationResult Allocate(Map *map, AllocationSpace space, AllocationSite *allocation_site=NULL)
MUST_USE_RESULT AllocationResult AllocateMap(InstanceType instance_type, int instance_size, ElementsKind elements_kind=TERMINAL_FAST_ELEMENTS_KIND)
void IterateWeakRoots(ObjectVisitor *v, VisitMode mode)
MUST_USE_RESULT AllocationResult AllocateJSObjectFromMap(Map *map, PretenureFlag pretenure=NOT_TENURED, bool alloc_props=true, AllocationSite *allocation_site=NULL)
int nodes_died_in_new_space_
bool InNewSpacePage(Address address)
MUST_USE_RESULT AllocationResult AllocateExtendedConstantPoolArray(const ConstantPoolArray::NumberOfEntries &small, const ConstantPoolArray::NumberOfEntries &extended)
static const int kMaxExecutableSizeHugeMemoryDevice
int gc_post_processing_depth_
STATIC_ASSERT(kempty_stringRootIndex==Internals::kEmptyStringRootIndex)
PropertyCellSpace * property_cell_space_
Object * encountered_weak_collections_
void UpdateNewSpaceReferencesInExternalStringTable(ExternalStringTableUpdaterCallback updater_func)
void DisableInlineAllocation()
static const int kNoGCFlags
static void ScavengeStoreBufferCallback(Heap *heap, MemoryChunk *page, StoreBufferEvent event)
intptr_t maximum_committed_
Address * OldDataSpaceAllocationTopAddress()
OldSpace * old_pointer_space_
void AddAllocationSiteToScratchpad(AllocationSite *site, ScratchpadSlotMode mode)
static const int kYoungSurvivalRateHighThreshold
bool InFromSpace(Object *object)
void IncrementPromotedObjectsSize(int object_size)
int remembered_unmapped_pages_index_
MemoryChunk * chunks_queued_for_free_
Object * weak_object_to_code_table_
int InitialSemiSpaceSize()
bool CollectGarbage(AllocationSpace space, const char *gc_reason=NULL, const GCCallbackFlags gc_callback_flags=kNoGCCallbackFlags)
void IncreaseTotalRegexpCodeGenerated(int size)
size_t object_counts_last_time_[OBJECT_STATS_COUNT]
bool inline_allocation_disabled_
void CallGCEpilogueCallbacks(GCType gc_type, GCCallbackFlags flags)
void ProcessAllocationSites(WeakObjectRetainer *retainer)
void FlushAllocationSitesScratchpad()
NO_INLINE(void CreateJSConstructEntryStub())
bool NextGCIsLikelyToBeFull()
base::Mutex relocation_mutex_
intptr_t PromotedTotalSize()
bool IsInGCPostProcessing()
int ReservedSemiSpaceSize()
void set_weak_object_to_code_table(Object *value)
void EnsureWeakObjectToCodeTable()
OldSpace * old_data_space()
static const int kMaxExecutableSizeMediumMemoryDevice
size_t object_sizes_[OBJECT_STATS_COUNT]
STATIC_ASSERT(kFalseValueRootIndex==Internals::kFalseValueRootIndex)
MUST_USE_RESULT AllocationResult AllocateHeapNumber(double value, MutableMode mode=IMMUTABLE, PretenureFlag pretenure=NOT_TENURED)
void RecordStats(HeapStats *stats, bool take_snapshot=false)
PromotionQueue promotion_queue_
bool CanMoveObjectStart(HeapObject *object)
static AllocationSpace TargetSpaceId(InstanceType type)
void IterateStrongRoots(ObjectVisitor *v, VisitMode mode)
MUST_USE_RESULT AllocationResult AllocateRawTwoByteString(int length, PretenureFlag pretenure)
Object * array_buffers_list_
void IterateAndMarkPointersToFromSpace(Address start, Address end, ObjectSlotCallback callback)
bool IdleNotification(int idle_time_in_ms)
STATIC_ASSERT(kUndefinedValueRootIndex==Internals::kUndefinedValueRootIndex)
void FlushNumberStringCache()
int reserved_semispace_size_
void AdjustLiveBytes(Address address, int by, InvocationMode mode)
void EnableInlineAllocation()
IncrementalMarking * incremental_marking()
static void FatalProcessOutOfMemory(const char *location, bool take_snapshot=false)
Address new_space_top_after_last_gc_
void UpdateMaximumCommitted()
void IncrementNodesCopiedInNewSpace()
RootListIndex RootIndexForFixedTypedArray(ExternalArrayType array_type)
void RepairFreeListsAfterBoot()
void PrintShortHeapStatistics()
GarbageCollector SelectGarbageCollector(AllocationSpace space, const char **reason)
@ FIRST_CODE_AGE_SUB_TYPE
@ FIRST_FIXED_ARRAY_SUB_TYPE
@ FIRST_CODE_KIND_SUB_TYPE
VisitorDispatchTable< ScavengingCallback > scavenging_visitors_table_
MUST_USE_RESULT AllocationResult AllocateRawFixedArray(int length, PretenureFlag pretenure)
static AllocationSpace SelectSpace(int object_size, AllocationSpace preferred_old_space, PretenureFlag pretenure)
Address * OldDataSpaceAllocationLimitAddress()
MUST_USE_RESULT AllocationResult AllocateFixedArrayWithFiller(int length, PretenureFlag pretenure, Object *filler)
static bool ShouldZapGarbage()
bool ShouldBePromoted(Address old_address, int object_size)
static void CopyBlock(Address dst, Address src, int byte_size)
intptr_t CommittedMemory()
void OnMoveEvent(HeapObject *target, HeapObject *source, int size_in_bytes)
MUST_USE_RESULT AllocationResult AllocateStruct(InstanceType type)
unsigned int gc_count_at_last_idle_gc_
void RightTrimFixedArray(FixedArrayBase *obj, int elements_to_trim)
MUST_USE_RESULT AllocationResult AllocateSymbol()
AllocationMemento * FindAllocationMemento(HeapObject *object)
bool DeoptMaybeTenuredAllocationSites()
FixedArrayBase * LeftTrimFixedArray(FixedArrayBase *obj, int elements_to_trim)
void CollectAllGarbage(int flags, const char *gc_reason=NULL, const GCCallbackFlags gc_callback_flags=kNoGCCallbackFlags)
static const int kArgumentsLengthIndex
static const int kMaxOldSpaceSizeHugeMemoryDevice
void IncrementYoungSurvivorsCounter(int survived)
Object * array_buffers_list() const
MUST_USE_RESULT AllocationResult AllocateFixedTypedArray(int length, ExternalArrayType array_type, PretenureFlag pretenure)
MUST_USE_RESULT AllocationResult AllocateJSObject(JSFunction *constructor, PretenureFlag pretenure=NOT_TENURED, AllocationSite *allocation_site=NULL)
MUST_USE_RESULT AllocationResult CopyCode(Code *code, Vector< byte > reloc_info)
double total_regexp_code_generated()
MUST_USE_RESULT AllocationResult AllocateFillerObject(int size, bool double_align, AllocationSpace space)
static void ScavengeObjectSlow(HeapObject **p, HeapObject *object)
static const int kPointerMultiplier
void EnsureFromSpaceIsCommitted()
MUST_USE_RESULT AllocationResult AllocatePropertyCell()
RootListIndex RootIndexForEmptyExternalArray(ElementsKind kind)
void ClearNormalizedMapCaches()
static const int kOldSurvivalRateLowThreshold
static const int kMaxOldSpaceSizeLowMemoryDevice
static const int kMaxSemiSpaceSizeHugeMemoryDevice
MUST_USE_RESULT AllocationResult AllocateExternalArray(int length, ExternalArrayType array_type, void *external_pointer, PretenureFlag pretenure)
Object ** weak_object_to_code_table_address()
intptr_t OldGenerationAllocationLimit(intptr_t old_gen_size, int freed_global_handles)
void UpdateReferencesInExternalStringTable(ExternalStringTableUpdaterCallback updater_func)
intptr_t get_max_alive_after_gc()
static void ScavengePointer(HeapObject **p)
void CompletelyClearInstanceofCache()
IncrementalMarking incremental_marking_
void RemoveGCEpilogueCallback(v8::Isolate::GCEpilogueCallback callback)
intptr_t max_alive_after_gc_
double semi_space_copied_rate_
static const int kMaxSemiSpaceSizeMediumMemoryDevice
bool ConfigureHeapDefault()
void EvaluateOldSpaceLocalPretenuring(uint64_t size_of_objects_before_gc)
void CollectAllAvailableGarbage(const char *gc_reason=NULL)
void IncrementNodesPromoted()
void RecordFixedArraySubTypeStats(int array_sub_type, size_t size)
void IncrementNodesDiedInNewSpace()
void decrement_scan_on_scavenge_pages()
void set_native_contexts_list(Object *object)
static const int kMaxExecutableSizeLowMemoryDevice
intptr_t promoted_objects_size_
MUST_USE_RESULT AllocationResult AllocateInternalizedStringImpl(T t, int chars, uint32_t hash_field)
MUST_USE_RESULT AllocationResult CopyFixedDoubleArrayWithMap(FixedDoubleArray *src, Map *map)
size_t full_codegen_bytes_generated_
INLINE(void RecordWrites(Address address, int start, int len))
Address always_allocate_scope_depth_address()
int64_t PromotedExternalMemorySize()
OldSpace * old_data_space_
void InitializeAllocationSitesScratchpad()
bool InToSpace(Object *object)
void PrintAlloctionsHash()
void ReportStatisticsBeforeGC()
void set_encountered_weak_collections(Object *weak_collection)
bool InOldPointerSpace(Address address)
static const int kMaxSemiSpaceSizeLowMemoryDevice
MUST_USE_RESULT AllocationResult AllocateEmptyFixedArray()
void public_set_empty_script(Script *script)
LargeObjectSpace * lo_space_
DependentCode * LookupWeakObjectToCodeDependency(Handle< Object > obj)
Map * MapForFixedTypedArray(ExternalArrayType array_type)
intptr_t PromotedSpaceSizeOfObjects()
int high_survival_rate_period_length_
HeapObjectCallback gc_safe_size_of_old_object_
void SetArgumentsAdaptorDeoptPCOffset(int pc_offset)
int NotifyContextDisposed()
MarkCompactCollector * mark_compact_collector()
void UpdateSurvivalStatistics(int start_new_space_size)
void ProcessArrayBuffers(WeakObjectRetainer *retainer)
intptr_t semi_space_copied_object_size_
bool flush_monomorphic_ics()
void RecordObjectStats(InstanceType type, size_t size)
intptr_t OldGenerationCapacityAvailable()
MUST_USE_RESULT AllocationResult LookupSingleCharacterStringFromCode(uint16_t code)
bool InSpace(Address addr, AllocationSpace space)
void MarkMapPointersAsEncoded(bool encoded)
STATIC_ASSERT(kNullValueRootIndex==Internals::kNullValueRootIndex)
bool MaximumSizeScavenge()
MUST_USE_RESULT AllocationResult AllocateOneByteInternalizedString(Vector< const uint8_t > str, uint32_t hash_field)
MUST_USE_RESULT AllocationResult AllocateTwoByteInternalizedString(Vector< const uc16 > str, uint32_t hash_field)
static bool RootCanBeWrittenAfterInitialization(RootListIndex root_index)
Object ** allocation_sites_list_address()
static const int kEmptyStringRootIndex
static const int kUndefinedValueRootIndex
static const int kFalseValueRootIndex
static const int kTrueValueRootIndex
static const int kNullValueRootIndex
static void ClearMark(HeapObject *object)
static int SizeOfMarkedObject(HeapObject *object)
STATIC_ASSERT((kHeapObjectTag &kNotMarkedBit) !=0)
static bool IsMarked(HeapObject *object)
static void SetMark(HeapObject *object)
static const uintptr_t kNotMarkedBit
static Map * MapOfMarkedObject(HeapObject *object)
static const int kHeaderSize
static const int kHashMask
static const int kKeyIndex
DISALLOW_COPY_AND_ASSIGN(KeyedLookupCache)
Address field_offsets_address()
static const int kCapacityMask
int Lookup(Handle< Map > map, Handle< Name > name)
static const int kMapHashShift
STATIC_ASSERT((kEntriesPerBucket &(kEntriesPerBucket - 1))==0)
friend class ExternalReference
static const int kEntriesPerBucket
static const int kNotFound
static int Hash(Handle< Map > map, Handle< Name > name)
void Update(Handle< Map > map, Handle< Name > name, int field_offset)
static const int kEntryLength
int field_offsets_[kLength]
static const int kMapIndex
STATIC_ASSERT(kEntriesPerBucket==-kHashMask)
static MemoryChunk * FromAddress(Address a)
NewSpacePage * prev_page() const
static bool IsAtStart(Address addr)
static NewSpacePage * FromAddress(Address address_in_page)
bool IsAtMaximumCapacity()
Address * allocation_top_address()
Address * allocation_limit_address()
static const int kPageSize
static const int kMaxRegularHeapObjectSize
Address * allocation_limit_address()
Address * allocation_top_address()
static const int kStringOffset
static const int kPatternOffset
static const int kArrayEntriesPerCacheEntry
static Object * Lookup(Heap *heap, String *key_string, Object *key_pattern, ResultsCacheType type)
@ REGEXP_MULTIPLE_INDICES
@ STRING_SPLIT_SUBSTRINGS
static void Enter(Isolate *isolate, Handle< String > key_string, Handle< Object > key_pattern, Handle< FixedArray > value_array, ResultsCacheType type)
static const int kRegExpResultsCacheSize
static const int kArrayOffset
static void Clear(FixedArray *cache)
static void AssertValidRange(Address from, Address to)
static Smi * FromInt(int value)
ObjectIterator * CreateIterator()
ObjectIterator * iterator_
HeapObjectCallback size_func_
SpaceIterator(Heap *heap)
Object *** start_of_current_page_
void Callback(MemoryChunk *page, StoreBufferEvent event)
MemoryChunk * current_page_
StoreBuffer * store_buffer_
StoreBufferRebuilder(StoreBuffer *store_buffer)
void VisitPointers(Object **start, Object **end)
void VisitPointers(Object **start, Object **end)
Callback GetVisitor(Map *map)
virtual Object * RetainAs(Object *object)=0
virtual ~WeakObjectRetainer()
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf map
enable harmony numeric enable harmony object literal extensions Optimize object size
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long mode(MIPS only)") DEFINE_BOOL(enable_always_align_csp
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi space(in MBytes)
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define STRING_INDEX_DECLARATION(name, str)
#define ROOT_INDEX_DECLARATION(type, name, camel_name)
#define STRUCT_MAP_ACCESSOR(NAME, Name, name)
#define STRONG_ROOT_LIST(V)
#define INTERNALIZED_STRING_LIST(V)
#define DECLARE_STRUCT_MAP(NAME, Name, name)
#define STRING_ACCESSOR(name, str)
#define ROOT_ACCESSOR(type, name, camel_name)
#define DCHECK(condition)
#define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName)
PerThreadAssertScopeDebugOnly< HEAP_ALLOCATION_ASSERT, false > DisallowHeapAllocation
@ LAST_FIXED_ARRAY_SUB_TYPE
void(* ObjectSlotCallback)(HeapObject **from, HeapObject *to)
kSerializedDataOffset Object
const int kPointerSizeLog2
@ TERMINAL_FAST_ELEMENTS_KIND
String *(* ExternalStringTableUpdaterCallback)(Heap *heap, Object **pointer)
void PrintF(const char *format,...)
int(* HeapObjectCallback)(HeapObject *obj)
kFeedbackVectorOffset flag
void(* ScavengingCallback)(Map *map, HeapObject **slot, HeapObject *object)
ArrayStorageAllocationMode
@ INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE
@ DONT_INITIALIZE_ARRAY_ELEMENTS
Debugger support for the V8 JavaScript engine.
GCType
Applications can register callback functions which will be called before and after a garbage collecti...
MakeHeapIterableHelper(Heap *heap)
bool operator==(const GCEpilogueCallbackPair &pair) const
v8::Isolate::GCPrologueCallback callback
GCEpilogueCallbackPair(v8::Isolate::GCPrologueCallback callback, GCType gc_type, bool pass_isolate)
bool operator==(const GCPrologueCallbackPair &pair) const
v8::Isolate::GCPrologueCallback callback
GCPrologueCallbackPair(v8::Isolate::GCPrologueCallback callback, GCType gc_type, bool pass_isolate)
Entry(HeapObject *obj, int size)
#define T(name, string, precedence)