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 3202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3213 Handle<String> name##d = factory->NewStringFromStaticChars(#name); \ | 3213 Handle<String> name##d = factory->NewStringFromStaticChars(#name); \ |
3214 Handle<Object> symbol(isolate()->factory()->NewPrivateSymbol(name##d)); \ | 3214 Handle<Object> symbol(isolate()->factory()->NewPrivateSymbol(name##d)); \ |
3215 roots_[k##name##RootIndex] = *symbol; \ | 3215 roots_[k##name##RootIndex] = *symbol; \ |
3216 } | 3216 } |
3217 PRIVATE_SYMBOL_LIST(SYMBOL_INIT) | 3217 PRIVATE_SYMBOL_LIST(SYMBOL_INIT) |
3218 #undef SYMBOL_INIT | 3218 #undef SYMBOL_INIT |
3219 } | 3219 } |
3220 | 3220 |
3221 { | 3221 { |
3222 HandleScope scope(isolate()); | 3222 HandleScope scope(isolate()); |
3223 #define SYMBOL_INIT(name, varname, description) \ | 3223 #define SYMBOL_INIT(name, description) \ |
3224 Handle<Symbol> name = factory->NewSymbol(); \ | 3224 Handle<Symbol> name = factory->NewSymbol(); \ |
3225 Handle<String> name##d = factory->NewStringFromStaticChars(#description); \ | 3225 Handle<String> name##d = factory->NewStringFromStaticChars(#description); \ |
3226 name->set_name(*name##d); \ | 3226 name->set_name(*name##d); \ |
3227 roots_[k##name##RootIndex] = *name; | 3227 roots_[k##name##RootIndex] = *name; |
3228 PUBLIC_SYMBOL_LIST(SYMBOL_INIT) | 3228 PUBLIC_SYMBOL_LIST(SYMBOL_INIT) |
3229 #undef SYMBOL_INIT | 3229 #undef SYMBOL_INIT |
3230 } | 3230 } |
3231 | 3231 |
3232 CreateFixedStubs(); | 3232 CreateFixedStubs(); |
3233 | 3233 |
(...skipping 3540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6774 *object_type = "CODE_TYPE"; \ | 6774 *object_type = "CODE_TYPE"; \ |
6775 *object_sub_type = "CODE_AGE/" #name; \ | 6775 *object_sub_type = "CODE_AGE/" #name; \ |
6776 return true; | 6776 return true; |
6777 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) | 6777 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) |
6778 #undef COMPARE_AND_RETURN_NAME | 6778 #undef COMPARE_AND_RETURN_NAME |
6779 } | 6779 } |
6780 return false; | 6780 return false; |
6781 } | 6781 } |
6782 } // namespace internal | 6782 } // namespace internal |
6783 } // namespace v8 | 6783 } // namespace v8 |
OLD | NEW |