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

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

Issue 2070493003: Revert "Remove Registry from registerMetadataConstant" and "Serialize metadata" (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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
OLDNEW
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.dart'; 9 import '../common.dart';
10 import '../common/names.dart' show Identifiers; 10 import '../common/names.dart' show Identifiers;
(...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 constant = new ErroneousConstantExpression(); 1081 constant = new ErroneousConstantExpression();
1082 break; 1082 break;
1083 } 1083 }
1084 annotation.constant = constant; 1084 annotation.constant = constant;
1085 1085
1086 constantCompiler.evaluate(annotation.constant); 1086 constantCompiler.evaluate(annotation.constant);
1087 // TODO(johnniwinther): Register the relation between the annotati on 1087 // TODO(johnniwinther): Register the relation between the annotati on
1088 // and the annotated element instead. This will allow the backend to 1088 // and the annotated element instead. This will allow the backend to
1089 // retrieve the backend constant and only register metadata on the 1089 // retrieve the backend constant and only register metadata on the
1090 // elements for which it is needed. (Issue 17732). 1090 // elements for which it is needed. (Issue 17732).
1091 registry.registerMetadataConstant(annotation);
1091 annotation.resolutionState = STATE_DONE; 1092 annotation.resolutionState = STATE_DONE;
1092 })); 1093 }));
1093 } 1094 }
1094 1095
1095 List<MetadataAnnotation> resolveMetadata( 1096 List<MetadataAnnotation> resolveMetadata(
1096 Element element, VariableDefinitions node) { 1097 Element element, VariableDefinitions node) {
1097 List<MetadataAnnotation> metadata = <MetadataAnnotation>[]; 1098 List<MetadataAnnotation> metadata = <MetadataAnnotation>[];
1098 for (Metadata annotation in node.metadata.nodes) { 1099 for (Metadata annotation in node.metadata.nodes) {
1099 ParameterMetadataAnnotation metadataAnnotation = 1100 ParameterMetadataAnnotation metadataAnnotation =
1100 new ParameterMetadataAnnotation(annotation); 1101 new ParameterMetadataAnnotation(annotation);
(...skipping 19 matching lines...) Expand all
1120 TreeElements get treeElements { 1121 TreeElements get treeElements {
1121 assert(invariant(this, _treeElements != null, 1122 assert(invariant(this, _treeElements != null,
1122 message: "TreeElements have not been computed for $this.")); 1123 message: "TreeElements have not been computed for $this."));
1123 return _treeElements; 1124 return _treeElements;
1124 } 1125 }
1125 1126
1126 void reuseElement() { 1127 void reuseElement() {
1127 _treeElements = null; 1128 _treeElements = null;
1128 } 1129 }
1129 } 1130 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/registry.dart ('k') | pkg/compiler/lib/src/serialization/element_serialization.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698