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 3078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3089 } | 3089 } |
3090 | 3090 |
3091 set_detached_contexts(empty_fixed_array()); | 3091 set_detached_contexts(empty_fixed_array()); |
3092 set_retained_maps(ArrayList::cast(empty_fixed_array())); | 3092 set_retained_maps(ArrayList::cast(empty_fixed_array())); |
3093 | 3093 |
3094 set_weak_object_to_code_table( | 3094 set_weak_object_to_code_table( |
3095 *WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY, | 3095 *WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY, |
3096 TENURED)); | 3096 TENURED)); |
3097 | 3097 |
3098 Handle<SeededNumberDictionary> slow_element_dictionary = | 3098 Handle<SeededNumberDictionary> slow_element_dictionary = |
3099 SeededNumberDictionary::New(isolate(), 0, TENURED); | 3099 SeededNumberDictionary::New(isolate(), 1, 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 set_allocation_sites_scratchpad( | 3108 set_allocation_sites_scratchpad( |
3109 *factory->NewFixedArray(kAllocationSiteScratchpadSize, TENURED)); | 3109 *factory->NewFixedArray(kAllocationSiteScratchpadSize, TENURED)); |
(...skipping 3295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6405 static_cast<int>(object_sizes_last_time_[index])); | 6405 static_cast<int>(object_sizes_last_time_[index])); |
6406 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6406 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6407 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6407 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6408 | 6408 |
6409 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6409 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6410 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6410 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6411 ClearObjectStats(); | 6411 ClearObjectStats(); |
6412 } | 6412 } |
6413 } | 6413 } |
6414 } // namespace v8::internal | 6414 } // namespace v8::internal |
OLD | NEW |