From 705ad49f353d3f90d8b63625aca2c2035bacdbef Mon Sep 17 00:00:00 2001 From: Alex Light Date: Mon, 21 Sep 2015 11:36:30 -0700 Subject: Support directly invoking interface default methods With the Java 8 Language one is allowed to directly call default interface methods of interfaces one (directly) implements through the use of the super keyword. We support this behavior through the invoke-super opcode with the target being an interface. We add 3 tests for this behavior. Currently only supports slow-path interpreter. Invoke-super is currently extremely slow. Bug: 24618811 Change-Id: I7e06e17326f7dbae0116bd7dfefca151f0092bd2 --- runtime/class_linker_test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/class_linker_test.cc') diff --git a/runtime/class_linker_test.cc b/runtime/class_linker_test.cc index 387ac0aee2..7db5390a44 100644 --- a/runtime/class_linker_test.cc +++ b/runtime/class_linker_test.cc @@ -24,6 +24,7 @@ #include "class_linker-inl.h" #include "common_runtime_test.h" #include "dex_file.h" +#include "experimental_flags.h" #include "entrypoints/entrypoint_utils-inl.h" #include "gc/heap.h" #include "mirror/abstract_method.h" @@ -228,7 +229,7 @@ class ClassLinkerTest : public CommonRuntimeTest { if (klass->IsInterface()) { EXPECT_EQ(0U, iftable->GetMethodArrayCount(i)); } else { - EXPECT_EQ(interface->NumVirtualMethods(), iftable->GetMethodArrayCount(i)); + EXPECT_EQ(interface->NumDeclaredVirtualMethods(), iftable->GetMethodArrayCount(i)); } } if (klass->IsAbstract()) { -- cgit v1.2.3-59-g8ed1b