| 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 2149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2160 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_observe) | 2160 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_observe) |
| 2161 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread_arrays) | 2161 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread_arrays) |
| 2162 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_new_target) | 2162 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_new_target) |
| 2163 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_concat_spreadable) | 2163 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_concat_spreadable) |
| 2164 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexps) | 2164 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexps) |
| 2165 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode_regexps) | 2165 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode_regexps) |
| 2166 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) | 2166 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) |
| 2167 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_completion) | 2167 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_completion) |
| 2168 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tolength) | 2168 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tolength) |
| 2169 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_do_expressions) | 2169 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_do_expressions) |
| 2170 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_async_await) |
| 2170 | 2171 |
| 2171 | 2172 |
| 2172 static void SimpleInstallFunction(Handle<JSObject>& base, const char* name, | 2173 static void SimpleInstallFunction(Handle<JSObject>& base, const char* name, |
| 2173 Builtins::Name call, int len, bool adapt) { | 2174 Builtins::Name call, int len, bool adapt) { |
| 2174 Handle<JSFunction> fun = | 2175 Handle<JSFunction> fun = |
| 2175 InstallFunction(base, name, JS_OBJECT_TYPE, JSObject::kHeaderSize, | 2176 InstallFunction(base, name, JS_OBJECT_TYPE, JSObject::kHeaderSize, |
| 2176 MaybeHandle<JSObject>(), call); | 2177 MaybeHandle<JSObject>(), call); |
| 2177 if (adapt) { | 2178 if (adapt) { |
| 2178 fun->shared()->set_internal_formal_parameter_count(len); | 2179 fun->shared()->set_internal_formal_parameter_count(len); |
| 2179 } else { | 2180 } else { |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2638 static const char* harmony_sharedarraybuffer_natives[] = { | 2639 static const char* harmony_sharedarraybuffer_natives[] = { |
| 2639 "native harmony-sharedarraybuffer.js", "native harmony-atomics.js", NULL}; | 2640 "native harmony-sharedarraybuffer.js", "native harmony-atomics.js", NULL}; |
| 2640 static const char* harmony_new_target_natives[] = {nullptr}; | 2641 static const char* harmony_new_target_natives[] = {nullptr}; |
| 2641 static const char* harmony_concat_spreadable_natives[] = { | 2642 static const char* harmony_concat_spreadable_natives[] = { |
| 2642 "native harmony-concat-spreadable.js", nullptr}; | 2643 "native harmony-concat-spreadable.js", nullptr}; |
| 2643 static const char* harmony_simd_natives[] = {"native harmony-simd.js", | 2644 static const char* harmony_simd_natives[] = {"native harmony-simd.js", |
| 2644 nullptr}; | 2645 nullptr}; |
| 2645 static const char* harmony_tolength_natives[] = {nullptr}; | 2646 static const char* harmony_tolength_natives[] = {nullptr}; |
| 2646 static const char* harmony_completion_natives[] = {nullptr}; | 2647 static const char* harmony_completion_natives[] = {nullptr}; |
| 2647 static const char* harmony_do_expressions_natives[] = {nullptr}; | 2648 static const char* harmony_do_expressions_natives[] = {nullptr}; |
| 2649 static const char* harmony_async_await_natives[] = {nullptr}; |
| 2648 | 2650 |
| 2649 for (int i = ExperimentalNatives::GetDebuggerCount(); | 2651 for (int i = ExperimentalNatives::GetDebuggerCount(); |
| 2650 i < ExperimentalNatives::GetBuiltinsCount(); i++) { | 2652 i < ExperimentalNatives::GetBuiltinsCount(); i++) { |
| 2651 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ | 2653 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ |
| 2652 if (FLAG_##id) { \ | 2654 if (FLAG_##id) { \ |
| 2653 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ | 2655 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ |
| 2654 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ | 2656 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ |
| 2655 if (strncmp(script_name.start(), id##_natives[j], \ | 2657 if (strncmp(script_name.start(), id##_natives[j], \ |
| 2656 script_name.length()) == 0) { \ | 2658 script_name.length()) == 0) { \ |
| 2657 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ | 2659 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3327 } | 3329 } |
| 3328 | 3330 |
| 3329 | 3331 |
| 3330 // Called when the top-level V8 mutex is destroyed. | 3332 // Called when the top-level V8 mutex is destroyed. |
| 3331 void Bootstrapper::FreeThreadResources() { | 3333 void Bootstrapper::FreeThreadResources() { |
| 3332 DCHECK(!IsActive()); | 3334 DCHECK(!IsActive()); |
| 3333 } | 3335 } |
| 3334 | 3336 |
| 3335 } // namespace internal | 3337 } // namespace internal |
| 3336 } // namespace v8 | 3338 } // namespace v8 |
| OLD | NEW |