• Benedikt Meurer's avatar
    [turbofan] Fix inconsistent treatment of SpeculativeToNumber. · c54d93d6
    Benedikt Meurer authored
    This is a partial revert of e583fc83.
    The reasoning here is that the treatment of SpeculativeToNumber[hint]
    was not consistent (which led to the original bug that caused the
    performance regression): The semantics of the operator is that it turns
    its input into a number, and might bailout if the input is too complex
    to accomplish that within optimized code. It can use the hint to handle
    even fewer cases without the risk of a deoptimization loop. However it
    cannot rely on the hint influencing the output, especially not before
    SimplifiedLowering ran. The code for the OOB element access however
    relied on the hint being enforced, which caused the original bug.
    
    This CL repairs that and instead uses CheckSmi for the OOB element
    access guard.
    
    Also-By: tebbi@chromium.org
    Bug: chromium:819298, chromium:820729
    Change-Id: I9b2170ccf9b5561d698c0108e93e538cac1e708c
    Reviewed-on: https://chromium-review.googlesource.com/961066Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
    Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#51924}
    c54d93d6
js-native-context-specialization.cc 124 KB