hg: jdk/jdk: 8194978: Javac produces dead code for try-with-resource

jan.lahoda at oracle.com jan.lahoda at oracle.com
Thu Mar 22 14:34:19 UTC 2018


Changeset: c2a3a2aa2475
Author:    jlahoda
Date:      2018-03-22 15:28 +0100
URL:       http://hg.openjdk.java.net/jdk/jdk/rev/c2a3a2aa2475

8194978: Javac produces dead code for try-with-resource
Summary: For try-with-resources, using simplified distinct close code for try body and catch clause, to avoid creating multiple copies of the full finally code.
Reviewed-by: mcimadamore

! src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java
! test/langtools/tools/javac/TryWithResources/TwrClose.java
- test/langtools/tools/javac/TryWithResources/TwrShareCloseCode.java
+ test/langtools/tools/javac/TryWithResources/TwrSimpleClose.java
! test/langtools/tools/javac/annotations/typeAnnotations/referenceinfos/ResourceVariable.java
! test/langtools/tools/javac/flow/tests/TestCaseTry.java



More information about the jdk-all-changes mailing list