summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/verifier/method_verifier.cc7
-rw-r--r--runtime/verifier/verifier_enums.h8
2 files changed, 9 insertions, 6 deletions
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
index 02b1cbd1f33..8d9176a84db 100644
--- a/runtime/verifier/method_verifier.cc
+++ b/runtime/verifier/method_verifier.cc
@@ -3829,12 +3829,13 @@ bool MethodVerifier<kVerifierDebug>::HandleMoveException(const Instruction* inst
// We need to post a failure. The compiler currently does not handle unreachable
// code correctly.
- Fail(VERIFY_ERROR_UNRESOLVED_CATCH) << "Unresolved catch handler, fail for compiler";
+ Fail(VERIFY_ERROR_SKIP_COMPILER, /*pending_exc=*/ false)
+ << "Unresolved catch handler, fail for compiler";
return std::make_pair(false, unresolved);
}
// Soft-fail, but do not handle this with a synthetic throw.
- Fail(VERIFY_ERROR_UNRESOLVED_CATCH) << "Unresolved catch handler";
+ Fail(VERIFY_ERROR_NO_CLASS, /*pending_exc=*/ false) << "Unresolved catch handler";
if (common_super != nullptr) {
unresolved = &unresolved->Merge(*common_super, &reg_types_, this);
}
@@ -5574,7 +5575,7 @@ std::ostream& MethodVerifier::Fail(VerifyError error, bool pending_exc) {
break;
}
- case VERIFY_ERROR_UNRESOLVED_CATCH:
+ case VERIFY_ERROR_SKIP_COMPILER:
// Nothing to do, just remember the failure type.
break;
}
diff --git a/runtime/verifier/verifier_enums.h b/runtime/verifier/verifier_enums.h
index 0e968828f56..b445e944a9e 100644
--- a/runtime/verifier/verifier_enums.h
+++ b/runtime/verifier/verifier_enums.h
@@ -94,9 +94,11 @@ enum VerifyError : uint32_t {
// (sets a soft fail at compile time).
VERIFY_ERROR_LOCKING = 1 << 11, // Could not guarantee balanced locking. This should be
// punted to the interpreter with access checks.
- VERIFY_ERROR_UNRESOLVED_CATCH = 1 << 12, // Error code necessary to have a synthetic soft fail
- // that is not an exception, to let the compiler know
- // that there is (unreachable) unverified code.
+ VERIFY_ERROR_SKIP_COMPILER = 1u << 31, // Flag to note that the failure should preclude
+ // optimization. Meant as a signal from the verifier
+ // to the compiler that there is unreachable unverified
+ // code. May be removed once the compiler handles
+ // unreachable code correctly.
};
std::ostream& operator<<(std::ostream& os, const VerifyError& rhs);