Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: src/bootstrapper.cc

Issue 1895603002: [esnext] prototype runtime implementation for async functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@AsyncFunction
Patch Set: disable opt too to fix test variants ._< Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « BUILD.gn ('k') | src/builtins.h » ('j') | src/builtins.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after
2385 } 2385 }
2386 2386
2387 Handle<AccessorInfo> script_is_embedder_debug_script = 2387 Handle<AccessorInfo> script_is_embedder_debug_script =
2388 Accessors::ScriptIsEmbedderDebugScriptInfo(isolate, attribs); 2388 Accessors::ScriptIsEmbedderDebugScriptInfo(isolate, attribs);
2389 { 2389 {
2390 AccessorConstantDescriptor d( 2390 AccessorConstantDescriptor d(
2391 Handle<Name>(Name::cast(script_is_embedder_debug_script->name())), 2391 Handle<Name>(Name::cast(script_is_embedder_debug_script->name())),
2392 script_is_embedder_debug_script, attribs); 2392 script_is_embedder_debug_script, attribs);
2393 script_map->AppendDescriptor(&d); 2393 script_map->AppendDescriptor(&d);
2394 } 2394 }
2395
2396 {
2397 SimpleInstallFunction(container, "AsyncFunctionNext",
2398 Builtins::kAsyncFunctionNext, 2, false);
2399 SimpleInstallFunction(container, "AsyncFunctionThrow",
2400 Builtins::kAsyncFunctionThrow, 2, false);
2401 }
2395 } 2402 }
2396 } 2403 }
2397 2404
2398 2405
2399 void Bootstrapper::ExportExperimentalFromRuntime(Isolate* isolate, 2406 void Bootstrapper::ExportExperimentalFromRuntime(Isolate* isolate,
2400 Handle<JSObject> container) { 2407 Handle<JSObject> container) {
2401 HandleScope scope(isolate); 2408 HandleScope scope(isolate);
2402 2409
2403 #define INITIALIZE_FLAG(FLAG) \ 2410 #define INITIALIZE_FLAG(FLAG) \
2404 { \ 2411 { \
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
2993 static const char* harmony_function_sent_natives[] = {nullptr}; 3000 static const char* harmony_function_sent_natives[] = {nullptr};
2994 static const char* promise_extra_natives[] = {"native promise-extra.js", 3001 static const char* promise_extra_natives[] = {"native promise-extra.js",
2995 nullptr}; 3002 nullptr};
2996 static const char* harmony_object_values_entries_natives[] = {nullptr}; 3003 static const char* harmony_object_values_entries_natives[] = {nullptr};
2997 static const char* harmony_object_own_property_descriptors_natives[] = { 3004 static const char* harmony_object_own_property_descriptors_natives[] = {
2998 nullptr}; 3005 nullptr};
2999 static const char* harmony_array_prototype_values_natives[] = {nullptr}; 3006 static const char* harmony_array_prototype_values_natives[] = {nullptr};
3000 static const char* harmony_exponentiation_operator_natives[] = {nullptr}; 3007 static const char* harmony_exponentiation_operator_natives[] = {nullptr};
3001 static const char* harmony_string_padding_natives[] = { 3008 static const char* harmony_string_padding_natives[] = {
3002 "native harmony-string-padding.js", nullptr}; 3009 "native harmony-string-padding.js", nullptr};
3003 static const char* harmony_async_await_natives[] = {nullptr}; 3010 static const char* harmony_async_await_natives[] = {
3011 "native harmony-async-await.js", nullptr};
3004 3012
3005 for (int i = ExperimentalNatives::GetDebuggerCount(); 3013 for (int i = ExperimentalNatives::GetDebuggerCount();
3006 i < ExperimentalNatives::GetBuiltinsCount(); i++) { 3014 i < ExperimentalNatives::GetBuiltinsCount(); i++) {
3007 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ 3015 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \
3008 if (FLAG_##id) { \ 3016 if (FLAG_##id) { \
3009 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ 3017 for (size_t j = 0; id##_natives[j] != NULL; j++) { \
3010 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ 3018 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \
3011 if (strncmp(script_name.start(), id##_natives[j], \ 3019 if (strncmp(script_name.start(), id##_natives[j], \
3012 script_name.length()) == 0) { \ 3020 script_name.length()) == 0) { \
3013 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ 3021 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
3667 } 3675 }
3668 3676
3669 3677
3670 // Called when the top-level V8 mutex is destroyed. 3678 // Called when the top-level V8 mutex is destroyed.
3671 void Bootstrapper::FreeThreadResources() { 3679 void Bootstrapper::FreeThreadResources() {
3672 DCHECK(!IsActive()); 3680 DCHECK(!IsActive());
3673 } 3681 }
3674 3682
3675 } // namespace internal 3683 } // namespace internal
3676 } // namespace v8 3684 } // namespace v8
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/builtins.h » ('j') | src/builtins.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698