• 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
..
benchmarks Loading commit data...
bigint Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
debugging Loading commit data...
fuzzer Loading commit data...
fuzzilli Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-api-tests Loading commit data...
wasm-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
OWNERS Loading commit data...