OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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.resolution.members; | 5 library dart2js.resolution.members; |
6 | 6 |
7 import '../common.dart'; | 7 import '../common.dart'; |
8 import '../common/names.dart' show Selectors; | 8 import '../common/names.dart' show Selectors; |
9 import '../common/resolution.dart' show Resolution; | 9 import '../common/resolution.dart' show Resolution; |
10 import '../compile_time_constants.dart'; | 10 import '../compile_time_constants.dart'; |
(...skipping 4043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4054 {bool inConstContext: false}) { | 4054 {bool inConstContext: false}) { |
4055 return node.accept(new ConstructorResolver(resolution, this, | 4055 return node.accept(new ConstructorResolver(resolution, this, |
4056 inConstContext: inConstContext)); | 4056 inConstContext: inConstContext)); |
4057 } | 4057 } |
4058 | 4058 |
4059 DartType resolveTypeAnnotation(TypeAnnotation node, | 4059 DartType resolveTypeAnnotation(TypeAnnotation node, |
4060 {bool malformedIsError: false, bool deferredIsMalformed: true}) { | 4060 {bool malformedIsError: false, bool deferredIsMalformed: true}) { |
4061 DartType type = typeResolver.resolveTypeAnnotation(this, node, | 4061 DartType type = typeResolver.resolveTypeAnnotation(this, node, |
4062 malformedIsError: malformedIsError, | 4062 malformedIsError: malformedIsError, |
4063 deferredIsMalformed: deferredIsMalformed); | 4063 deferredIsMalformed: deferredIsMalformed); |
4064 registry.registerTypeUse(new TypeUse.checkedModeCheck(type)); | 4064 if (!type.isDynamic) { |
| 4065 registry.registerTypeUse(new TypeUse.checkedModeCheck(type)); |
| 4066 } |
4065 return type; | 4067 return type; |
4066 } | 4068 } |
4067 | 4069 |
4068 ResolutionResult visitLiteralList(LiteralList node) { | 4070 ResolutionResult visitLiteralList(LiteralList node) { |
4069 bool isValidAsConstant = true; | 4071 bool isValidAsConstant = true; |
4070 sendIsMemberAccess = false; | 4072 sendIsMemberAccess = false; |
4071 | 4073 |
4072 NodeList arguments = node.typeArguments; | 4074 NodeList arguments = node.typeArguments; |
4073 DartType typeArgument; | 4075 DartType typeArgument; |
4074 if (arguments != null) { | 4076 if (arguments != null) { |
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4720 } | 4722 } |
4721 return const NoneResult(); | 4723 return const NoneResult(); |
4722 } | 4724 } |
4723 } | 4725 } |
4724 | 4726 |
4725 /// Looks up [name] in [scope] and unwraps the result. | 4727 /// Looks up [name] in [scope] and unwraps the result. |
4726 Element lookupInScope( | 4728 Element lookupInScope( |
4727 DiagnosticReporter reporter, Node node, Scope scope, String name) { | 4729 DiagnosticReporter reporter, Node node, Scope scope, String name) { |
4728 return Elements.unwrap(scope.lookup(name), reporter, node); | 4730 return Elements.unwrap(scope.lookup(name), reporter, node); |
4729 } | 4731 } |
OLD | NEW |