Chromium Code Reviews| 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 3517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3528 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tailcalls) | 3528 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tailcalls) |
| 3529 #ifdef V8_I18N_SUPPORT | 3529 #ifdef V8_I18N_SUPPORT |
| 3530 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(datetime_format_to_parts) | 3530 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(datetime_format_to_parts) |
| 3531 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(icu_case_mapping) | 3531 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(icu_case_mapping) |
| 3532 #endif | 3532 #endif |
| 3533 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_generators) | 3533 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_restrictive_generators) |
| 3534 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_trailing_commas) | 3534 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_trailing_commas) |
| 3535 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_class_fields) | 3535 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_class_fields) |
| 3536 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_rest_spread) | 3536 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_rest_spread) |
| 3537 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_dynamic_import) | 3537 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_dynamic_import) |
| 3538 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_template_escapes) | |
| 3538 | 3539 |
| 3539 void InstallPublicSymbol(Factory* factory, Handle<Context> native_context, | 3540 void InstallPublicSymbol(Factory* factory, Handle<Context> native_context, |
| 3540 const char* name, Handle<Symbol> value) { | 3541 const char* name, Handle<Symbol> value) { |
| 3541 Handle<JSGlobalObject> global( | 3542 Handle<JSGlobalObject> global( |
| 3542 JSGlobalObject::cast(native_context->global_object())); | 3543 JSGlobalObject::cast(native_context->global_object())); |
| 3543 Handle<String> symbol_string = factory->InternalizeUtf8String("Symbol"); | 3544 Handle<String> symbol_string = factory->InternalizeUtf8String("Symbol"); |
| 3544 Handle<JSObject> symbol = Handle<JSObject>::cast( | 3545 Handle<JSObject> symbol = Handle<JSObject>::cast( |
| 3545 JSObject::GetProperty(global, symbol_string).ToHandleChecked()); | 3546 JSObject::GetProperty(global, symbol_string).ToHandleChecked()); |
| 3546 Handle<String> name_string = factory->InternalizeUtf8String(name); | 3547 Handle<String> name_string = factory->InternalizeUtf8String(name); |
| 3547 PropertyAttributes attributes = | 3548 PropertyAttributes attributes = |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4120 nullptr}; | 4121 nullptr}; |
| 4121 static const char* datetime_format_to_parts_natives[] = { | 4122 static const char* datetime_format_to_parts_natives[] = { |
| 4122 "native datetime-format-to-parts.js", nullptr}; | 4123 "native datetime-format-to-parts.js", nullptr}; |
| 4123 #endif | 4124 #endif |
| 4124 static const char* harmony_restrictive_generators_natives[] = {nullptr}; | 4125 static const char* harmony_restrictive_generators_natives[] = {nullptr}; |
| 4125 static const char* harmony_trailing_commas_natives[] = {nullptr}; | 4126 static const char* harmony_trailing_commas_natives[] = {nullptr}; |
| 4126 static const char* harmony_class_fields_natives[] = {nullptr}; | 4127 static const char* harmony_class_fields_natives[] = {nullptr}; |
| 4127 static const char* harmony_object_rest_spread_natives[] = {nullptr}; | 4128 static const char* harmony_object_rest_spread_natives[] = {nullptr}; |
| 4128 static const char* harmony_async_iteration_natives[] = {nullptr}; | 4129 static const char* harmony_async_iteration_natives[] = {nullptr}; |
| 4129 static const char* harmony_dynamic_import_natives[] = {nullptr}; | 4130 static const char* harmony_dynamic_import_natives[] = {nullptr}; |
| 4131 static const char* harmony_template_escapes_natives[] = {nullptr}; | |
|
vogelheim
2017/02/13 17:36:06
Do we need this? Why? This feature doesn't seem to
adamk
2017/02/13 19:14:10
This is needed to let the macro just below work. A
| |
| 4130 | 4132 |
| 4131 for (int i = ExperimentalNatives::GetDebuggerCount(); | 4133 for (int i = ExperimentalNatives::GetDebuggerCount(); |
| 4132 i < ExperimentalNatives::GetBuiltinsCount(); i++) { | 4134 i < ExperimentalNatives::GetBuiltinsCount(); i++) { |
| 4133 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ | 4135 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ |
| 4134 if (FLAG_##id) { \ | 4136 if (FLAG_##id) { \ |
| 4135 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ | 4137 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ |
| 4136 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ | 4138 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ |
| 4137 if (strncmp(script_name.start(), id##_natives[j], \ | 4139 if (strncmp(script_name.start(), id##_natives[j], \ |
| 4138 script_name.length()) == 0) { \ | 4140 script_name.length()) == 0) { \ |
| 4139 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ | 4141 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ |
| (...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4875 } | 4877 } |
| 4876 | 4878 |
| 4877 | 4879 |
| 4878 // Called when the top-level V8 mutex is destroyed. | 4880 // Called when the top-level V8 mutex is destroyed. |
| 4879 void Bootstrapper::FreeThreadResources() { | 4881 void Bootstrapper::FreeThreadResources() { |
| 4880 DCHECK(!IsActive()); | 4882 DCHECK(!IsActive()); |
| 4881 } | 4883 } |
| 4882 | 4884 |
| 4883 } // namespace internal | 4885 } // namespace internal |
| 4884 } // namespace v8 | 4886 } // namespace v8 |
| OLD | NEW |