<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [ES6] Implement ES6 arrow function syntax. Arrow function specific features. Lexical bind of this"
href="https://bugs.webkit.org/show_bug.cgi?id=144956#c62">Comment # 62</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [ES6] Implement ES6 arrow function syntax. Arrow function specific features. Lexical bind of this"
href="https://bugs.webkit.org/show_bug.cgi?id=144956">bug 144956</a>
from <span class="vcard"><a class="email" href="mailto:gskachkov@gmail.com" title="GSkachkov <gskachkov@gmail.com>"> <span class="fn">GSkachkov</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=144956#c52">comment #52</a>)
<span class="quote">> Comment on <span class="bz_obsolete"><a href="attachment.cgi?id=256831&action=diff" name="attach_256831" title="Patch">attachment 256831</a> <a href="attachment.cgi?id=256831&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=256831&action=review">https://bugs.webkit.org/attachment.cgi?id=256831&action=review</a>
>
> > 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.</span >
New fix, with help of the Saam Barati, implemented without switching between native and JS.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>