| 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/utils/random-number-generator.h" | 9 #include "src/base/utils/random-number-generator.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1687 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) | 1687 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) |
| 1688 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) | 1688 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) |
| 1689 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) | 1689 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) |
| 1690 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode_regexps) | 1690 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode_regexps) |
| 1691 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) | 1691 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) |
| 1692 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters) | 1692 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters) |
| 1693 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_reflect) | 1693 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_reflect) |
| 1694 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spreadcalls) | 1694 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spreadcalls) |
| 1695 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_destructuring) | 1695 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_destructuring) |
| 1696 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object) | 1696 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object) |
| 1697 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_optional_params) |
| 1697 | 1698 |
| 1698 | 1699 |
| 1699 void Genesis::InstallNativeFunctions_harmony_proxies() { | 1700 void Genesis::InstallNativeFunctions_harmony_proxies() { |
| 1700 if (FLAG_harmony_proxies) { | 1701 if (FLAG_harmony_proxies) { |
| 1701 INSTALL_NATIVE(JSFunction, "$proxyDerivedHasTrap", derived_has_trap); | 1702 INSTALL_NATIVE(JSFunction, "$proxyDerivedHasTrap", derived_has_trap); |
| 1702 INSTALL_NATIVE(JSFunction, "$proxyDerivedGetTrap", derived_get_trap); | 1703 INSTALL_NATIVE(JSFunction, "$proxyDerivedGetTrap", derived_get_trap); |
| 1703 INSTALL_NATIVE(JSFunction, "$proxyDerivedSetTrap", derived_set_trap); | 1704 INSTALL_NATIVE(JSFunction, "$proxyDerivedSetTrap", derived_set_trap); |
| 1704 INSTALL_NATIVE(JSFunction, "$proxyEnumerate", proxy_enumerate); | 1705 INSTALL_NATIVE(JSFunction, "$proxyEnumerate", proxy_enumerate); |
| 1705 } | 1706 } |
| 1706 } | 1707 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1717 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) | 1718 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) |
| 1718 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) | 1719 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) |
| 1719 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) | 1720 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) |
| 1720 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) | 1721 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) |
| 1721 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) | 1722 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) |
| 1722 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names) | 1723 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names) |
| 1723 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters) | 1724 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters) |
| 1724 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls) | 1725 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls) |
| 1725 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring) | 1726 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring) |
| 1726 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object) | 1727 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object) |
| 1728 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_optional_params) |
| 1727 | 1729 |
| 1728 void Genesis::InitializeGlobal_harmony_regexps() { | 1730 void Genesis::InitializeGlobal_harmony_regexps() { |
| 1729 Handle<JSObject> builtins(native_context()->builtins()); | 1731 Handle<JSObject> builtins(native_context()->builtins()); |
| 1730 | 1732 |
| 1731 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() | 1733 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() |
| 1732 : heap()->false_value()); | 1734 : heap()->false_value()); |
| 1733 Runtime::SetObjectProperty(isolate(), builtins, | 1735 Runtime::SetObjectProperty(isolate(), builtins, |
| 1734 factory()->harmony_regexps_string(), flag, | 1736 factory()->harmony_regexps_string(), flag, |
| 1735 STRICT).Assert(); | 1737 STRICT).Assert(); |
| 1736 } | 1738 } |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2325 static const char* harmony_unicode_regexps_natives[] = {nullptr}; | 2327 static const char* harmony_unicode_regexps_natives[] = {nullptr}; |
| 2326 static const char* harmony_computed_property_names_natives[] = {nullptr}; | 2328 static const char* harmony_computed_property_names_natives[] = {nullptr}; |
| 2327 static const char* harmony_rest_parameters_natives[] = {nullptr}; | 2329 static const char* harmony_rest_parameters_natives[] = {nullptr}; |
| 2328 static const char* harmony_reflect_natives[] = {"native harmony-reflect.js", | 2330 static const char* harmony_reflect_natives[] = {"native harmony-reflect.js", |
| 2329 nullptr}; | 2331 nullptr}; |
| 2330 static const char* harmony_spreadcalls_natives[] = { | 2332 static const char* harmony_spreadcalls_natives[] = { |
| 2331 "native harmony-spread.js", nullptr}; | 2333 "native harmony-spread.js", nullptr}; |
| 2332 static const char* harmony_destructuring_natives[] = {nullptr}; | 2334 static const char* harmony_destructuring_natives[] = {nullptr}; |
| 2333 static const char* harmony_object_natives[] = {"native harmony-object.js", | 2335 static const char* harmony_object_natives[] = {"native harmony-object.js", |
| 2334 NULL}; | 2336 NULL}; |
| 2337 static const char* harmony_optional_params_natives[] = {nullptr}; |
| 2335 | 2338 |
| 2336 for (int i = ExperimentalNatives::GetDebuggerCount(); | 2339 for (int i = ExperimentalNatives::GetDebuggerCount(); |
| 2337 i < ExperimentalNatives::GetBuiltinsCount(); i++) { | 2340 i < ExperimentalNatives::GetBuiltinsCount(); i++) { |
| 2338 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ | 2341 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ |
| 2339 if (FLAG_##id) { \ | 2342 if (FLAG_##id) { \ |
| 2340 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ | 2343 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ |
| 2341 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ | 2344 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ |
| 2342 if (strncmp(script_name.start(), id##_natives[j], \ | 2345 if (strncmp(script_name.start(), id##_natives[j], \ |
| 2343 script_name.length()) == 0) { \ | 2346 script_name.length()) == 0) { \ |
| 2344 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ | 2347 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2967 return from + sizeof(NestingCounterType); | 2970 return from + sizeof(NestingCounterType); |
| 2968 } | 2971 } |
| 2969 | 2972 |
| 2970 | 2973 |
| 2971 // Called when the top-level V8 mutex is destroyed. | 2974 // Called when the top-level V8 mutex is destroyed. |
| 2972 void Bootstrapper::FreeThreadResources() { | 2975 void Bootstrapper::FreeThreadResources() { |
| 2973 DCHECK(!IsActive()); | 2976 DCHECK(!IsActive()); |
| 2974 } | 2977 } |
| 2975 | 2978 |
| 2976 } } // namespace v8::internal | 2979 } } // namespace v8::internal |
| OLD | NEW |