• Frank Tang's avatar
    [Temporal] Fix Duration toJSON/toString · 20db58cb
    Frank Tang authored
    1. Correct the return type of RoundTowardsZero to fix issue with
    double value > 2^64
    
    2. In TemporalDurationToString:
    a. Use std::fmod instead of % to get the remainder
    b. Use extra xx_add variables to hold additional value which may
    overflow the double during computation.
    c. Use BigInt for days if the value is too large for double
    to ensure the precision.
    3. Add tests with Number.MAX_SAFE_INTEGER
    and Number.MAX_VALUE in values for Duration toJSON in mjsunit
    
    
    
    Bug: v8:11544
    Change-Id: Icac4f669ed1c591e947b51c82dd48bdef7a6db6e
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3900813Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
    Commit-Queue: Frank Tang <ftang@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#83344}
    20db58cb
Name
Last commit
Last update
..
calendar-constructor.js Loading commit data...
calendar-date-add.js Loading commit data...
calendar-date-from-fields.js Loading commit data...
calendar-date-until.js Loading commit data...
calendar-day-of-week.js Loading commit data...
calendar-day-of-year.js Loading commit data...
calendar-day.js Loading commit data...
calendar-days-in-month.js Loading commit data...
calendar-days-in-week.js Loading commit data...
calendar-days-in-year.js Loading commit data...
calendar-fields.js Loading commit data...
calendar-from.js Loading commit data...
calendar-in-leap-year.js Loading commit data...
calendar-merge-fields.js Loading commit data...
calendar-month-code.js Loading commit data...
calendar-month-day-from-fields.js Loading commit data...
calendar-month.js Loading commit data...
calendar-months-in-year.js Loading commit data...
calendar-week-of-year.js Loading commit data...
calendar-year-month-from-fields.js Loading commit data...
calendar-year.js Loading commit data...
duration-abs.js Loading commit data...
duration-add.js Loading commit data...
duration-constructor.js Loading commit data...
duration-from.js Loading commit data...
duration-negated.js Loading commit data...
duration-to-json-boundary-cases.js Loading commit data...
duration-to-json.js Loading commit data...
duration-valueOf.js Loading commit data...
duration-with.js Loading commit data...
function-exist-no-intl.js Loading commit data...
function-exist.js Loading commit data...
instant-add.js Loading commit data...
instant-compare.js Loading commit data...
instant-constructor.js Loading commit data...
instant-equals.js Loading commit data...
instant-from-epoch-microseconds.js Loading commit data...
instant-from-epoch-milliseconds.js Loading commit data...
instant-from-epoch-nanoseconds.js Loading commit data...
instant-from-epoch-seconds.js Loading commit data...
instant-subtract.js Loading commit data...
instant-to-json.js Loading commit data...
instant-toJSON.js Loading commit data...
instant-valueOf.js Loading commit data...
plain-date-add.js Loading commit data...
plain-date-compare.js Loading commit data...
plain-date-constructor.js Loading commit data...
plain-date-equals.js Loading commit data...
plain-date-from.js Loading commit data...
plain-date-get-calendar.js Loading commit data...
plain-date-get-day.js Loading commit data...
plain-date-get-dayOfWeek.js Loading commit data...
plain-date-get-dayOfYear.js Loading commit data...
plain-date-get-daysInMonth.js Loading commit data...
plain-date-get-daysInWeek.js Loading commit data...
plain-date-get-daysInYear.js Loading commit data...
plain-date-get-era.js Loading commit data...
plain-date-get-eraYear.js Loading commit data...
plain-date-get-inLeapYear.js Loading commit data...
plain-date-get-iso-fields.js Loading commit data...
plain-date-get-month.js Loading commit data...
plain-date-get-monthCode.js Loading commit data...
plain-date-get-monthsInYear.js Loading commit data...
plain-date-get-weekOfYear.js Loading commit data...
plain-date-get-year.js Loading commit data...
plain-date-time-add.js Loading commit data...
plain-date-time-compare.js Loading commit data...
plain-date-time-constructor.js Loading commit data...
plain-date-time-equals.js Loading commit data...
plain-date-time-from.js Loading commit data...
plain-date-time-get-calendar.js Loading commit data...
plain-date-time-get-day.js Loading commit data...
plain-date-time-get-dayOfWeek.js Loading commit data...
plain-date-time-get-dayOfYear.js Loading commit data...
plain-date-time-get-daysInMonth.js Loading commit data...
plain-date-time-get-daysInWeek.js Loading commit data...
plain-date-time-get-daysInYear.js Loading commit data...
plain-date-time-get-era.js Loading commit data...
plain-date-time-get-eraYear.js Loading commit data...
plain-date-time-get-hour.js Loading commit data...
plain-date-time-get-inLeapYear.js Loading commit data...
plain-date-time-get-iso-fields.js Loading commit data...
plain-date-time-get-microsecond.js Loading commit data...
plain-date-time-get-millisecond.js Loading commit data...
plain-date-time-get-minute.js Loading commit data...
plain-date-time-get-month.js Loading commit data...
plain-date-time-get-monthCode.js Loading commit data...
plain-date-time-get-monthsInYear.js Loading commit data...
plain-date-time-get-nanosecond.js Loading commit data...
plain-date-time-get-second.js Loading commit data...
plain-date-time-get-weekOfYear.js Loading commit data...
plain-date-time-get-year.js Loading commit data...
plain-date-time-subtract.js Loading commit data...
plain-date-time-to-json.js Loading commit data...
plain-date-time-to-plain-date.js Loading commit data...
plain-date-time-to-plain-month-day.js Loading commit data...
plain-date-time-to-plain-time.js Loading commit data...
plain-date-time-to-plain-year-month.js Loading commit data...
plain-date-time-valueOf.js Loading commit data...
plain-date-time-with-calendar.js Loading commit data...
plain-date-time-with-plain-date.js Loading commit data...
plain-date-time-with-plain-time.js Loading commit data...
plain-date-time-with.js Loading commit data...
plain-date-to-json.js Loading commit data...
plain-date-to-plain-date-time.js Loading commit data...
plain-date-to-plain-month-day.js Loading commit data...
plain-date-to-plain-year-month.js Loading commit data...
plain-date-valueOf.js Loading commit data...
plain-date-with-calendar.js Loading commit data...
plain-date-with.js Loading commit data...
temporal-helpers.js Loading commit data...
time-zone-constructor.js Loading commit data...