...
<rdar://problem/56108519>
Created attachment 387069 [details] patch
Comment on attachment 387069 [details] patch r=me
Comment on attachment 387069 [details] patch Clearing flags on attachment: 387069 Committed r254188: <https://trac.webkit.org/changeset/254188>
All reviewed patches have been landed. Closing bug.
Comment on attachment 387069 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=387069&action=review > JSTests/stress/ai-value-mod-should-result-in-constant-int-where-possible.js:14 > + const c = z / 1.0 + 0; I think you meant "%" here. > Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:330 > + setConstant(node, jsDoubleNumber(left.asNumber() / right.asNumber())); How does this issue not affect `ArithDiv/ArithMod` as well? IIUC, we can have the same scenario for ArithDiv/ArithMod.
Comment on attachment 387069 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=387069&action=review >> JSTests/stress/ai-value-mod-should-result-in-constant-int-where-possible.js:14 >> + const c = z / 1.0 + 0; > > I think you meant "%" here. yes. will fix.
Comment on attachment 387069 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=387069&action=review >> Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:330 >> + setConstant(node, jsDoubleNumber(left.asNumber() / right.asNumber())); > > How does this issue not affect `ArithDiv/ArithMod` as well? IIUC, we can have the same scenario for ArithDiv/ArithMod. No, it's not the same. If you read the code for ArithDiv/ArithMod over Double binary use kind, they both return the value in double format.
Comment on attachment 387069 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=387069&action=review >>> JSTests/stress/ai-value-mod-should-result-in-constant-int-where-possible.js:14 >>> + const c = z / 1.0 + 0; >> >> I think you meant "%" here. > > yes. will fix. thanks for calling this out. Fixed in: https://trac.webkit.org/changeset/254247/webkit