| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library dart2js.analyze_helpers.test; | 5 library dart2js.analyze_helpers.test; |
| 6 | 6 |
| 7 import 'dart:io'; | 7 import 'dart:io'; |
| 8 | 8 |
| 9 import 'package:async_helper/async_helper.dart'; | 9 import 'package:async_helper/async_helper.dart'; |
| 10 import 'package:compiler/compiler_new.dart' show | 10 import 'package:compiler/compiler_new.dart' show |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 AnalyzableElement get analyzedElement => resolvedAst.element; | 87 AnalyzableElement get analyzedElement => resolvedAst.element; |
| 88 | 88 |
| 89 HelperAnalyzer(this.diagnostics) : super(null); | 89 HelperAnalyzer(this.diagnostics) : super(null); |
| 90 | 90 |
| 91 @override | 91 @override |
| 92 void apply(Node node, [_]) { | 92 void apply(Node node, [_]) { |
| 93 node.accept(this); | 93 node.accept(this); |
| 94 } | 94 } |
| 95 | 95 |
| 96 void analyze(ResolvedAst resolvedAst) { | 96 void analyze(ResolvedAst resolvedAst) { |
| 97 if (resolvedAst.node == null) { | 97 if (resolvedAst.kind != ResolvedAstKind.PARSED) { |
| 98 // Skip synthesized members. | 98 // Skip synthesized members. |
| 99 return; | 99 return; |
| 100 } | 100 } |
| 101 this.resolvedAst = resolvedAst; | 101 this.resolvedAst = resolvedAst; |
| 102 apply(resolvedAst.node); | 102 apply(resolvedAst.node); |
| 103 this.resolvedAst = null; | 103 this.resolvedAst = null; |
| 104 } | 104 } |
| 105 | 105 |
| 106 bool isHelper(Element element) { | 106 bool isHelper(Element element) { |
| 107 Uri uri = element.library.canonicalUri; | 107 Uri uri = element.library.canonicalUri; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 } | 227 } |
| 228 | 228 |
| 229 @override | 229 @override |
| 230 void visitConstConstructorInvoke( | 230 void visitConstConstructorInvoke( |
| 231 NewExpression node, | 231 NewExpression node, |
| 232 ConstructedConstantExpression constant, | 232 ConstructedConstantExpression constant, |
| 233 _) { | 233 _) { |
| 234 checkAccess(node, constant.target); | 234 checkAccess(node, constant.target); |
| 235 } | 235 } |
| 236 } | 236 } |
| OLD | NEW |