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

Side by Side Diff: pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart

Issue 2890153002: Handle super accesses loaded from .dill (Closed)
Patch Set: Created 3 years, 7 months 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
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map_impl.dart ('k') | pkg/compiler/lib/src/ssa/kernel_impact.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698