Bug 195653 - [JSC] OSR entry should respect abstract values in addition to flush formats
Summary: [JSC] OSR entry should respect abstract values in addition to flush formats
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-12 17:17 PDT by Yusuke Suzuki
Modified: 2019-03-14 13:16 PDT (History)
7 users (show)

See Also:


Attachments
Patch (7.13 KB, patch)
2019-03-12 18:13 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (7.14 KB, patch)
2019-03-12 18:25 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2019-03-12 17:17:25 PDT
[JSC] OSR entry should respect abstract values in addition to flush formats
Comment 1 Yusuke Suzuki 2019-03-12 18:13:19 PDT
Created attachment 364490 [details]
Patch
Comment 2 EWS Watchlist 2019-03-12 18:14:21 PDT
Attachment 364490 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/ChangeLog:14:  Line contains tab character.  [whitespace/tab] [5]
ERROR: Source/JavaScriptCore/ChangeLog:15:  Line contains tab character.  [whitespace/tab] [5]
ERROR: Source/JavaScriptCore/ChangeLog:16:  Line contains tab character.  [whitespace/tab] [5]
Total errors found: 3 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Yusuke Suzuki 2019-03-12 18:25:57 PDT
Created attachment 364491 [details]
Patch
Comment 4 Mark Lam 2019-03-12 18:38:54 PDT
Comment on attachment 364491 [details]
Patch

r=me
Comment 5 WebKit Commit Bot 2019-03-12 19:34:34 PDT
Comment on attachment 364491 [details]
Patch

Clearing flags on attachment: 364491

Committed r242841: <https://trac.webkit.org/changeset/242841>
Comment 6 WebKit Commit Bot 2019-03-12 19:34:35 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2019-03-12 19:35:17 PDT
<rdar://problem/48834271>
Comment 8 Mark Lam 2019-03-12 19:58:13 PDT
<rdar://problem/48766554>
Comment 9 Saam Barati 2019-03-13 18:09:11 PDT
Comment on attachment 364491 [details]
Patch

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

> Source/JavaScriptCore/dfg/DFGOSREntry.cpp:228
> +            if (!value) {

how is this the right check?
Comment 10 Saam Barati 2019-03-13 18:11:05 PDT
Comment on attachment 364491 [details]
Patch

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

> Source/JavaScriptCore/dfg/DFGOSREntry.cpp:215
> +        if (!entry->m_expectedValues.local(local).validate(value)) {
> +            if (Options::verboseOSR()) {
> +                dataLog(
> +                    "    OSR failed because variable ", VirtualRegister(localOffset), " is ",
> +                    value, ", expected ",
> +                    entry->m_expectedValues.local(local), ".\n");
> +            }
> +            return 0;
> +        }

Why are any below checks needed if this is done?
Comment 11 Yusuke Suzuki 2019-03-14 13:16:18 PDT
Comment on attachment 364491 [details]
Patch

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

>> Source/JavaScriptCore/dfg/DFGOSREntry.cpp:215
>> +        }
> 
> Why are any below checks needed if this is done?

Yes, and I found that this patch is conservative for AnyInt and Double cases. I've created the follow-up patch.
https://bugs.webkit.org/show_bug.cgi?id=195752

>> Source/JavaScriptCore/dfg/DFGOSREntry.cpp:228
>> +            if (!value) {
> 
> how is this the right check?

Ooooops, fixed in the follow-up patch.