| 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/heap/heap.h" | 5 #include "src/heap/heap.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 3328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3339 set_dummy_vector(*dummy_vector); | 3339 set_dummy_vector(*dummy_vector); |
| 3340 } | 3340 } |
| 3341 | 3341 |
| 3342 set_detached_contexts(empty_fixed_array()); | 3342 set_detached_contexts(empty_fixed_array()); |
| 3343 set_retained_maps(ArrayList::cast(empty_fixed_array())); | 3343 set_retained_maps(ArrayList::cast(empty_fixed_array())); |
| 3344 | 3344 |
| 3345 set_weak_object_to_code_table( | 3345 set_weak_object_to_code_table( |
| 3346 *WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY, | 3346 *WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY, |
| 3347 TENURED)); | 3347 TENURED)); |
| 3348 | 3348 |
| 3349 set_script_list(Smi::FromInt(0)); |
| 3350 |
| 3349 Handle<SeededNumberDictionary> slow_element_dictionary = | 3351 Handle<SeededNumberDictionary> slow_element_dictionary = |
| 3350 SeededNumberDictionary::New(isolate(), 0, TENURED); | 3352 SeededNumberDictionary::New(isolate(), 0, TENURED); |
| 3351 slow_element_dictionary->set_requires_slow_elements(); | 3353 slow_element_dictionary->set_requires_slow_elements(); |
| 3352 set_empty_slow_element_dictionary(*slow_element_dictionary); | 3354 set_empty_slow_element_dictionary(*slow_element_dictionary); |
| 3353 | 3355 |
| 3354 set_materialized_objects(*factory->NewFixedArray(0, TENURED)); | 3356 set_materialized_objects(*factory->NewFixedArray(0, TENURED)); |
| 3355 | 3357 |
| 3356 // Handling of script id generation is in Factory::NewScript. | 3358 // Handling of script id generation is in Factory::NewScript. |
| 3357 set_last_script_id(Smi::FromInt(v8::UnboundScript::kNoScriptId)); | 3359 set_last_script_id(Smi::FromInt(v8::UnboundScript::kNoScriptId)); |
| 3358 | 3360 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3407 case kStoreBufferTopRootIndex: | 3409 case kStoreBufferTopRootIndex: |
| 3408 case kNumberStringCacheRootIndex: | 3410 case kNumberStringCacheRootIndex: |
| 3409 case kInstanceofCacheFunctionRootIndex: | 3411 case kInstanceofCacheFunctionRootIndex: |
| 3410 case kInstanceofCacheMapRootIndex: | 3412 case kInstanceofCacheMapRootIndex: |
| 3411 case kInstanceofCacheAnswerRootIndex: | 3413 case kInstanceofCacheAnswerRootIndex: |
| 3412 case kCodeStubsRootIndex: | 3414 case kCodeStubsRootIndex: |
| 3413 case kNonMonomorphicCacheRootIndex: | 3415 case kNonMonomorphicCacheRootIndex: |
| 3414 case kPolymorphicCodeCacheRootIndex: | 3416 case kPolymorphicCodeCacheRootIndex: |
| 3415 case kEmptyScriptRootIndex: | 3417 case kEmptyScriptRootIndex: |
| 3416 case kSymbolRegistryRootIndex: | 3418 case kSymbolRegistryRootIndex: |
| 3419 case kScriptListRootIndex: |
| 3417 case kMaterializedObjectsRootIndex: | 3420 case kMaterializedObjectsRootIndex: |
| 3418 case kAllocationSitesScratchpadRootIndex: | 3421 case kAllocationSitesScratchpadRootIndex: |
| 3419 case kMicrotaskQueueRootIndex: | 3422 case kMicrotaskQueueRootIndex: |
| 3420 case kDetachedContextsRootIndex: | 3423 case kDetachedContextsRootIndex: |
| 3421 case kWeakObjectToCodeTableRootIndex: | 3424 case kWeakObjectToCodeTableRootIndex: |
| 3422 case kRetainedMapsRootIndex: | 3425 case kRetainedMapsRootIndex: |
| 3423 case kWeakStackTraceListRootIndex: | 3426 case kWeakStackTraceListRootIndex: |
| 3424 // Smi values | 3427 // Smi values |
| 3425 #define SMI_ENTRY(type, name, Name) case k##Name##RootIndex: | 3428 #define SMI_ENTRY(type, name, Name) case k##Name##RootIndex: |
| 3426 SMI_ROOT_LIST(SMI_ENTRY) | 3429 SMI_ROOT_LIST(SMI_ENTRY) |
| (...skipping 3476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6903 *object_type = "CODE_TYPE"; \ | 6906 *object_type = "CODE_TYPE"; \ |
| 6904 *object_sub_type = "CODE_AGE/" #name; \ | 6907 *object_sub_type = "CODE_AGE/" #name; \ |
| 6905 return true; | 6908 return true; |
| 6906 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) | 6909 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) |
| 6907 #undef COMPARE_AND_RETURN_NAME | 6910 #undef COMPARE_AND_RETURN_NAME |
| 6908 } | 6911 } |
| 6909 return false; | 6912 return false; |
| 6910 } | 6913 } |
| 6911 } // namespace internal | 6914 } // namespace internal |
| 6912 } // namespace v8 | 6915 } // namespace v8 |
| OLD | NEW |