| 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 3395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3406 | 3406 |
| 3407 // Allocate object to hold object observation state. | 3407 // Allocate object to hold object observation state. |
| 3408 set_observation_state(*factory->NewJSObjectFromMap( | 3408 set_observation_state(*factory->NewJSObjectFromMap( |
| 3409 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize))); | 3409 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize))); |
| 3410 | 3410 |
| 3411 // Microtask queue uses the empty fixed array as a sentinel for "empty". | 3411 // Microtask queue uses the empty fixed array as a sentinel for "empty". |
| 3412 // Number of queued microtasks stored in Isolate::pending_microtask_count(). | 3412 // Number of queued microtasks stored in Isolate::pending_microtask_count(). |
| 3413 set_microtask_queue(empty_fixed_array()); | 3413 set_microtask_queue(empty_fixed_array()); |
| 3414 | 3414 |
| 3415 { | 3415 { |
| 3416 FeedbackVectorSpec spec(0, Code::KEYED_LOAD_IC); | 3416 Code::Kind kinds[] = {Code::LOAD_IC, Code::KEYED_LOAD_IC, Code::STORE_IC, |
| 3417 Code::KEYED_STORE_IC}; |
| 3418 FeedbackVectorSpec spec(0, 4, kinds); |
| 3417 Handle<TypeFeedbackVector> dummy_vector = | 3419 Handle<TypeFeedbackVector> dummy_vector = |
| 3418 factory->NewTypeFeedbackVector(&spec); | 3420 factory->NewTypeFeedbackVector(&spec); |
| 3419 dummy_vector->Set(FeedbackVectorICSlot(0), | 3421 for (int i = 0; i < 4; i++) { |
| 3420 *TypeFeedbackVector::MegamorphicSentinel(isolate()), | 3422 dummy_vector->Set(FeedbackVectorICSlot(0), |
| 3421 SKIP_WRITE_BARRIER); | 3423 *TypeFeedbackVector::MegamorphicSentinel(isolate()), |
| 3422 set_keyed_load_dummy_vector(*dummy_vector); | 3424 SKIP_WRITE_BARRIER); |
| 3423 } | 3425 } |
| 3424 | 3426 set_dummy_vector(*dummy_vector); |
| 3425 if (FLAG_vector_stores) { | |
| 3426 FeedbackVectorSpec spec(0, Code::KEYED_STORE_IC); | |
| 3427 Handle<TypeFeedbackVector> dummy_vector = | |
| 3428 factory->NewTypeFeedbackVector(&spec); | |
| 3429 dummy_vector->Set(FeedbackVectorICSlot(0), | |
| 3430 *TypeFeedbackVector::MegamorphicSentinel(isolate()), | |
| 3431 SKIP_WRITE_BARRIER); | |
| 3432 set_keyed_store_dummy_vector(*dummy_vector); | |
| 3433 } else { | |
| 3434 set_keyed_store_dummy_vector(empty_fixed_array()); | |
| 3435 } | 3427 } |
| 3436 | 3428 |
| 3437 set_detached_contexts(empty_fixed_array()); | 3429 set_detached_contexts(empty_fixed_array()); |
| 3438 set_retained_maps(ArrayList::cast(empty_fixed_array())); | 3430 set_retained_maps(ArrayList::cast(empty_fixed_array())); |
| 3439 | 3431 |
| 3440 set_weak_object_to_code_table( | 3432 set_weak_object_to_code_table( |
| 3441 *WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY, | 3433 *WeakHashTable::New(isolate(), 16, USE_DEFAULT_MINIMUM_CAPACITY, |
| 3442 TENURED)); | 3434 TENURED)); |
| 3443 | 3435 |
| 3444 Handle<SeededNumberDictionary> slow_element_dictionary = | 3436 Handle<SeededNumberDictionary> slow_element_dictionary = |
| (...skipping 3490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6935 *object_type = "CODE_TYPE"; \ | 6927 *object_type = "CODE_TYPE"; \ |
| 6936 *object_sub_type = "CODE_AGE/" #name; \ | 6928 *object_sub_type = "CODE_AGE/" #name; \ |
| 6937 return true; | 6929 return true; |
| 6938 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) | 6930 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) |
| 6939 #undef COMPARE_AND_RETURN_NAME | 6931 #undef COMPARE_AND_RETURN_NAME |
| 6940 } | 6932 } |
| 6941 return false; | 6933 return false; |
| 6942 } | 6934 } |
| 6943 } // namespace internal | 6935 } // namespace internal |
| 6944 } // namespace v8 | 6936 } // namespace v8 |
| OLD | NEW |