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 2699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2710 | 2710 |
2711 { | 2711 { |
2712 HandleScope scope(isolate()); | 2712 HandleScope scope(isolate()); |
2713 #define SYMBOL_INIT(name, description) \ | 2713 #define SYMBOL_INIT(name, description) \ |
2714 Handle<Symbol> name = factory->NewSymbol(); \ | 2714 Handle<Symbol> name = factory->NewSymbol(); \ |
2715 Handle<String> name##d = factory->NewStringFromStaticChars(#description); \ | 2715 Handle<String> name##d = factory->NewStringFromStaticChars(#description); \ |
2716 name->set_name(*name##d); \ | 2716 name->set_name(*name##d); \ |
2717 roots_[k##name##RootIndex] = *name; | 2717 roots_[k##name##RootIndex] = *name; |
2718 PUBLIC_SYMBOL_LIST(SYMBOL_INIT) | 2718 PUBLIC_SYMBOL_LIST(SYMBOL_INIT) |
2719 #undef SYMBOL_INIT | 2719 #undef SYMBOL_INIT |
| 2720 |
| 2721 #define SYMBOL_INIT(name, description) \ |
| 2722 Handle<Symbol> name = factory->NewSymbol(); \ |
| 2723 Handle<String> name##d = factory->NewStringFromStaticChars(#description); \ |
| 2724 name->set_is_well_known_symbol(true); \ |
| 2725 name->set_name(*name##d); \ |
| 2726 roots_[k##name##RootIndex] = *name; |
| 2727 WELL_KNOWN_SYMBOL_LIST(SYMBOL_INIT) |
| 2728 #undef SYMBOL_INIT |
2720 } | 2729 } |
2721 | 2730 |
2722 CreateFixedStubs(); | 2731 CreateFixedStubs(); |
2723 | 2732 |
2724 // Allocate the dictionary of intrinsic function names. | 2733 // Allocate the dictionary of intrinsic function names. |
2725 Handle<NameDictionary> intrinsic_names = | 2734 Handle<NameDictionary> intrinsic_names = |
2726 NameDictionary::New(isolate(), Runtime::kNumFunctions, TENURED); | 2735 NameDictionary::New(isolate(), Runtime::kNumFunctions, TENURED); |
2727 Runtime::InitializeIntrinsicFunctionNames(isolate(), intrinsic_names); | 2736 Runtime::InitializeIntrinsicFunctionNames(isolate(), intrinsic_names); |
2728 set_intrinsic_function_names(*intrinsic_names); | 2737 set_intrinsic_function_names(*intrinsic_names); |
2729 | 2738 |
(...skipping 3410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6140 } | 6149 } |
6141 | 6150 |
6142 | 6151 |
6143 // static | 6152 // static |
6144 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6153 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6145 return StaticVisitorBase::GetVisitorId(map); | 6154 return StaticVisitorBase::GetVisitorId(map); |
6146 } | 6155 } |
6147 | 6156 |
6148 } // namespace internal | 6157 } // namespace internal |
6149 } // namespace v8 | 6158 } // namespace v8 |
OLD | NEW |