• Tobias Tebbi's avatar
    [torque] make overload resolution robust concerning branching contexts · 93c13714
    Tobias Tebbi authored
    This changes the behavior of overload resolution to not consider if the
    call happens in a branching context (i.e., with implicit True and False
    labels from a conditional operator or statement).
    That way, it is not possible to get different behavior accidentially
    by using an operator in the wrong context. Instead, there will be a
    compile error because the call happened in a non-branching context, or
    because it is ambiguous without this information.
    
    The test doesn't perfectly fit the issue (impossible until we have
    negative tests), but instead tests that equality on HeapNumber's works
    in boolean contexts, which is something Peter fixed already in
    https://crrev.com/c/1432596.
    
    
    Bug: v8:8737 v8:7793
    Change-Id: I08a3801891587aac705dc93b1c65b0c6cf164107
    Reviewed-on: https://chromium-review.googlesource.com/c/1456093Reviewed-by: 's avatarPeter Wong <peter.wm.wong@gmail.com>
    Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
    Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#59625}
    93c13714
base.tq 59.4 KB