| 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 Set<Node> get superUses; | 9 Set<Node> get superUses; |
| 10 | 10 |
| (...skipping 3319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3330 return mixinApplication.computeType(compiler); | 3330 return mixinApplication.computeType(compiler); |
| 3331 } | 3331 } |
| 3332 | 3332 |
| 3333 bool isDefaultConstructor(FunctionElement constructor) { | 3333 bool isDefaultConstructor(FunctionElement constructor) { |
| 3334 return constructor.name == const SourceString('') && | 3334 return constructor.name == const SourceString('') && |
| 3335 constructor.computeSignature(compiler).parameterCount == 0; | 3335 constructor.computeSignature(compiler).parameterCount == 0; |
| 3336 } | 3336 } |
| 3337 | 3337 |
| 3338 FunctionElement createForwardingConstructor(FunctionElement target, | 3338 FunctionElement createForwardingConstructor(FunctionElement target, |
| 3339 ClassElement enclosing) { | 3339 ClassElement enclosing) { |
| 3340 return new SynthesizedConstructorElementX(target.name, | 3340 return new SynthesizedConstructorElementX( |
| 3341 target, | 3341 target.name, target, enclosing, false); |
| 3342 enclosing); | |
| 3343 } | 3342 } |
| 3344 | 3343 |
| 3345 void doApplyMixinTo(MixinApplicationElement mixinApplication, | 3344 void doApplyMixinTo(MixinApplicationElement mixinApplication, |
| 3346 DartType supertype, | 3345 DartType supertype, |
| 3347 DartType mixinType) { | 3346 DartType mixinType) { |
| 3348 Node node = mixinApplication.parseNode(compiler); | 3347 Node node = mixinApplication.parseNode(compiler); |
| 3349 | 3348 |
| 3350 if (mixinApplication.supertype != null) { | 3349 if (mixinApplication.supertype != null) { |
| 3351 // [supertype] is not null if there was a cycle. | 3350 // [supertype] is not null if there was a cycle. |
| 3352 assert(invariant(node, compiler.compilationFailed)); | 3351 assert(invariant(node, compiler.compilationFailed)); |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4068 return e; | 4067 return e; |
| 4069 } | 4068 } |
| 4070 | 4069 |
| 4071 /// Assumed to be called by [resolveRedirectingFactory]. | 4070 /// Assumed to be called by [resolveRedirectingFactory]. |
| 4072 Element visitReturn(Return node) { | 4071 Element visitReturn(Return node) { |
| 4073 Node expression = node.expression; | 4072 Node expression = node.expression; |
| 4074 return finishConstructorReference(visit(expression), | 4073 return finishConstructorReference(visit(expression), |
| 4075 expression, expression); | 4074 expression, expression); |
| 4076 } | 4075 } |
| 4077 } | 4076 } |
| OLD | NEW |