| Summary: | GetByVal constant folding over a Double OutOfBoundsSaneChain array with no BytecodeUsesAsOther should constant fold to PNaN, not undefined | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Saam Barati <saam> | ||||||
| Component: | JavaScriptCore | Assignee: | Saam Barati <saam> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | benjamin, fpizlo, ggaren, gskachkov, guijemont, jsc32, keith_miller, mark.lam, msaboff, rmorisset, ross.kirsling, ticaiolima, tzagallo, webkit-bug-importer, ysuzuki, zhunkibatu | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Saam Barati
2020-08-27 10:42:07 PDT
Created attachment 407418 [details]
patch
Comment on attachment 407418 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=407418&action=review r=me > Source/JavaScriptCore/ChangeLog:10 > + BytecodeUsesAsOther return PNaN for holds and OOB accesses, not jsUndefined(). Did you mean *holes*? Comment on attachment 407418 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=407418&action=review r=me. > Source/JavaScriptCore/ChangeLog:10 > + BytecodeUsesAsOther return PNaN for holds and OOB accesses, not jsUndefined(). typo: holds => holes. > Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:2241 > + if (node->arrayMode().type() == Array::Double && node->arrayMode().isOutOfBoundsSaneChain() && !(node->flags() & NodeBytecodeUsesAsOther)) Seems like we could have an inline function for !(node->flags() & NodeBytecodeUsesAsOther) that's more meaningful than that expression... But we can do that another day. Comment on attachment 407418 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=407418&action=review >> Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:2241 >> + if (node->arrayMode().type() == Array::Double && node->arrayMode().isOutOfBoundsSaneChain() && !(node->flags() & NodeBytecodeUsesAsOther)) > > Seems like we could have an inline function for !(node->flags() & NodeBytecodeUsesAsOther) that's more meaningful than that expression... But we can do that another day. Agreed, and also agree let's save it for another day. Probably want a name like: resultDistinguishesNaNFromUndefined Created attachment 407419 [details]
patch for landing
*** Bug 215841 has been marked as a duplicate of this bug. *** Committed r266254: <https://trac.webkit.org/changeset/266254> All reviewed patches have been landed. Closing bug and clearing flags on attachment 407419 [details]. |