<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [JSC] implement async functions proposal"
href="https://bugs.webkit.org/show_bug.cgi?id=156147#c80">Comment # 80</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [JSC] implement async functions proposal"
href="https://bugs.webkit.org/show_bug.cgi?id=156147">bug 156147</a>
from <span class="vcard"><a class="email" href="mailto:utatane.tea@gmail.com" title="Yusuke Suzuki <utatane.tea@gmail.com>"> <span class="fn">Yusuke Suzuki</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=278692&action=diff" name="attach_278692" title="Patch">attachment 278692</a> <a href="attachment.cgi?id=278692&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=278692&action=review">https://bugs.webkit.org/attachment.cgi?id=278692&action=review</a>
Nice clean up! Sorry for my late review process. I have a time on week end :)
<span class="quote">> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:245
> + bool containsArrowOrEvalButNotInArrowBlock = ((functionNode->usesArrowFunction() && functionNode->doAnyInnerArrowFunctionsUseAnyFeature()) || functionNode->usesEval()) && (!m_codeBlock->isArrowFunction() && !m_codeBlock->isAsyncArrowFunction());</span >
Now, isArrowFunction() includes isAsyncArrowFunction, let's drop isAsyncArrowFunction. :)
<span class="quote">> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:249
> + bool needsArguments = (functionNode->usesArguments() || codeBlock->usesEval() || (functionNode->usesArrowFunction() && !codeBlock->isArrowFunction() && !codeBlock->isAsyncArrowFunction() && isArgumentsUsedInInnerArrowFunction()));</span >
Ditto.
<span class="quote">> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:509
> + if (!haveParameterNamedArguments && !m_codeBlock->isArrowFunction() && !m_codeBlock->isAsyncArrowFunction()) {</span >
isAsyncArrowFunction is included in isArrowFunction().
<span class="quote">> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:630
> + if (SourceParseMode::ArrowFunctionMode == parseMode || SourceParseMode::AsyncArrowFunctionBodyMode == parseMode || SourceParseMode::AsyncArrowFunctionMode == parseMode) {</span >
Is this AsyncArrowFunctionBodyMode correct?
<span class="quote">> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:638
> + if (needsToUpdateArrowFunctionContext() && !codeBlock->isArrowFunction() && !codeBlock->isAsyncArrowFunction()) {</span >
isAsyncArrowFunction is included in isArrowFunction()
<span class="quote">> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:4313
> + ASSERT(m_codeBlock->isArrowFunction() || parseMode() == SourceParseMode::AsyncArrowFunctionBodyMode || parseMode() == SourceParseMode::AsyncArrowFunctionMode || m_codeBlock->isArrowFunctionContext() || constructorKind() == ConstructorKind::Derived || m_codeType == EvalCode);</span >
Is this `SourceParseMode::AsyncArrowFunctionBodyMode` correct?
<span class="quote">> Source/JavaScriptCore/parser/ASTBuilder.h:386
> + usesArrowFunction();</span >
Is this usesArrowFunction() here correct?
<span class="quote">> Source/JavaScriptCore/parser/Parser.cpp:3562
> + goto parseProperty;</span >
Is it safe for `async hello: value` property?
<span class="quote">> Source/JavaScriptCore/parser/Parser.cpp:3989
> + return parseAsyncFunctionExpression(context);</span >
Looks nice.
<span class="quote">> Source/JavaScriptCore/parser/Parser.h:1579
> + ASSERT(false);</span >
Let's use `RELEASE_ASSERT_NOT_REACHED()`
<span class="quote">> Source/JavaScriptCore/runtime/CodeCache.cpp:200
> + ConstructAbility constructAbility = constructAbilityForParseMode(metadata->parseMode());</span >
Nice.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>