From 5c93af3cc8894deefbc9cba69ea69526c45842aa Mon Sep 17 00:00:00 2001 From: Alex Light Date: Mon, 9 Sep 2019 10:51:16 -0700 Subject: Loosen verifier around interface-invoke-super We were being overly strict with interface-invoke-super and not allowing an interface to invoke-super into its own methods without going to the interpreter. This causes some scala programs to run mostly in the interpreter. Our compiler is able to handle this correctly so we should allow it without any soft-verification failures. Test: ./test.py --host Bug: 140589303 Change-Id: I40d9510add5bbfd41d2e38b68973fce77880f7e6 --- runtime/verifier/method_verifier.cc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc index c506df1395..839491ec3e 100644 --- a/runtime/verifier/method_verifier.cc +++ b/runtime/verifier/method_verifier.cc @@ -4284,13 +4284,6 @@ ArtMethod* MethodVerifier::VerifyInvocationArgs( return nullptr; } if (reference_type.GetClass()->IsInterface()) { - // TODO Can we verify anything else. - if (class_idx == class_def_.class_idx_) { - Fail(VERIFY_ERROR_CLASS_CHANGE) << "Cannot invoke-super on self as interface"; - return nullptr; - } - // TODO Revisit whether we want to allow invoke-super on direct interfaces only like the JLS - // does. if (!GetDeclaringClass().HasClass()) { Fail(VERIFY_ERROR_NO_CLASS) << "Unable to resolve the full class of 'this' used in an" << "interface invoke-super"; -- cgit v1.2.3-59-g8ed1b