| OLD | NEW |
| 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 import 'dart:collection'; | 5 import 'dart:collection'; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/ast/standard_ast_factory.dart'; | 8 import 'package:analyzer/dart/ast/standard_ast_factory.dart'; |
| 9 import 'package:analyzer/dart/ast/token.dart'; | 9 import 'package:analyzer/dart/ast/token.dart'; |
| 10 import 'package:analyzer/dart/element/element.dart'; | 10 import 'package:analyzer/dart/element/element.dart'; |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 * member exists | 154 * member exists |
| 155 */ | 155 */ |
| 156 ExecutableElement lookupInheritance( | 156 ExecutableElement lookupInheritance( |
| 157 ClassElement classElt, String memberName) { | 157 ClassElement classElt, String memberName) { |
| 158 if (memberName == null || memberName.isEmpty) { | 158 if (memberName == null || memberName.isEmpty) { |
| 159 return null; | 159 return null; |
| 160 } | 160 } |
| 161 ExecutableElement executable = _computeClassChainLookupMap( | 161 ExecutableElement executable = _computeClassChainLookupMap( |
| 162 classElt, new HashSet<ClassElement>())[memberName]; | 162 classElt, new HashSet<ClassElement>())[memberName]; |
| 163 if (executable == null) { | 163 if (executable == null) { |
| 164 return _computeInterfaceLookupMap(classElt, new HashSet<ClassElement>())[ | 164 return _computeInterfaceLookupMap( |
| 165 memberName]; | 165 classElt, new HashSet<ClassElement>())[memberName]; |
| 166 } | 166 } |
| 167 return executable; | 167 return executable; |
| 168 } | 168 } |
| 169 | 169 |
| 170 /** | 170 /** |
| 171 * Given some [ClassElement] and some member name, this returns the | 171 * Given some [ClassElement] and some member name, this returns the |
| 172 * [ExecutableElement] that the class either declares itself, or | 172 * [ExecutableElement] that the class either declares itself, or |
| 173 * inherits, that has the member name, if no member is inherited `null` is ret
urned. | 173 * inherits, that has the member name, if no member is inherited `null` is ret
urned. |
| 174 * | 174 * |
| 175 * @param classElt the class element to query | 175 * @param classElt the class element to query |
| (...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1248 } | 1248 } |
| 1249 | 1249 |
| 1250 /** | 1250 /** |
| 1251 * Initializes [keys] and [values]. | 1251 * Initializes [keys] and [values]. |
| 1252 */ | 1252 */ |
| 1253 void _initArrays(int initialCapacity) { | 1253 void _initArrays(int initialCapacity) { |
| 1254 _keys = new List<String>(initialCapacity); | 1254 _keys = new List<String>(initialCapacity); |
| 1255 _values = new List<ExecutableElement>(initialCapacity); | 1255 _values = new List<ExecutableElement>(initialCapacity); |
| 1256 } | 1256 } |
| 1257 } | 1257 } |
| OLD | NEW |