[Webkit-unassigned] [Bug 163208] [ES6]. Implement Annex B.3.3 function hoisting rules for eval

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 27 14:41:10 PST 2017


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

GSkachkov <gskachkov at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #299744|1                           |0
        is obsolete|                            |

--- Comment #30 from GSkachkov <gskachkov at gmail.com> ---
Comment on attachment 299744
  --> https://bugs.webkit.org/attachment.cgi?id=299744
Patch

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

Thanks for review!!!

>> Source/JavaScriptCore/ChangeLog:19
>> +        op_is_scope_var_type - check if scope with variable is function scope           
> 
> 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.

I've tried to make it more clear in new patch

>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:697
>> +        RegisterID* emitResolveOuterVarScope(RegisterID* dst, const Identifier&);
> 
> It is bad that this function name does not match the name of the bytecode it emits.

Fixed

>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:698
>> +        RegisterID* emitCheckIfScopeIsVarType(RegisterID* dst, RegisterID* scope);
> 
> Same comment here.

Fixed

>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:699
>> +        RegisterID* emitPutToOuterScope(RegisterID* scope, const Identifier&, RegisterID* value, ResolveMode, InitializationMode);
> 
> How is emitPutToOuterScope different from emitPutToScope?

Yeah, now it is the same. Removed

>> Source/JavaScriptCore/runtime/CommonSlowPaths.cpp:814
>> +SLOW_PATH_DECL(slow_path_resolve_closest_var_scope)
> 
> You forgot the word "or" in this name, which changes its meaning significantly.

Fixed

>> Source/JavaScriptCore/runtime/JSScope.cpp:220
>> +ALWAYS_INLINE JSObject* JSScope::baseResolve(ExecState* exec, JSScope* scope, const Identifier& ident, FinishResolveEarlierFunctor finishResolveEarlier)
> 
> There's no need to use a different function name here. You can call this resolve.

Fixed

>> Source/JavaScriptCore/runtime/JSScope.cpp:256
>> +        if (finishResolveEarlier(scope))
> 
> I would call this 'accept' or 'predicate'.

Renamed

-- 
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/20170127/f42b3b69/attachment.html>


More information about the webkit-unassigned mailing list