[Webkit-unassigned] [Bug 144956] [ES6] Implement ES6 arrow function syntax. Arrow function specific features. Lexical bind of this
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jul 27 13:01:04 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=144956
GSkachkov <gskachkov at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #257562|1 |0
is obsolete| |
--- Comment #71 from GSkachkov <gskachkov at gmail.com> ---
Comment on attachment 257562
--> https://bugs.webkit.org/attachment.cgi?id=257562
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=257562&action=review
>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:515
>> + m_arrowFunctionThisRegister = addVar();
>
> This shouldn't be an addVar(). It should be a temporary.
> Also, I'd put this "if" statement above the "m_TDZStack.append(...)" line.
Done
>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:2201
>> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)
>
> You don't need guars here.
Done
>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:304
>> + RegisterID* arrowFunctionThisRegister() { return m_arrowFunctionThisRegister; }
>
> Don't need this.
Done
>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:481
>> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)
>
> You don't need guards here.
Done
>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:483
>> + RegisterID* emitThisNodeBytecode(RegisterID*, JSTextPosition);
>
> This looks like it should be removed.
Done
>> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:766
>> + RegisterID* m_arrowFunctionThisRegister { nullptr };
>
> We don't need this to be a field.
Done
>> Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp:3070
>> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)
>
> Don't need guards here.
OK. I've removed. What is difference with ES6_CLASS_SYNTAX guards?
>> Source/JavaScriptCore/parser/NodeConstructors.h:848
>> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)
>
> Don't need guards here.
Done
>> Source/JavaScriptCore/parser/Nodes.h:167
>> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)
>
> ditto.
Done
>> Source/JavaScriptCore/parser/Nodes.h:1742
>> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)
>
> ditto.
Done
>> Source/JavaScriptCore/runtime/CommonIdentifiers.h:187
>> + macro(__private_arrowfunction_this__) \
>
> You probably want this under the "JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_PROPERTY_NAME" macro.
> Also, there is no need to make this a crazy name with underscores. Just call it "arrowFunctionBoundThis" or something
> similar. Also, make sure that this property is not visible to JS code.
Done
>> Source/JavaScriptCore/runtime/JSFunction.cpp:132
>> +void JSFunction::finishCreation(VM& vm)
>
> Is this called?
Yes, it is called in createImpl function
>> Source/JavaScriptCore/runtime/JSFunction.h:147
>> using Base::finishCreation;
>
> Maybe we no longer want this line?
Done
--
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/20150727/0dd5e6b0/attachment.html>
More information about the webkit-unassigned
mailing list