| 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" |
| 11 #include "src/base/utils/random-number-generator.h" | 11 #include "src/base/utils/random-number-generator.h" |
| 12 #include "src/bootstrapper.h" | 12 #include "src/bootstrapper.h" |
| 13 #include "src/codegen.h" | 13 #include "src/codegen.h" |
| 14 #include "src/compilation-cache.h" | 14 #include "src/compilation-cache.h" |
| 15 #include "src/conversions.h" | 15 #include "src/conversions.h" |
| 16 #include "src/cpu-profiler.h" | 16 #include "src/cpu-profiler.h" |
| 17 #include "src/debug/debug.h" | 17 #include "src/debug/debug.h" |
| 18 #include "src/deoptimizer.h" | 18 #include "src/deoptimizer.h" |
| 19 #include "src/global-handles.h" | 19 #include "src/global-handles.h" |
| 20 #include "src/heap/gc-idle-time-handler.h" | 20 #include "src/heap/gc-idle-time-handler.h" |
| 21 #include "src/heap/incremental-marking.h" | 21 #include "src/heap/incremental-marking.h" |
| 22 #include "src/heap/mark-compact.h" | 22 #include "src/heap/mark-compact.h" |
| 23 #include "src/heap/memory-reducer.h" | 23 #include "src/heap/memory-reducer.h" |
| 24 #include "src/heap/objects-visiting-inl.h" | 24 #include "src/heap/objects-visiting-inl.h" |
| 25 #include "src/heap/objects-visiting.h" | 25 #include "src/heap/objects-visiting.h" |
| 26 #include "src/heap/store-buffer.h" | 26 #include "src/heap/store-buffer.h" |
| 27 #include "src/heap-profiler.h" | 27 #include "src/heap-profiler.h" |
| 28 #include "src/interpreter/interpreter.h" |
| 28 #include "src/runtime-profiler.h" | 29 #include "src/runtime-profiler.h" |
| 29 #include "src/scopeinfo.h" | 30 #include "src/scopeinfo.h" |
| 30 #include "src/snapshot/natives.h" | 31 #include "src/snapshot/natives.h" |
| 31 #include "src/snapshot/serialize.h" | 32 #include "src/snapshot/serialize.h" |
| 32 #include "src/snapshot/snapshot.h" | 33 #include "src/snapshot/snapshot.h" |
| 33 #include "src/utils.h" | 34 #include "src/utils.h" |
| 34 #include "src/v8threads.h" | 35 #include "src/v8threads.h" |
| 35 #include "src/vm-state-inl.h" | 36 #include "src/vm-state-inl.h" |
| 36 | 37 |
| 37 #if V8_TARGET_ARCH_PPC && !V8_INTERPRETED_REGEXP | 38 #if V8_TARGET_ARCH_PPC && !V8_INTERPRETED_REGEXP |
| (...skipping 3317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3355 cell->set_value(Smi::FromInt(Isolate::kArrayProtectorValid)); | 3356 cell->set_value(Smi::FromInt(Isolate::kArrayProtectorValid)); |
| 3356 set_array_protector(*cell); | 3357 set_array_protector(*cell); |
| 3357 | 3358 |
| 3358 cell = factory->NewPropertyCell(); | 3359 cell = factory->NewPropertyCell(); |
| 3359 cell->set_value(the_hole_value()); | 3360 cell->set_value(the_hole_value()); |
| 3360 set_empty_property_cell(*cell); | 3361 set_empty_property_cell(*cell); |
| 3361 | 3362 |
| 3362 set_weak_stack_trace_list(Smi::FromInt(0)); | 3363 set_weak_stack_trace_list(Smi::FromInt(0)); |
| 3363 | 3364 |
| 3364 // Will be filled in by Interpreter::Initialize(). | 3365 // Will be filled in by Interpreter::Initialize(). |
| 3365 set_interpreter_table(empty_fixed_array()); | 3366 set_interpreter_table( |
| 3367 *interpreter::Interpreter::CreateUninitializedInterpreterTable( |
| 3368 isolate())); |
| 3366 | 3369 |
| 3367 set_allocation_sites_scratchpad( | 3370 set_allocation_sites_scratchpad( |
| 3368 *factory->NewFixedArray(kAllocationSiteScratchpadSize, TENURED)); | 3371 *factory->NewFixedArray(kAllocationSiteScratchpadSize, TENURED)); |
| 3369 InitializeAllocationSitesScratchpad(); | 3372 InitializeAllocationSitesScratchpad(); |
| 3370 | 3373 |
| 3371 // Initialize keyed lookup cache. | 3374 // Initialize keyed lookup cache. |
| 3372 isolate_->keyed_lookup_cache()->Clear(); | 3375 isolate_->keyed_lookup_cache()->Clear(); |
| 3373 | 3376 |
| 3374 // Initialize context slot cache. | 3377 // Initialize context slot cache. |
| 3375 isolate_->context_slot_cache()->Clear(); | 3378 isolate_->context_slot_cache()->Clear(); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3407 case kPolymorphicCodeCacheRootIndex: | 3410 case kPolymorphicCodeCacheRootIndex: |
| 3408 case kEmptyScriptRootIndex: | 3411 case kEmptyScriptRootIndex: |
| 3409 case kSymbolRegistryRootIndex: | 3412 case kSymbolRegistryRootIndex: |
| 3410 case kMaterializedObjectsRootIndex: | 3413 case kMaterializedObjectsRootIndex: |
| 3411 case kAllocationSitesScratchpadRootIndex: | 3414 case kAllocationSitesScratchpadRootIndex: |
| 3412 case kMicrotaskQueueRootIndex: | 3415 case kMicrotaskQueueRootIndex: |
| 3413 case kDetachedContextsRootIndex: | 3416 case kDetachedContextsRootIndex: |
| 3414 case kWeakObjectToCodeTableRootIndex: | 3417 case kWeakObjectToCodeTableRootIndex: |
| 3415 case kRetainedMapsRootIndex: | 3418 case kRetainedMapsRootIndex: |
| 3416 case kWeakStackTraceListRootIndex: | 3419 case kWeakStackTraceListRootIndex: |
| 3417 case kInterpreterTableRootIndex: | |
| 3418 // Smi values | 3420 // Smi values |
| 3419 #define SMI_ENTRY(type, name, Name) case k##Name##RootIndex: | 3421 #define SMI_ENTRY(type, name, Name) case k##Name##RootIndex: |
| 3420 SMI_ROOT_LIST(SMI_ENTRY) | 3422 SMI_ROOT_LIST(SMI_ENTRY) |
| 3421 #undef SMI_ENTRY | 3423 #undef SMI_ENTRY |
| 3422 // String table | 3424 // String table |
| 3423 case kStringTableRootIndex: | 3425 case kStringTableRootIndex: |
| 3424 return true; | 3426 return true; |
| 3425 | 3427 |
| 3426 default: | 3428 default: |
| 3427 return false; | 3429 return false; |
| (...skipping 3471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6899 *object_type = "CODE_TYPE"; \ | 6901 *object_type = "CODE_TYPE"; \ |
| 6900 *object_sub_type = "CODE_AGE/" #name; \ | 6902 *object_sub_type = "CODE_AGE/" #name; \ |
| 6901 return true; | 6903 return true; |
| 6902 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) | 6904 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) |
| 6903 #undef COMPARE_AND_RETURN_NAME | 6905 #undef COMPARE_AND_RETURN_NAME |
| 6904 } | 6906 } |
| 6905 return false; | 6907 return false; |
| 6906 } | 6908 } |
| 6907 } // namespace internal | 6909 } // namespace internal |
| 6908 } // namespace v8 | 6910 } // namespace v8 |
| OLD | NEW |