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

Side by Side Diff: pkg/analyzer/lib/src/summary/link.dart

Issue 1994673003: Fix generation of variable initializer synthetic functions in summary AST linker. (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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/linker_test.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 /** 5 /**
6 * This library is capable of producing linked summaries from unlinked 6 * This library is capable of producing linked summaries from unlinked
7 * ones (or prelinked ones). It functions by building a miniature 7 * ones (or prelinked ones). It functions by building a miniature
8 * element model to represent the contents of the summaries, and then 8 * element model to represent the contents of the summaries, and then
9 * scanning the element model to gather linked information and adding 9 * scanning the element model to gather linked information and adding
10 * it to the summary data structures. 10 * it to the summary data structures.
(...skipping 4566 matching lines...) Expand 10 before | Expand all | Expand 10 after
4577 } else { 4577 } else {
4578 _inferredType = compilationUnit.getLinkedType( 4578 _inferredType = compilationUnit.getLinkedType(
4579 unlinkedVariable.inferredTypeSlot, _typeParameterContext); 4579 unlinkedVariable.inferredTypeSlot, _typeParameterContext);
4580 } 4580 }
4581 } 4581 }
4582 return _inferredType; 4582 return _inferredType;
4583 } 4583 }
4584 4584
4585 @override 4585 @override
4586 FunctionElementForLink_Initializer get initializer { 4586 FunctionElementForLink_Initializer get initializer {
4587 if (unlinkedVariable.constExpr == null) { 4587 if (unlinkedVariable.initializer == null) {
4588 return null; 4588 return null;
4589 } else { 4589 } else {
4590 return _initializer ??= new FunctionElementForLink_Initializer(this); 4590 return _initializer ??= new FunctionElementForLink_Initializer(this);
4591 } 4591 }
4592 } 4592 }
4593 4593
4594 @override 4594 @override
4595 bool get isConst => unlinkedVariable.isConst; 4595 bool get isConst => unlinkedVariable.isConst;
4596 4596
4597 @override 4597 @override
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
4635 * there are no type parameters in scope. 4635 * there are no type parameters in scope.
4636 */ 4636 */
4637 TypeParameterizedElementMixin get _typeParameterContext; 4637 TypeParameterizedElementMixin get _typeParameterContext;
4638 4638
4639 @override 4639 @override
4640 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 4640 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
4641 4641
4642 @override 4642 @override
4643 String toString() => '$enclosingElement.$name'; 4643 String toString() => '$enclosingElement.$name';
4644 } 4644 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/linker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698