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

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

Issue 1981363002: In summary AST linker, fix top level isStatic getters. (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 3797 matching lines...) Expand 10 before | Expand all | Expand 10 after
3808 CompilationUnitElementForLink enclosingUnit, 3808 CompilationUnitElementForLink enclosingUnit,
3809 ClassElementForLink_Class enclosingClass, 3809 ClassElementForLink_Class enclosingClass,
3810 UnlinkedExecutable unlinkedExecutable, 3810 UnlinkedExecutable unlinkedExecutable,
3811 this.variable) 3811 this.variable)
3812 : super(enclosingUnit, enclosingClass, unlinkedExecutable); 3812 : super(enclosingUnit, enclosingClass, unlinkedExecutable);
3813 3813
3814 @override 3814 @override
3815 DartType get asStaticType => returnType; 3815 DartType get asStaticType => returnType;
3816 3816
3817 @override 3817 @override
3818 bool get isStatic => enclosingClass == null || super.isStatic;
3819
3820 @override
3818 PropertyAccessorElementForLink_Executable get correspondingGetter => 3821 PropertyAccessorElementForLink_Executable get correspondingGetter =>
3819 variable.getter; 3822 variable.getter;
3820 3823
3821 @override 3824 @override
3822 bool get isGetter => 3825 bool get isGetter =>
3823 _unlinkedExecutable.kind == UnlinkedExecutableKind.getter; 3826 _unlinkedExecutable.kind == UnlinkedExecutableKind.getter;
3824 3827
3825 @override 3828 @override
3826 bool get isSetter => 3829 bool get isSetter =>
3827 _unlinkedExecutable.kind == UnlinkedExecutableKind.setter; 3830 _unlinkedExecutable.kind == UnlinkedExecutableKind.setter;
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
4063 DartType _returnType; 4066 DartType _returnType;
4064 4067
4065 TopLevelFunctionElementForLink( 4068 TopLevelFunctionElementForLink(
4066 CompilationUnitElementForLink enclosingUnit, UnlinkedExecutable _buf) 4069 CompilationUnitElementForLink enclosingUnit, UnlinkedExecutable _buf)
4067 : super(enclosingUnit, null, _buf); 4070 : super(enclosingUnit, null, _buf);
4068 4071
4069 @override 4072 @override
4070 DartType get asStaticType => type; 4073 DartType get asStaticType => type;
4071 4074
4072 @override 4075 @override
4076 bool get isStatic => true;
4077
4078 @override
4073 ElementKind get kind => ElementKind.FUNCTION; 4079 ElementKind get kind => ElementKind.FUNCTION;
4074 4080
4075 @override 4081 @override
4076 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 4082 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
4077 } 4083 }
4078 4084
4079 /** 4085 /**
4080 * Element representing a top level variable resynthesized from a 4086 * Element representing a top level variable resynthesized from a
4081 * summary during linking. 4087 * summary during linking.
4082 */ 4088 */
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
4675 * there are no type parameters in scope. 4681 * there are no type parameters in scope.
4676 */ 4682 */
4677 TypeParameterizedElementForLink get _typeParameterContext; 4683 TypeParameterizedElementForLink get _typeParameterContext;
4678 4684
4679 @override 4685 @override
4680 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 4686 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
4681 4687
4682 @override 4688 @override
4683 String toString() => '$enclosingElement.$name'; 4689 String toString() => '$enclosingElement.$name';
4684 } 4690 }
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