diff options
Diffstat (limited to 'deps/v8/src/heap/setup-heap-internal.cc')
-rw-r--r-- | deps/v8/src/heap/setup-heap-internal.cc | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/deps/v8/src/heap/setup-heap-internal.cc b/deps/v8/src/heap/setup-heap-internal.cc index 9e2d7e6354..8a7aca1694 100644 --- a/deps/v8/src/heap/setup-heap-internal.cc +++ b/deps/v8/src/heap/setup-heap-internal.cc @@ -222,7 +222,7 @@ bool Heap::CreateInitialMaps() { (constructor_function_index)); \ } - ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, scope_info) + ALLOCATE_VARSIZE_MAP(SCOPE_INFO_TYPE, scope_info) ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, module_info) ALLOCATE_VARSIZE_MAP(FEEDBACK_VECTOR_TYPE, feedback_vector) ALLOCATE_PRIMITIVE_MAP(HEAP_NUMBER_TYPE, HeapNumber::kSize, heap_number, @@ -289,12 +289,17 @@ bool Heap::CreateInitialMaps() { ALLOCATE_MAP(CELL_TYPE, Cell::kSize, cell) ALLOCATE_MAP(PROPERTY_CELL_TYPE, PropertyCell::kSize, global_property_cell) ALLOCATE_MAP(WEAK_CELL_TYPE, WeakCell::kSize, weak_cell) - ALLOCATE_MAP(CELL_TYPE, Cell::kSize, no_closures_cell) - ALLOCATE_MAP(CELL_TYPE, Cell::kSize, one_closure_cell) - ALLOCATE_MAP(CELL_TYPE, Cell::kSize, many_closures_cell) ALLOCATE_MAP(FILLER_TYPE, kPointerSize, one_pointer_filler) ALLOCATE_MAP(FILLER_TYPE, 2 * kPointerSize, two_pointer_filler) + // The "no closures" and "one closure" FeedbackCell maps need + // to be marked unstable because their objects can change maps. + ALLOCATE_MAP(FEEDBACK_CELL_TYPE, FeedbackCell::kSize, no_closures_cell) + no_closures_cell_map()->mark_unstable(); + ALLOCATE_MAP(FEEDBACK_CELL_TYPE, FeedbackCell::kSize, one_closure_cell) + one_closure_cell_map()->mark_unstable(); + ALLOCATE_MAP(FEEDBACK_CELL_TYPE, FeedbackCell::kSize, many_closures_cell) + ALLOCATE_VARSIZE_MAP(TRANSITION_ARRAY_TYPE, transition_array) ALLOCATE_VARSIZE_MAP(HASH_TABLE_TYPE, hash_table) @@ -303,6 +308,7 @@ bool Heap::CreateInitialMaps() { ALLOCATE_VARSIZE_MAP(HASH_TABLE_TYPE, name_dictionary) ALLOCATE_VARSIZE_MAP(HASH_TABLE_TYPE, global_dictionary) ALLOCATE_VARSIZE_MAP(HASH_TABLE_TYPE, number_dictionary) + ALLOCATE_VARSIZE_MAP(HASH_TABLE_TYPE, simple_number_dictionary) ALLOCATE_VARSIZE_MAP(HASH_TABLE_TYPE, string_table) ALLOCATE_VARSIZE_MAP(HASH_TABLE_TYPE, weak_hash_table) @@ -475,7 +481,7 @@ void Heap::CreateInitialObjects() { // Create the code_stubs dictionary. The initial size is set to avoid // expanding the dictionary during bootstrapping. - set_code_stubs(*NumberDictionary::New(isolate(), 128)); + set_code_stubs(*SimpleNumberDictionary::New(isolate(), 128)); { HandleScope scope(isolate()); @@ -533,7 +539,10 @@ void Heap::CreateInitialObjects() { set_regexp_multiple_cache(*factory->NewFixedArray( RegExpResultsCache::kRegExpResultsCacheSize, TENURED)); - set_undefined_cell(*factory->NewCell(factory->undefined_value())); + // Allocate FeedbackCell for builtins. + Handle<FeedbackCell> many_closures_cell = + factory->NewManyClosuresCell(factory->undefined_value()); + set_many_closures_cell(*many_closures_cell); // Microtask queue uses the empty fixed array as a sentinel for "empty". // Number of queued microtasks stored in Isolate::pending_microtask_count(). @@ -638,6 +647,14 @@ void Heap::CreateInitialObjects() { cell->set_value(Smi::FromInt(Isolate::kProtectorValid)); set_array_buffer_neutering_protector(*cell); + cell = factory->NewPropertyCell(factory->empty_string()); + cell->set_value(Smi::FromInt(Isolate::kProtectorValid)); + set_promise_hook_protector(*cell); + + cell = factory->NewPropertyCell(factory->empty_string()); + cell->set_value(Smi::FromInt(Isolate::kProtectorValid)); + set_promise_then_protector(*cell); + set_serialized_objects(empty_fixed_array()); set_serialized_global_proxy_sizes(empty_fixed_array()); @@ -650,6 +667,9 @@ void Heap::CreateInitialObjects() { set_deserialize_lazy_handler_wide(Smi::kZero); set_deserialize_lazy_handler_extra_wide(Smi::kZero); + // Initialize builtins constants table. + set_builtins_constants_table(empty_fixed_array()); + // Initialize context slot cache. isolate_->context_slot_cache()->Clear(); |