| 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 Diagnostic; | 10 import 'package:compiler/compiler_new.dart' show Diagnostic; |
| 11 import 'package:compiler/src/apiimpl.dart' show CompilerImpl; | 11 import 'package:compiler/src/apiimpl.dart' show CompilerImpl; |
| 12 import 'package:compiler/src/commandline_options.dart'; | 12 import 'package:compiler/src/commandline_options.dart'; |
| 13 import 'package:compiler/src/constants/expressions.dart' | 13 import 'package:compiler/src/constants/expressions.dart' |
| 14 show ConstructedConstantExpression; | 14 show ConstructedConstantExpression; |
| 15 import 'package:compiler/src/elements/resolution_types.dart' show InterfaceType; | 15 import 'package:compiler/src/elements/resolution_types.dart' |
| 16 show ResolutionInterfaceType; |
| 16 import 'package:compiler/src/diagnostics/source_span.dart' show SourceSpan; | 17 import 'package:compiler/src/diagnostics/source_span.dart' show SourceSpan; |
| 17 import 'package:compiler/src/elements/elements.dart'; | 18 import 'package:compiler/src/elements/elements.dart'; |
| 18 import 'package:compiler/src/filenames.dart' show nativeToUriPath; | 19 import 'package:compiler/src/filenames.dart' show nativeToUriPath; |
| 19 import 'package:compiler/src/resolution/semantic_visitor.dart'; | 20 import 'package:compiler/src/resolution/semantic_visitor.dart'; |
| 20 import 'package:compiler/src/resolution/tree_elements.dart' show TreeElements; | 21 import 'package:compiler/src/resolution/tree_elements.dart' show TreeElements; |
| 21 import 'package:compiler/src/source_file_provider.dart' | 22 import 'package:compiler/src/source_file_provider.dart' |
| 22 show FormattingDiagnosticHandler; | 23 show FormattingDiagnosticHandler; |
| 23 import 'package:compiler/src/tree/tree.dart'; | 24 import 'package:compiler/src/tree/tree.dart'; |
| 24 import 'package:compiler/src/universe/call_structure.dart' show CallStructure; | 25 import 'package:compiler/src/universe/call_structure.dart' show CallStructure; |
| 25 import 'package:expect/expect.dart'; | 26 import 'package:expect/expect.dart'; |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 155 |
| 155 @override | 156 @override |
| 156 void visitTopLevelFunctionGet(Send node, MethodElement method, _) { | 157 void visitTopLevelFunctionGet(Send node, MethodElement method, _) { |
| 157 checkAccess(node, method); | 158 checkAccess(node, method); |
| 158 } | 159 } |
| 159 | 160 |
| 160 @override | 161 @override |
| 161 void visitGenerativeConstructorInvoke( | 162 void visitGenerativeConstructorInvoke( |
| 162 NewExpression node, | 163 NewExpression node, |
| 163 ConstructorElement constructor, | 164 ConstructorElement constructor, |
| 164 InterfaceType type, | 165 ResolutionInterfaceType type, |
| 165 NodeList arguments, | 166 NodeList arguments, |
| 166 CallStructure callStructure, | 167 CallStructure callStructure, |
| 167 _) { | 168 _) { |
| 168 checkAccess(node, constructor); | 169 checkAccess(node, constructor); |
| 169 apply(arguments); | 170 apply(arguments); |
| 170 } | 171 } |
| 171 | 172 |
| 172 @override | 173 @override |
| 173 void visitRedirectingGenerativeConstructorInvoke( | 174 void visitRedirectingGenerativeConstructorInvoke( |
| 174 NewExpression node, | 175 NewExpression node, |
| 175 ConstructorElement constructor, | 176 ConstructorElement constructor, |
| 176 InterfaceType type, | 177 ResolutionInterfaceType type, |
| 177 NodeList arguments, | 178 NodeList arguments, |
| 178 CallStructure callStructure, | 179 CallStructure callStructure, |
| 179 _) { | 180 _) { |
| 180 checkAccess(node, constructor); | 181 checkAccess(node, constructor); |
| 181 apply(arguments); | 182 apply(arguments); |
| 182 } | 183 } |
| 183 | 184 |
| 184 @override | 185 @override |
| 185 void visitFactoryConstructorInvoke( | 186 void visitFactoryConstructorInvoke( |
| 186 NewExpression node, | 187 NewExpression node, |
| 187 ConstructorElement constructor, | 188 ConstructorElement constructor, |
| 188 InterfaceType type, | 189 ResolutionInterfaceType type, |
| 189 NodeList arguments, | 190 NodeList arguments, |
| 190 CallStructure callStructure, | 191 CallStructure callStructure, |
| 191 _) { | 192 _) { |
| 192 checkAccess(node, constructor); | 193 checkAccess(node, constructor); |
| 193 apply(arguments); | 194 apply(arguments); |
| 194 } | 195 } |
| 195 | 196 |
| 196 @override | 197 @override |
| 197 void visitRedirectingFactoryConstructorInvoke( | 198 void visitRedirectingFactoryConstructorInvoke( |
| 198 NewExpression node, | 199 NewExpression node, |
| 199 ConstructorElement constructor, | 200 ConstructorElement constructor, |
| 200 InterfaceType type, | 201 ResolutionInterfaceType type, |
| 201 ConstructorElement effectiveTarget, | 202 ConstructorElement effectiveTarget, |
| 202 InterfaceType effectiveTargetType, | 203 ResolutionInterfaceType effectiveTargetType, |
| 203 NodeList arguments, | 204 NodeList arguments, |
| 204 CallStructure callStructure, | 205 CallStructure callStructure, |
| 205 _) { | 206 _) { |
| 206 checkAccess(node, constructor); | 207 checkAccess(node, constructor); |
| 207 apply(arguments); | 208 apply(arguments); |
| 208 } | 209 } |
| 209 | 210 |
| 210 @override | 211 @override |
| 211 void visitConstConstructorInvoke( | 212 void visitConstConstructorInvoke( |
| 212 NewExpression node, ConstructedConstantExpression constant, _) { | 213 NewExpression node, ConstructedConstantExpression constant, _) { |
| 213 checkAccess(node, constant.target); | 214 checkAccess(node, constant.target); |
| 214 } | 215 } |
| 215 } | 216 } |
| OLD | NEW |