| 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 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1585 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_array_includes) | 1585 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_array_includes) |
| 1586 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_classes) | 1586 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_classes) |
| 1587 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object_literals) | 1587 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object_literals) |
| 1588 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps) | 1588 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_regexps) |
| 1589 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) | 1589 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_arrow_functions) |
| 1590 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_numeric_literals) | 1590 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_numeric_literals) |
| 1591 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) | 1591 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_tostring) |
| 1592 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_templates) | 1592 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_templates) |
| 1593 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) | 1593 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sloppy) |
| 1594 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) | 1594 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) |
| 1595 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) | |
| 1596 | 1595 |
| 1597 | 1596 |
| 1598 void Genesis::InstallNativeFunctions_harmony_proxies() { | 1597 void Genesis::InstallNativeFunctions_harmony_proxies() { |
| 1599 if (FLAG_harmony_proxies) { | 1598 if (FLAG_harmony_proxies) { |
| 1600 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); | 1599 INSTALL_NATIVE(JSFunction, "DerivedHasTrap", derived_has_trap); |
| 1601 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); | 1600 INSTALL_NATIVE(JSFunction, "DerivedGetTrap", derived_get_trap); |
| 1602 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); | 1601 INSTALL_NATIVE(JSFunction, "DerivedSetTrap", derived_set_trap); |
| 1603 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); | 1602 INSTALL_NATIVE(JSFunction, "ProxyEnumerate", proxy_enumerate); |
| 1604 } | 1603 } |
| 1605 } | 1604 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1616 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes) | 1615 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_array_includes) |
| 1617 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes) | 1616 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_classes) |
| 1618 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) | 1617 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_literals) |
| 1619 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) | 1618 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) |
| 1620 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals) | 1619 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_numeric_literals) |
| 1621 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) | 1620 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) |
| 1622 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) | 1621 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) |
| 1623 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_templates) | 1622 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_templates) |
| 1624 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) | 1623 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) |
| 1625 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) | 1624 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) |
| 1626 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names) | |
| 1627 | 1625 |
| 1628 void Genesis::InitializeGlobal_harmony_regexps() { | 1626 void Genesis::InitializeGlobal_harmony_regexps() { |
| 1629 Handle<JSObject> builtins(native_context()->builtins()); | 1627 Handle<JSObject> builtins(native_context()->builtins()); |
| 1630 | 1628 |
| 1631 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() | 1629 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() |
| 1632 : heap()->false_value()); | 1630 : heap()->false_value()); |
| 1633 PropertyAttributes attributes = | 1631 PropertyAttributes attributes = |
| 1634 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY); | 1632 static_cast<PropertyAttributes>(DONT_DELETE | READ_ONLY); |
| 1635 Runtime::DefineObjectProperty(builtins, factory()->harmony_regexps_string(), | 1633 Runtime::DefineObjectProperty(builtins, factory()->harmony_regexps_string(), |
| 1636 flag, attributes).Assert(); | 1634 flag, attributes).Assert(); |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2171 static const char* harmony_regexps_natives[] = { | 2169 static const char* harmony_regexps_natives[] = { |
| 2172 "native harmony-regexp.js", NULL}; | 2170 "native harmony-regexp.js", NULL}; |
| 2173 static const char* harmony_arrow_functions_natives[] = {NULL}; | 2171 static const char* harmony_arrow_functions_natives[] = {NULL}; |
| 2174 static const char* harmony_numeric_literals_natives[] = {NULL}; | 2172 static const char* harmony_numeric_literals_natives[] = {NULL}; |
| 2175 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js", | 2173 static const char* harmony_tostring_natives[] = {"native harmony-tostring.js", |
| 2176 NULL}; | 2174 NULL}; |
| 2177 static const char* harmony_templates_natives[] = { | 2175 static const char* harmony_templates_natives[] = { |
| 2178 "native harmony-templates.js", NULL}; | 2176 "native harmony-templates.js", NULL}; |
| 2179 static const char* harmony_sloppy_natives[] = {NULL}; | 2177 static const char* harmony_sloppy_natives[] = {NULL}; |
| 2180 static const char* harmony_unicode_natives[] = {NULL}; | 2178 static const char* harmony_unicode_natives[] = {NULL}; |
| 2181 static const char* harmony_computed_property_names_natives[] = {NULL}; | |
| 2182 | 2179 |
| 2183 for (int i = ExperimentalNatives::GetDebuggerCount(); | 2180 for (int i = ExperimentalNatives::GetDebuggerCount(); |
| 2184 i < ExperimentalNatives::GetBuiltinsCount(); i++) { | 2181 i < ExperimentalNatives::GetBuiltinsCount(); i++) { |
| 2185 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ | 2182 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ |
| 2186 if (FLAG_##id) { \ | 2183 if (FLAG_##id) { \ |
| 2187 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ | 2184 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ |
| 2188 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ | 2185 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ |
| 2189 if (strncmp(script_name.start(), id##_natives[j], \ | 2186 if (strncmp(script_name.start(), id##_natives[j], \ |
| 2190 script_name.length()) == 0) { \ | 2187 script_name.length()) == 0) { \ |
| 2191 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ | 2188 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2826 return from + sizeof(NestingCounterType); | 2823 return from + sizeof(NestingCounterType); |
| 2827 } | 2824 } |
| 2828 | 2825 |
| 2829 | 2826 |
| 2830 // Called when the top-level V8 mutex is destroyed. | 2827 // Called when the top-level V8 mutex is destroyed. |
| 2831 void Bootstrapper::FreeThreadResources() { | 2828 void Bootstrapper::FreeThreadResources() { |
| 2832 DCHECK(!IsActive()); | 2829 DCHECK(!IsActive()); |
| 2833 } | 2830 } |
| 2834 | 2831 |
| 2835 } } // namespace v8::internal | 2832 } } // namespace v8::internal |
| OLD | NEW |