ART: Add interface class join heuristic

Do not treat interfaces as regular classes. This will always
lead to a join of java.lang.Object, rejecting semantically
valid programs.

We want to retain IMT dispatch, forcing us to verify interface
assigment. In the absence of set types, the result is ambiguous
and not well defined. In a best effort, attempt to find a joint
interface by walking the interface tables of the join arguments
backwards.

In the case of two non-interface classes, we still prefer the
class hierarchy.

Bug: 69826014
Test: m test-art-host-gtest-reg_type_test
Change-Id: I7e0086f045e5bb2a7c3ee3464de45fc5b02f4d3f
4 files changed