[webkit-changes] [WebKit/WebKit] c72427: [JSC] Add precise IntlMathematicalValue

Yusuke Suzuki noreply at github.com
Thu Oct 26 14:16:32 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c724273822ecdefc02e6501581b649cc772cb94d
      https://github.com/WebKit/WebKit/commit/c724273822ecdefc02e6501581b649cc772cb94d
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2023-10-26 (Thu, 26 Oct 2023)

  Changed paths:
    A JSTests/stress/intl-mathematical-value.js
    M JSTests/test262/expectations.yaml
    M Source/JavaScriptCore/runtime/IntlNumberFormat.cpp
    M Source/JavaScriptCore/runtime/IntlNumberFormat.h
    M Source/JavaScriptCore/runtime/IntlNumberFormatInlines.h

  Log Message:
  -----------
  [JSC] Add precise IntlMathematicalValue
https://bugs.webkit.org/show_bug.cgi?id=263705
rdar://problem/117535507

Reviewed by Justin Michaud.

This patch implements precise IntlMathematicalValue aligning to the spec[1].

1. We should keep string representation if the string value may not be exactly converted to double.
   And we should pass string directly to ICU when it happens.
2. We should appropriately handle 0x / 0o / 0b patterns.

[1]: https://tc39.es/ecma402/#sec-tointlmathematicalvalue

* JSTests/test262/expectations.yaml:
* Source/JavaScriptCore/runtime/IntlNumberFormat.cpp:
(JSC::IntlMathematicalValue::parseString):
* Source/JavaScriptCore/runtime/IntlNumberFormat.h:
* Source/JavaScriptCore/runtime/IntlNumberFormatInlines.h:
(JSC::toIntlMathematicalValue):

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




More information about the webkit-changes mailing list