<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&#64;gmail.com" title="GSkachkov &lt;gskachkov&#64;gmail.com&gt;"> <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">&gt; Comment on <span class="bz_obsolete"><a href="attachment.cgi?id=256831&amp;action=diff" name="attach_256831" title="Patch">attachment 256831</a> <a href="attachment.cgi?id=256831&amp;action=edit" title="Patch">[details]</a></span>
&gt; Patch
&gt; 
&gt; View in context:
&gt; <a href="https://bugs.webkit.org/attachment.cgi?id=256831&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=256831&amp;action=review</a>
&gt; 
&gt; &gt; Source/JavaScriptCore/runtime/JSArrowFunction.cpp:56
&gt; &gt; +EncodedJSValue JSC_HOST_CALL arrowFunctionCall(ExecState* exec)
&gt; &gt; +{
&gt; &gt; +    JSArrowFunction* arrowFunction = jsCast&lt;JSArrowFunction*&gt;(exec-&gt;callee());
&gt; &gt; +
&gt; &gt; +    MarkedArgumentBuffer args;
&gt; &gt; +    for (unsigned i = 0; i &lt; exec-&gt;argumentCount(); ++i)
&gt; &gt; +        args.append(exec-&gt;uncheckedArgument(i));
&gt; &gt; +
&gt; &gt; +    JSObject* function = arrowFunction-&gt;arrowFunction();
&gt; &gt; +    CallData callData;
&gt; &gt; +    CallType callType = getCallData(function, callData);
&gt; &gt; +    ASSERT(callType != CallTypeNone);
&gt; &gt; +    return JSValue::encode(call(exec, function, callType, callData, arrowFunction-&gt;boundThis(), args));
&gt; &gt; +}
&gt; 
&gt; This is pretty bad.  You should implement this in a way that doesn't require
&gt; every arrow function call to call into native and then back into JS.  This
&gt; 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>