| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 // TODO(johnniwinther): Remove this library when all constant constructors are | 5 // TODO(johnniwinther): Remove this library when all constant constructors are |
| 6 // computed during resolution. | 6 // computed during resolution. |
| 7 library dart2js.constants.constant_constructors; | 7 library dart2js.constants.constant_constructors; |
| 8 | 8 |
| 9 import '../dart_types.dart'; | 9 import '../dart_types.dart'; |
| 10 import '../diagnostics/invariant.dart' show | 10 import '../diagnostics/invariant.dart' show |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 class ConstantConstructorComputer extends SemanticVisitor | 31 class ConstantConstructorComputer extends SemanticVisitor |
| 32 with SemanticDeclarationResolvedMixin, | 32 with SemanticDeclarationResolvedMixin, |
| 33 DeclarationResolverMixin, | 33 DeclarationResolverMixin, |
| 34 GetBulkMixin, | 34 GetBulkMixin, |
| 35 SetBulkMixin, | 35 SetBulkMixin, |
| 36 ErrorBulkMixin, | 36 ErrorBulkMixin, |
| 37 InvokeBulkMixin, | 37 InvokeBulkMixin, |
| 38 IndexSetBulkMixin, | 38 IndexSetBulkMixin, |
| 39 CompoundBulkMixin, | 39 CompoundBulkMixin, |
| 40 SetIfNullBulkMixin, |
| 40 UnaryBulkMixin, | 41 UnaryBulkMixin, |
| 41 BaseBulkMixin, | 42 BaseBulkMixin, |
| 42 BinaryBulkMixin, | 43 BinaryBulkMixin, |
| 43 PrefixBulkMixin, | 44 PrefixBulkMixin, |
| 44 PostfixBulkMixin, | 45 PostfixBulkMixin, |
| 45 NewBulkMixin, | 46 NewBulkMixin, |
| 46 InitializerBulkMixin, | 47 InitializerBulkMixin, |
| 47 FunctionBulkMixin, | 48 FunctionBulkMixin, |
| 48 VariableBulkMixin | 49 VariableBulkMixin |
| 49 implements SemanticDeclarationVisitor, SemanticSendVisitor { | 50 implements SemanticDeclarationVisitor, SemanticSendVisitor { |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 } | 376 } |
| 376 return new IdenticalConstantExpression( | 377 return new IdenticalConstantExpression( |
| 377 apply(arguments.nodes.head), apply(arguments.nodes.tail.head)); | 378 apply(arguments.nodes.head), apply(arguments.nodes.tail.head)); |
| 378 } | 379 } |
| 379 | 380 |
| 380 @override | 381 @override |
| 381 ConstantExpression visitNamedArgument(NamedArgument node) { | 382 ConstantExpression visitNamedArgument(NamedArgument node) { |
| 382 return apply(node.expression); | 383 return apply(node.expression); |
| 383 } | 384 } |
| 384 } | 385 } |
| OLD | NEW |