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 3054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3065 set_regexp_multiple_cache(*factory->NewFixedArray( | 3065 set_regexp_multiple_cache(*factory->NewFixedArray( |
3066 RegExpResultsCache::kRegExpResultsCacheSize, TENURED)); | 3066 RegExpResultsCache::kRegExpResultsCacheSize, TENURED)); |
3067 | 3067 |
3068 // Allocate cache for external strings pointing to native source code. | 3068 // Allocate cache for external strings pointing to native source code. |
3069 set_natives_source_cache( | 3069 set_natives_source_cache( |
3070 *factory->NewFixedArray(Natives::GetBuiltinsCount())); | 3070 *factory->NewFixedArray(Natives::GetBuiltinsCount())); |
3071 | 3071 |
3072 set_experimental_natives_source_cache( | 3072 set_experimental_natives_source_cache( |
3073 *factory->NewFixedArray(ExperimentalNatives::GetBuiltinsCount())); | 3073 *factory->NewFixedArray(ExperimentalNatives::GetBuiltinsCount())); |
3074 | 3074 |
| 3075 set_extra_natives_source_cache( |
| 3076 *factory->NewFixedArray(ExtraNatives::GetBuiltinsCount())); |
| 3077 |
3075 set_undefined_cell(*factory->NewCell(factory->undefined_value())); | 3078 set_undefined_cell(*factory->NewCell(factory->undefined_value())); |
3076 | 3079 |
3077 // The symbol registry is initialized lazily. | 3080 // The symbol registry is initialized lazily. |
3078 set_symbol_registry(Smi::FromInt(0)); | 3081 set_symbol_registry(Smi::FromInt(0)); |
3079 | 3082 |
3080 // Allocate object to hold object observation state. | 3083 // Allocate object to hold object observation state. |
3081 set_observation_state(*factory->NewJSObjectFromMap( | 3084 set_observation_state(*factory->NewJSObjectFromMap( |
3082 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize))); | 3085 factory->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize))); |
3083 | 3086 |
3084 // Microtask queue uses the empty fixed array as a sentinel for "empty". | 3087 // Microtask queue uses the empty fixed array as a sentinel for "empty". |
(...skipping 3349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6434 static_cast<int>(object_sizes_last_time_[index])); | 6437 static_cast<int>(object_sizes_last_time_[index])); |
6435 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6438 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6436 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6439 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6437 | 6440 |
6438 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6441 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6439 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6442 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6440 ClearObjectStats(); | 6443 ClearObjectStats(); |
6441 } | 6444 } |
6442 } | 6445 } |
6443 } // namespace v8::internal | 6446 } // namespace v8::internal |
OLD | NEW |