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 3428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3439 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tailcalls) | 3439 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tailcalls) |
3440 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_string_padding) | 3440 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_string_padding) |
3441 #ifdef V8_I18N_SUPPORT | 3441 #ifdef V8_I18N_SUPPORT |
3442 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(datetime_format_to_parts) | 3442 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(datetime_format_to_parts) |
3443 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(icu_case_mapping) | 3443 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(icu_case_mapping) |
3444 #endif | 3444 #endif |
3445 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_async_await) | 3445 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_async_await) |
3446 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_generators) | 3446 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_generators) |
3447 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_trailing_commas) | 3447 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_trailing_commas) |
3448 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_class_fields) | 3448 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_class_fields) |
| 3449 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_spread) |
3449 | 3450 |
3450 void InstallPublicSymbol(Factory* factory, Handle<Context> native_context, | 3451 void InstallPublicSymbol(Factory* factory, Handle<Context> native_context, |
3451 const char* name, Handle<Symbol> value) { | 3452 const char* name, Handle<Symbol> value) { |
3452 Handle<JSGlobalObject> global( | 3453 Handle<JSGlobalObject> global( |
3453 JSGlobalObject::cast(native_context->global_object())); | 3454 JSGlobalObject::cast(native_context->global_object())); |
3454 Handle<String> symbol_string = factory->InternalizeUtf8String("Symbol"); | 3455 Handle<String> symbol_string = factory->InternalizeUtf8String("Symbol"); |
3455 Handle<JSObject> symbol = Handle<JSObject>::cast( | 3456 Handle<JSObject> symbol = Handle<JSObject>::cast( |
3456 JSObject::GetProperty(global, symbol_string).ToHandleChecked()); | 3457 JSObject::GetProperty(global, symbol_string).ToHandleChecked()); |
3457 Handle<String> name_string = factory->InternalizeUtf8String(name); | 3458 Handle<String> name_string = factory->InternalizeUtf8String(name); |
3458 PropertyAttributes attributes = | 3459 PropertyAttributes attributes = |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4000 #ifdef V8_I18N_SUPPORT | 4001 #ifdef V8_I18N_SUPPORT |
4001 static const char* icu_case_mapping_natives[] = {"native icu-case-mapping.js", | 4002 static const char* icu_case_mapping_natives[] = {"native icu-case-mapping.js", |
4002 nullptr}; | 4003 nullptr}; |
4003 static const char* datetime_format_to_parts_natives[] = { | 4004 static const char* datetime_format_to_parts_natives[] = { |
4004 "native datetime-format-to-parts.js", nullptr}; | 4005 "native datetime-format-to-parts.js", nullptr}; |
4005 #endif | 4006 #endif |
4006 static const char* harmony_async_await_natives[] = {nullptr}; | 4007 static const char* harmony_async_await_natives[] = {nullptr}; |
4007 static const char* harmony_restrictive_generators_natives[] = {nullptr}; | 4008 static const char* harmony_restrictive_generators_natives[] = {nullptr}; |
4008 static const char* harmony_trailing_commas_natives[] = {nullptr}; | 4009 static const char* harmony_trailing_commas_natives[] = {nullptr}; |
4009 static const char* harmony_class_fields_natives[] = {nullptr}; | 4010 static const char* harmony_class_fields_natives[] = {nullptr}; |
| 4011 static const char* harmony_object_spread_natives[] = {nullptr}; |
4010 | 4012 |
4011 for (int i = ExperimentalNatives::GetDebuggerCount(); | 4013 for (int i = ExperimentalNatives::GetDebuggerCount(); |
4012 i < ExperimentalNatives::GetBuiltinsCount(); i++) { | 4014 i < ExperimentalNatives::GetBuiltinsCount(); i++) { |
4013 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ | 4015 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ |
4014 if (FLAG_##id) { \ | 4016 if (FLAG_##id) { \ |
4015 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ | 4017 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ |
4016 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ | 4018 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ |
4017 if (strncmp(script_name.start(), id##_natives[j], \ | 4019 if (strncmp(script_name.start(), id##_natives[j], \ |
4018 script_name.length()) == 0) { \ | 4020 script_name.length()) == 0) { \ |
4019 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ | 4021 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4740 } | 4742 } |
4741 | 4743 |
4742 | 4744 |
4743 // Called when the top-level V8 mutex is destroyed. | 4745 // Called when the top-level V8 mutex is destroyed. |
4744 void Bootstrapper::FreeThreadResources() { | 4746 void Bootstrapper::FreeThreadResources() { |
4745 DCHECK(!IsActive()); | 4747 DCHECK(!IsActive()); |
4746 } | 4748 } |
4747 | 4749 |
4748 } // namespace internal | 4750 } // namespace internal |
4749 } // namespace v8 | 4751 } // namespace v8 |
OLD | NEW |