Bug 196116 - Remove an invalid assertion in DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNullOrUndefined().
Summary: Remove an invalid assertion in DFG::SpeculativeJIT::nonSpeculativeNonPeephole...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-21 16:17 PDT by Mark Lam
Modified: 2019-03-21 19:22 PDT (History)
8 users (show)

See Also:


Attachments
proposed patch. (3.52 KB, patch)
2019-03-21 16:24 PDT, Mark Lam
fpizlo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 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>
Comment 1 Mark Lam 2019-03-21 16:24:59 PDT
Created attachment 365639 [details]
proposed patch.
Comment 2 Filip Pizlo 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.
Comment 3 Filip Pizlo 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
Comment 4 Mark Lam 2019-03-21 16:35:33 PDT
Thanks for the review.  Landed in r243344: <http://trac.webkit.org/r243344>.
Comment 5 Saam Barati 2019-03-21 19:22:01 PDT
Comment on attachment 365639 [details]
proposed patch.

LGTM too.