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; | 5 library dart2js.resolution; |
6 | 6 |
7 import 'dart:collection' show Queue; | 7 import 'dart:collection' show Queue; |
8 | 8 |
9 import '../common.dart'; | 9 import '../common.dart'; |
10 import '../common/names.dart' show Identifiers; | 10 import '../common/names.dart' show Identifiers; |
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 if (element.isFactoryConstructor) { | 967 if (element.isFactoryConstructor) { |
968 FunctionExpression body = element.parseNode(parsingContext); | 968 FunctionExpression body = element.parseNode(parsingContext); |
969 if (body.isRedirectingFactory) { | 969 if (body.isRedirectingFactory) { |
970 defaultValuesError = MessageKind.REDIRECTING_FACTORY_WITH_DEFAULT; | 970 defaultValuesError = MessageKind.REDIRECTING_FACTORY_WITH_DEFAULT; |
971 } | 971 } |
972 } | 972 } |
973 return reporter.withCurrentElement(element, () { | 973 return reporter.withCurrentElement(element, () { |
974 FunctionExpression node = element.parseNode(parsingContext); | 974 FunctionExpression node = element.parseNode(parsingContext); |
975 return measure(() => SignatureResolver.analyze( | 975 return measure(() => SignatureResolver.analyze( |
976 compiler, | 976 compiler, |
| 977 element.enclosingElement.buildScope(), |
| 978 node.typeVariables, |
977 node.parameters, | 979 node.parameters, |
978 node.returnType, | 980 node.returnType, |
979 element, | 981 element, |
980 new ResolutionRegistry(compiler, _ensureTreeElements(element)), | 982 new ResolutionRegistry(compiler, _ensureTreeElements(element)), |
981 defaultValuesError: defaultValuesError, | 983 defaultValuesError: defaultValuesError, |
982 createRealParameters: true)); | 984 createRealParameters: true)); |
983 }); | 985 }); |
984 } | 986 } |
985 | 987 |
986 WorldImpact resolveTypedef(TypedefElementX element) { | 988 WorldImpact resolveTypedef(TypedefElementX element) { |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1090 TreeElements get treeElements { | 1092 TreeElements get treeElements { |
1091 assert(invariant(this, _treeElements != null, | 1093 assert(invariant(this, _treeElements != null, |
1092 message: "TreeElements have not been computed for $this.")); | 1094 message: "TreeElements have not been computed for $this.")); |
1093 return _treeElements; | 1095 return _treeElements; |
1094 } | 1096 } |
1095 | 1097 |
1096 void reuseElement() { | 1098 void reuseElement() { |
1097 _treeElements = null; | 1099 _treeElements = null; |
1098 } | 1100 } |
1099 } | 1101 } |
OLD | NEW |