• 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
..
local-tests/test Loading commit data...
BUILD.gn Loading commit data...
OWNERS Loading commit data...
README Loading commit data...
detachArrayBuffer.js Loading commit data...
harness-adapt-donotevaluate.js Loading commit data...
harness-adapt.js Loading commit data...
harness-agent.js Loading commit data...
harness-ishtmldda.js Loading commit data...
prune-local-tests.sh Loading commit data...
test262.status Loading commit data...
testcfg.py Loading commit data...
upstream-local-tests.sh Loading commit data...