| 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 import 'package:kernel/ast.dart' as ir; | 5 import 'package:kernel/ast.dart' as ir; |
| 6 | 6 |
| 7 import '../closure.dart'; | 7 import '../closure.dart'; |
| 8 import '../common.dart'; | 8 import '../common.dart'; |
| 9 import '../constants/values.dart'; | 9 import '../constants/values.dart'; |
| 10 import '../common_elements.dart'; | 10 import '../common_elements.dart'; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 /// Returns the [ConstructorEntity] corresponding to the generative or factory | 57 /// Returns the [ConstructorEntity] corresponding to the generative or factory |
| 58 /// constructor [node]. | 58 /// constructor [node]. |
| 59 ConstructorEntity getConstructor(ir.Member node); | 59 ConstructorEntity getConstructor(ir.Member node); |
| 60 | 60 |
| 61 /// Returns the [FieldEntity] corresponding to the field [node]. | 61 /// Returns the [FieldEntity] corresponding to the field [node]. |
| 62 FieldEntity getField(ir.Field node); | 62 FieldEntity getField(ir.Field node); |
| 63 | 63 |
| 64 /// Returns the [ClassEntity] corresponding to the class [node]. | 64 /// Returns the [ClassEntity] corresponding to the class [node]. |
| 65 ClassEntity getClass(ir.Class node); | 65 ClassEntity getClass(ir.Class node); |
| 66 | 66 |
| 67 /// Returns the [TypedefType] corresponding to raw type of the typedef [node]. |
| 68 TypedefType getTypedefType(ir.Typedef node); |
| 69 |
| 67 /// Returns the super [MemberEntity] for a super invocation, get or set of | 70 /// Returns the super [MemberEntity] for a super invocation, get or set of |
| 68 /// [name] from the member [context]. | 71 /// [name] from the member [context]. |
| 69 /// | 72 /// |
| 70 /// The IR doesn't always resolve super accesses to the corresponding | 73 /// The IR doesn't always resolve super accesses to the corresponding |
| 71 /// [target]. If not, the target is computed using [name] and [setter] from | 74 /// [target]. If not, the target is computed using [name] and [setter] from |
| 72 /// the enclosing class of [context]. | 75 /// the enclosing class of [context]. |
| 73 MemberEntity getSuperMember(ir.Member context, ir.Name name, ir.Member target, | 76 MemberEntity getSuperMember(ir.Member context, ir.Name name, ir.Member target, |
| 74 {bool setter: false}); | 77 {bool setter: false}); |
| 75 | 78 |
| 76 /// Returns the [Name] corresponding to [name]. | 79 /// Returns the [Name] corresponding to [name]. |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 uri = Uri.parse(node.location.file); | 448 uri = Uri.parse(node.location.file); |
| 446 break; | 449 break; |
| 447 } | 450 } |
| 448 node = node.parent; | 451 node = node.parent; |
| 449 } | 452 } |
| 450 if (uri != null) { | 453 if (uri != null) { |
| 451 return new SourceSpan(uri, offset, offset + 1); | 454 return new SourceSpan(uri, offset, offset + 1); |
| 452 } | 455 } |
| 453 return null; | 456 return null; |
| 454 } | 457 } |
| OLD | NEW |