Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1281)

Side by Side Diff: pkg/compiler/lib/src/resolution/resolution_common.dart

Issue 1148343004: Remove ConstantExpression.value (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Update comments. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 part of resolution; 5 part of resolution;
6 6
7 class ResolverTask extends CompilerTask { 7 class ResolverTask extends CompilerTask {
8 final ConstantCompiler constantCompiler; 8 final ConstantCompiler constantCompiler;
9 9
10 ResolverTask(Compiler compiler, this.constantCompiler) : super(compiler); 10 ResolverTask(Compiler compiler, this.constantCompiler) : super(compiler);
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 element.supertypeLoadState = STATE_DONE; 526 element.supertypeLoadState = STATE_DONE;
527 element.resolutionState = STATE_DONE; 527 element.resolutionState = STATE_DONE;
528 // TODO(johnniwinther): Check matching type variables and 528 // TODO(johnniwinther): Check matching type variables and
529 // empty extends/implements clauses. 529 // empty extends/implements clauses.
530 } 530 }
531 } 531 }
532 532
533 void _postProcessClassElement(BaseClassElementX element) { 533 void _postProcessClassElement(BaseClassElementX element) {
534 for (MetadataAnnotation metadata in element.metadata) { 534 for (MetadataAnnotation metadata in element.metadata) {
535 metadata.ensureResolved(compiler); 535 metadata.ensureResolved(compiler);
536 if (!element.isProxy && 536 ConstantValue value =
537 metadata.constant.value == compiler.proxyConstant) { 537 compiler.constants.getConstantValue(metadata.constant);
538 if (!element.isProxy && value == compiler.proxyConstant) {
538 element.isProxy = true; 539 element.isProxy = true;
539 } 540 }
540 } 541 }
541 542
542 // Force resolution of metadata on non-instance members since they may be 543 // Force resolution of metadata on non-instance members since they may be
543 // inspected by the backend while emitting. Metadata on instance members is 544 // inspected by the backend while emitting. Metadata on instance members is
544 // handled as a result of processing instantiated class members in the 545 // handled as a result of processing instantiated class members in the
545 // enqueuer. 546 // enqueuer.
546 // TODO(ahe): Avoid this eager resolution. 547 // TODO(ahe): Avoid this eager resolution.
547 element.forEachMember((_, Element member) { 548 element.forEachMember((_, Element member) {
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 1042
1042 void reportDuplicateDefinition(String name, 1043 void reportDuplicateDefinition(String name,
1043 Spannable definition, 1044 Spannable definition,
1044 Spannable existing) { 1045 Spannable existing) {
1045 compiler.reportError(definition, 1046 compiler.reportError(definition,
1046 MessageKind.DUPLICATE_DEFINITION, {'name': name}); 1047 MessageKind.DUPLICATE_DEFINITION, {'name': name});
1047 compiler.reportInfo(existing, 1048 compiler.reportInfo(existing,
1048 MessageKind.EXISTING_DEFINITION, {'name': name}); 1049 MessageKind.EXISTING_DEFINITION, {'name': name});
1049 } 1050 }
1050 } 1051 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698