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 3232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3243 | 3243 |
3244 set_polymorphic_code_cache(PolymorphicCodeCache::cast( | 3244 set_polymorphic_code_cache(PolymorphicCodeCache::cast( |
3245 *factory->NewStruct(POLYMORPHIC_CODE_CACHE_TYPE))); | 3245 *factory->NewStruct(POLYMORPHIC_CODE_CACHE_TYPE))); |
3246 | 3246 |
3247 set_instanceof_cache_function(Smi::FromInt(0)); | 3247 set_instanceof_cache_function(Smi::FromInt(0)); |
3248 set_instanceof_cache_map(Smi::FromInt(0)); | 3248 set_instanceof_cache_map(Smi::FromInt(0)); |
3249 set_instanceof_cache_answer(Smi::FromInt(0)); | 3249 set_instanceof_cache_answer(Smi::FromInt(0)); |
3250 | 3250 |
3251 { | 3251 { |
3252 HandleScope scope(isolate()); | 3252 HandleScope scope(isolate()); |
3253 #define SYMBOL_INIT(name) \ | 3253 #define SYMBOL_INIT(name) \ |
3254 { \ | 3254 { \ |
3255 Handle<String> name##d = factory->NewStringFromStaticChars(#name); \ | 3255 Handle<String> name##d = factory->NewStringFromStaticChars(#name); \ |
3256 Handle<Object> symbol(isolate()->factory()->NewPrivateOwnSymbol(name##d)); \ | 3256 Handle<Object> symbol(isolate()->factory()->NewPrivateSymbol(name##d)); \ |
3257 roots_[k##name##RootIndex] = *symbol; \ | 3257 roots_[k##name##RootIndex] = *symbol; \ |
3258 } | 3258 } |
3259 PRIVATE_SYMBOL_LIST(SYMBOL_INIT) | 3259 PRIVATE_SYMBOL_LIST(SYMBOL_INIT) |
3260 #undef SYMBOL_INIT | 3260 #undef SYMBOL_INIT |
3261 } | 3261 } |
3262 | 3262 |
3263 { | 3263 { |
3264 HandleScope scope(isolate()); | 3264 HandleScope scope(isolate()); |
3265 #define SYMBOL_INIT(name, varname, description) \ | 3265 #define SYMBOL_INIT(name, varname, description) \ |
3266 Handle<Symbol> name = factory->NewSymbol(); \ | 3266 Handle<Symbol> name = factory->NewSymbol(); \ |
3267 Handle<String> name##d = factory->NewStringFromStaticChars(#description); \ | 3267 Handle<String> name##d = factory->NewStringFromStaticChars(#description); \ |
(...skipping 3493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6761 *object_type = "CODE_TYPE"; \ | 6761 *object_type = "CODE_TYPE"; \ |
6762 *object_sub_type = "CODE_AGE/" #name; \ | 6762 *object_sub_type = "CODE_AGE/" #name; \ |
6763 return true; | 6763 return true; |
6764 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) | 6764 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) |
6765 #undef COMPARE_AND_RETURN_NAME | 6765 #undef COMPARE_AND_RETURN_NAME |
6766 } | 6766 } |
6767 return false; | 6767 return false; |
6768 } | 6768 } |
6769 } // namespace internal | 6769 } // namespace internal |
6770 } // namespace v8 | 6770 } // namespace v8 |
OLD | NEW |