| 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 3369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3380 new Link<DartType>.fromList([keyTypeArgument, valueTypeArgument])); | 3380 new Link<DartType>.fromList([keyTypeArgument, valueTypeArgument])); |
| 3381 } else { | 3381 } else { |
| 3382 compiler.mapClass.computeType(compiler); | 3382 compiler.mapClass.computeType(compiler); |
| 3383 mapType = compiler.mapClass.rawType; | 3383 mapType = compiler.mapClass.rawType; |
| 3384 } | 3384 } |
| 3385 if (node.isConst() && mapType.containsTypeVariables) { | 3385 if (node.isConst() && mapType.containsTypeVariables) { |
| 3386 compiler.reportError(arguments, | 3386 compiler.reportError(arguments, |
| 3387 MessageKind.TYPE_VARIABLE_IN_CONSTANT); | 3387 MessageKind.TYPE_VARIABLE_IN_CONSTANT); |
| 3388 } | 3388 } |
| 3389 mapping.setType(node, mapType); | 3389 mapping.setType(node, mapType); |
| 3390 world.registerInstantiatedClass(compiler.mapClass, mapping); | 3390 world.registerInstantiatedType(mapType, mapping); |
| 3391 if (node.isConst()) { | 3391 if (node.isConst()) { |
| 3392 compiler.backend.registerConstantMap(mapping); | 3392 compiler.backend.registerConstantMap(mapping); |
| 3393 } | 3393 } |
| 3394 compiler.backend.registerRequiredType(mapType, enclosingElement); | 3394 compiler.backend.registerRequiredType(mapType, enclosingElement); |
| 3395 node.visitChildren(this); | 3395 node.visitChildren(this); |
| 3396 if (node.isConst()) { | 3396 if (node.isConst()) { |
| 3397 analyzeConstant(node); | 3397 analyzeConstant(node); |
| 3398 } | 3398 } |
| 3399 } | 3399 } |
| 3400 | 3400 |
| (...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4726 return finishConstructorReference(visit(expression), | 4726 return finishConstructorReference(visit(expression), |
| 4727 expression, expression); | 4727 expression, expression); |
| 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(Compiler compiler, Node node, | 4732 Element lookupInScope(Compiler compiler, Node node, |
| 4733 Scope scope, String name) { | 4733 Scope scope, String name) { |
| 4734 return Elements.unwrap(scope.lookup(name), compiler, node); | 4734 return Elements.unwrap(scope.lookup(name), compiler, node); |
| 4735 } | 4735 } |
| OLD | NEW |