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 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1608 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps) | 1608 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps) |
1609 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) | 1609 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) |
1610 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_numeric_literals) | 1610 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_numeric_literals) |
1611 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) | 1611 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) |
1612 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_templates) | 1612 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_templates) |
1613 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) | 1613 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) |
1614 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) | 1614 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) |
1615 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode_regexps) | 1615 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode_regexps) |
1616 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) | 1616 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) |
1617 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters) | 1617 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters) |
| 1618 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spread) |
| 1619 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spreadcalls) |
1618 | 1620 |
1619 | 1621 |
1620 void Genesis::InstallNativeFunctions_harmony_proxies() { | 1622 void Genesis::InstallNativeFunctions_harmony_proxies() { |
1621 if (FLAG_harmony_proxies) { | 1623 if (FLAG_harmony_proxies) { |
1622 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); | 1624 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); |
1623 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); | 1625 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); |
1624 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); | 1626 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); |
1625 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); | 1627 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); |
1626 } | 1628 } |
1627 } | 1629 } |
(...skipping 12 matching lines...) Expand all Loading... |
1640 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) | 1642 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) |
1641 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) | 1643 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) |
1642 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals) | 1644 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals) |
1643 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) | 1645 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) |
1644 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) | 1646 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) |
1645 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_templates) | 1647 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_templates) |
1646 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) | 1648 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) |
1647 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) | 1649 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) |
1648 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names) | 1650 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names) |
1649 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters) | 1651 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters) |
| 1652 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread) |
| 1653 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls) |
1650 | 1654 |
1651 void Genesis::InitializeGlobal_harmony_regexps() { | 1655 void Genesis::InitializeGlobal_harmony_regexps() { |
1652 Handle<JSObject> builtins(native_context()->builtins()); | 1656 Handle<JSObject> builtins(native_context()->builtins()); |
1653 | 1657 |
1654 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() | 1658 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() |
1655 : heap()->false_value()); | 1659 : heap()->false_value()); |
1656 PropertyAttributes attributes = | 1660 PropertyAttributes attributes = |
1657 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY); | 1661 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY); |
1658 Runtime::DefineObjectProperty(builtins, factory()->harmony_regexps_string(), | 1662 Runtime::DefineObjectProperty(builtins, factory()->harmony_regexps_string(), |
1659 flag, attributes).Assert(); | 1663 flag, attributes).Assert(); |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2223 static const char* harmony_numeric_literals_natives[] = {NULL}; | 2227 static const char* harmony_numeric_literals_natives[] = {NULL}; |
2224 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js", | 2228 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js", |
2225 NULL}; | 2229 NULL}; |
2226 static const char* harmony_templates_natives[] = { | 2230 static const char* harmony_templates_natives[] = { |
2227 "native harmony-templates.js", NULL}; | 2231 "native harmony-templates.js", NULL}; |
2228 static const char* harmony_sloppy_natives[] = {NULL}; | 2232 static const char* harmony_sloppy_natives[] = {NULL}; |
2229 static const char* harmony_unicode_natives[] = {NULL}; | 2233 static const char* harmony_unicode_natives[] = {NULL}; |
2230 static const char* harmony_unicode_regexps_natives[] = {NULL}; | 2234 static const char* harmony_unicode_regexps_natives[] = {NULL}; |
2231 static const char* harmony_computed_property_names_natives[] = {NULL}; | 2235 static const char* harmony_computed_property_names_natives[] = {NULL}; |
2232 static const char* harmony_rest_parameters_natives[] = {NULL}; | 2236 static const char* harmony_rest_parameters_natives[] = {NULL}; |
| 2237 static const char* harmony_spread_natives[] = {"native harmony-spread.js", |
| 2238 NULL}; |
| 2239 static const char* harmony_spreadcalls_natives[] = {NULL}; |
2233 | 2240 |
2234 for (int i = ExperimentalNatives::GetDebuggerCount(); | 2241 for (int i = ExperimentalNatives::GetDebuggerCount(); |
2235 i < ExperimentalNatives::GetBuiltinsCount(); i++) { | 2242 i < ExperimentalNatives::GetBuiltinsCount(); i++) { |
2236 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ | 2243 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ |
2237 if (FLAG_##id) { \ | 2244 if (FLAG_##id) { \ |
2238 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ | 2245 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ |
2239 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ | 2246 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ |
2240 if (strncmp(script_name.start(), id##_natives[j], \ | 2247 if (strncmp(script_name.start(), id##_natives[j], \ |
2241 script_name.length()) == 0) { \ | 2248 script_name.length()) == 0) { \ |
2242 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ | 2249 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2859 return from + sizeof(NestingCounterType); | 2866 return from + sizeof(NestingCounterType); |
2860 } | 2867 } |
2861 | 2868 |
2862 | 2869 |
2863 // Called when the top-level V8 mutex is destroyed. | 2870 // Called when the top-level V8 mutex is destroyed. |
2864 void Bootstrapper::FreeThreadResources() { | 2871 void Bootstrapper::FreeThreadResources() { |
2865 DCHECK(!IsActive()); | 2872 DCHECK(!IsActive()); |
2866 } | 2873 } |
2867 | 2874 |
2868 } } // namespace v8::internal | 2875 } } // namespace v8::internal |
OLD | NEW |