ART: Balanced locking
Change the verifier to check for balanced locking. When balanced
locking can't be guaranteed, use a new failure kind to punt to
the interpreter.
Add smali tests, with JNI code to check the balanced-locking result.
Bug: 23502994
Change-Id: Icd7db0be20ef2f69f0ac784de43dcba990035cd8
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index c006e62..89668f2 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -601,7 +601,7 @@
// Do not have failures that should punt to the interpreter.
!verified_method->HasRuntimeThrow() &&
(verified_method->GetEncounteredVerificationFailures() &
- verifier::VERIFY_ERROR_FORCE_INTERPRETER) == 0 &&
+ (verifier::VERIFY_ERROR_FORCE_INTERPRETER | verifier::VERIFY_ERROR_LOCKING)) == 0 &&
// Is eligable for compilation by methods-to-compile filter.
driver->IsMethodToCompile(method_ref);
if (compile) {