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