diff options
author | 2015-09-21 11:36:30 -0700 | |
---|---|---|
committer | 2016-01-12 15:40:31 -0800 | |
commit | 705ad49f353d3f90d8b63625aca2c2035bacdbef (patch) | |
tree | ac70af53158a80bc35c057aefae11428281df9ac /runtime/art_method-inl.h | |
parent | fae1db92d8433d0f75258c190bcf2c940731f036 (diff) |
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
Diffstat (limited to 'runtime/art_method-inl.h')
-rw-r--r-- | runtime/art_method-inl.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/runtime/art_method-inl.h b/runtime/art_method-inl.h index cf548ada33..a5f5c49068 100644 --- a/runtime/art_method-inl.h +++ b/runtime/art_method-inl.h @@ -225,8 +225,7 @@ inline bool ArtMethod::CheckIncompatibleClassChange(InvokeType type) { } case kSuper: // Constructors and static methods are called with invoke-direct. - // Interface methods cannot be invoked with invoke-super. - return IsConstructor() || IsStatic() || GetDeclaringClass()->IsInterface(); + return IsConstructor() || IsStatic(); case kInterface: { mirror::Class* methods_class = GetDeclaringClass(); return IsDirect() || !(methods_class->IsInterface() || methods_class->IsObjectClass()); |