Bug 127018 - FTL should be cool with runtime functions throwing exceptions
Summary: FTL should be cool with runtime functions throwing exceptions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks: 113622
  Show dependency treegraph
 
Reported: 2014-01-14 16:30 PST by Filip Pizlo
Modified: 2014-01-15 14:11 PST (History)
8 users (show)

See Also:


Attachments
the patch (11.12 KB, patch)
2014-01-14 16:32 PST, Filip Pizlo
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2014-01-14 16:30:24 PST
This requires an exception throw off-ramp from the FTL.  It's pretty easy.
Comment 1 Filip Pizlo 2014-01-14 16:32:30 PST
Created attachment 221213 [details]
the patch
Comment 2 Geoffrey Garen 2014-01-14 17:19:12 PST
Comment on attachment 221213 [details]
the patch

r=me

Would be nice to have a test case for the rare case where an FTL function does not handle any exceptions.
Comment 3 Filip Pizlo 2014-01-14 18:24:49 PST
(In reply to comment #2)
> (From update of attachment 221213 [details])
> r=me
> 
> Would be nice to have a test case for the rare case where an FTL function does not handle any exceptions.

This gives me the excuse to write this test:

function foo() { }

noInline(foo);

for (var i = 0; i < 100000; ++i) {
    var result = foo();
    if (result !== void 0)
        throw "You broke JSC so hard that even the empty function doesn't work: " + result;
}
Comment 4 Filip Pizlo 2014-01-14 19:16:43 PST
Landed in http://trac.webkit.org/changeset/162035
Comment 5 Geoffrey Garen 2014-01-15 14:11:26 PST
Nice!