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/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 2675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2686 | 2686 |
2687 set_polymorphic_code_cache(PolymorphicCodeCache::cast( | 2687 set_polymorphic_code_cache(PolymorphicCodeCache::cast( |
2688 *factory->NewStruct(POLYMORPHIC_CODE_CACHE_TYPE))); | 2688 *factory->NewStruct(POLYMORPHIC_CODE_CACHE_TYPE))); |
2689 | 2689 |
2690 set_instanceof_cache_function(Smi::FromInt(0)); | 2690 set_instanceof_cache_function(Smi::FromInt(0)); |
2691 set_instanceof_cache_map(Smi::FromInt(0)); | 2691 set_instanceof_cache_map(Smi::FromInt(0)); |
2692 set_instanceof_cache_answer(Smi::FromInt(0)); | 2692 set_instanceof_cache_answer(Smi::FromInt(0)); |
2693 | 2693 |
2694 { | 2694 { |
2695 HandleScope scope(isolate()); | 2695 HandleScope scope(isolate()); |
2696 #define SYMBOL_INIT(name) \ | 2696 #define SYMBOL_INIT(name) \ |
2697 { \ | 2697 { \ |
2698 Handle<String> name##d = factory->NewStringFromStaticChars(#name); \ | 2698 Handle<String> name##d = factory->NewStringFromStaticChars(#name); \ |
2699 Handle<Object> symbol(isolate()->factory()->NewPrivateSymbol(name##d)); \ | 2699 Handle<Symbol> symbol(isolate()->factory()->NewPrivateSymbol()); \ |
2700 roots_[k##name##RootIndex] = *symbol; \ | 2700 symbol->set_name(*name##d); \ |
| 2701 roots_[k##name##RootIndex] = *symbol; \ |
2701 } | 2702 } |
2702 PRIVATE_SYMBOL_LIST(SYMBOL_INIT) | 2703 PRIVATE_SYMBOL_LIST(SYMBOL_INIT) |
2703 #undef SYMBOL_INIT | 2704 #undef SYMBOL_INIT |
2704 } | 2705 } |
2705 | 2706 |
2706 { | 2707 { |
2707 HandleScope scope(isolate()); | 2708 HandleScope scope(isolate()); |
2708 #define SYMBOL_INIT(name, description) \ | 2709 #define SYMBOL_INIT(name, description) \ |
2709 Handle<Symbol> name = factory->NewSymbol(); \ | 2710 Handle<Symbol> name = factory->NewSymbol(); \ |
2710 Handle<String> name##d = factory->NewStringFromStaticChars(#description); \ | 2711 Handle<String> name##d = factory->NewStringFromStaticChars(#description); \ |
(...skipping 3445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6156 } | 6157 } |
6157 | 6158 |
6158 | 6159 |
6159 // static | 6160 // static |
6160 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6161 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6161 return StaticVisitorBase::GetVisitorId(map); | 6162 return StaticVisitorBase::GetVisitorId(map); |
6162 } | 6163 } |
6163 | 6164 |
6164 } // namespace internal | 6165 } // namespace internal |
6165 } // namespace v8 | 6166 } // namespace v8 |
OLD | NEW |