Bug 198648

Summary: [JSC] Use mergePrediction in ValuePow prediction propagation
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ews-watchlist, keith_miller, mark.lam, msaboff, saam, ticaiolima, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Yusuke Suzuki 2019-06-07 00:44:01 PDT
Currently, we are accidentally using setPrediction. This is wrong since prediction propagation (not processInvariant) must extend the speculation types to ensure we eventually reach to the fixed point.
setPrediction can discard previously configured predictions, can lead to oscillation potentially.
Comment 1 Yusuke Suzuki 2019-06-07 00:47:14 PDT
Created attachment 371572 [details]
Patch
Comment 2 Yusuke Suzuki 2019-06-07 00:49:03 PDT
<rdar://problem/51472985>
Comment 3 Yusuke Suzuki 2019-06-07 01:00:08 PDT
Comment on attachment 371572 [details]
Patch

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

> Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp:291
> +                    changed |= mergePrediction(SpecBytecodeDouble | SpecBigInt);

And this also does not propagate "change" :)
Comment 4 Caio Lima 2019-06-07 02:01:54 PDT
Comment on attachment 371572 [details]
Patch

Nice catch! Informal r+.
Comment 5 Yusuke Suzuki 2019-06-08 21:42:17 PDT
Created attachment 371701 [details]
Patch
Comment 6 Saam Barati 2019-06-08 23:35:47 PDT
Comment on attachment 371701 [details]
Patch

r=me
Comment 7 Yusuke Suzuki 2019-06-08 23:39:12 PDT
Comment on attachment 371701 [details]
Patch

Thanks! :)
Comment 8 WebKit Commit Bot 2019-06-09 00:09:53 PDT
Comment on attachment 371701 [details]
Patch

Clearing flags on attachment: 371701

Committed r246237: <https://trac.webkit.org/changeset/246237>
Comment 9 WebKit Commit Bot 2019-06-09 00:09:55 PDT
All reviewed patches have been landed.  Closing bug.