| 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 part of resolution; | 5 part of resolution; |
| 6 | 6 |
| 7 abstract class TreeElements { | 7 abstract class TreeElements { |
| 8 Element get currentElement; | 8 Element get currentElement; |
| 9 Setlet<Node> get superUses; | 9 Setlet<Node> get superUses; |
| 10 | 10 |
| (...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1182 compiler.parser.measure(() => element.parseNode(compiler)); | 1182 compiler.parser.measure(() => element.parseNode(compiler)); |
| 1183 return measure(() => SignatureResolver.analyze( | 1183 return measure(() => SignatureResolver.analyze( |
| 1184 compiler, node.parameters, node.returnType, element, | 1184 compiler, node.parameters, node.returnType, element, |
| 1185 new ResolutionRegistry(compiler, element), | 1185 new ResolutionRegistry(compiler, element), |
| 1186 defaultValuesError: defaultValuesError)); | 1186 defaultValuesError: defaultValuesError)); |
| 1187 }); | 1187 }); |
| 1188 } | 1188 } |
| 1189 | 1189 |
| 1190 TreeElements resolveTypedef(TypedefElementX element) { | 1190 TreeElements resolveTypedef(TypedefElementX element) { |
| 1191 if (element.isResolved) return element.treeElements; | 1191 if (element.isResolved) return element.treeElements; |
| 1192 compiler.world.allTypedefs.add(element); | |
| 1193 return _resolveTypeDeclaration(element, () { | 1192 return _resolveTypeDeclaration(element, () { |
| 1194 ResolutionRegistry registry = new ResolutionRegistry(compiler, element); | 1193 ResolutionRegistry registry = new ResolutionRegistry(compiler, element); |
| 1195 return compiler.withCurrentElement(element, () { | 1194 return compiler.withCurrentElement(element, () { |
| 1196 return measure(() { | 1195 return measure(() { |
| 1197 assert(element.resolutionState == STATE_NOT_STARTED); | 1196 assert(element.resolutionState == STATE_NOT_STARTED); |
| 1198 element.resolutionState = STATE_STARTED; | 1197 element.resolutionState = STATE_STARTED; |
| 1199 Typedef node = | 1198 Typedef node = |
| 1200 compiler.parser.measure(() => element.parseNode(compiler)); | 1199 compiler.parser.measure(() => element.parseNode(compiler)); |
| 1201 TypedefResolverVisitor visitor = | 1200 TypedefResolverVisitor visitor = |
| 1202 new TypedefResolverVisitor(compiler, element, registry); | 1201 new TypedefResolverVisitor(compiler, element, registry); |
| (...skipping 3498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4701 TreeElements _treeElements; | 4700 TreeElements _treeElements; |
| 4702 | 4701 |
| 4703 bool get hasTreeElements => _treeElements != null; | 4702 bool get hasTreeElements => _treeElements != null; |
| 4704 | 4703 |
| 4705 TreeElements get treeElements { | 4704 TreeElements get treeElements { |
| 4706 assert(invariant(this, _treeElements !=null, | 4705 assert(invariant(this, _treeElements !=null, |
| 4707 message: "TreeElements have not been computed for $this.")); | 4706 message: "TreeElements have not been computed for $this.")); |
| 4708 return _treeElements; | 4707 return _treeElements; |
| 4709 } | 4708 } |
| 4710 } | 4709 } |
| OLD | NEW |