From f07d5707c77e73031b6921faac165ca7f8d577c6 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sun, 1 Dec 2019 18:44:06 -0500 Subject: Bug 1343481 - Part 2: Stop using StarGegerator for async function. Tag #1287 --- js/src/frontend/BytecodeCompiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/src/frontend/BytecodeCompiler.cpp') diff --git a/js/src/frontend/BytecodeCompiler.cpp b/js/src/frontend/BytecodeCompiler.cpp index a1abbfeda..7760c4b2e 100644 --- a/js/src/frontend/BytecodeCompiler.cpp +++ b/js/src/frontend/BytecodeCompiler.cpp @@ -727,5 +727,5 @@ frontend::CompileStandaloneAsyncFunction(JSContext* cx, MutableHandleFunction fu BytecodeCompiler compiler(cx, cx->tempLifoAlloc(), options, srcBuf, emptyGlobalScope, TraceLogger_ParserCompileFunction); - return compiler.compileStandaloneFunction(fun, StarGenerator, AsyncFunction, parameterListEnd); + return compiler.compileStandaloneFunction(fun, NotGenerator, AsyncFunction, parameterListEnd); } -- cgit v1.2.3 From d5086ac3aa308bb1ef177834366eeaf7b39bb17e Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Fri, 13 Dec 2019 21:29:23 -0500 Subject: Bug 1331092 - Part 2: Implement Async Generator except yield*. Tag #1287 --- js/src/frontend/BytecodeCompiler.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'js/src/frontend/BytecodeCompiler.cpp') diff --git a/js/src/frontend/BytecodeCompiler.cpp b/js/src/frontend/BytecodeCompiler.cpp index 7760c4b2e..ccfe3cd2e 100644 --- a/js/src/frontend/BytecodeCompiler.cpp +++ b/js/src/frontend/BytecodeCompiler.cpp @@ -729,3 +729,16 @@ frontend::CompileStandaloneAsyncFunction(JSContext* cx, MutableHandleFunction fu TraceLogger_ParserCompileFunction); return compiler.compileStandaloneFunction(fun, NotGenerator, AsyncFunction, parameterListEnd); } + +bool +frontend::CompileStandaloneAsyncGenerator(JSContext* cx, MutableHandleFunction fun, + const ReadOnlyCompileOptions& options, + JS::SourceBufferHolder& srcBuf, + Maybe parameterListEnd) +{ + RootedScope emptyGlobalScope(cx, &cx->global()->emptyGlobalScope()); + + BytecodeCompiler compiler(cx, cx->tempLifoAlloc(), options, srcBuf, emptyGlobalScope, + TraceLogger_ParserCompileFunction); + return compiler.compileStandaloneFunction(fun, StarGenerator, AsyncFunction, parameterListEnd); +} -- cgit v1.2.3