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

Side by Side Diff: pkg/compiler/lib/src/inferrer/builder_kernel.dart

Issue 2938853004: Rename ClosureClassMaps to ClosureDataLookup (Closed)
Patch Set: . Created 3 years, 6 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 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 '../compiler.dart'; 8 import '../compiler.dart';
9 import '../elements/elements.dart'; 9 import '../elements/elements.dart';
10 import '../elements/entities.dart'; 10 import '../elements/entities.dart';
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // Eagerly bailout, because computing the closure data only 96 // Eagerly bailout, because computing the closure data only
97 // works for functions and field assignments. 97 // works for functions and field assignments.
98 return types.nullType; 98 return types.nullType;
99 } 99 }
100 } 100 }
101 101
102 // Update the locals that are boxed in [locals]. These locals will 102 // Update the locals that are boxed in [locals]. These locals will
103 // be handled specially, in that we are computing their LUB at 103 // be handled specially, in that we are computing their LUB at
104 // each update, and reading them yields the type that was found in a 104 // each update, and reading them yields the type that was found in a
105 // previous analysis of [outermostElement]. 105 // previous analysis of [outermostElement].
106 ClosureRepresentationInfo closureData = compiler.closureToClassMapper 106 ClosureRepresentationInfo closureData = compiler.closureDataLookup
107 .getClosureRepresentationInfo(resolvedAst.element); 107 .getClosureRepresentationInfo(resolvedAst.element);
108 closureData.forEachCapturedVariable((variable, field) { 108 closureData.forEachCapturedVariable((variable, field) {
109 locals.setCaptured(variable, field); 109 locals.setCaptured(variable, field);
110 }); 110 });
111 closureData.forEachBoxedVariable((variable, field) { 111 closureData.forEachBoxedVariable((variable, field) {
112 locals.setCapturedAndBoxed(variable, field); 112 locals.setCapturedAndBoxed(variable, field);
113 }); 113 });
114 114
115 if (analyzedNode is ir.Field) { 115 if (analyzedNode is ir.Field) {
116 return initializer.accept(this); 116 return initializer.accept(this);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 : types.simplifyPhi(null, null, elementType); 162 : types.simplifyPhi(null, null, elementType);
163 TypeInformation containerType = 163 TypeInformation containerType =
164 listLiteral.isConst ? types.constListType : types.growableListType; 164 listLiteral.isConst ? types.constListType : types.growableListType;
165 // TODO(efortuna): Change signature of allocateList and the rest of 165 // TODO(efortuna): Change signature of allocateList and the rest of
166 // type_system to deal with Kernel elements. 166 // type_system to deal with Kernel elements.
167 return types.allocateList(containerType, astAdapter.getNode(listLiteral), 167 return types.allocateList(containerType, astAdapter.getNode(listLiteral),
168 outermostElement, elementType, length); 168 outermostElement, elementType, length);
169 }); 169 });
170 } 170 }
171 } 171 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/builder.dart ('k') | pkg/compiler/lib/src/js_backend/element_strategy.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698