Bug 190740 - vmCall should check if we may exit before emitting an OSR exit due to exceptions
Summary: vmCall should check if we may exit before emitting an OSR exit due to exceptions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-10-18 16:40 PDT by Saam Barati
Modified: 2018-10-19 13:04 PDT (History)
13 users (show)

See Also:


Attachments
patch (4.21 KB, patch)
2018-10-18 16:51 PDT, Saam Barati
no flags Details | Formatted Diff | Diff
patch (4.21 KB, patch)
2018-10-18 16:54 PDT, Saam Barati
mark.lam: review+
Details | Formatted Diff | Diff
patch for landing (4.23 KB, patch)
2018-10-19 12:15 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2018-10-18 16:40:31 PDT
Otherwise, we may be in a state where we don't have a valid exit state. So if we exitted at that point, we wouldn't know how to recover certain values. validateFTLOSRExitLiveness catches these issues. The solution is to not emit an exit due to an exception being thrown if the node we're compiling isn't allowed to throw. This should also be a tiny bit of a speedup/code size reduction.
Comment 1 Saam Barati 2018-10-18 16:41:11 PDT
<rdar://problem/45220139>
Comment 2 Saam Barati 2018-10-18 16:51:15 PDT
Created attachment 352746 [details]
patch
Comment 3 EWS Watchlist 2018-10-18 16:52:51 PDT
Attachment 352746 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/ChangeLog:13:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 1 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Saam Barati 2018-10-18 16:54:38 PDT
Created attachment 352747 [details]
patch
Comment 5 Mark Lam 2018-10-18 17:03:08 PDT
Comment on attachment 352747 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=352747&action=review

r=me

> Source/JavaScriptCore/ChangeLog:21
> +        emitting an exception check. A node node being able to exit implies

I think you meant to say "A node not being able"

> Source/JavaScriptCore/ChangeLog:22
> +        that it can't exit for exceptions (hence, it can't throw an exception).

I suggest saying "it also can't".
Comment 6 Saam Barati 2018-10-19 12:15:49 PDT
Created attachment 352814 [details]
patch for landing
Comment 7 WebKit Commit Bot 2018-10-19 13:04:02 PDT
Comment on attachment 352814 [details]
patch for landing

Clearing flags on attachment: 352814

Committed r237297: <https://trac.webkit.org/changeset/237297>
Comment 8 WebKit Commit Bot 2018-10-19 13:04:04 PDT
All reviewed patches have been landed.  Closing bug.