< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/CompileStates.java

Print this page

46         CompileStates instance = context.get(compileStatesKey);
47         if (instance == null) {
48             instance = new CompileStates(context);
49         }
50         return instance;
51     }
52 
53     /** Ordered list of compiler phases for each compilation unit. */
54     public enum CompileState {
55         INIT(0),
56         PARSE(1),
57         ENTER(2),
58         PROCESS(3),
59         ATTR(4),
60         FLOW(5),
61         WARN(6),
62         TRANSTYPES(7),
63         TRANSPATTERNS(8),
64         LOWER(9),
65         UNLAMBDA(10),
66         GENERATE(11);

67 
68         CompileState(int value) {
69             this.value = value;
70         }
71         public boolean isAfter(CompileState other) {
72             return value > other.value;
73         }
74         public static CompileState max(CompileState a, CompileState b) {
75             return a.value > b.value ? a : b;
76         }
77         private final int value;
78     }
79 
80     private static final long serialVersionUID = 1812267524140424433L;
81 
82     protected transient Context context;
83 
84     @SuppressWarnings("this-escape")
85     public CompileStates(Context context) {
86         this.context = context;

46         CompileStates instance = context.get(compileStatesKey);
47         if (instance == null) {
48             instance = new CompileStates(context);
49         }
50         return instance;
51     }
52 
53     /** Ordered list of compiler phases for each compilation unit. */
54     public enum CompileState {
55         INIT(0),
56         PARSE(1),
57         ENTER(2),
58         PROCESS(3),
59         ATTR(4),
60         FLOW(5),
61         WARN(6),
62         TRANSTYPES(7),
63         TRANSPATTERNS(8),
64         LOWER(9),
65         UNLAMBDA(10),
66         STRICT_FIELDS_PROXIES(11),
67         GENERATE(12);
68 
69         CompileState(int value) {
70             this.value = value;
71         }
72         public boolean isAfter(CompileState other) {
73             return value > other.value;
74         }
75         public static CompileState max(CompileState a, CompileState b) {
76             return a.value > b.value ? a : b;
77         }
78         private final int value;
79     }
80 
81     private static final long serialVersionUID = 1812267524140424433L;
82 
83     protected transient Context context;
84 
85     @SuppressWarnings("this-escape")
86     public CompileStates(Context context) {
87         this.context = context;
< prev index next >