summaryrefslogtreecommitdiff
path: root/test/java/com/google/devtools/build/android/desugar/FrameInfoTest.java
AgeCommit message (Collapse)Author
2017-11-29Specialize $closeResource(Throwable, AutoCloseable) so that desugared code ↵cnsun
does not depend on AutoCloseable, as it is not available before API 19. This CL includes the following: 1. A type inference algorithm based on ASM. It relies on the stack map frames to compute type information at the entry of basic blocks. 2. The type inference is used to infer the types of the resources to be closed. Then for each concrete resource type, we specialize the synthetic $closeResource method to $closeResource(Throwable, <concrete resource type>). RELNOTES: None PiperOrigin-RevId: 175731437 GitOrigin-RevId: e83f3b1fb010298cbe1e16e5f7f2f39bfb045cef Change-Id: I347f8e4058a191621fb21bf2e81d7cf8f39ce6aa