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

Unified 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: properly rebase Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index bd228352721af48b312261da81d55c6c07bcb758..b8538d6b481285312528716aeeeb54b64e5975ec 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -2409,6 +2409,17 @@ void Bootstrapper::ExportFromRuntime(Isolate* isolate,
script_is_embedder_debug_script, attribs);
script_map->AppendDescriptor(&d);
}
+
+ {
+ Handle<JSFunction> async_function_next =
+ SimpleInstallFunction(container, "AsyncFunctionNext",
+ Builtins::kAsyncFunctionNext, 2, false);
+ Handle<JSFunction> async_function_throw =
+ SimpleInstallFunction(container, "AsyncFunctionThrow",
+ Builtins::kAsyncFunctionThrow, 2, false);
+ async_function_next->shared()->set_native(true);
+ async_function_throw->shared()->set_native(true);
+ }
}
}
@@ -2501,8 +2512,6 @@ void Genesis::InitializeGlobal_harmony_sharedarraybuffer() {
SimpleInstallFunction(atomics_object, factory->InternalizeUtf8String("load"),
Builtins::kAtomicsLoad, 2, true);
- SimpleInstallFunction(atomics_object, factory->InternalizeUtf8String("store"),
- Builtins::kAtomicsStore, 3, true);
}
@@ -3019,7 +3028,8 @@ bool Genesis::InstallExperimentalNatives() {
static const char* harmony_exponentiation_operator_natives[] = {nullptr};
static const char* harmony_string_padding_natives[] = {
"native harmony-string-padding.js", nullptr};
- static const char* harmony_async_await_natives[] = {nullptr};
+ static const char* harmony_async_await_natives[] = {
+ "native harmony-async-await.js", nullptr};
for (int i = ExperimentalNatives::GetDebuggerCount();
i < ExperimentalNatives::GetBuiltinsCount(); i++) {

Powered by Google App Engine
This is Rietveld 408576698