| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 dart2js.kernel.element_map; | 5 library dart2js.kernel.element_map; |
| 6 | 6 |
| 7 import 'package:kernel/ast.dart' as ir; | 7 import 'package:kernel/ast.dart' as ir; |
| 8 | 8 |
| 9 import '../closure.dart' show BoxLocal; | 9 import '../closure.dart' show BoxLocal; |
| 10 import '../common.dart'; | 10 import '../common.dart'; |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 IndexedClass superclass = _getSuperType(cls)?.element; | 359 IndexedClass superclass = _getSuperType(cls)?.element; |
| 360 while (superclass != null) { | 360 while (superclass != null) { |
| 361 ClassEnv env = _classEnvs[superclass.classIndex]; | 361 ClassEnv env = _classEnvs[superclass.classIndex]; |
| 362 MemberEntity superMember = | 362 MemberEntity superMember = |
| 363 env.lookupMember(this, name.name, setter: setter); | 363 env.lookupMember(this, name.name, setter: setter); |
| 364 if (superMember != null) { | 364 if (superMember != null) { |
| 365 return superMember; | 365 return superMember; |
| 366 } | 366 } |
| 367 superclass = _getSuperType(superclass)?.element; | 367 superclass = _getSuperType(superclass)?.element; |
| 368 } | 368 } |
| 369 throw failedAt(cls, "No super method member found for ${name} in $cls."); | 369 return null; |
| 370 } | 370 } |
| 371 | 371 |
| 372 @override | 372 @override |
| 373 ConstructorEntity getConstructor(ir.Member node) => _getConstructor(node); | 373 ConstructorEntity getConstructor(ir.Member node) => _getConstructor(node); |
| 374 | 374 |
| 375 ConstructorEntity _getConstructor(ir.Member node); | 375 ConstructorEntity _getConstructor(ir.Member node); |
| 376 | 376 |
| 377 ConstructorEntity getSuperConstructor( | 377 ConstructorEntity getSuperConstructor( |
| 378 ir.Constructor sourceNode, ir.Member targetNode) { | 378 ir.Constructor sourceNode, ir.Member targetNode) { |
| 379 ConstructorEntity source = getConstructor(sourceNode); | 379 ConstructorEntity source = getConstructor(sourceNode); |
| (...skipping 1941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2321 /// | 2321 /// |
| 2322 /// These names are not used in generated code, just as element name. | 2322 /// These names are not used in generated code, just as element name. |
| 2323 String _getClosureVariableName(String name, int id) { | 2323 String _getClosureVariableName(String name, int id) { |
| 2324 return "_captured_${name}_$id"; | 2324 return "_captured_${name}_$id"; |
| 2325 } | 2325 } |
| 2326 | 2326 |
| 2327 String getDeferredUri(ir.LibraryDependency node) { | 2327 String getDeferredUri(ir.LibraryDependency node) { |
| 2328 throw new UnimplementedError('JsKernelToElementMap.getDeferredUri'); | 2328 throw new UnimplementedError('JsKernelToElementMap.getDeferredUri'); |
| 2329 } | 2329 } |
| 2330 } | 2330 } |
| OLD | NEW |