Index: src/builtins/builtins-function.cc |
diff --git a/src/builtins/builtins-function.cc b/src/builtins/builtins-function.cc |
index 818e09a722590e84d12357d19109683a06370bbc..ab915b0a675e6e5b8b5f8c20e553b50ef6063906 100644 |
--- a/src/builtins/builtins-function.cc |
+++ b/src/builtins/builtins-function.cc |
@@ -163,6 +163,24 @@ BUILTIN(AsyncFunctionConstructor) { |
return *func; |
} |
+BUILTIN(AsyncGeneratorFunctionConstructor) { |
+ HandleScope scope(isolate); |
+ Handle<Object> maybe_func; |
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
+ isolate, maybe_func, |
+ CreateDynamicFunction(isolate, args, "async function*")); |
+ if (!maybe_func->IsJSFunction()) return *maybe_func; |
+ |
+ // Do not lazily compute eval position for AsyncFunction, as they may not be |
+ // determined after the function is resumed. |
+ Handle<JSFunction> func = Handle<JSFunction>::cast(maybe_func); |
+ Handle<Script> script = handle(Script::cast(func->shared()->script())); |
+ int position = script->GetEvalPosition(); |
+ USE(position); |
+ |
+ return *func; |
+} |
+ |
namespace { |
Object* DoFunctionBind(Isolate* isolate, BuiltinArguments args) { |