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 3335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3346 set_symbol_registry(Smi::FromInt(0)); | 3346 set_symbol_registry(Smi::FromInt(0)); |
3347 | 3347 |
3348 // Allocate object to hold object observation state. | 3348 // Allocate object to hold object observation state. |
3349 set_observation_state(*factory->NewJSObjectFromMap( | 3349 set_observation_state(*factory->NewJSObjectFromMap( |
3350 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize))); | 3350 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize))); |
3351 | 3351 |
3352 // Microtask queue uses the empty fixed array as a sentinel for "empty". | 3352 // Microtask queue uses the empty fixed array as a sentinel for "empty". |
3353 // Number of queued microtasks stored in Isolate::pending_microtask_count(). | 3353 // Number of queued microtasks stored in Isolate::pending_microtask_count(). |
3354 set_microtask_queue(empty_fixed_array()); | 3354 set_microtask_queue(empty_fixed_array()); |
3355 | 3355 |
3356 FeedbackVectorSpec spec(0, Code::KEYED_LOAD_IC); | 3356 { |
3357 Handle<TypeFeedbackVector> dummy_vector = | 3357 FeedbackVectorSpec spec(0, Code::KEYED_LOAD_IC); |
3358 factory->NewTypeFeedbackVector(&spec); | 3358 Handle<TypeFeedbackVector> dummy_vector = |
3359 dummy_vector->Set(FeedbackVectorICSlot(0), | 3359 factory->NewTypeFeedbackVector(&spec); |
3360 *TypeFeedbackVector::MegamorphicSentinel(isolate()), | 3360 dummy_vector->Set(FeedbackVectorICSlot(0), |
3361 SKIP_WRITE_BARRIER); | 3361 *TypeFeedbackVector::MegamorphicSentinel(isolate()), |
3362 set_keyed_load_dummy_vector(*dummy_vector); | 3362 SKIP_WRITE_BARRIER); |
| 3363 set_keyed_load_dummy_vector(*dummy_vector); |
| 3364 } |
| 3365 |
| 3366 if (FLAG_vector_stores) { |
| 3367 FeedbackVectorSpec spec(0, Code::KEYED_STORE_IC); |
| 3368 Handle<TypeFeedbackVector> dummy_vector = |
| 3369 factory->NewTypeFeedbackVector(&spec); |
| 3370 dummy_vector->Set(FeedbackVectorICSlot(0), |
| 3371 *TypeFeedbackVector::MegamorphicSentinel(isolate()), |
| 3372 SKIP_WRITE_BARRIER); |
| 3373 set_keyed_store_dummy_vector(*dummy_vector); |
| 3374 } else { |
| 3375 set_keyed_store_dummy_vector(empty_fixed_array()); |
| 3376 } |
3363 | 3377 |
3364 set_detached_contexts(empty_fixed_array()); | 3378 set_detached_contexts(empty_fixed_array()); |
3365 set_retained_maps(ArrayList::cast(empty_fixed_array())); | 3379 set_retained_maps(ArrayList::cast(empty_fixed_array())); |
3366 | 3380 |
3367 set_weak_object_to_code_table( | 3381 set_weak_object_to_code_table( |
3368 *WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY, | 3382 *WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY, |
3369 TENURED)); | 3383 TENURED)); |
3370 | 3384 |
3371 Handle<SeededNumberDictionary> slow_element_dictionary = | 3385 Handle<SeededNumberDictionary> slow_element_dictionary = |
3372 SeededNumberDictionary::New(isolate(), 0, TENURED); | 3386 SeededNumberDictionary::New(isolate(), 0, TENURED); |
(...skipping 3459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6832 *object_type = "CODE_TYPE"; \ | 6846 *object_type = "CODE_TYPE"; \ |
6833 *object_sub_type = "CODE_AGE/" #name; \ | 6847 *object_sub_type = "CODE_AGE/" #name; \ |
6834 return true; | 6848 return true; |
6835 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) | 6849 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) |
6836 #undef COMPARE_AND_RETURN_NAME | 6850 #undef COMPARE_AND_RETURN_NAME |
6837 } | 6851 } |
6838 return false; | 6852 return false; |
6839 } | 6853 } |
6840 } // namespace internal | 6854 } // namespace internal |
6841 } // namespace v8 | 6855 } // namespace v8 |
OLD | NEW |