| 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 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1807 Handle<JSObject> builtins(native_context()->builtins()); | 1807 Handle<JSObject> builtins(native_context()->builtins()); |
| 1808 | 1808 |
| 1809 Handle<HeapObject> flag(FLAG_harmony_unicode_regexps ? heap()->true_value() | 1809 Handle<HeapObject> flag(FLAG_harmony_unicode_regexps ? heap()->true_value() |
| 1810 : heap()->false_value()); | 1810 : heap()->false_value()); |
| 1811 Runtime::SetObjectProperty(isolate(), builtins, | 1811 Runtime::SetObjectProperty(isolate(), builtins, |
| 1812 factory()->harmony_unicode_regexps_string(), flag, | 1812 factory()->harmony_unicode_regexps_string(), flag, |
| 1813 STRICT).Assert(); | 1813 STRICT).Assert(); |
| 1814 } | 1814 } |
| 1815 | 1815 |
| 1816 | 1816 |
| 1817 void Genesis::InitializeGlobal_harmony_tolength() { |
| 1818 Handle<JSObject> builtins(native_context()->builtins()); |
| 1819 |
| 1820 Handle<HeapObject> flag(FLAG_harmony_tolength ? heap()->true_value() |
| 1821 : heap()->false_value()); |
| 1822 Runtime::SetObjectProperty(isolate(), builtins, |
| 1823 factory()->harmony_tolength_string(), flag, |
| 1824 STRICT).Assert(); |
| 1825 } |
| 1826 |
| 1827 |
| 1817 void Genesis::InitializeGlobal_harmony_reflect() { | 1828 void Genesis::InitializeGlobal_harmony_reflect() { |
| 1818 Handle<JSObject> builtins(native_context()->builtins()); | 1829 Handle<JSObject> builtins(native_context()->builtins()); |
| 1819 | 1830 |
| 1820 Handle<JSFunction> apply = InstallFunction( | 1831 Handle<JSFunction> apply = InstallFunction( |
| 1821 builtins, "$reflectApply", JS_OBJECT_TYPE, JSObject::kHeaderSize, | 1832 builtins, "$reflectApply", JS_OBJECT_TYPE, JSObject::kHeaderSize, |
| 1822 MaybeHandle<JSObject>(), Builtins::kReflectApply); | 1833 MaybeHandle<JSObject>(), Builtins::kReflectApply); |
| 1823 apply->shared()->set_internal_formal_parameter_count(3); | 1834 apply->shared()->set_internal_formal_parameter_count(3); |
| 1824 apply->shared()->set_length(3); | 1835 apply->shared()->set_length(3); |
| 1825 | 1836 |
| 1826 native_context()->set_reflect_apply(*apply); | 1837 native_context()->set_reflect_apply(*apply); |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2469 static const char* harmony_spread_arrays_natives[] = {nullptr}; | 2480 static const char* harmony_spread_arrays_natives[] = {nullptr}; |
| 2470 static const char* harmony_sharedarraybuffer_natives[] = { | 2481 static const char* harmony_sharedarraybuffer_natives[] = { |
| 2471 "native harmony-sharedarraybuffer.js", NULL}; | 2482 "native harmony-sharedarraybuffer.js", NULL}; |
| 2472 static const char* harmony_atomics_natives[] = {"native harmony-atomics.js", | 2483 static const char* harmony_atomics_natives[] = {"native harmony-atomics.js", |
| 2473 nullptr}; | 2484 nullptr}; |
| 2474 static const char* harmony_new_target_natives[] = {nullptr}; | 2485 static const char* harmony_new_target_natives[] = {nullptr}; |
| 2475 static const char* harmony_concat_spreadable_natives[] = { | 2486 static const char* harmony_concat_spreadable_natives[] = { |
| 2476 "native harmony-concat-spreadable.js", nullptr}; | 2487 "native harmony-concat-spreadable.js", nullptr}; |
| 2477 static const char* harmony_simd_natives[] = {"native harmony-simd.js", | 2488 static const char* harmony_simd_natives[] = {"native harmony-simd.js", |
| 2478 nullptr}; | 2489 nullptr}; |
| 2490 static const char* harmony_tolength_natives[] = {nullptr}; |
| 2479 | 2491 |
| 2480 for (int i = ExperimentalNatives::GetDebuggerCount(); | 2492 for (int i = ExperimentalNatives::GetDebuggerCount(); |
| 2481 i < ExperimentalNatives::GetBuiltinsCount(); i++) { | 2493 i < ExperimentalNatives::GetBuiltinsCount(); i++) { |
| 2482 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ | 2494 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ |
| 2483 if (FLAG_##id) { \ | 2495 if (FLAG_##id) { \ |
| 2484 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ | 2496 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ |
| 2485 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ | 2497 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ |
| 2486 if (strncmp(script_name.start(), id##_natives[j], \ | 2498 if (strncmp(script_name.start(), id##_natives[j], \ |
| 2487 script_name.length()) == 0) { \ | 2499 script_name.length()) == 0) { \ |
| 2488 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ | 2500 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3168 } | 3180 } |
| 3169 | 3181 |
| 3170 | 3182 |
| 3171 // Called when the top-level V8 mutex is destroyed. | 3183 // Called when the top-level V8 mutex is destroyed. |
| 3172 void Bootstrapper::FreeThreadResources() { | 3184 void Bootstrapper::FreeThreadResources() { |
| 3173 DCHECK(!IsActive()); | 3185 DCHECK(!IsActive()); |
| 3174 } | 3186 } |
| 3175 | 3187 |
| 3176 } // namespace internal | 3188 } // namespace internal |
| 3177 } // namespace v8 | 3189 } // namespace v8 |
| OLD | NEW |