[Webkit-unassigned] [Bug 154808] NewRegexp should not prevent inlining

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Aug 20 01:05:02 PDT 2016


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

--- Comment #2 from Caio Lima <ticaiolima at gmail.com> ---
Created attachment 286537
  --> https://bugs.webkit.org/attachment.cgi?id=286537&action=review
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("test ccc: "+re.test("ccc"));
    print("test abc: "+re.test("abc"));
    return 0;
}

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

noInline(f);

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

gc();

print("GC Passed");

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

print("Objects Allocated");
for (let i = 0; i < 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.

-- 
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/20160820/9660e1d4/attachment-0001.html>


More information about the webkit-unassigned mailing list