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

Unified Diff: pkg/analyzer/lib/src/summary/resynthesize.dart

Issue 2015053002: Resynthesize constant field initializers lazily. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/resynthesize.dart
diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart
index 48a29f398e2507b85f7deb2e0e267e826a723199..acc0ce2801ea20c9647ffab99ac6bd6043d38548 100644
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
@@ -574,8 +574,8 @@ class _ConstExprBuilder {
*/
TypeName _newTypeName() {
EntityRef typeRef = uc.references[refPtr++];
- DartType type = resynthesizer.buildType(
- typeRef, resynthesizer._currentTypeParameterizedElement);
+ DartType type =
+ resynthesizer.buildType(typeRef, context?.typeParameterContext);
return _buildTypeAst(type);
}
@@ -2553,12 +2553,8 @@ class _UnitResynthesizer {
if (serializedVariable.initializer?.bodyExpr != null &&
(serializedVariable.isConst ||
serializedVariable.isFinal && !serializedVariable.isStatic)) {
- ConstFieldElementImpl constElement =
- new ConstFieldElementImpl.forSerialized(
- serializedVariable, enclosingClass);
- element = constElement;
- constElement.constantInitializer = _buildConstExpression(
- enclosingClass, serializedVariable.initializer.bodyExpr);
+ element = new ConstFieldElementImpl.forSerialized(
+ serializedVariable, enclosingClass);
} else {
element = new FieldElementImpl.forSerialized(
serializedVariable, enclosingClass);
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698