• neis's avatar
    [compiler] Fix typing of ToLength. · 1b696f3c
    neis authored
    Typer::Visitor::ToLength was unsound (and non-monotonic).  For instance,
    if the input type was Range(2^53, 2^53+1), the result type was
    Constant(2^53).  Now the result is type Constant(2^53-1).  (The result
    of ToLength is guaranteed to be between 0 and 2^53-1.)
    
    BUG=
    
    Review-Url: https://codereview.chromium.org/2753773010
    Cr-Commit-Position: refs/heads/master@{#43914}
    1b696f3c
typer.cc 59.2 KB