[Webkit-unassigned] [Bug 166695] [ESNext] Async iteration - Implement Async Generator

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 9 15:39:47 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=166695

--- Comment #7 from Yusuke Suzuki <utatane.tea at gmail.com> ---
Comment on attachment 298373
  --> https://bugs.webkit.org/attachment.cgi?id=298373
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=298373&action=review

quick review. I'll review it in detail later.

> Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:1179
> +        dataLogF("Creating async function!\n");

Nit: `async generator function`.

> Source/JavaScriptCore/parser/Parser.cpp:2740
> +        bool isAsyncGeneratorMethod = false;

Instead of adding more flags, cleaning up these flags is better.
You can combine `isGenerator`, `isAsync`, `isAsyncGenerator`, `isAsyncMethod`, `isAsyncGeneratorMethod` etc. carefully to one enum, right?

> Source/JavaScriptCore/parser/Parser.cpp:3808
> +    bool isAsyncGenerator = false;
> +    bool isAsyncGeneratorMethod = false;

Ditto

> Source/JavaScriptCore/runtime/AsyncGeneratorFunctionConstructor.h:36
> +    typedef InternalFunction Base;

For the newer code, let's use `using Base = JSFunction;`.

> Source/JavaScriptCore/runtime/AsyncGeneratorFunctionPrototype.h:33
> +    typedef JSNonFinalObject Base;

For the newer code, let's use `using Base = JSFunction;`.

> Source/JavaScriptCore/runtime/AsyncGeneratorPrototype.h:36
> +    typedef JSNonFinalObject Base;

For the newer code, let's use `using Base = JSFunction;`.

> Source/JavaScriptCore/runtime/AsyncIteratorPrototype.h:34
> +    typedef JSNonFinalObject Base;

For the newer code, let's use `using Base = JSFunction;`.

> Source/JavaScriptCore/runtime/JSAsyncGeneratorFunction.h:36
> +    typedef JSFunction Base;

For the newer code, let's use `using Base = JSFunction;`.

> Source/JavaScriptCore/runtime/JSFunction.cpp:356
> +                // prototype = constructEmptyObject(exec, thisObject->globalObject(vm)->asyncGeneratorPrototype());

This line is not necessary.

> Source/JavaScriptCore/runtime/JSGlobalObject.cpp:1223
> +    visitor.append(thisObject->m_asyncGeneratorPrototype);

m_asyncIteratorPrototype and m_asyncGeneratorFunctionPrototype need to be visited.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170109/d0931f84/attachment.html>


More information about the webkit-unassigned mailing list