| 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/base/utils/random-number-generator.h" | 9 #include "src/base/utils/random-number-generator.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1760 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) | 1760 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode) |
| 1761 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode_regexps) | 1761 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_unicode_regexps) |
| 1762 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) | 1762 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) |
| 1763 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters) | 1763 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters) |
| 1764 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_reflect) | 1764 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_reflect) |
| 1765 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spreadcalls) | 1765 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spreadcalls) |
| 1766 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_destructuring) | 1766 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_destructuring) |
| 1767 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object) | 1767 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object) |
| 1768 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spread_arrays) | 1768 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spread_arrays) |
| 1769 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sharedarraybuffer) | 1769 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sharedarraybuffer) |
| 1770 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_default_parameters) |
| 1770 | 1771 |
| 1771 | 1772 |
| 1772 void Genesis::InstallNativeFunctions_harmony_proxies() { | 1773 void Genesis::InstallNativeFunctions_harmony_proxies() { |
| 1773 if (FLAG_harmony_proxies) { | 1774 if (FLAG_harmony_proxies) { |
| 1774 INSTALL_NATIVE(JSFunction, "$proxyDerivedHasTrap", derived_has_trap); | 1775 INSTALL_NATIVE(JSFunction, "$proxyDerivedHasTrap", derived_has_trap); |
| 1775 INSTALL_NATIVE(JSFunction, "$proxyDerivedGetTrap", derived_get_trap); | 1776 INSTALL_NATIVE(JSFunction, "$proxyDerivedGetTrap", derived_get_trap); |
| 1776 INSTALL_NATIVE(JSFunction, "$proxyDerivedSetTrap", derived_set_trap); | 1777 INSTALL_NATIVE(JSFunction, "$proxyDerivedSetTrap", derived_set_trap); |
| 1777 INSTALL_NATIVE(JSFunction, "$proxyEnumerate", proxy_enumerate); | 1778 INSTALL_NATIVE(JSFunction, "$proxyEnumerate", proxy_enumerate); |
| 1778 } | 1779 } |
| 1779 } | 1780 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1791 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) | 1792 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_arrow_functions) |
| 1792 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) | 1793 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_proxies) |
| 1793 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) | 1794 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) |
| 1794 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) | 1795 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) |
| 1795 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names) | 1796 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names) |
| 1796 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters) | 1797 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters) |
| 1797 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls) | 1798 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls) |
| 1798 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring) | 1799 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring) |
| 1799 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object) | 1800 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object) |
| 1800 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread_arrays) | 1801 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread_arrays) |
| 1802 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_default_parameters) |
| 1801 | 1803 |
| 1802 void Genesis::InitializeGlobal_harmony_regexps() { | 1804 void Genesis::InitializeGlobal_harmony_regexps() { |
| 1803 Handle<JSObject> builtins(native_context()->builtins()); | 1805 Handle<JSObject> builtins(native_context()->builtins()); |
| 1804 | 1806 |
| 1805 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() | 1807 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() |
| 1806 : heap()->false_value()); | 1808 : heap()->false_value()); |
| 1807 Runtime::SetObjectProperty(isolate(), builtins, | 1809 Runtime::SetObjectProperty(isolate(), builtins, |
| 1808 factory()->harmony_regexps_string(), flag, | 1810 factory()->harmony_regexps_string(), flag, |
| 1809 STRICT).Assert(); | 1811 STRICT).Assert(); |
| 1810 } | 1812 } |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2435 static const char* harmony_reflect_natives[] = {"native harmony-reflect.js", | 2437 static const char* harmony_reflect_natives[] = {"native harmony-reflect.js", |
| 2436 nullptr}; | 2438 nullptr}; |
| 2437 static const char* harmony_spreadcalls_natives[] = { | 2439 static const char* harmony_spreadcalls_natives[] = { |
| 2438 "native harmony-spread.js", nullptr}; | 2440 "native harmony-spread.js", nullptr}; |
| 2439 static const char* harmony_destructuring_natives[] = {nullptr}; | 2441 static const char* harmony_destructuring_natives[] = {nullptr}; |
| 2440 static const char* harmony_object_natives[] = {"native harmony-object.js", | 2442 static const char* harmony_object_natives[] = {"native harmony-object.js", |
| 2441 NULL}; | 2443 NULL}; |
| 2442 static const char* harmony_spread_arrays_natives[] = {nullptr}; | 2444 static const char* harmony_spread_arrays_natives[] = {nullptr}; |
| 2443 static const char* harmony_sharedarraybuffer_natives[] = { | 2445 static const char* harmony_sharedarraybuffer_natives[] = { |
| 2444 "native harmony-sharedarraybuffer.js", NULL}; | 2446 "native harmony-sharedarraybuffer.js", NULL}; |
| 2447 static const char* harmony_default_parameters_natives[] = {nullptr}; |
| 2445 | 2448 |
| 2446 for (int i = ExperimentalNatives::GetDebuggerCount(); | 2449 for (int i = ExperimentalNatives::GetDebuggerCount(); |
| 2447 i < ExperimentalNatives::GetBuiltinsCount(); i++) { | 2450 i < ExperimentalNatives::GetBuiltinsCount(); i++) { |
| 2448 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ | 2451 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ |
| 2449 if (FLAG_##id) { \ | 2452 if (FLAG_##id) { \ |
| 2450 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ | 2453 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ |
| 2451 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ | 2454 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ |
| 2452 if (strncmp(script_name.start(), id##_natives[j], \ | 2455 if (strncmp(script_name.start(), id##_natives[j], \ |
| 2453 script_name.length()) == 0) { \ | 2456 script_name.length()) == 0) { \ |
| 2454 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ | 2457 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3088 return from + sizeof(NestingCounterType); | 3091 return from + sizeof(NestingCounterType); |
| 3089 } | 3092 } |
| 3090 | 3093 |
| 3091 | 3094 |
| 3092 // Called when the top-level V8 mutex is destroyed. | 3095 // Called when the top-level V8 mutex is destroyed. |
| 3093 void Bootstrapper::FreeThreadResources() { | 3096 void Bootstrapper::FreeThreadResources() { |
| 3094 DCHECK(!IsActive()); | 3097 DCHECK(!IsActive()); |
| 3095 } | 3098 } |
| 3096 | 3099 |
| 3097 } } // namespace v8::internal | 3100 } } // namespace v8::internal |
| OLD | NEW |