| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 208523963
|
|
|
|
|
|
|
|
| |
idempotency.
RELNOTES: None.
PiperOrigin-RevId: 204957400
|
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 190559240
|
|
|
|
|
|
|
|
| |
Always generate default method stubs for emulated methods.
RELNOTES: None.
PiperOrigin-RevId: 189423933
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 188760099
|
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 187671513
|
|
|
|
|
|
|
|
| |
invokespecial invocations for core interfaces.
RELNOTES: None.
PiperOrigin-RevId: 186404206
|
|
|
|
|
|
|
|
| |
android desugaring
RELNOTES: None.
PiperOrigin-RevId: 185863194
|
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 185082719
|
|
|
|
| |
PiperOrigin-RevId: 177261837
|
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 173154512
|
|
|
|
|
|
|
|
| |
correctness of default and static interface desugaring.
RELNOTES: none
PiperOrigin-RevId: 170779637
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
RELNOTES: n/na
PiperOrigin-RevId: 158162658
|
|
|
|
|
|
| |
RELNOTES: none
PiperOrigin-RevId: 155293316
|
|
|
|
|
|
| |
RELNOTES: none
PiperOrigin-RevId: 154452158
|
|
|
|
|
|
| |
RELNOTES: none
PiperOrigin-RevId: 154344780
|
|
RELNOTES: n/a
PiperOrigin-RevId: 153735445
|