| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.constant; | 8 library engine.constant; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 return true; | 893 return true; |
| 894 } | 894 } |
| 895 if (type.isUndefined) { | 895 if (type.isUndefined) { |
| 896 return false; | 896 return false; |
| 897 } | 897 } |
| 898 return obj.type.isSubtypeOf(type); | 898 return obj.type.isSubtypeOf(type); |
| 899 } | 899 } |
| 900 } | 900 } |
| 901 | 901 |
| 902 /** | 902 /** |
| 903 * [AstCloner] that copies the necessary information from the AST to allow const
constructor | 903 * A `ConstantValueComputer_InitializerCloner` is an [AstCloner] that copies the |
| 904 * initializers to be evaluated. | 904 * necessary information from the AST to allow const constructor initializers to |
| 905 * be evaluated. |
| 905 */ | 906 */ |
| 906 class ConstantValueComputer_InitializerCloner extends AstCloner { | 907 class ConstantValueComputer_InitializerCloner extends AstCloner { |
| 908 // TODO(brianwilkerson) Investigate replacing uses of this class with uses of |
| 909 // AstCloner and ResolutionCopier. |
| 910 |
| 911 ConstantValueComputer_InitializerCloner() : super(true); |
| 912 |
| 907 @override | 913 @override |
| 908 InstanceCreationExpression visitInstanceCreationExpression(InstanceCreationExp
ression node) { | 914 InstanceCreationExpression visitInstanceCreationExpression(InstanceCreationExp
ression node) { |
| 909 InstanceCreationExpression expression = super.visitInstanceCreationExpressio
n(node); | 915 InstanceCreationExpression expression = super.visitInstanceCreationExpressio
n(node); |
| 910 expression.evaluationResult = node.evaluationResult; | 916 expression.evaluationResult = node.evaluationResult; |
| 911 return expression; | 917 return expression; |
| 912 } | 918 } |
| 913 | 919 |
| 914 @override | 920 @override |
| 915 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) { | 921 SimpleIdentifier visitSimpleIdentifier(SimpleIdentifier node) { |
| 916 SimpleIdentifier identifier = super.visitSimpleIdentifier(node); | 922 SimpleIdentifier identifier = super.visitSimpleIdentifier(node); |
| (...skipping 3771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4688 | 4694 |
| 4689 @override | 4695 @override |
| 4690 String get typeName => "Type"; | 4696 String get typeName => "Type"; |
| 4691 | 4697 |
| 4692 @override | 4698 @override |
| 4693 int get hashCode => _element == null ? 0 : _element.hashCode; | 4699 int get hashCode => _element == null ? 0 : _element.hashCode; |
| 4694 | 4700 |
| 4695 @override | 4701 @override |
| 4696 String toString() => _element == null ? "-unknown-" : _element.name; | 4702 String toString() => _element == null ? "-unknown-" : _element.name; |
| 4697 } | 4703 } |
| OLD | NEW |