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/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/extensions/externalize-string-extension.h" | 10 #include "src/extensions/externalize-string-extension.h" |
(...skipping 2352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2363 } | 2363 } |
2364 | 2364 |
2365 Handle<AccessorInfo> script_is_embedder_debug_script = | 2365 Handle<AccessorInfo> script_is_embedder_debug_script = |
2366 Accessors::ScriptIsEmbedderDebugScriptInfo(isolate, attribs); | 2366 Accessors::ScriptIsEmbedderDebugScriptInfo(isolate, attribs); |
2367 { | 2367 { |
2368 AccessorConstantDescriptor d( | 2368 AccessorConstantDescriptor d( |
2369 Handle<Name>(Name::cast(script_is_embedder_debug_script->name())), | 2369 Handle<Name>(Name::cast(script_is_embedder_debug_script->name())), |
2370 script_is_embedder_debug_script, attribs); | 2370 script_is_embedder_debug_script, attribs); |
2371 script_map->AppendDescriptor(&d); | 2371 script_map->AppendDescriptor(&d); |
2372 } | 2372 } |
| 2373 |
| 2374 { |
| 2375 SimpleInstallFunction(container, "AsyncFunctionNext", |
| 2376 Builtins::kAsyncFunctionNext, 2, false); |
| 2377 SimpleInstallFunction(container, "AsyncFunctionThrow", |
| 2378 Builtins::kAsyncFunctionThrow, 2, false); |
| 2379 } |
2373 } | 2380 } |
2374 } | 2381 } |
2375 | 2382 |
2376 | 2383 |
2377 void Bootstrapper::ExportExperimentalFromRuntime(Isolate* isolate, | 2384 void Bootstrapper::ExportExperimentalFromRuntime(Isolate* isolate, |
2378 Handle<JSObject> container) { | 2385 Handle<JSObject> container) { |
2379 HandleScope scope(isolate); | 2386 HandleScope scope(isolate); |
2380 | 2387 |
2381 #define INITIALIZE_FLAG(FLAG) \ | 2388 #define INITIALIZE_FLAG(FLAG) \ |
2382 { \ | 2389 { \ |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2972 static const char* harmony_function_sent_natives[] = {nullptr}; | 2979 static const char* harmony_function_sent_natives[] = {nullptr}; |
2973 static const char* promise_extra_natives[] = {"native promise-extra.js", | 2980 static const char* promise_extra_natives[] = {"native promise-extra.js", |
2974 nullptr}; | 2981 nullptr}; |
2975 static const char* harmony_object_values_entries_natives[] = {nullptr}; | 2982 static const char* harmony_object_values_entries_natives[] = {nullptr}; |
2976 static const char* harmony_object_own_property_descriptors_natives[] = { | 2983 static const char* harmony_object_own_property_descriptors_natives[] = { |
2977 nullptr}; | 2984 nullptr}; |
2978 static const char* harmony_array_prototype_values_natives[] = {nullptr}; | 2985 static const char* harmony_array_prototype_values_natives[] = {nullptr}; |
2979 static const char* harmony_exponentiation_operator_natives[] = {nullptr}; | 2986 static const char* harmony_exponentiation_operator_natives[] = {nullptr}; |
2980 static const char* harmony_string_padding_natives[] = { | 2987 static const char* harmony_string_padding_natives[] = { |
2981 "native harmony-string-padding.js", nullptr}; | 2988 "native harmony-string-padding.js", nullptr}; |
2982 static const char* harmony_async_await_natives[] = {nullptr}; | 2989 static const char* harmony_async_await_natives[] = { |
| 2990 "native harmony-async-await.js", nullptr}; |
2983 | 2991 |
2984 for (int i = ExperimentalNatives::GetDebuggerCount(); | 2992 for (int i = ExperimentalNatives::GetDebuggerCount(); |
2985 i < ExperimentalNatives::GetBuiltinsCount(); i++) { | 2993 i < ExperimentalNatives::GetBuiltinsCount(); i++) { |
2986 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ | 2994 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ |
2987 if (FLAG_##id) { \ | 2995 if (FLAG_##id) { \ |
2988 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ | 2996 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ |
2989 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ | 2997 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ |
2990 if (strncmp(script_name.start(), id##_natives[j], \ | 2998 if (strncmp(script_name.start(), id##_natives[j], \ |
2991 script_name.length()) == 0) { \ | 2999 script_name.length()) == 0) { \ |
2992 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ | 3000 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ |
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3646 } | 3654 } |
3647 | 3655 |
3648 | 3656 |
3649 // Called when the top-level V8 mutex is destroyed. | 3657 // Called when the top-level V8 mutex is destroyed. |
3650 void Bootstrapper::FreeThreadResources() { | 3658 void Bootstrapper::FreeThreadResources() { |
3651 DCHECK(!IsActive()); | 3659 DCHECK(!IsActive()); |
3652 } | 3660 } |
3653 | 3661 |
3654 } // namespace internal | 3662 } // namespace internal |
3655 } // namespace v8 | 3663 } // namespace v8 |
OLD | NEW |