aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android/java/com/google/devtools/build/android/desugar/DefaultMethodClassFixer.java
Commit message (Collapse)AuthorAge
* Changed all instances of /*itf=*/ to /*isInterface=*/ to eliminate errors.Gravatar Googler2018-08-13
| | | | | RELNOTES: None PiperOrigin-RevId: 208523963
* Make default method stubbing resilient to core library renaming, to preserve ↵Gravatar kmb2018-07-17
| | | | | | | | idempotency. RELNOTES: None. PiperOrigin-RevId: 204957400
* stub simple core library bridge methods that only differ in return typeGravatar kmb2018-03-26
| | | | | | RELNOTES: None. PiperOrigin-RevId: 190559240
* Reflect core library moves in super calls, even in default method stubs. ↵Gravatar kmb2018-03-16
| | | | | | | | Always generate default method stubs for emulated methods. RELNOTES: None. PiperOrigin-RevId: 189423933
* Make KeepScanner tool search classpath for nearest definition of each member ↵Gravatar kmb2018-03-12
| | | | | | | | | reference, instead of potentially referring to a subtype. Refactor desugar's class loading machinery and related code into a separate package for easier reuse in this tool. RELNOTES: None. PiperOrigin-RevId: 188825305
* Support custom implementations of emulated core interface methodsGravatar kmb2018-03-12
| | | | | | RELNOTES: None. PiperOrigin-RevId: 188760099
* emulate dynamic dispatch of emulated default interface methodsGravatar kmb2018-03-02
| | | | | | RELNOTES: None. PiperOrigin-RevId: 187671513
* Apply interface invocation desugaring to renamed core libraries. Fix ↵Gravatar kmb2018-02-20
| | | | | | | | invokespecial invocations for core interfaces. RELNOTES: None. PiperOrigin-RevId: 186404206
* Resolve the owner of interface.super calls to inherited default methods for ↵Gravatar kmb2018-02-15
| | | | | | | | android desugaring RELNOTES: None. PiperOrigin-RevId: 185863194
* Stub default methods as needed for core library desugaringGravatar kmb2018-02-08
| | | | | | RELNOTES: None PiperOrigin-RevId: 185082719
* Automatic code cleanup.Gravatar cushon2017-11-28
| | | | PiperOrigin-RevId: 177261837
* Record dependencies when directly calling moved interface methods.Gravatar kmb2017-10-24
| | | | | | RELNOTES: None. PiperOrigin-RevId: 173154512
* add flags to desugar to emit metadata that can be used for double-checking ↵Gravatar kmb2017-10-06
| | | | | | | | correctness of default and static interface desugaring. RELNOTES: none PiperOrigin-RevId: 170779637
* Access interface constants to explicitly trigger the execution of interfaceGravatar cnsun2017-06-29
| | | | | | | | | | | | | | | | | | | | | initializers. The problem is that when we desugar default methods, the static intializer of interface will not be executed. The JVM spec says that if an interface has default methods, then when it is loaded, it will also be initialized. After we desugar such an interface, its default methods are removed, and when we load the interface, the <clinit> will not be executed. This CL checks whether an interface has default methods and fields. If yes (needs to be initialized when the interface is loaded), it injects field access code to access the interface fields in the <clinit> of the companion class. We also create a constant $$CONSTANT$$ in the companion class. Then for all the classes that implement the interface, we inject GETSTATIC in the class <clinit> to the $$CONSTANT$$ of the companion class of the interface. This indirection is to avoid the IllegalAccessError when the interface is package private. Note that accessing an arbitrary interface field does not guarantee the interface will be initialized. We need to access the field that is initialized in the interface static initializer. RELNOTES: None PiperOrigin-RevId: 160414671
* Automated rollback of commit 317e0de2113f0361c9dbf98653ceda4efea3f3e2.Gravatar Googler2017-06-20
| | | | | | | | | | | | | | | | | | | | | *** Original change description *** Access interface constants to explicitly trigger the execution of interface initializers. The problem is that when we desugar default methods, the static intializer of interface will not be executed. The JVM spec says that if an interface has default methods, then when it is loaded, it will also be initialized. After we desugar such an interface, its default methods are removed, and when we load the interface, the <clinit> will not be executed. This CL checks whether an interface has default me... *** ROLLBACK_OF=159496992 NO_SQ=PURE_ROLLBACK RELNOTES: None PiperOrigin-RevId: 159545752
* Access interface constants to explicitly trigger the execution of interfaceGravatar cnsun2017-06-20
| | | | | | | | | | | | | | | | | | | | | initializers. The problem is that when we desugar default methods, the static intializer of interface will not be executed. The JVM spec says that if an interface has default methods, then when it is loaded, it will also be initialized. After we desugar such an interface, its default methods are removed, and when we load the interface, the <clinit> will not be executed. This CL checks whether an interface has default methods and fields. If yes (needs to be initialized when the interface is loaded), it injects field access code to access the interface fields in the <clinit> of the companion class. We also create a constant $$CONSTANT$$ in the companion class. Then for all the classes that implement the interface, we inject GETSTATIC in the class <clinit> to the $$CONSTANT$$ of the companion class of the interface. This indirection is to avoid the IllegalAccessError when the interface is package private. Note that accessing an arbitrary interface field does not guarantee the interface will be initialized. We need to access the field that is initialized in the interface static initializer. RELNOTES: None PiperOrigin-RevId: 159496992
* Move bridge methods for default methods down to the implementing classes.Gravatar cnsun2017-06-07
| | | | | RELNOTES: n/na PiperOrigin-RevId: 158162658
* fix issue with interfaces redefining (overriding) inherited default methodsGravatar kmb2017-05-08
| | | | | | RELNOTES: none PiperOrigin-RevId: 155293316
* Don't copy lambda bodies from interfaces into implementing classes.Gravatar kmb2017-04-28
| | | | | | RELNOTES: none PiperOrigin-RevId: 154452158
* Desugar default and static interface methods by default.Gravatar kmb2017-04-27
| | | | | | RELNOTES: none PiperOrigin-RevId: 154344780
* Default and static interface desugaringGravatar kmb2017-04-24
RELNOTES: n/a PiperOrigin-RevId: 153735445