[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 24 12:57:53 PDT 2015


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

--- Comment #62 from GSkachkov <gskachkov at gmail.com> ---
(In reply to comment #52)
> Comment on attachment 256831 [details]
> 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.
New fix, with help of the Saam Barati, implemented without switching between native and JS.

-- 
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/20150724/76389ac0/attachment.html>


More information about the webkit-unassigned mailing list