equal
deleted
inserted
replaced
37 * This code and its internal interfaces are subject to change or |
37 * This code and its internal interfaces are subject to change or |
38 * deletion without notice.</b> |
38 * deletion without notice.</b> |
39 */ |
39 */ |
40 public class CompileStates extends HashMap<Env<AttrContext>, CompileStates.CompileState> { |
40 public class CompileStates extends HashMap<Env<AttrContext>, CompileStates.CompileState> { |
41 /** The context key for the compile states. */ |
41 /** The context key for the compile states. */ |
42 protected static final Context.Key<CompileStates> compileStatesKey = |
42 protected static final Context.Key<CompileStates> compileStatesKey = new Context.Key<>(); |
43 new Context.Key<CompileStates>(); |
|
44 |
43 |
45 /** Get the CompileStates instance for this context. */ |
44 /** Get the CompileStates instance for this context. */ |
46 public static CompileStates instance(Context context) { |
45 public static CompileStates instance(Context context) { |
47 CompileStates instance = context.get(compileStatesKey); |
46 CompileStates instance = context.get(compileStatesKey); |
48 if (instance == null) { |
47 if (instance == null) { |
72 } |
71 } |
73 public static CompileState max(CompileState a, CompileState b) { |
72 public static CompileState max(CompileState a, CompileState b) { |
74 return a.value > b.value ? a : b; |
73 return a.value > b.value ? a : b; |
75 } |
74 } |
76 private final int value; |
75 private final int value; |
77 }; |
76 } |
78 |
77 |
79 private static final long serialVersionUID = 1812267524140424433L; |
78 private static final long serialVersionUID = 1812267524140424433L; |
80 |
79 |
81 protected Context context; |
80 protected Context context; |
82 |
81 |