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 2812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2823 // is set to avoid expanding the dictionary during bootstrapping. | 2823 // is set to avoid expanding the dictionary during bootstrapping. |
2824 set_non_monomorphic_cache(*UnseededNumberDictionary::New(isolate(), 64)); | 2824 set_non_monomorphic_cache(*UnseededNumberDictionary::New(isolate(), 64)); |
2825 | 2825 |
2826 set_polymorphic_code_cache(PolymorphicCodeCache::cast( | 2826 set_polymorphic_code_cache(PolymorphicCodeCache::cast( |
2827 *factory->NewStruct(POLYMORPHIC_CODE_CACHE_TYPE))); | 2827 *factory->NewStruct(POLYMORPHIC_CODE_CACHE_TYPE))); |
2828 | 2828 |
2829 set_instanceof_cache_function(Smi::FromInt(0)); | 2829 set_instanceof_cache_function(Smi::FromInt(0)); |
2830 set_instanceof_cache_map(Smi::FromInt(0)); | 2830 set_instanceof_cache_map(Smi::FromInt(0)); |
2831 set_instanceof_cache_answer(Smi::FromInt(0)); | 2831 set_instanceof_cache_answer(Smi::FromInt(0)); |
2832 | 2832 |
2833 #define SYMBOL_INIT(name) \ | 2833 { |
2834 roots_[k##name##RootIndex] = *factory->NewPrivateOwnSymbol(); | 2834 HandleScope scope(isolate()); |
2835 PRIVATE_SYMBOL_LIST(SYMBOL_INIT) | 2835 #define SYMBOL_INIT(name) \ |
| 2836 Handle<Symbol> name = factory->NewPrivateOwnSymbol(); \ |
| 2837 roots_[k##name##RootIndex] = *name; |
| 2838 PRIVATE_SYMBOL_LIST(SYMBOL_INIT) |
2836 #undef SYMBOL_INIT | 2839 #undef SYMBOL_INIT |
| 2840 } |
2837 | 2841 |
2838 CreateFixedStubs(); | 2842 CreateFixedStubs(); |
2839 | 2843 |
2840 // Allocate the dictionary of intrinsic function names. | 2844 // Allocate the dictionary of intrinsic function names. |
2841 Handle<NameDictionary> intrinsic_names = | 2845 Handle<NameDictionary> intrinsic_names = |
2842 NameDictionary::New(isolate(), Runtime::kNumFunctions, TENURED); | 2846 NameDictionary::New(isolate(), Runtime::kNumFunctions, TENURED); |
2843 Runtime::InitializeIntrinsicFunctionNames(isolate(), intrinsic_names); | 2847 Runtime::InitializeIntrinsicFunctionNames(isolate(), intrinsic_names); |
2844 set_intrinsic_function_names(*intrinsic_names); | 2848 set_intrinsic_function_names(*intrinsic_names); |
2845 | 2849 |
2846 set_number_string_cache( | 2850 set_number_string_cache( |
(...skipping 3295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6142 static_cast<int>(object_sizes_last_time_[index])); | 6146 static_cast<int>(object_sizes_last_time_[index])); |
6143 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6147 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6144 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6148 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6145 | 6149 |
6146 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6150 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6147 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6151 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6148 ClearObjectStats(); | 6152 ClearObjectStats(); |
6149 } | 6153 } |
6150 } | 6154 } |
6151 } // namespace v8::internal | 6155 } // namespace v8::internal |
OLD | NEW |