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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 3087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3098 Handle<SeededNumberDictionary> slow_element_dictionary = | 3098 Handle<SeededNumberDictionary> slow_element_dictionary = |
3099 SeededNumberDictionary::New(isolate(), 0, TENURED); | 3099 SeededNumberDictionary::New(isolate(), 0, TENURED); |
3100 slow_element_dictionary->set_requires_slow_elements(); | 3100 slow_element_dictionary->set_requires_slow_elements(); |
3101 set_empty_slow_element_dictionary(*slow_element_dictionary); | 3101 set_empty_slow_element_dictionary(*slow_element_dictionary); |
3102 | 3102 |
3103 set_materialized_objects(*factory->NewFixedArray(0, TENURED)); | 3103 set_materialized_objects(*factory->NewFixedArray(0, TENURED)); |
3104 | 3104 |
3105 // Handling of script id generation is in Factory::NewScript. | 3105 // Handling of script id generation is in Factory::NewScript. |
3106 set_last_script_id(Smi::FromInt(v8::UnboundScript::kNoScriptId)); | 3106 set_last_script_id(Smi::FromInt(v8::UnboundScript::kNoScriptId)); |
3107 | 3107 |
3108 Handle<PropertyCell> cell = factory->NewPropertyCell(); | |
3109 cell->set_value(Smi::FromInt(1)); | |
3110 set_array_protector(*cell); | |
3111 | |
3112 set_allocation_sites_scratchpad( | 3108 set_allocation_sites_scratchpad( |
3113 *factory->NewFixedArray(kAllocationSiteScratchpadSize, TENURED)); | 3109 *factory->NewFixedArray(kAllocationSiteScratchpadSize, TENURED)); |
3114 InitializeAllocationSitesScratchpad(); | 3110 InitializeAllocationSitesScratchpad(); |
3115 | 3111 |
3116 // Initialize keyed lookup cache. | 3112 // Initialize keyed lookup cache. |
3117 isolate_->keyed_lookup_cache()->Clear(); | 3113 isolate_->keyed_lookup_cache()->Clear(); |
3118 | 3114 |
3119 // Initialize context slot cache. | 3115 // Initialize context slot cache. |
3120 isolate_->context_slot_cache()->Clear(); | 3116 isolate_->context_slot_cache()->Clear(); |
3121 | 3117 |
(...skipping 3287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6409 static_cast<int>(object_sizes_last_time_[index])); | 6405 static_cast<int>(object_sizes_last_time_[index])); |
6410 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6406 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6411 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6407 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6412 | 6408 |
6413 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6409 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6414 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6410 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6415 ClearObjectStats(); | 6411 ClearObjectStats(); |
6416 } | 6412 } |
6417 } | 6413 } |
6418 } // namespace v8::internal | 6414 } // namespace v8::internal |
OLD | NEW |