ART: Account for OOME during array merging

When joining class types, in the case of arrays it is possible that
a join type cannot be created (e.g., there's no Java heap to actually
create the class). In that case report an unresolved reference. For
AoT this will lead to re-verification at runtime. At runtime, this
will most likely fail the class.

However, have a special cutout that aborts for AoT on the host, to
protect determinism of preopting.

The decision for an unresolved reference type was made as we do not
want to propagate the underlying exception out of verification. This
would require significant work along all call edges, violating the
current design and invariants of the verifier.

Extend reg_type_test.

Bug: 63822536
Test: m test-art-host-gtest-reg_type_test
Change-Id: I823201e3c401b2c2a46a46fad3327a28e049c181
5 files changed