equal
deleted
inserted
replaced
151 instance = new LambdaToMethod(context); |
151 instance = new LambdaToMethod(context); |
152 } |
152 } |
153 return instance; |
153 return instance; |
154 } |
154 } |
155 |
155 |
|
156 private Attr attr; |
|
157 |
156 private LambdaToMethod(Context context) { |
158 private LambdaToMethod(Context context) { |
157 diags = JCDiagnostic.Factory.instance(context); |
159 diags = JCDiagnostic.Factory.instance(context); |
158 log = Log.instance(context); |
160 log = Log.instance(context); |
159 lower = Lower.instance(context); |
161 lower = Lower.instance(context); |
160 names = Names.instance(context); |
162 names = Names.instance(context); |
164 types = Types.instance(context); |
166 types = Types.instance(context); |
165 transTypes = TransTypes.instance(context); |
167 transTypes = TransTypes.instance(context); |
166 analyzer = new LambdaAnalyzerPreprocessor(); |
168 analyzer = new LambdaAnalyzerPreprocessor(); |
167 Options options = Options.instance(context); |
169 Options options = Options.instance(context); |
168 dumpLambdaToMethodStats = options.isSet("dumpLambdaToMethodStats"); |
170 dumpLambdaToMethodStats = options.isSet("dumpLambdaToMethodStats"); |
|
171 attr = Attr.instance(context); |
169 } |
172 } |
170 // </editor-fold> |
173 // </editor-fold> |
171 |
174 |
172 // <editor-fold defaultstate="collapsed" desc="translate methods"> |
175 // <editor-fold defaultstate="collapsed" desc="translate methods"> |
173 @Override |
176 @Override |
366 localContext.owner.enclClass()); |
369 localContext.owner.enclClass()); |
367 break; |
370 break; |
368 |
371 |
369 case BOUND: /** Expr :: instMethod */ |
372 case BOUND: /** Expr :: instMethod */ |
370 init = tree.getQualifierExpression(); |
373 init = tree.getQualifierExpression(); |
|
374 init = attr.makeNullCheck(init); |
371 break; |
375 break; |
372 |
376 |
373 case UNBOUND: /** Type :: instMethod */ |
377 case UNBOUND: /** Type :: instMethod */ |
374 case STATIC: /** Type :: staticMethod */ |
378 case STATIC: /** Type :: staticMethod */ |
375 case TOPLEVEL: /** Top level :: new */ |
379 case TOPLEVEL: /** Top level :: new */ |