[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
Wed Jul 15 13:22:39 PDT 2015


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

Filip Pizlo <fpizlo at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #256831|review?, commit-queue?      |review-, commit-queue-
              Flags|                            |

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

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

> Source/JavaScriptCore/runtime/JSArrowFunction.cpp:56
> +EncodedJSValue JSC_HOST_CALL arrowFunctionCall(ExecState* exec)
> +{
> +    JSArrowFunction* arrowFunction = jsCast<JSArrowFunction*>(exec->callee());
> +
> +    MarkedArgumentBuffer args;
> +    for (unsigned i = 0; i < exec->argumentCount(); ++i)
> +        args.append(exec->uncheckedArgument(i));
> +
> +    JSObject* function = arrowFunction->arrowFunction();
> +    CallData callData;
> +    CallType callType = getCallData(function, callData);
> +    ASSERT(callType != CallTypeNone);
> +    return JSValue::encode(call(exec, function, callType, callData, arrowFunction->boundThis(), args));
> +}

This is pretty bad.  You should implement this in a way that doesn't require every arrow function call to call into native and then back into JS.  This will be extremely slow.

-- 
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/20150715/2bf36b13/attachment.html>


More information about the webkit-unassigned mailing list