OSDN Git Service

Support directly invoking interface default methods
authorAlex Light <allight@google.com>
Mon, 21 Sep 2015 18:36:30 +0000 (11:36 -0700)
committerAlex Light <allight@google.com>
Tue, 12 Jan 2016 23:40:31 +0000 (15:40 -0800)
commit705ad49f353d3f90d8b63625aca2c2035bacdbef
treeac70af53158a80bc35c057aefae11428281df9ac
parentfae1db92d8433d0f75258c190bcf2c940731f036
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
45 files changed:
compiler/dex/quick/quick_compiler.cc
compiler/dex/quick/quick_compiler.h
runtime/art_method-inl.h
runtime/art_method.h
runtime/class_linker.cc
runtime/class_linker_test.cc
runtime/common_throws.cc
runtime/common_throws.h
runtime/entrypoints/entrypoint_utils-inl.h
runtime/mirror/class-inl.h
runtime/mirror/class.cc
runtime/mirror/class.h
runtime/verifier/method_verifier.cc
runtime/verifier/method_verifier.h
runtime/verifier/reg_type.h
test/969-iface-super/build [new file with mode: 0755]
test/969-iface-super/expected.txt [new file with mode: 0644]
test/969-iface-super/info.txt [new file with mode: 0644]
test/969-iface-super/run [new file with mode: 0755]
test/969-iface-super/smali/A.smali [new file with mode: 0644]
test/969-iface-super/smali/B.smali [new file with mode: 0644]
test/969-iface-super/smali/C.smali [new file with mode: 0644]
test/969-iface-super/smali/D.smali [new file with mode: 0644]
test/969-iface-super/smali/E.smali [new file with mode: 0644]
test/969-iface-super/smali/F.smali [new file with mode: 0644]
test/969-iface-super/smali/G.smali [new file with mode: 0644]
test/969-iface-super/smali/H.smali [new file with mode: 0644]
test/969-iface-super/smali/classes.xml [new file with mode: 0644]
test/969-iface-super/smali/iface.smali [new file with mode: 0644]
test/969-iface-super/smali/iface2.smali [new file with mode: 0644]
test/969-iface-super/smali/iface3.smali [new file with mode: 0644]
test/970-iface-super-resolution-generated/build [new file with mode: 0755]
test/970-iface-super-resolution-generated/expected.txt [new file with mode: 0644]
test/970-iface-super-resolution-generated/info.txt [new file with mode: 0644]
test/970-iface-super-resolution-generated/run [new file with mode: 0755]
test/970-iface-super-resolution-generated/util-src/generate_java.py [new file with mode: 0755]
test/970-iface-super-resolution-generated/util-src/generate_smali.py [new file with mode: 0755]
test/971-iface-super-partial-compile-generated/build [new file with mode: 0755]
test/971-iface-super-partial-compile-generated/expected.txt [new file with mode: 0644]
test/971-iface-super-partial-compile-generated/info.txt [new file with mode: 0644]
test/971-iface-super-partial-compile-generated/run [new file with mode: 0755]
test/971-iface-super-partial-compile-generated/util-src/generate_java.py [new file with mode: 0755]
test/971-iface-super-partial-compile-generated/util-src/generate_smali.py [new file with mode: 0755]
test/Android.run-test.mk
test/run-test