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/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/extensions/externalize-string-extension.h" | 9 #include "src/extensions/externalize-string-extension.h" |
10 #include "src/extensions/free-buffer-extension.h" | 10 #include "src/extensions/free-buffer-extension.h" |
(...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1575 } | 1575 } |
1576 | 1576 |
1577 | 1577 |
1578 #define EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(id) \ | 1578 #define EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(id) \ |
1579 void Genesis::InstallNativeFunctions_##id() {} | 1579 void Genesis::InstallNativeFunctions_##id() {} |
1580 | 1580 |
1581 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_scoping) | 1581 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_scoping) |
1582 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_modules) | 1582 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_modules) |
1583 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_strings) | 1583 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_strings) |
1584 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrays) | 1584 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrays) |
| 1585 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_array_includes) |
1585 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_classes) | 1586 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_classes) |
1586 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object_literals) | 1587 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object_literals) |
1587 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps) | 1588 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps) |
1588 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) | 1589 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) |
1589 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_numeric_literals) | 1590 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_numeric_literals) |
1590 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) | 1591 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) |
1591 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_templates) | 1592 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_templates) |
1592 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) | 1593 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) |
1593 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) | 1594 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) |
1594 | 1595 |
1595 | 1596 |
1596 void Genesis::InstallNativeFunctions_harmony_proxies() { | 1597 void Genesis::InstallNativeFunctions_harmony_proxies() { |
1597 if (FLAG_harmony_proxies) { | 1598 if (FLAG_harmony_proxies) { |
1598 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); | 1599 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); |
1599 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); | 1600 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); |
1600 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); | 1601 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); |
1601 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); | 1602 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); |
1602 } | 1603 } |
1603 } | 1604 } |
1604 | 1605 |
1605 #undef INSTALL_NATIVE | 1606 #undef INSTALL_NATIVE |
1606 | 1607 |
1607 #define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \ | 1608 #define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \ |
1608 void Genesis::InitializeGlobal_##id() {} | 1609 void Genesis::InitializeGlobal_##id() {} |
1609 | 1610 |
1610 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_scoping) | 1611 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_scoping) |
1611 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_modules) | 1612 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_modules) |
1612 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_strings) | 1613 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_strings) |
1613 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays) | 1614 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays) |
| 1615 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes) |
1614 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes) | 1616 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes) |
1615 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) | 1617 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) |
1616 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) | 1618 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) |
1617 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals) | 1619 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals) |
1618 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) | 1620 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) |
1619 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) | 1621 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) |
1620 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_templates) | 1622 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_templates) |
1621 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) | 1623 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) |
1622 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) | 1624 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) |
1623 | 1625 |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2147 builtins->ObjectVerify(); | 2149 builtins->ObjectVerify(); |
2148 #endif | 2150 #endif |
2149 | 2151 |
2150 return true; | 2152 return true; |
2151 } | 2153 } |
2152 | 2154 |
2153 | 2155 |
2154 bool Genesis::InstallExperimentalNatives() { | 2156 bool Genesis::InstallExperimentalNatives() { |
2155 static const char* harmony_arrays_natives[] = { | 2157 static const char* harmony_arrays_natives[] = { |
2156 "native harmony-array.js", "native harmony-typedarray.js", NULL}; | 2158 "native harmony-array.js", "native harmony-typedarray.js", NULL}; |
| 2159 static const char* harmony_array_includes_natives[] = { |
| 2160 "native harmony-array-includes.js", NULL}; |
2157 static const char* harmony_proxies_natives[] = {"native proxy.js", NULL}; | 2161 static const char* harmony_proxies_natives[] = {"native proxy.js", NULL}; |
2158 static const char* harmony_strings_natives[] = {"native harmony-string.js", | 2162 static const char* harmony_strings_natives[] = {"native harmony-string.js", |
2159 NULL}; | 2163 NULL}; |
2160 static const char* harmony_classes_natives[] = {"native harmony-classes.js", | 2164 static const char* harmony_classes_natives[] = {"native harmony-classes.js", |
2161 NULL}; | 2165 NULL}; |
2162 static const char* harmony_modules_natives[] = {NULL}; | 2166 static const char* harmony_modules_natives[] = {NULL}; |
2163 static const char* harmony_scoping_natives[] = {NULL}; | 2167 static const char* harmony_scoping_natives[] = {NULL}; |
2164 static const char* harmony_object_literals_natives[] = {NULL}; | 2168 static const char* harmony_object_literals_natives[] = {NULL}; |
2165 static const char* harmony_regexps_natives[] = {NULL}; | 2169 static const char* harmony_regexps_natives[] = {NULL}; |
2166 static const char* harmony_arrow_functions_natives[] = {NULL}; | 2170 static const char* harmony_arrow_functions_natives[] = {NULL}; |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2819 return from + sizeof(NestingCounterType); | 2823 return from + sizeof(NestingCounterType); |
2820 } | 2824 } |
2821 | 2825 |
2822 | 2826 |
2823 // Called when the top-level V8 mutex is destroyed. | 2827 // Called when the top-level V8 mutex is destroyed. |
2824 void Bootstrapper::FreeThreadResources() { | 2828 void Bootstrapper::FreeThreadResources() { |
2825 DCHECK(!IsActive()); | 2829 DCHECK(!IsActive()); |
2826 } | 2830 } |
2827 | 2831 |
2828 } } // namespace v8::internal | 2832 } } // namespace v8::internal |
OLD | NEW |