| 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 Feature; | 9 import '../common/resolution.dart' show Feature; |
| 10 import '../compiler.dart' show Compiler; | 10 import '../compiler.dart' show Compiler; |
| (...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 | 884 |
| 885 /// Compute the [AccessSemantics] corresponding to a local access of [target]. | 885 /// Compute the [AccessSemantics] corresponding to a local access of [target]. |
| 886 AccessSemantics computeLocalAccessSemantics( | 886 AccessSemantics computeLocalAccessSemantics( |
| 887 Spannable node, LocalElement target) { | 887 Spannable node, LocalElement target) { |
| 888 if (target.isParameter) { | 888 if (target.isParameter) { |
| 889 if (target.isFinal || target.isConst) { | 889 if (target.isFinal || target.isConst) { |
| 890 return new StaticAccess.finalParameter(target); | 890 return new StaticAccess.finalParameter(target); |
| 891 } else { | 891 } else { |
| 892 return new StaticAccess.parameter(target); | 892 return new StaticAccess.parameter(target); |
| 893 } | 893 } |
| 894 } else if (target.isInitializingFormal){ | 894 } else if (target.isInitializingFormal) { |
| 895 return new StaticAccess.finalParameter(target); | 895 return new StaticAccess.finalParameter(target); |
| 896 } else if (target.isVariable) { | 896 } else if (target.isVariable) { |
| 897 if (target.isFinal || target.isConst) { | 897 if (target.isFinal || target.isConst) { |
| 898 return new StaticAccess.finalLocalVariable(target); | 898 return new StaticAccess.finalLocalVariable(target); |
| 899 } else { | 899 } else { |
| 900 return new StaticAccess.localVariable(target); | 900 return new StaticAccess.localVariable(target); |
| 901 } | 901 } |
| 902 } else { | 902 } else { |
| 903 assert(invariant(node, target.isFunction, | 903 assert(invariant(node, target.isFunction, |
| 904 message: "Unexpected local target '$target'.")); | 904 message: "Unexpected local target '$target'.")); |
| (...skipping 3821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4726 } | 4726 } |
| 4727 return const NoneResult(); | 4727 return const NoneResult(); |
| 4728 } | 4728 } |
| 4729 } | 4729 } |
| 4730 | 4730 |
| 4731 /// Looks up [name] in [scope] and unwraps the result. | 4731 /// Looks up [name] in [scope] and unwraps the result. |
| 4732 Element lookupInScope( | 4732 Element lookupInScope( |
| 4733 DiagnosticReporter reporter, Node node, Scope scope, String name) { | 4733 DiagnosticReporter reporter, Node node, Scope scope, String name) { |
| 4734 return Elements.unwrap(scope.lookup(name), reporter, node); | 4734 return Elements.unwrap(scope.lookup(name), reporter, node); |
| 4735 } | 4735 } |
| OLD | NEW |