| 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 library dart2js.resolution; | 5 library dart2js.resolution; |
| 6 | 6 |
| 7 import 'dart:collection' show Queue; | 7 import 'dart:collection' show Queue; |
| 8 | 8 |
| 9 import '../common/names.dart' show | 9 import '../common/names.dart' show |
| 10 Identifiers; | 10 Identifiers; |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 // TODO(johnniwinther): Check matching type variables and | 591 // TODO(johnniwinther): Check matching type variables and |
| 592 // empty extends/implements clauses. | 592 // empty extends/implements clauses. |
| 593 } | 593 } |
| 594 } | 594 } |
| 595 | 595 |
| 596 void _postProcessClassElement(BaseClassElementX element) { | 596 void _postProcessClassElement(BaseClassElementX element) { |
| 597 for (MetadataAnnotation metadata in element.implementation.metadata) { | 597 for (MetadataAnnotation metadata in element.implementation.metadata) { |
| 598 metadata.ensureResolved(compiler); | 598 metadata.ensureResolved(compiler); |
| 599 ConstantValue value = | 599 ConstantValue value = |
| 600 compiler.constants.getConstantValue(metadata.constant); | 600 compiler.constants.getConstantValue(metadata.constant); |
| 601 if (!element.isProxy && value == compiler.proxyConstant) { | 601 if (!element.isProxy && compiler.isProxyConstant(value)) { |
| 602 element.isProxy = true; | 602 element.isProxy = true; |
| 603 } | 603 } |
| 604 } | 604 } |
| 605 | 605 |
| 606 // Force resolution of metadata on non-instance members since they may be | 606 // Force resolution of metadata on non-instance members since they may be |
| 607 // inspected by the backend while emitting. Metadata on instance members is | 607 // inspected by the backend while emitting. Metadata on instance members is |
| 608 // handled as a result of processing instantiated class members in the | 608 // handled as a result of processing instantiated class members in the |
| 609 // enqueuer. | 609 // enqueuer. |
| 610 // TODO(ahe): Avoid this eager resolution. | 610 // TODO(ahe): Avoid this eager resolution. |
| 611 element.forEachMember((_, Element member) { | 611 element.forEachMember((_, Element member) { |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 TreeElements get treeElements { | 1038 TreeElements get treeElements { |
| 1039 assert(invariant(this, _treeElements !=null, | 1039 assert(invariant(this, _treeElements !=null, |
| 1040 message: "TreeElements have not been computed for $this.")); | 1040 message: "TreeElements have not been computed for $this.")); |
| 1041 return _treeElements; | 1041 return _treeElements; |
| 1042 } | 1042 } |
| 1043 | 1043 |
| 1044 void reuseElement() { | 1044 void reuseElement() { |
| 1045 _treeElements = null; | 1045 _treeElements = null; |
| 1046 } | 1046 } |
| 1047 } | 1047 } |
| OLD | NEW |