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

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

Issue 728513002: Remove some (but not all) unused methods in analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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
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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.constant; 8 library engine.constant;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 } 1467 }
1468 return new DartObjectImpl(functionType, new FunctionState(function)); 1468 return new DartObjectImpl(functionType, new FunctionState(function));
1469 } 1469 }
1470 } else if (element is ClassElement || element is FunctionTypeAliasElement) { 1470 } else if (element is ClassElement || element is FunctionTypeAliasElement) {
1471 return new DartObjectImpl(_typeProvider.typeType, new TypeState(element)); 1471 return new DartObjectImpl(_typeProvider.typeType, new TypeState(element));
1472 } 1472 }
1473 // TODO(brianwilkerson) Figure out which error to report. 1473 // TODO(brianwilkerson) Figure out which error to report.
1474 _error(node, null); 1474 _error(node, null);
1475 return null; 1475 return null;
1476 } 1476 }
1477
1478 /**
1479 * Return `true` if the given element represents the 'length' getter in class 'String'.
1480 *
1481 * @param element the element being tested.
1482 * @return
1483 */
1484 bool _isStringLength(Element element) {
1485 if (element is! PropertyAccessorElement) {
1486 return false;
1487 }
1488 PropertyAccessorElement accessor = element as PropertyAccessorElement;
1489 if (!accessor.isGetter || accessor.name != "length") {
1490 return false;
1491 }
1492 Element parent = accessor.enclosingElement;
1493 return parent == _typeProvider.stringType.element;
1494 }
1495 } 1477 }
1496 1478
1497 /** 1479 /**
1498 * The interface `DartObject` defines the behavior of objects that represent the state of a 1480 * The interface `DartObject` defines the behavior of objects that represent the state of a
1499 * Dart object. 1481 * Dart object.
1500 */ 1482 */
1501 abstract class DartObject { 1483 abstract class DartObject {
1502 /** 1484 /**
1503 * Return the boolean value of this object, or `null` if either the value of t his object is 1485 * Return the boolean value of this object, or `null` if either the value of t his object is
1504 * not known or this object is not of type 'bool'. 1486 * not known or this object is not of type 'bool'.
(...skipping 3293 matching lines...) Expand 10 before | Expand all | Expand 10 after
4798 4780
4799 @override 4781 @override
4800 String get typeName => "Type"; 4782 String get typeName => "Type";
4801 4783
4802 @override 4784 @override
4803 int get hashCode => _element == null ? 0 : _element.hashCode; 4785 int get hashCode => _element == null ? 0 : _element.hashCode;
4804 4786
4805 @override 4787 @override
4806 String toString() => _element == null ? "-unknown-" : _element.name; 4788 String toString() => _element == null ? "-unknown-" : _element.name;
4807 } 4789 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698