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 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1591 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_modules) | 1591 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_modules) |
1592 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_strings) | 1592 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_strings) |
1593 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrays) | 1593 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrays) |
1594 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_classes) | 1594 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_classes) |
1595 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object_literals) | 1595 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object_literals) |
1596 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps) | 1596 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps) |
1597 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) | 1597 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) |
1598 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_numeric_literals) | 1598 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_numeric_literals) |
1599 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) | 1599 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) |
1600 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_templates) | 1600 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_templates) |
| 1601 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) |
1601 | 1602 |
1602 | 1603 |
1603 void Genesis::InstallNativeFunctions_harmony_proxies() { | 1604 void Genesis::InstallNativeFunctions_harmony_proxies() { |
1604 if (FLAG_harmony_proxies) { | 1605 if (FLAG_harmony_proxies) { |
1605 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); | 1606 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); |
1606 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); | 1607 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); |
1607 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); | 1608 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); |
1608 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); | 1609 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); |
1609 } | 1610 } |
1610 } | 1611 } |
1611 | 1612 |
1612 #undef INSTALL_NATIVE | 1613 #undef INSTALL_NATIVE |
1613 | 1614 |
1614 #define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \ | 1615 #define EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(id) \ |
1615 void Genesis::InitializeGlobal_##id() {} | 1616 void Genesis::InitializeGlobal_##id() {} |
1616 | 1617 |
1617 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_scoping) | 1618 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_scoping) |
1618 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_modules) | 1619 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_modules) |
1619 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_strings) | 1620 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_strings) |
1620 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays) | 1621 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrays) |
1621 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes) | 1622 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes) |
1622 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) | 1623 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) |
1623 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) | 1624 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) |
1624 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals) | 1625 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals) |
1625 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) | 1626 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) |
1626 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) | 1627 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) |
1627 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_templates) | 1628 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_templates) |
| 1629 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) |
1628 | 1630 |
1629 void Genesis::InitializeGlobal_harmony_regexps() { | 1631 void Genesis::InitializeGlobal_harmony_regexps() { |
1630 Handle<JSObject> builtins(native_context()->builtins()); | 1632 Handle<JSObject> builtins(native_context()->builtins()); |
1631 | 1633 |
1632 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() | 1634 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() |
1633 : heap()->false_value()); | 1635 : heap()->false_value()); |
1634 PropertyAttributes attributes = | 1636 PropertyAttributes attributes = |
1635 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY); | 1637 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY); |
1636 Runtime::DefineObjectProperty(builtins, factory()->harmony_regexps_string(), | 1638 Runtime::DefineObjectProperty(builtins, factory()->harmony_regexps_string(), |
1637 flag, attributes).Assert(); | 1639 flag, attributes).Assert(); |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2173 static const char* harmony_modules_natives[] = {NULL}; | 2175 static const char* harmony_modules_natives[] = {NULL}; |
2174 static const char* harmony_scoping_natives[] = {NULL}; | 2176 static const char* harmony_scoping_natives[] = {NULL}; |
2175 static const char* harmony_object_literals_natives[] = {NULL}; | 2177 static const char* harmony_object_literals_natives[] = {NULL}; |
2176 static const char* harmony_regexps_natives[] = {NULL}; | 2178 static const char* harmony_regexps_natives[] = {NULL}; |
2177 static const char* harmony_arrow_functions_natives[] = {NULL}; | 2179 static const char* harmony_arrow_functions_natives[] = {NULL}; |
2178 static const char* harmony_numeric_literals_natives[] = {NULL}; | 2180 static const char* harmony_numeric_literals_natives[] = {NULL}; |
2179 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js", | 2181 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js", |
2180 NULL}; | 2182 NULL}; |
2181 static const char* harmony_templates_natives[] = { | 2183 static const char* harmony_templates_natives[] = { |
2182 "native harmony-templates.js", NULL}; | 2184 "native harmony-templates.js", NULL}; |
| 2185 static const char* harmony_sloppy_natives[] = {NULL}; |
2183 | 2186 |
2184 for (int i = ExperimentalNatives::GetDebuggerCount(); | 2187 for (int i = ExperimentalNatives::GetDebuggerCount(); |
2185 i < ExperimentalNatives::GetBuiltinsCount(); i++) { | 2188 i < ExperimentalNatives::GetBuiltinsCount(); i++) { |
2186 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ | 2189 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ |
2187 if (FLAG_##id) { \ | 2190 if (FLAG_##id) { \ |
2188 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ | 2191 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ |
2189 if (strcmp(ExperimentalNatives::GetScriptName(i).start(), \ | 2192 if (strcmp(ExperimentalNatives::GetScriptName(i).start(), \ |
2190 id##_natives[j]) == 0) { \ | 2193 id##_natives[j]) == 0) { \ |
2191 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ | 2194 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ |
2192 } \ | 2195 } \ |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2835 return from + sizeof(NestingCounterType); | 2838 return from + sizeof(NestingCounterType); |
2836 } | 2839 } |
2837 | 2840 |
2838 | 2841 |
2839 // Called when the top-level V8 mutex is destroyed. | 2842 // Called when the top-level V8 mutex is destroyed. |
2840 void Bootstrapper::FreeThreadResources() { | 2843 void Bootstrapper::FreeThreadResources() { |
2841 DCHECK(!IsActive()); | 2844 DCHECK(!IsActive()); |
2842 } | 2845 } |
2843 | 2846 |
2844 } } // namespace v8::internal | 2847 } } // namespace v8::internal |
OLD | NEW |