Bug 281895
| Summary: | [JSC] Refactor `Element` in `IntlDurationFormat` | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Sosuke Suzuki <sosuke> |
| Component: | JavaScriptCore | Assignee: | 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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Sosuke Suzuki
Pull request: https://github.com/WebKit/WebKit/pull/35564
Radar WebKit Bug Importer
<rdar://problem/138817542>
EWS
Committed 285992@main (831c463d4efc): <https://commits.webkit.org/285992@main>
Reviewed commits have been landed. Closing PR #35564 and removing active labels.