NEW 156327
[JSC] Do a better job a comparing unsigned integers
https://bugs.webkit.org/show_bug.cgi?id=156327
Summary [JSC] Do a better job a comparing unsigned integers
Benjamin Poulain
Reported 2016-04-06 18:58:09 PDT
[JSC] Do a better job a comparing unsigned integers
Attachments
Patch (97.77 KB, patch)
2016-04-06 19:08 PDT, Benjamin Poulain
fpizlo: review-
Benjamin Poulain
Comment 1 2016-04-06 19:08:23 PDT
WebKit Commit Bot
Comment 2 2016-04-06 19:09:20 PDT
Attachment 275847 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/dfg/DFGDCEPhase.cpp:143: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/dfg/DFGDCEPhase.cpp:181: Place brace on its own line for function definitions. [whitespace/braces] [4] ERROR: Source/JavaScriptCore/dfg/DFGDCEPhase.cpp:301: Place brace on its own line for function definitions. [whitespace/braces] [4] Total errors found: 3 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Filip Pizlo
Comment 3 2016-04-06 19:18:02 PDT
Comment on attachment 275847 [details] Patch This change is unsound. It's valid for a phase to perform optimizations based on the fact that UInt32ToNumber will OSR exit for certain values. For example, it would be valid for a phase to claim that after UInt32ToNumber(@x) has executed, @x cannot possibly be negative. This is the way our IR works for all other cases where we perform any kind of speculation. This patch could already be wrong, if there is anything that already does UInt32ToNumber-based optimizations. Probably, there is no other such optimization, but I don't see how we would prevent such an optimization from being written. It would be awkward for UInt32ToNumber's speculation to be the only one exempted from the usual rule. The correct way to make this work is to use Int52. This is a feature of the DFG that we already have. The correct behavior of UInt32ToNumber would be to return an Int52. If you did this, then you'd get all of the other stuff for free.
Note You need to log in before you can comment on or make changes to this bug.