[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
Fri Jul 3 13:00:47 PDT 2015


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

--- Comment #34 from Filip Pizlo <fpizlo at apple.com> ---
Comment on attachment 256003
  --> https://bugs.webkit.org/attachment.cgi?id=256003
Patch

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

The thing that should be conditional on ENABLE_ES6_ARROWFUNCTION_SYNTAX is the code in the parser.

Then, you could just make JSArrowFunction be unconditionally available, which removes all of the #if's in the compiler.

> Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:1
> -<?xml version="1.0" encoding="utf-8"?>
> +<?xml version="1.0" encoding="utf-8"?>

You should probably revert this.

> Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.h:92
> +#define FOR_EACH_ABSTRACT_FIELD_ARROWFUNCTION(macro) \

If you made JSArrowFunction non-conditional, then you wouldn't need this.

> Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp:3147
> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)

Ditto.

> Source/JavaScriptCore/runtime/JSArrowFunction.h:29
> +#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)

I would remove this conditional here.  You could always declare the class.  Then, you need fewer conditionals elsewhere in the system, and it simplifies how you do the abstract heap repo in the FTL, for example.

-- 
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/20150703/9c13471a/attachment.html>


More information about the webkit-unassigned mailing list