<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - NewRegexp should not prevent inlining"
   href="https://bugs.webkit.org/show_bug.cgi?id=154808#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - NewRegexp should not prevent inlining"
   href="https://bugs.webkit.org/show_bug.cgi?id=154808">bug 154808</a>
              from <span class="vcard"><a class="email" href="mailto:ticaiolima&#64;gmail.com" title="Caio Lima &lt;ticaiolima&#64;gmail.com&gt;"> <span class="fn">Caio Lima</span></a>
</span></b>
        <pre>Created <span class=""><a href="attachment.cgi?id=286537&amp;action=diff" name="attach_286537" title="Proposed Patch">attachment 286537</a> <a href="attachment.cgi?id=286537&amp;action=edit" title="Proposed Patch">[details]</a></span>
Proposed Patch

This version that I propose. I am investigating if there is a possibility of callee CodeBock be GCed because if it happens, RegExp are potentially candidates to be collected and Mache Code Block are going to point o invalid RegExp.

The current test that I am using right now is:

```
function toInline(a) {
    var re = /cc+/;

    print(&quot;test ccc: &quot;+re.test(&quot;ccc&quot;));
    print(&quot;test abc: &quot;+re.test(&quot;abc&quot;));
    return 0;
}

function f(a) {
    toInline(a)
    var re = /(ab)+/;
    print(&quot;test ba: &quot; + re.test(&quot;ba&quot;));
    return 0;
}

noInline(f);

for (let i = 0; i &lt; 100000; i++) {
    f(2);
}

gc();

print(&quot;GC Passed&quot;);

let a = Array(10000000);
for (let i = 0; i &lt; 10000000; i++) {
    a[i] = {value: i};
}

print(&quot;Objects Allocated&quot;);
for (let i = 0; i &lt; 100; i++) {
    f(4);
}
```

However it is possible write  more test codes with correct asserts.
This testing is working properly but I think it is worth more investigation.</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>