| 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 2143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2154 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring) | 2154 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring) |
| 2155 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_observe) | 2155 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_observe) |
| 2156 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread_arrays) | 2156 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread_arrays) |
| 2157 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_new_target) | 2157 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_new_target) |
| 2158 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_concat_spreadable) | 2158 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_concat_spreadable) |
| 2159 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexps) | 2159 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexps) |
| 2160 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode_regexps) | 2160 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode_regexps) |
| 2161 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) | 2161 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tostring) |
| 2162 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_completion) | 2162 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_completion) |
| 2163 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tolength) | 2163 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tolength) |
| 2164 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_do_expressions) |
| 2164 | 2165 |
| 2165 | 2166 |
| 2166 static void SimpleInstallFunction(Handle<JSObject>& base, const char* name, | 2167 static void SimpleInstallFunction(Handle<JSObject>& base, const char* name, |
| 2167 Builtins::Name call, int len, bool adapt) { | 2168 Builtins::Name call, int len, bool adapt) { |
| 2168 Handle<JSFunction> fun = | 2169 Handle<JSFunction> fun = |
| 2169 InstallFunction(base, name, JS_OBJECT_TYPE, JSObject::kHeaderSize, | 2170 InstallFunction(base, name, JS_OBJECT_TYPE, JSObject::kHeaderSize, |
| 2170 MaybeHandle<JSObject>(), call); | 2171 MaybeHandle<JSObject>(), call); |
| 2171 if (adapt) { | 2172 if (adapt) { |
| 2172 fun->shared()->set_internal_formal_parameter_count(len); | 2173 fun->shared()->set_internal_formal_parameter_count(len); |
| 2173 } else { | 2174 } else { |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2625 static const char* harmony_spread_arrays_natives[] = {nullptr}; | 2626 static const char* harmony_spread_arrays_natives[] = {nullptr}; |
| 2626 static const char* harmony_sharedarraybuffer_natives[] = { | 2627 static const char* harmony_sharedarraybuffer_natives[] = { |
| 2627 "native harmony-sharedarraybuffer.js", "native harmony-atomics.js", NULL}; | 2628 "native harmony-sharedarraybuffer.js", "native harmony-atomics.js", NULL}; |
| 2628 static const char* harmony_new_target_natives[] = {nullptr}; | 2629 static const char* harmony_new_target_natives[] = {nullptr}; |
| 2629 static const char* harmony_concat_spreadable_natives[] = { | 2630 static const char* harmony_concat_spreadable_natives[] = { |
| 2630 "native harmony-concat-spreadable.js", nullptr}; | 2631 "native harmony-concat-spreadable.js", nullptr}; |
| 2631 static const char* harmony_simd_natives[] = {"native harmony-simd.js", | 2632 static const char* harmony_simd_natives[] = {"native harmony-simd.js", |
| 2632 nullptr}; | 2633 nullptr}; |
| 2633 static const char* harmony_tolength_natives[] = {nullptr}; | 2634 static const char* harmony_tolength_natives[] = {nullptr}; |
| 2634 static const char* harmony_completion_natives[] = {nullptr}; | 2635 static const char* harmony_completion_natives[] = {nullptr}; |
| 2636 static const char* harmony_do_expressions_natives[] = {nullptr}; |
| 2635 | 2637 |
| 2636 for (int i = ExperimentalNatives::GetDebuggerCount(); | 2638 for (int i = ExperimentalNatives::GetDebuggerCount(); |
| 2637 i < ExperimentalNatives::GetBuiltinsCount(); i++) { | 2639 i < ExperimentalNatives::GetBuiltinsCount(); i++) { |
| 2638 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ | 2640 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ |
| 2639 if (FLAG_##id) { \ | 2641 if (FLAG_##id) { \ |
| 2640 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ | 2642 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ |
| 2641 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ | 2643 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ |
| 2642 if (strncmp(script_name.start(), id##_natives[j], \ | 2644 if (strncmp(script_name.start(), id##_natives[j], \ |
| 2643 script_name.length()) == 0) { \ | 2645 script_name.length()) == 0) { \ |
| 2644 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ | 2646 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3313 } | 3315 } |
| 3314 | 3316 |
| 3315 | 3317 |
| 3316 // Called when the top-level V8 mutex is destroyed. | 3318 // Called when the top-level V8 mutex is destroyed. |
| 3317 void Bootstrapper::FreeThreadResources() { | 3319 void Bootstrapper::FreeThreadResources() { |
| 3318 DCHECK(!IsActive()); | 3320 DCHECK(!IsActive()); |
| 3319 } | 3321 } |
| 3320 | 3322 |
| 3321 } // namespace internal | 3323 } // namespace internal |
| 3322 } // namespace v8 | 3324 } // namespace v8 |
| OLD | NEW |