<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [ES6]. Implement Annex B.3.3 function hoisting rules for eval"
href="https://bugs.webkit.org/show_bug.cgi?id=163208#c28">Comment # 28</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [ES6]. Implement Annex B.3.3 function hoisting rules for eval"
href="https://bugs.webkit.org/show_bug.cgi?id=163208">bug 163208</a>
from <span class="vcard"><a class="email" href="mailto:ggaren@apple.com" title="Geoffrey Garen <ggaren@apple.com>"> <span class="fn">Geoffrey Garen</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=299744&action=diff" name="attach_299744" title="Patch">attachment 299744</a> <a href="attachment.cgi?id=299744&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=299744&action=review">https://bugs.webkit.org/attachment.cgi?id=299744&action=review</a>
<span class="quote">> Source/JavaScriptCore/ChangeLog:19
> + op_is_scope_var_type - check if scope with variable is function scope </span >
Let's call this op_is_var_scope.
I don't understand your explanation "check if scope with variable is function scope", but since op_resolve_closest_or_var_scope names something a "var scope", I'm inferring that this check applies to the same thing.
<span class="quote">> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:697
> + RegisterID* emitResolveOuterVarScope(RegisterID* dst, const Identifier&);</span >
It is bad that this function name does not match the name of the bytecode it emits.
<span class="quote">> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:698
> + RegisterID* emitCheckIfScopeIsVarType(RegisterID* dst, RegisterID* scope);</span >
Same comment here.
<span class="quote">> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:699
> + RegisterID* emitPutToOuterScope(RegisterID* scope, const Identifier&, RegisterID* value, ResolveMode, InitializationMode);</span >
How is emitPutToOuterScope different from emitPutToScope?
<span class="quote">> Source/JavaScriptCore/runtime/CommonSlowPaths.cpp:814
> +SLOW_PATH_DECL(slow_path_resolve_closest_var_scope)</span >
You forgot the word "or" in this name, which changes its meaning significantly.
<span class="quote">> Source/JavaScriptCore/runtime/JSScope.cpp:220
> +ALWAYS_INLINE JSObject* JSScope::baseResolve(ExecState* exec, JSScope* scope, const Identifier& ident, FinishResolveEarlierFunctor finishResolveEarlier)</span >
There's no need to use a different function name here. You can call this resolve.
<span class="quote">> Source/JavaScriptCore/runtime/JSScope.cpp:256
> + if (finishResolveEarlier(scope))</span >
I would call this 'accept' or 'predicate'.</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>