Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a64b9e0912a45e949a38510f6c647c74b8c0102d
      
https://github.com/WebKit/WebKit/commit/a64b9e0912a45e949a38510f6c647c74b8c0102d
  Author: Kai Tamkun <[email protected]>
  Date:   2026-05-12 (Tue, 12 May 2026)

  Changed paths:
    A JSTests/stress/math-round-just-below-half.js
    M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
    M Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

  Log Message:
  -----------
  [JSC] Incorrect Math.round Result via floor(x+0.5) JIT Fast Path
https://bugs.webkit.org/show_bug.cgi?id=312687
rdar://175122231

Reviewed by Yijia Huang.

Rounding x by evaluating floor(x + 0.5) fails if x is the nearest representable
double-precision float below 0.5. This patch removes our usage of floor(x + 0.5)
in FTL and DFG.

Test: JSTests/stress/math-round-just-below-half.js

* JSTests/stress/math-round-just-below-half.js: Added.
(f):
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:
* Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileArithRound):

Canonical link: https://commits.webkit.org/313090@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to