| 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 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1812 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) | 1812 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) |
| 1813 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters) | 1813 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters) |
| 1814 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_reflect) | 1814 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_reflect) |
| 1815 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spreadcalls) | 1815 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spreadcalls) |
| 1816 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_destructuring) | 1816 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_destructuring) |
| 1817 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object) | 1817 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object) |
| 1818 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spread_arrays) | 1818 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spread_arrays) |
| 1819 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sharedarraybuffer) | 1819 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sharedarraybuffer) |
| 1820 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_atomics) | 1820 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_atomics) |
| 1821 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_new_target) | 1821 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_new_target) |
| 1822 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_concat_spreadable) |
| 1822 | 1823 |
| 1823 | 1824 |
| 1824 void Genesis::InstallNativeFunctions_harmony_proxies() { | 1825 void Genesis::InstallNativeFunctions_harmony_proxies() { |
| 1825 if (FLAG_harmony_proxies) { | 1826 if (FLAG_harmony_proxies) { |
| 1826 INSTALL_NATIVE(JSFunction, "$proxyDerivedHasTrap", derived_has_trap); | 1827 INSTALL_NATIVE(JSFunction, "$proxyDerivedHasTrap", derived_has_trap); |
| 1827 INSTALL_NATIVE(JSFunction, "$proxyDerivedGetTrap", derived_get_trap); | 1828 INSTALL_NATIVE(JSFunction, "$proxyDerivedGetTrap", derived_get_trap); |
| 1828 INSTALL_NATIVE(JSFunction, "$proxyDerivedSetTrap", derived_set_trap); | 1829 INSTALL_NATIVE(JSFunction, "$proxyDerivedSetTrap", derived_set_trap); |
| 1829 INSTALL_NATIVE(JSFunction, "$proxyEnumerate", proxy_enumerate); | 1830 INSTALL_NATIVE(JSFunction, "$proxyEnumerate", proxy_enumerate); |
| 1830 } | 1831 } |
| 1831 } | 1832 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1843 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) | 1844 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) |
| 1844 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) | 1845 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) |
| 1845 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names) | 1846 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names) |
| 1846 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters) | 1847 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters) |
| 1847 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls) | 1848 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls) |
| 1848 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring) | 1849 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring) |
| 1849 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object) | 1850 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object) |
| 1850 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread_arrays) | 1851 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread_arrays) |
| 1851 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_atomics) | 1852 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_atomics) |
| 1852 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_new_target) | 1853 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_new_target) |
| 1854 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_concat_spreadable) |
| 1853 | 1855 |
| 1854 void Genesis::InitializeGlobal_harmony_regexps() { | 1856 void Genesis::InitializeGlobal_harmony_regexps() { |
| 1855 Handle<JSObject> builtins(native_context()->builtins()); | 1857 Handle<JSObject> builtins(native_context()->builtins()); |
| 1856 | 1858 |
| 1857 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() | 1859 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() |
| 1858 : heap()->false_value()); | 1860 : heap()->false_value()); |
| 1859 Runtime::SetObjectProperty(isolate(), builtins, | 1861 Runtime::SetObjectProperty(isolate(), builtins, |
| 1860 factory()->harmony_regexps_string(), flag, | 1862 factory()->harmony_regexps_string(), flag, |
| 1861 STRICT).Assert(); | 1863 STRICT).Assert(); |
| 1862 } | 1864 } |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2493 "native harmony-spread.js", nullptr}; | 2495 "native harmony-spread.js", nullptr}; |
| 2494 static const char* harmony_destructuring_natives[] = {nullptr}; | 2496 static const char* harmony_destructuring_natives[] = {nullptr}; |
| 2495 static const char* harmony_object_natives[] = {"native harmony-object.js", | 2497 static const char* harmony_object_natives[] = {"native harmony-object.js", |
| 2496 NULL}; | 2498 NULL}; |
| 2497 static const char* harmony_spread_arrays_natives[] = {nullptr}; | 2499 static const char* harmony_spread_arrays_natives[] = {nullptr}; |
| 2498 static const char* harmony_sharedarraybuffer_natives[] = { | 2500 static const char* harmony_sharedarraybuffer_natives[] = { |
| 2499 "native harmony-sharedarraybuffer.js", NULL}; | 2501 "native harmony-sharedarraybuffer.js", NULL}; |
| 2500 static const char* harmony_atomics_natives[] = {"native harmony-atomics.js", | 2502 static const char* harmony_atomics_natives[] = {"native harmony-atomics.js", |
| 2501 nullptr}; | 2503 nullptr}; |
| 2502 static const char* harmony_new_target_natives[] = {nullptr}; | 2504 static const char* harmony_new_target_natives[] = {nullptr}; |
| 2505 static const char* harmony_concat_spreadable_natives[] = { |
| 2506 "native harmony-concat-spreadable.js", nullptr}; |
| 2503 | 2507 |
| 2504 for (int i = ExperimentalNatives::GetDebuggerCount(); | 2508 for (int i = ExperimentalNatives::GetDebuggerCount(); |
| 2505 i < ExperimentalNatives::GetBuiltinsCount(); i++) { | 2509 i < ExperimentalNatives::GetBuiltinsCount(); i++) { |
| 2506 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ | 2510 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ |
| 2507 if (FLAG_##id) { \ | 2511 if (FLAG_##id) { \ |
| 2508 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ | 2512 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ |
| 2509 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ | 2513 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ |
| 2510 if (strncmp(script_name.start(), id##_natives[j], \ | 2514 if (strncmp(script_name.start(), id##_natives[j], \ |
| 2511 script_name.length()) == 0) { \ | 2515 script_name.length()) == 0) { \ |
| 2512 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ | 2516 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ |
| (...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3198 } | 3202 } |
| 3199 | 3203 |
| 3200 | 3204 |
| 3201 // Called when the top-level V8 mutex is destroyed. | 3205 // Called when the top-level V8 mutex is destroyed. |
| 3202 void Bootstrapper::FreeThreadResources() { | 3206 void Bootstrapper::FreeThreadResources() { |
| 3203 DCHECK(!IsActive()); | 3207 DCHECK(!IsActive()); |
| 3204 } | 3208 } |
| 3205 | 3209 |
| 3206 } // namespace internal | 3210 } // namespace internal |
| 3207 } // namespace v8 | 3211 } // namespace v8 |
| OLD | NEW |