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

Side by Side Diff: pkg/compiler/lib/src/js_model/locals.dart

Issue 3002953002: Split getClosureRepresentationInfo into MemberEntity and (ir/ast) nodes (Closed)
Patch Set: Update cf. comments Created 3 years, 4 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) 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.js_model.locals; 5 library dart2js.js_model.locals;
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 JClosureClass; 9 import 'closure.dart' show JClosureClass;
10 import '../closure.dart'; 10 import '../closure.dart';
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 } 161 }
162 return new JLocal(name, currentMember); 162 return new JLocal(name, currentMember);
163 }); 163 });
164 } 164 }
165 165
166 @override 166 @override
167 CapturedLoopScope getCapturedLoopScope( 167 CapturedLoopScope getCapturedLoopScope(
168 ClosureDataLookup closureLookup, ir.TreeNode node) { 168 ClosureDataLookup closureLookup, ir.TreeNode node) {
169 return closureLookup.getCapturedLoopScope(node); 169 return closureLookup.getCapturedLoopScope(node);
170 } 170 }
171
172 @override
173 ClosureRepresentationInfo getClosureRepresentationInfo(
174 ClosureDataLookup closureLookup, ir.TreeNode node) {
175 return closureLookup.getClosureInfo(node);
176 }
171 } 177 }
172 178
173 class JumpVisitor extends ir.Visitor { 179 class JumpVisitor extends ir.Visitor {
174 int index = 0; 180 int index = 0;
175 final MemberEntity member; 181 final MemberEntity member;
176 final Map<ir.TreeNode, JJumpTarget> jumpTargetMap = 182 final Map<ir.TreeNode, JJumpTarget> jumpTargetMap =
177 <ir.TreeNode, JJumpTarget>{}; 183 <ir.TreeNode, JJumpTarget>{};
178 final Set<ir.BreakStatement> breaksAsContinue = new Set<ir.BreakStatement>(); 184 final Set<ir.BreakStatement> breaksAsContinue = new Set<ir.BreakStatement>();
179 185
180 JumpVisitor(this.member); 186 JumpVisitor(this.member);
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 sb.write(memberContext.enclosingClass.name); 312 sb.write(memberContext.enclosingClass.name);
307 sb.write('.'); 313 sb.write('.');
308 } 314 }
309 sb.write(memberContext.name); 315 sb.write(memberContext.name);
310 sb.write('#'); 316 sb.write('#');
311 sb.write(name); 317 sb.write(name);
312 sb.write(')'); 318 sb.write(')');
313 return sb.toString(); 319 return sb.toString();
314 } 320 }
315 } 321 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_model/closure.dart ('k') | pkg/compiler/lib/src/kernel/element_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698