| 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 3040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3051 set_symbol_registry(Smi::FromInt(0)); | 3051 set_symbol_registry(Smi::FromInt(0)); |
| 3052 | 3052 |
| 3053 // Allocate object to hold object observation state. | 3053 // Allocate object to hold object observation state. |
| 3054 set_observation_state(*factory->NewJSObjectFromMap( | 3054 set_observation_state(*factory->NewJSObjectFromMap( |
| 3055 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize))); | 3055 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize))); |
| 3056 | 3056 |
| 3057 // Microtask queue uses the empty fixed array as a sentinel for "empty". | 3057 // Microtask queue uses the empty fixed array as a sentinel for "empty". |
| 3058 // Number of queued microtasks stored in Isolate::pending_microtask_count(). | 3058 // Number of queued microtasks stored in Isolate::pending_microtask_count(). |
| 3059 set_microtask_queue(empty_fixed_array()); | 3059 set_microtask_queue(empty_fixed_array()); |
| 3060 | 3060 |
| 3061 if (FLAG_vector_ics) { |
| 3062 FeedbackVectorSpec spec(0, 1); |
| 3063 spec.SetKind(0, Code::KEYED_LOAD_IC); |
| 3064 Handle<TypeFeedbackVector> dummy_vector = |
| 3065 factory->NewTypeFeedbackVector(spec); |
| 3066 dummy_vector->Set(FeedbackVectorICSlot(0), |
| 3067 *TypeFeedbackVector::MegamorphicSentinel(isolate()), |
| 3068 SKIP_WRITE_BARRIER); |
| 3069 set_keyed_load_dummy_vector(*dummy_vector); |
| 3070 } else { |
| 3071 set_keyed_load_dummy_vector(empty_fixed_array()); |
| 3072 } |
| 3073 |
| 3061 Handle<SeededNumberDictionary> slow_element_dictionary = | 3074 Handle<SeededNumberDictionary> slow_element_dictionary = |
| 3062 SeededNumberDictionary::New(isolate(), 0, TENURED); | 3075 SeededNumberDictionary::New(isolate(), 0, TENURED); |
| 3063 slow_element_dictionary->set_requires_slow_elements(); | 3076 slow_element_dictionary->set_requires_slow_elements(); |
| 3064 set_empty_slow_element_dictionary(*slow_element_dictionary); | 3077 set_empty_slow_element_dictionary(*slow_element_dictionary); |
| 3065 | 3078 |
| 3066 set_materialized_objects(*factory->NewFixedArray(0, TENURED)); | 3079 set_materialized_objects(*factory->NewFixedArray(0, TENURED)); |
| 3067 | 3080 |
| 3068 // Handling of script id generation is in Factory::NewScript. | 3081 // Handling of script id generation is in Factory::NewScript. |
| 3069 set_last_script_id(Smi::FromInt(v8::UnboundScript::kNoScriptId)); | 3082 set_last_script_id(Smi::FromInt(v8::UnboundScript::kNoScriptId)); |
| 3070 | 3083 |
| (...skipping 3379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6450 static_cast<int>(object_sizes_last_time_[index])); | 6463 static_cast<int>(object_sizes_last_time_[index])); |
| 6451 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6464 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 6452 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6465 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 6453 | 6466 |
| 6454 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6467 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 6455 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6468 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 6456 ClearObjectStats(); | 6469 ClearObjectStats(); |
| 6457 } | 6470 } |
| 6458 } | 6471 } |
| 6459 } // namespace v8::internal | 6472 } // namespace v8::internal |
| OLD | NEW |