[webkit-changes] [WebKit/WebKit] c0dd96: [JSC] Disable fp-contract explicitly for Date math

Yusuke Suzuki noreply at github.com
Tue May 23 20:23:38 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c0dd96832e9fe3af82713082a391feabd26003dc
      https://github.com/WebKit/WebKit/commit/c0dd96832e9fe3af82713082a391feabd26003dc
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2023-05-23 (Tue, 23 May 2023)

  Changed paths:
    M JSTests/test262/config.yaml
    M Source/JavaScriptCore/runtime/DateConstructor.cpp

  Log Message:
  -----------
  [JSC] Disable fp-contract explicitly for Date math
https://bugs.webkit.org/show_bug.cgi?id=255296
rdar://107895685

Reviewed by Justin Michaud.

Clang-14 enabled fp-contract=on by default. This means that fused-multiply-add (FMA)
can be automatically applied at C++ code! The problem is that FMA changes precision of FP,
causing FP precision problem in places where the precision is important.
This patch applies pragma to disable this behavior.

* JSTests/test262/config.yaml:
* Source/JavaScriptCore/runtime/DateConstructor.cpp:
(JSC::toIntegerOrInfinity):
(JSC::makeDate):
(JSC::makeTime):
(JSC::makeDay):
(JSC::millisecondsFromComponents):

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




More information about the webkit-changes mailing list