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 'package:js_runtime/shared/embedded_names.dart'; | 5 import 'package:js_runtime/shared/embedded_names.dart'; |
6 import 'package:kernel/ast.dart' as ir; | 6 import 'package:kernel/ast.dart' as ir; |
7 | 7 |
8 import '../closure.dart'; | 8 import '../closure.dart'; |
9 import '../common.dart'; | 9 import '../common.dart'; |
10 import '../compiler.dart'; | 10 import '../compiler.dart'; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 message: "No element found for $node.")); | 175 message: "No element found for $node.")); |
176 return result; | 176 return result; |
177 } | 177 } |
178 | 178 |
179 ConstructorElement getConstructor(ir.Member node) => | 179 ConstructorElement getConstructor(ir.Member node) => |
180 getElement(node).declaration; | 180 getElement(node).declaration; |
181 | 181 |
182 @override | 182 @override |
183 ConstructorEntity getSuperConstructor( | 183 ConstructorEntity getSuperConstructor( |
184 ir.Constructor constructor, ir.Member target) { | 184 ir.Constructor constructor, ir.Member target) { |
| 185 assert(target != null); |
185 return getConstructor(target); | 186 return getConstructor(target); |
186 } | 187 } |
187 | 188 |
| 189 @override |
| 190 MemberEntity getSuperMember(ir.Member context, ir.Name name, ir.Member target, |
| 191 {bool setter: false}) { |
| 192 assert(target != null); |
| 193 return getMember(target); |
| 194 } |
| 195 |
188 MemberElement getMember(ir.Member node) => getElement(node).declaration; | 196 MemberElement getMember(ir.Member node) => getElement(node).declaration; |
189 | 197 |
190 MethodElement getMethod(ir.Procedure node) => getElement(node).declaration; | 198 MethodElement getMethod(ir.Procedure node) => getElement(node).declaration; |
191 | 199 |
192 FieldElement getField(ir.Field node) => getElement(node).declaration; | 200 FieldElement getField(ir.Field node) => getElement(node).declaration; |
193 | 201 |
194 ClassElement getClass(ir.Class node) => getElement(node).declaration; | 202 ClassElement getClass(ir.Class node) => getElement(node).declaration; |
195 | 203 |
196 LibraryElement getLibrary(ir.Library node) => getElement(node).declaration; | 204 LibraryElement getLibrary(ir.Library node) => getElement(node).declaration; |
197 | 205 |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
829 JumpTarget continueTarget = | 837 JumpTarget continueTarget = |
830 astAdapter.getJumpTarget(switchCase, isContinueTarget: true); | 838 astAdapter.getJumpTarget(switchCase, isContinueTarget: true); |
831 assert(continueTarget is KernelJumpTarget); | 839 assert(continueTarget is KernelJumpTarget); |
832 targetIndexMap[continueTarget] = switchIndex; | 840 targetIndexMap[continueTarget] = switchIndex; |
833 assert(builder.jumpTargets[continueTarget] == null); | 841 assert(builder.jumpTargets[continueTarget] == null); |
834 builder.jumpTargets[continueTarget] = this; | 842 builder.jumpTargets[continueTarget] = this; |
835 switchIndex++; | 843 switchIndex++; |
836 } | 844 } |
837 } | 845 } |
838 } | 846 } |
OLD | NEW |