[torque] make overload resolution robust concerning branching contexts
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: Peter Wong <peter.wm.wong@gmail.com> Reviewed-by: Daniel Clifford <danno@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#59625}
Showing
Please
register
or
sign in
to comment