Thu, 30 Jul 2009 10:29:53 +0100
6827648: Extremely slow compilation time for visitor pattern code + generics
Summary: Javac unnecessarily recomputates type-substitutions multiple times
Reviewed-by: jjg
duke@1 | 1 | /* |
duke@1 | 2 | * @test /nodynamiccopyright/ |
duke@1 | 3 | * @bug 4469737 |
duke@1 | 4 | * @summary Verify the source position for assertions. |
duke@1 | 5 | * @author gafter |
duke@1 | 6 | */ |
duke@1 | 7 | |
darcy@289 | 8 | |
duke@1 | 9 | public class Position { |
duke@1 | 10 | static public void main(String[] args) { |
duke@1 | 11 | Position.class.getClassLoader().setClassAssertionStatus("U", true); |
duke@1 | 12 | new U().main(); |
duke@1 | 13 | } |
duke@1 | 14 | } |
darcy@289 | 15 | |
darcy@289 | 16 | |
duke@1 | 17 | class U { |
duke@1 | 18 | void main() { |
duke@1 | 19 | try { |
duke@1 | 20 | assert false; // line 20 |
duke@1 | 21 | } catch (Throwable t) { |
duke@1 | 22 | if (t.getStackTrace()[0].getLineNumber() == 20) { |
duke@1 | 23 | return; // passed |
duke@1 | 24 | } |
duke@1 | 25 | } |
duke@1 | 26 | throw new Error("failed 4469737"); |
duke@1 | 27 | } |
duke@1 | 28 | } |