| 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/heap/heap.h" | 5 #include "src/heap/heap.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/ast/scopeinfo.h" | 9 #include "src/ast/scopeinfo.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 2704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2715 #define SYMBOL_INIT(name, description) \ | 2715 #define SYMBOL_INIT(name, description) \ |
| 2716 Handle<Symbol> name = factory->NewSymbol(); \ | 2716 Handle<Symbol> name = factory->NewSymbol(); \ |
| 2717 Handle<String> name##d = factory->NewStringFromStaticChars(#description); \ | 2717 Handle<String> name##d = factory->NewStringFromStaticChars(#description); \ |
| 2718 name->set_is_well_known_symbol(true); \ | 2718 name->set_is_well_known_symbol(true); \ |
| 2719 name->set_name(*name##d); \ | 2719 name->set_name(*name##d); \ |
| 2720 roots_[k##name##RootIndex] = *name; | 2720 roots_[k##name##RootIndex] = *name; |
| 2721 WELL_KNOWN_SYMBOL_LIST(SYMBOL_INIT) | 2721 WELL_KNOWN_SYMBOL_LIST(SYMBOL_INIT) |
| 2722 #undef SYMBOL_INIT | 2722 #undef SYMBOL_INIT |
| 2723 } | 2723 } |
| 2724 | 2724 |
| 2725 CreateFixedStubs(); | |
| 2726 | |
| 2727 // Allocate the dictionary of intrinsic function names. | 2725 // Allocate the dictionary of intrinsic function names. |
| 2728 Handle<NameDictionary> intrinsic_names = | 2726 Handle<NameDictionary> intrinsic_names = |
| 2729 NameDictionary::New(isolate(), Runtime::kNumFunctions, TENURED); | 2727 NameDictionary::New(isolate(), Runtime::kNumFunctions, TENURED); |
| 2730 Runtime::InitializeIntrinsicFunctionNames(isolate(), intrinsic_names); | 2728 Runtime::InitializeIntrinsicFunctionNames(isolate(), intrinsic_names); |
| 2731 set_intrinsic_function_names(*intrinsic_names); | 2729 set_intrinsic_function_names(*intrinsic_names); |
| 2732 | 2730 |
| 2733 Handle<NameDictionary> empty_properties_dictionary = | 2731 Handle<NameDictionary> empty_properties_dictionary = |
| 2734 NameDictionary::New(isolate(), 0, TENURED); | 2732 NameDictionary::New(isolate(), 0, TENURED); |
| 2735 empty_properties_dictionary->SetRequiresCopyOnCapacityChange(); | 2733 empty_properties_dictionary->SetRequiresCopyOnCapacityChange(); |
| 2736 set_empty_properties_dictionary(*empty_properties_dictionary); | 2734 set_empty_properties_dictionary(*empty_properties_dictionary); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2858 isolate_->keyed_lookup_cache()->Clear(); | 2856 isolate_->keyed_lookup_cache()->Clear(); |
| 2859 | 2857 |
| 2860 // Initialize context slot cache. | 2858 // Initialize context slot cache. |
| 2861 isolate_->context_slot_cache()->Clear(); | 2859 isolate_->context_slot_cache()->Clear(); |
| 2862 | 2860 |
| 2863 // Initialize descriptor cache. | 2861 // Initialize descriptor cache. |
| 2864 isolate_->descriptor_lookup_cache()->Clear(); | 2862 isolate_->descriptor_lookup_cache()->Clear(); |
| 2865 | 2863 |
| 2866 // Initialize compilation cache. | 2864 // Initialize compilation cache. |
| 2867 isolate_->compilation_cache()->Clear(); | 2865 isolate_->compilation_cache()->Clear(); |
| 2866 |
| 2867 CreateFixedStubs(); |
| 2868 } | 2868 } |
| 2869 | 2869 |
| 2870 | 2870 |
| 2871 bool Heap::RootCanBeWrittenAfterInitialization(Heap::RootListIndex root_index) { | 2871 bool Heap::RootCanBeWrittenAfterInitialization(Heap::RootListIndex root_index) { |
| 2872 switch (root_index) { | 2872 switch (root_index) { |
| 2873 case kNumberStringCacheRootIndex: | 2873 case kNumberStringCacheRootIndex: |
| 2874 case kInstanceofCacheFunctionRootIndex: | 2874 case kInstanceofCacheFunctionRootIndex: |
| 2875 case kInstanceofCacheMapRootIndex: | 2875 case kInstanceofCacheMapRootIndex: |
| 2876 case kInstanceofCacheAnswerRootIndex: | 2876 case kInstanceofCacheAnswerRootIndex: |
| 2877 case kCodeStubsRootIndex: | 2877 case kCodeStubsRootIndex: |
| (...skipping 3477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6355 } | 6355 } |
| 6356 | 6356 |
| 6357 | 6357 |
| 6358 // static | 6358 // static |
| 6359 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6359 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6360 return StaticVisitorBase::GetVisitorId(map); | 6360 return StaticVisitorBase::GetVisitorId(map); |
| 6361 } | 6361 } |
| 6362 | 6362 |
| 6363 } // namespace internal | 6363 } // namespace internal |
| 6364 } // namespace v8 | 6364 } // namespace v8 |
| OLD | NEW |