Bug 196116

Summary: Remove an invalid assertion in DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNullOrUndefined().
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: fpizlo, keith_miller, msaboff, rmorisset, saam, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch. fpizlo: review+

Mark Lam
Reported 2019-03-21 16:17:38 PDT
The DFG backend should not make assumptions about what optimizations the front end will or will not do. The assertion asserts that the operand cannot be known to be a cell. However, it is not guaranteed that the front end will fold away this case. Also, the DFG backend is perfectly capable of generating code to handle the case where the operand is a cell. <rdar://problem/48976951>
Attachments
proposed patch. (3.52 KB, patch)
2019-03-21 16:24 PDT, Mark Lam
fpizlo: review+
Mark Lam
Comment 1 2019-03-21 16:24:59 PDT
Created attachment 365639 [details] proposed patch.
Filip Pizlo
Comment 2 2019-03-21 16:26:52 PDT
Comment on attachment 365639 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=365639&action=review > Source/JavaScriptCore/ChangeLog:10 > + The DFG backend should not make assumptions about what optimizations the front end > + will or will not do. The assertion asserts that the operand cannot be known to be You're right - the DFG is making a back assumption here because optimizations should be optional.
Filip Pizlo
Comment 3 2019-03-21 16:27:06 PDT
(In reply to Filip Pizlo from comment #2) > Comment on attachment 365639 [details] > proposed patch. > > View in context: > https://bugs.webkit.org/attachment.cgi?id=365639&action=review > > > Source/JavaScriptCore/ChangeLog:10 > > + The DFG backend should not make assumptions about what optimizations the front end > > + will or will not do. The assertion asserts that the operand cannot be known to be > > You're right - the DFG is making a back assumption here because > optimizations should be optional. *bad assumption
Mark Lam
Comment 4 2019-03-21 16:35:33 PDT
Thanks for the review. Landed in r243344: <http://trac.webkit.org/r243344>.
Saam Barati
Comment 5 2019-03-21 19:22:01 PDT
Comment on attachment 365639 [details] proposed patch. LGTM too.
Note You need to log in before you can comment on or make changes to this bug.