Bug 281895

Summary: [JSC] Refactor `Element` in `IntlDurationFormat`
Product: WebKit Reporter: Sosuke Suzuki <sosuke>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Sosuke Suzuki
Reported 2024-10-21 22:11:25 PDT
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.
Attachments
Sosuke Suzuki
Comment 1 2024-10-21 22:12:07 PDT
Radar WebKit Bug Importer
Comment 2 2024-10-28 22:12:16 PDT
EWS
Comment 3 2024-10-31 19:34:00 PDT
Committed 285992@main (831c463d4efc): <https://commits.webkit.org/285992@main> Reviewed commits have been landed. Closing PR #35564 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.