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

Side by Side Diff: pkg/analyzer/lib/src/generated/incremental_resolver.dart

Issue 809203002: Log more information to debug 'null' location for constructor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analysis_server/lib/src/protocol_server.dart ('k') | no next file » | 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) 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 engine.incremental_resolver; 5 library engine.incremental_resolver;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:math' as math; 8 import 'dart:math' as math;
9 9
10 import 'ast.dart'; 10 import 'ast.dart';
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 @override 179 @override
180 visitConstructorDeclaration(ConstructorDeclaration node) { 180 visitConstructorDeclaration(ConstructorDeclaration node) {
181 _hasConstructor = true; 181 _hasConstructor = true;
182 SimpleIdentifier constructorName = node.name; 182 SimpleIdentifier constructorName = node.name;
183 ConstructorElementImpl element = constructorName == null ? 183 ConstructorElementImpl element = constructorName == null ?
184 _enclosingClass.unnamedConstructor : 184 _enclosingClass.unnamedConstructor :
185 _enclosingClass.getNamedConstructor(constructorName.name); 185 _enclosingClass.getNamedConstructor(constructorName.name);
186 _processElement(element); 186 _processElement(element);
187 _assertCompatibleParameters(node.parameters, element.parameters); 187 _assertCompatibleParameters(node.parameters, element.parameters);
188 // TODO(scheglov) debug null Location
189 if (element != null) {
190 if (element.context == null || element.source == null) {
191 logger.log('Bad constructor element $element for $node in ${node.parent} ');
192 }
193 }
188 // matches, update the existing element 194 // matches, update the existing element
189 ExecutableElement newElement = node.element; 195 ExecutableElement newElement = node.element;
190 node.element = element; 196 node.element = element;
191 _setLocalElements(element, newElement); 197 _setLocalElements(element, newElement);
192 } 198 }
193 199
194 @override 200 @override
195 visitEnumConstantDeclaration(EnumConstantDeclaration node) { 201 visitEnumConstantDeclaration(EnumConstantDeclaration node) {
196 String name = node.name.name; 202 String name = node.name.name;
197 FieldElement element = _findElement(_enclosingClass.fields, name); 203 FieldElement element = _findElement(_enclosingClass.fields, name);
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1713 String toString() => name; 1719 String toString() => name;
1714 } 1720 }
1715 1721
1716 1722
1717 class _TokenPair { 1723 class _TokenPair {
1718 final _TokenDifferenceKind kind; 1724 final _TokenDifferenceKind kind;
1719 final Token oldToken; 1725 final Token oldToken;
1720 final Token newToken; 1726 final Token newToken;
1721 _TokenPair(this.kind, this.oldToken, this.newToken); 1727 _TokenPair(this.kind, this.oldToken, this.newToken);
1722 } 1728 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/protocol_server.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698