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

Side by Side Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 1969943002: Resynthesize _DeferredClassElement 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 analyzer.src.dart.element.element; 5 library analyzer.src.dart.element.element;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:math' show min; 8 import 'dart:math' show min;
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 return false; 914 return false;
915 } 915 }
916 916
917 /** 917 /**
918 * Return the [ClassElementImpl] of the given [classElement]. May throw an 918 * Return the [ClassElementImpl] of the given [classElement]. May throw an
919 * exception if the [ClassElementImpl] cannot be provided (should not happen 919 * exception if the [ClassElementImpl] cannot be provided (should not happen
920 * though). 920 * though).
921 */ 921 */
922 static ClassElementImpl getImpl(ClassElement classElement) { 922 static ClassElementImpl getImpl(ClassElement classElement) {
923 if (classElement is ClassElementHandle) { 923 if (classElement is ClassElementHandle) {
924 classElement.ensureActualElementComplete();
924 return getImpl(classElement.actualElement); 925 return getImpl(classElement.actualElement);
925 } 926 }
926 return classElement as ClassElementImpl; 927 return classElement as ClassElementImpl;
927 } 928 }
928 } 929 }
929 930
930 /** 931 /**
931 * A concrete implementation of a [CompilationUnitElement]. 932 * A concrete implementation of a [CompilationUnitElement].
932 */ 933 */
933 class CompilationUnitElementImpl extends UriReferencedElementImpl 934 class CompilationUnitElementImpl extends UriReferencedElementImpl
(...skipping 4103 matching lines...) Expand 10 before | Expand all | Expand 10 after
5037 5038
5038 @override 5039 @override
5039 void visitElement(Element element) { 5040 void visitElement(Element element) {
5040 int offset = element.nameOffset; 5041 int offset = element.nameOffset;
5041 if (offset != -1) { 5042 if (offset != -1) {
5042 map[offset] = element; 5043 map[offset] = element;
5043 } 5044 }
5044 super.visitElement(element); 5045 super.visitElement(element);
5045 } 5046 }
5046 } 5047 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/handle.dart » ('j') | pkg/analyzer/lib/src/dart/element/handle.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698