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 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1592 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_classes) | 1592 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_classes) |
1593 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object_literals) | 1593 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object_literals) |
1594 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps) | 1594 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps) |
1595 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) | 1595 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) |
1596 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_numeric_literals) | 1596 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_numeric_literals) |
1597 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) | 1597 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) |
1598 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_templates) | 1598 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_templates) |
1599 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) | 1599 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) |
1600 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) | 1600 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) |
1601 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) | 1601 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) |
| 1602 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters) |
1602 | 1603 |
1603 | 1604 |
1604 void Genesis::InstallNativeFunctions_harmony_proxies() { | 1605 void Genesis::InstallNativeFunctions_harmony_proxies() { |
1605 if (FLAG_harmony_proxies) { | 1606 if (FLAG_harmony_proxies) { |
1606 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); | 1607 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); |
1607 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); | 1608 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); |
1608 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); | 1609 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); |
1609 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); | 1610 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); |
1610 } | 1611 } |
1611 } | 1612 } |
(...skipping 10 matching lines...) Expand all Loading... |
1622 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes) | 1623 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes) |
1623 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes) | 1624 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes) |
1624 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) | 1625 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) |
1625 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) | 1626 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) |
1626 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals) | 1627 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals) |
1627 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) | 1628 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) |
1628 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) | 1629 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) |
1629 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_templates) | 1630 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_templates) |
1630 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) | 1631 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) |
1631 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names) | 1632 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names) |
| 1633 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters) |
1632 | 1634 |
1633 void Genesis::InitializeGlobal_harmony_regexps() { | 1635 void Genesis::InitializeGlobal_harmony_regexps() { |
1634 Handle<JSObject> builtins(native_context()->builtins()); | 1636 Handle<JSObject> builtins(native_context()->builtins()); |
1635 | 1637 |
1636 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() | 1638 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() |
1637 : heap()->false_value()); | 1639 : heap()->false_value()); |
1638 PropertyAttributes attributes = | 1640 PropertyAttributes attributes = |
1639 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY); | 1641 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY); |
1640 Runtime::DefineObjectProperty(builtins, factory()->harmony_regexps_string(), | 1642 Runtime::DefineObjectProperty(builtins, factory()->harmony_regexps_string(), |
1641 flag, attributes).Assert(); | 1643 flag, attributes).Assert(); |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2201 "native harmony-regexp.js", NULL}; | 2203 "native harmony-regexp.js", NULL}; |
2202 static const char* harmony_arrow_functions_natives[] = {NULL}; | 2204 static const char* harmony_arrow_functions_natives[] = {NULL}; |
2203 static const char* harmony_numeric_literals_natives[] = {NULL}; | 2205 static const char* harmony_numeric_literals_natives[] = {NULL}; |
2204 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js", | 2206 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js", |
2205 NULL}; | 2207 NULL}; |
2206 static const char* harmony_templates_natives[] = { | 2208 static const char* harmony_templates_natives[] = { |
2207 "native harmony-templates.js", NULL}; | 2209 "native harmony-templates.js", NULL}; |
2208 static const char* harmony_sloppy_natives[] = {NULL}; | 2210 static const char* harmony_sloppy_natives[] = {NULL}; |
2209 static const char* harmony_unicode_natives[] = {NULL}; | 2211 static const char* harmony_unicode_natives[] = {NULL}; |
2210 static const char* harmony_computed_property_names_natives[] = {NULL}; | 2212 static const char* harmony_computed_property_names_natives[] = {NULL}; |
| 2213 static const char* harmony_rest_parameters_natives[] = {NULL}; |
2211 | 2214 |
2212 for (int i = ExperimentalNatives::GetDebuggerCount(); | 2215 for (int i = ExperimentalNatives::GetDebuggerCount(); |
2213 i < ExperimentalNatives::GetBuiltinsCount(); i++) { | 2216 i < ExperimentalNatives::GetBuiltinsCount(); i++) { |
2214 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ | 2217 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ |
2215 if (FLAG_##id) { \ | 2218 if (FLAG_##id) { \ |
2216 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ | 2219 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ |
2217 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ | 2220 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ |
2218 if (strncmp(script_name.start(), id##_natives[j], \ | 2221 if (strncmp(script_name.start(), id##_natives[j], \ |
2219 script_name.length()) == 0) { \ | 2222 script_name.length()) == 0) { \ |
2220 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ | 2223 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2876 return from + sizeof(NestingCounterType); | 2879 return from + sizeof(NestingCounterType); |
2877 } | 2880 } |
2878 | 2881 |
2879 | 2882 |
2880 // Called when the top-level V8 mutex is destroyed. | 2883 // Called when the top-level V8 mutex is destroyed. |
2881 void Bootstrapper::FreeThreadResources() { | 2884 void Bootstrapper::FreeThreadResources() { |
2882 DCHECK(!IsActive()); | 2885 DCHECK(!IsActive()); |
2883 } | 2886 } |
2884 | 2887 |
2885 } } // namespace v8::internal | 2888 } } // namespace v8::internal |
OLD | NEW |