• ahaas's avatar
    [wasm] Fixed float-to-int32 conversion to match the spec. · dcac1f14
    ahaas authored
    The new implementation detects if the input value is outside i32 range
    and traps it that case.
    
    The range check is done as follows:
    The input value is converted to int32 and then back to float. If the
    result is the same as the truncated input value, then the input value
    is within int32 range.
    
    R=bmeurer@chromium.org
    
    Review URL: https://codereview.chromium.org/1537393003
    
    Cr-Commit-Position: refs/heads/master@{#32984}
    dcac1f14
wasm-compiler.cc 66.9 KB