Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 270481@main (79a659d). https://bugs.webkit.org/show_bug.c…
…gi?id=264278 [JSC] Fix addImmediateShouldSpeculateInt32 for case int32 + constant double https://bugs.webkit.org/show_bug.cgi?id=264278 rdar://117563215 Reviewed by Yusuke Suzuki. Current fixup phase would convert the DFG node ValueAdd(Int32, DoubleConstant) to ArithAdd(Int32, JSConstant(DoubleConstant)) if the node is OK to be truncated to Int32. This is wrong. For example, let Int32 be -1 and DoubleConstant be 0.1 where ToInt32(-1 + 0.1) == 0 but -1 + ToInt32(0.1) == -1 . So, we should not speculate that node with Int32 in this case. * JSTests/stress/dfg-int32-add-non-int-double.js: Added. (foo): * Source/JavaScriptCore/dfg/DFGGraph.h: Canonical link: https://commits.webkit.org/270481@main
- Loading branch information