Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 831c463d4efcdcb1f6ba0679c63facfe67efc235
      
https://github.com/WebKit/WebKit/commit/831c463d4efcdcb1f6ba0679c63facfe67efc235
  Author: Sosuke Suzuki <[email protected]>
  Date:   2024-10-31 (Thu, 31 Oct 2024)

  Changed paths:
    M Source/JavaScriptCore/runtime/IntlDurationFormat.cpp

  Log Message:
  -----------
  [JSC] Refactor `Element` in `IntlDurationFormat`
https://bugs.webkit.org/show_bug.cgi?id=281895

Reviewed by Yusuke Suzuki.

The `Element` struct in `IntlDurationFormat`'s `collectElements` function holds 
the value of each
duration unit as the `m_value` field. The `m_value` field is used to pass 
following two pieces of
information to `NumberFormat`:

1. The sign bit
2. The value's type (`infinity`, `NaN`, or `integer`)

The type of `m_value` is always `integer`. Therefore, the `Element` struct only 
needs to hold the
sign bit of `m_value` rather than `m_value` itself.

This patch removes the `m_value` field from the `Element` struct and adds an 
`m_valueSign` field
instead.

* Source/JavaScriptCore/runtime/IntlDurationFormat.cpp:
(JSC::collectElements):
(JSC::IntlDurationFormat::formatToParts const):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to