Bug 101665

Summary: DFG should know that int == null is always false
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, ggaren, mark.lam, mhahnenberg, msaboff, oliver, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 101680    
Attachments:
Description Flags
the patch oliver: review+

Filip Pizlo
Reported 2012-11-08 16:42:24 PST
Patch forthcoming.
Attachments
the patch (2.59 KB, patch)
2012-11-08 16:45 PST, Filip Pizlo
oliver: review+
Filip Pizlo
Comment 1 2012-11-08 16:45:53 PST
Created attachment 173146 [details] the patch
Filip Pizlo
Comment 2 2012-11-08 17:58:29 PST
Darin Adler
Comment 3 2012-11-08 18:06:04 PST
Comment on attachment 173146 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=173146&action=review > Source/JavaScriptCore/ChangeLog:3 > + DFG should know that int == null is always false Seems more specific than I would have expected. Isn’t double == null also always false? And string == null? And lots of other cases like that?
Filip Pizlo
Comment 4 2012-11-08 18:11:48 PST
(In reply to comment #3) > (From update of attachment 173146 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=173146&action=review > > > Source/JavaScriptCore/ChangeLog:3 > > + DFG should know that int == null is always false > > Seems more specific than I would have expected. Isn’t double == null also always false? And string == null? And lots of other cases like that? You're right, this is too specific. On the other hand, I was playing it safe because even for int == null Gavin and I ended up scratching our heads over whether or not 0 is equal to null. Also, whereas we have test coverage for int == null being compiled correctly (V8/crypto), we don't have such coverage for the other cases. So, that patch will require somewhat more work since I don't want to add optimizations that aren't covered. I've opened a bug for this: https://bugs.webkit.org/show_bug.cgi?id=101680
Note You need to log in before you can comment on or make changes to this bug.