<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:saambarati1&#64;gmail.com" title="Saam Barati &lt;saambarati1&#64;gmail.com&gt;"> <span class="fn">Saam Barati</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - ES6 Arrow function. Write tests for the controlFlowProfiler"
   href="https://bugs.webkit.org/show_bug.cgi?id=145638">bug 145638</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
               &nbsp;
           </td>
           <td>saambarati1&#64;gmail.com
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - ES6 Arrow function. Write tests for the controlFlowProfiler"
   href="https://bugs.webkit.org/show_bug.cgi?id=145638#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - ES6 Arrow function. Write tests for the controlFlowProfiler"
   href="https://bugs.webkit.org/show_bug.cgi?id=145638">bug 145638</a>
              from <span class="vcard"><a class="email" href="mailto:saambarati1&#64;gmail.com" title="Saam Barati &lt;saambarati1&#64;gmail.com&gt;"> <span class="fn">Saam Barati</span></a>
</span></b>
        <pre>This looks good to me. You should also have a test that
tests the assumption for range of the entire function itself.
The way this works for functions now is that the entire
function executing offset will begin from the &quot;function&quot;
key word and will end with the closing &quot;}&quot; of the function.
We do this by passing in different parts of the function that
represent the textual boundary of the function.

We should match this style with arrow function syntax so the beginning
should be the &quot;(&quot; in the parameter list, or the beginning letter
of the parameter in the single parameter case. For example, I'd make tests
like this:

```
function foo1(test) {
   var f1 = () =&gt; { &quot;hello&quot;; }
   if (test)
       f1();
}
foo1(false);
checkBasicBlock(foo1, '() =&gt;', ShouldNotHaveExecuted);
checkBasicBlock(foo1, '; }', ShouldNotHaveExecuted);
foo1(true);
checkBasicBlock(foo1, '() =&gt;', ShouldHaveExecuted);
checkBasicBlock(foo1, '; }', ShouldHaveExecuted);
// etc, maybe different offsets, too.

function foo2(test) {
   var f1 = (xyz) =&gt; { &quot;hello&quot; }
   if (test)
       f1();
}
foo1(false);
checkBasicBlock(foo1, '(xyz) =&gt;', ShouldNotHaveExecuted);
checkBasicBlock(foo1, '; }', ShouldNotHaveExecuted);
foo1(true);
checkBasicBlock(foo1, '(xyz) =&gt;', ShouldHaveExecuted);
checkBasicBlock(foo1, '; }', ShouldHaveExecuted);
// etc, maybe other tests with single parameter syntax, etc.

``` 

(Actually, looking through the tests for the control flow profiler, it doesn't look like there are other
tests that check function boundaries for regular functions. I should open a bug for that).</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>