| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
| 9 #include "src/base/ieee754.h" | 9 #include "src/base/ieee754.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 2679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2690 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_explicit_tailcalls) | 2690 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_explicit_tailcalls) |
| 2691 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tailcalls) | 2691 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tailcalls) |
| 2692 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_declarations) | 2692 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_declarations) |
| 2693 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_exponentiation_operator) | 2693 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_exponentiation_operator) |
| 2694 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_string_padding) | 2694 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_string_padding) |
| 2695 #ifdef V8_I18N_SUPPORT | 2695 #ifdef V8_I18N_SUPPORT |
| 2696 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(icu_case_mapping) | 2696 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(icu_case_mapping) |
| 2697 #endif | 2697 #endif |
| 2698 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_async_await) | 2698 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_async_await) |
| 2699 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_generators) | 2699 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_generators) |
| 2700 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_trailing_commas) |
| 2700 | 2701 |
| 2701 void InstallPublicSymbol(Factory* factory, Handle<Context> native_context, | 2702 void InstallPublicSymbol(Factory* factory, Handle<Context> native_context, |
| 2702 const char* name, Handle<Symbol> value) { | 2703 const char* name, Handle<Symbol> value) { |
| 2703 Handle<JSGlobalObject> global( | 2704 Handle<JSGlobalObject> global( |
| 2704 JSGlobalObject::cast(native_context->global_object())); | 2705 JSGlobalObject::cast(native_context->global_object())); |
| 2705 Handle<String> symbol_string = factory->InternalizeUtf8String("Symbol"); | 2706 Handle<String> symbol_string = factory->InternalizeUtf8String("Symbol"); |
| 2706 Handle<JSObject> symbol = Handle<JSObject>::cast( | 2707 Handle<JSObject> symbol = Handle<JSObject>::cast( |
| 2707 JSObject::GetProperty(global, symbol_string).ToHandleChecked()); | 2708 JSObject::GetProperty(global, symbol_string).ToHandleChecked()); |
| 2708 Handle<String> name_string = factory->InternalizeUtf8String(name); | 2709 Handle<String> name_string = factory->InternalizeUtf8String(name); |
| 2709 PropertyAttributes attributes = | 2710 PropertyAttributes attributes = |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3268 static const char* harmony_exponentiation_operator_natives[] = {nullptr}; | 3269 static const char* harmony_exponentiation_operator_natives[] = {nullptr}; |
| 3269 static const char* harmony_string_padding_natives[] = { | 3270 static const char* harmony_string_padding_natives[] = { |
| 3270 "native harmony-string-padding.js", nullptr}; | 3271 "native harmony-string-padding.js", nullptr}; |
| 3271 #ifdef V8_I18N_SUPPORT | 3272 #ifdef V8_I18N_SUPPORT |
| 3272 static const char* icu_case_mapping_natives[] = {"native icu-case-mapping.js", | 3273 static const char* icu_case_mapping_natives[] = {"native icu-case-mapping.js", |
| 3273 nullptr}; | 3274 nullptr}; |
| 3274 #endif | 3275 #endif |
| 3275 static const char* harmony_async_await_natives[] = { | 3276 static const char* harmony_async_await_natives[] = { |
| 3276 "native harmony-async-await.js", nullptr}; | 3277 "native harmony-async-await.js", nullptr}; |
| 3277 static const char* harmony_restrictive_generators_natives[] = {nullptr}; | 3278 static const char* harmony_restrictive_generators_natives[] = {nullptr}; |
| 3279 static const char* harmony_trailing_commas_natives[] = {nullptr}; |
| 3278 | 3280 |
| 3279 for (int i = ExperimentalNatives::GetDebuggerCount(); | 3281 for (int i = ExperimentalNatives::GetDebuggerCount(); |
| 3280 i < ExperimentalNatives::GetBuiltinsCount(); i++) { | 3282 i < ExperimentalNatives::GetBuiltinsCount(); i++) { |
| 3281 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ | 3283 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ |
| 3282 if (FLAG_##id) { \ | 3284 if (FLAG_##id) { \ |
| 3283 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ | 3285 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ |
| 3284 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ | 3286 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ |
| 3285 if (strncmp(script_name.start(), id##_natives[j], \ | 3287 if (strncmp(script_name.start(), id##_natives[j], \ |
| 3286 script_name.length()) == 0) { \ | 3288 script_name.length()) == 0) { \ |
| 3287 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ | 3289 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3946 } | 3948 } |
| 3947 | 3949 |
| 3948 | 3950 |
| 3949 // Called when the top-level V8 mutex is destroyed. | 3951 // Called when the top-level V8 mutex is destroyed. |
| 3950 void Bootstrapper::FreeThreadResources() { | 3952 void Bootstrapper::FreeThreadResources() { |
| 3951 DCHECK(!IsActive()); | 3953 DCHECK(!IsActive()); |
| 3952 } | 3954 } |
| 3953 | 3955 |
| 3954 } // namespace internal | 3956 } // namespace internal |
| 3955 } // namespace v8 | 3957 } // namespace v8 |
| OLD | NEW |