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 3421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3432 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tailcalls) | 3432 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tailcalls) |
3433 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_string_padding) | 3433 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_string_padding) |
3434 #ifdef V8_I18N_SUPPORT | 3434 #ifdef V8_I18N_SUPPORT |
3435 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(datetime_format_to_parts) | 3435 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(datetime_format_to_parts) |
3436 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(icu_case_mapping) | 3436 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(icu_case_mapping) |
3437 #endif | 3437 #endif |
3438 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_async_await) | 3438 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_async_await) |
3439 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_generators) | 3439 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_generators) |
3440 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_trailing_commas) | 3440 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_trailing_commas) |
3441 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_class_fields) | 3441 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_class_fields) |
| 3442 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_spread) |
3442 | 3443 |
3443 void InstallPublicSymbol(Factory* factory, Handle<Context> native_context, | 3444 void InstallPublicSymbol(Factory* factory, Handle<Context> native_context, |
3444 const char* name, Handle<Symbol> value) { | 3445 const char* name, Handle<Symbol> value) { |
3445 Handle<JSGlobalObject> global( | 3446 Handle<JSGlobalObject> global( |
3446 JSGlobalObject::cast(native_context->global_object())); | 3447 JSGlobalObject::cast(native_context->global_object())); |
3447 Handle<String> symbol_string = factory->InternalizeUtf8String("Symbol"); | 3448 Handle<String> symbol_string = factory->InternalizeUtf8String("Symbol"); |
3448 Handle<JSObject> symbol = Handle<JSObject>::cast( | 3449 Handle<JSObject> symbol = Handle<JSObject>::cast( |
3449 JSObject::GetProperty(global, symbol_string).ToHandleChecked()); | 3450 JSObject::GetProperty(global, symbol_string).ToHandleChecked()); |
3450 Handle<String> name_string = factory->InternalizeUtf8String(name); | 3451 Handle<String> name_string = factory->InternalizeUtf8String(name); |
3451 PropertyAttributes attributes = | 3452 PropertyAttributes attributes = |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3993 #ifdef V8_I18N_SUPPORT | 3994 #ifdef V8_I18N_SUPPORT |
3994 static const char* icu_case_mapping_natives[] = {"native icu-case-mapping.js", | 3995 static const char* icu_case_mapping_natives[] = {"native icu-case-mapping.js", |
3995 nullptr}; | 3996 nullptr}; |
3996 static const char* datetime_format_to_parts_natives[] = { | 3997 static const char* datetime_format_to_parts_natives[] = { |
3997 "native datetime-format-to-parts.js", nullptr}; | 3998 "native datetime-format-to-parts.js", nullptr}; |
3998 #endif | 3999 #endif |
3999 static const char* harmony_async_await_natives[] = {nullptr}; | 4000 static const char* harmony_async_await_natives[] = {nullptr}; |
4000 static const char* harmony_restrictive_generators_natives[] = {nullptr}; | 4001 static const char* harmony_restrictive_generators_natives[] = {nullptr}; |
4001 static const char* harmony_trailing_commas_natives[] = {nullptr}; | 4002 static const char* harmony_trailing_commas_natives[] = {nullptr}; |
4002 static const char* harmony_class_fields_natives[] = {nullptr}; | 4003 static const char* harmony_class_fields_natives[] = {nullptr}; |
| 4004 static const char* harmony_object_spread_natives[] = {nullptr}; |
4003 | 4005 |
4004 for (int i = ExperimentalNatives::GetDebuggerCount(); | 4006 for (int i = ExperimentalNatives::GetDebuggerCount(); |
4005 i < ExperimentalNatives::GetBuiltinsCount(); i++) { | 4007 i < ExperimentalNatives::GetBuiltinsCount(); i++) { |
4006 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ | 4008 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ |
4007 if (FLAG_##id) { \ | 4009 if (FLAG_##id) { \ |
4008 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ | 4010 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ |
4009 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ | 4011 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ |
4010 if (strncmp(script_name.start(), id##_natives[j], \ | 4012 if (strncmp(script_name.start(), id##_natives[j], \ |
4011 script_name.length()) == 0) { \ | 4013 script_name.length()) == 0) { \ |
4012 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ | 4014 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4733 } | 4735 } |
4734 | 4736 |
4735 | 4737 |
4736 // Called when the top-level V8 mutex is destroyed. | 4738 // Called when the top-level V8 mutex is destroyed. |
4737 void Bootstrapper::FreeThreadResources() { | 4739 void Bootstrapper::FreeThreadResources() { |
4738 DCHECK(!IsActive()); | 4740 DCHECK(!IsActive()); |
4739 } | 4741 } |
4740 | 4742 |
4741 } // namespace internal | 4743 } // namespace internal |
4742 } // namespace v8 | 4744 } // namespace v8 |
OLD | NEW |