summaryrefslogtreecommitdiff
path: root/compiler/optimizing/cha_guard_optimization.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2024-10-21 14:05:13 +0000
committer VladimĂ­r Marko <vmarko@google.com> 2024-10-22 09:12:45 +0000
commit2d2522780c4883e5d9e03b886bb33faf90c60af5 (patch)
treeb698ab2150eacab38bdc5cdd99fbd7b4eca963b1 /compiler/optimizing/cha_guard_optimization.cc
parentaa072d3b56fb7c68e0e75c699fe9b0398aa0fa65 (diff)
verifier: Clean up handling of final abstract class.
Do not try to create an imprecise reference type for a final abstract class in `MethodVerifier<>::ResolveClass()`. Given that `MatchingPrecisionForClass()` in `reg_type_cache.cc` can match a precise reference anyway, this could lead to inconsistent register types, depending on the order in which the verifier stores them in the cache. Instead, let callers check for a final abstract class and report a soft failure, if such class causes the instruction to throw an exception, without creating an imprecise type. We keep the check for the declaring class of an invoke's target method as long as it's not an interface class but postpone it until after other argument checks; this extends the check to invoke-static for consistency and avoids it for default and default conflict methods. We similarly postpone the check for declaring class of a field access until the field has been resolved and checked for other failures. We no longer do the check for the method's incoming arguments, `const-class` and type checks. We also skip the check for `new-instance` as it shall already report a similar soft failure anyway. For `move-exception`, check only the common superclass. Test: m test-art-host-gtest Test: testrunner.py --host --optimizing Change-Id: Id5702c6beb255a719e16442b5971b847fb25b3a8
Diffstat (limited to 'compiler/optimizing/cha_guard_optimization.cc')
0 files changed, 0 insertions, 0 deletions