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/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/extensions/externalize-string-extension.h" | 10 #include "src/extensions/externalize-string-extension.h" |
(...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1651 #define EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(id) \ | 1651 #define EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(id) \ |
1652 void Genesis::InstallNativeFunctions_##id() {} | 1652 void Genesis::InstallNativeFunctions_##id() {} |
1653 | 1653 |
1654 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_modules) | 1654 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_modules) |
1655 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrays) | 1655 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrays) |
1656 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_array_includes) | 1656 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_array_includes) |
1657 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_classes) | 1657 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_classes) |
1658 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object_literals) | 1658 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object_literals) |
1659 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps) | 1659 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps) |
1660 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) | 1660 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) |
1661 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_numeric_literals) | |
1662 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) | 1661 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) |
1663 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) | 1662 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) |
1664 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) | 1663 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) |
1665 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode_regexps) | 1664 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode_regexps) |
1666 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) | 1665 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) |
1667 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters) | 1666 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters) |
1668 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_reflect) | 1667 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_reflect) |
1669 | 1668 |
1670 | 1669 |
1671 void Genesis::InstallNativeFunctions_harmony_proxies() { | 1670 void Genesis::InstallNativeFunctions_harmony_proxies() { |
1672 if (FLAG_harmony_proxies) { | 1671 if (FLAG_harmony_proxies) { |
1673 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); | 1672 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); |
1674 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); | 1673 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); |
1675 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); | 1674 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); |
1676 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); | 1675 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); |
1677 } | 1676 } |
1678 } | 1677 } |
1679 | 1678 |
1680 #undef INSTALL_NATIVE | 1679 #undef INSTALL_NATIVE |
1681 | 1680 |
1682 #define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \ | 1681 #define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \ |
1683 void Genesis::InitializeGlobal_##id() {} | 1682 void Genesis::InitializeGlobal_##id() {} |
1684 | 1683 |
1685 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_modules) | 1684 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_modules) |
1686 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays) | 1685 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays) |
1687 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes) | 1686 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes) |
1688 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes) | 1687 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes) |
1689 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) | 1688 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) |
1690 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) | 1689 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) |
1691 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals) | |
1692 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) | 1690 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) |
1693 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) | 1691 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) |
1694 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) | 1692 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) |
1695 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) | 1693 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) |
1696 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names) | 1694 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names) |
1697 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters) | 1695 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters) |
1698 | 1696 |
1699 void Genesis::InitializeGlobal_harmony_regexps() { | 1697 void Genesis::InitializeGlobal_harmony_regexps() { |
1700 Handle<JSObject> builtins(native_context()->builtins()); | 1698 Handle<JSObject> builtins(native_context()->builtins()); |
1701 | 1699 |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2303 "native harmony-array.js", "native harmony-typedarray.js", NULL}; | 2301 "native harmony-array.js", "native harmony-typedarray.js", NULL}; |
2304 static const char* harmony_array_includes_natives[] = { | 2302 static const char* harmony_array_includes_natives[] = { |
2305 "native harmony-array-includes.js", NULL}; | 2303 "native harmony-array-includes.js", NULL}; |
2306 static const char* harmony_proxies_natives[] = {"native proxy.js", NULL}; | 2304 static const char* harmony_proxies_natives[] = {"native proxy.js", NULL}; |
2307 static const char* harmony_classes_natives[] = {NULL}; | 2305 static const char* harmony_classes_natives[] = {NULL}; |
2308 static const char* harmony_modules_natives[] = {NULL}; | 2306 static const char* harmony_modules_natives[] = {NULL}; |
2309 static const char* harmony_object_literals_natives[] = {NULL}; | 2307 static const char* harmony_object_literals_natives[] = {NULL}; |
2310 static const char* harmony_regexps_natives[] = { | 2308 static const char* harmony_regexps_natives[] = { |
2311 "native harmony-regexp.js", NULL}; | 2309 "native harmony-regexp.js", NULL}; |
2312 static const char* harmony_arrow_functions_natives[] = {NULL}; | 2310 static const char* harmony_arrow_functions_natives[] = {NULL}; |
2313 static const char* harmony_numeric_literals_natives[] = {NULL}; | |
2314 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js", | 2311 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js", |
2315 NULL}; | 2312 NULL}; |
2316 static const char* harmony_sloppy_natives[] = {NULL}; | 2313 static const char* harmony_sloppy_natives[] = {NULL}; |
2317 static const char* harmony_unicode_natives[] = {NULL}; | 2314 static const char* harmony_unicode_natives[] = {NULL}; |
2318 static const char* harmony_unicode_regexps_natives[] = {NULL}; | 2315 static const char* harmony_unicode_regexps_natives[] = {NULL}; |
2319 static const char* harmony_computed_property_names_natives[] = {NULL}; | 2316 static const char* harmony_computed_property_names_natives[] = {NULL}; |
2320 static const char* harmony_rest_parameters_natives[] = {NULL}; | 2317 static const char* harmony_rest_parameters_natives[] = {NULL}; |
2321 static const char* harmony_reflect_natives[] = {"native harmony-reflect.js", | 2318 static const char* harmony_reflect_natives[] = {"native harmony-reflect.js", |
2322 NULL}; | 2319 NULL}; |
2323 | 2320 |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2955 return from + sizeof(NestingCounterType); | 2952 return from + sizeof(NestingCounterType); |
2956 } | 2953 } |
2957 | 2954 |
2958 | 2955 |
2959 // Called when the top-level V8 mutex is destroyed. | 2956 // Called when the top-level V8 mutex is destroyed. |
2960 void Bootstrapper::FreeThreadResources() { | 2957 void Bootstrapper::FreeThreadResources() { |
2961 DCHECK(!IsActive()); | 2958 DCHECK(!IsActive()); |
2962 } | 2959 } |
2963 | 2960 |
2964 } } // namespace v8::internal | 2961 } } // namespace v8::internal |
OLD | NEW |