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

Side by Side Diff: pkg/compiler/lib/src/kernel/element_map.dart

Issue 2848553002: Include setters in KClassEnv.forEachClassMember (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
« no previous file with comments | « no previous file | tests/compiler/dart2js/kernel/closed_world2_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.kernel.element_map; 5 library dart2js.kernel.element_map;
6 6
7 import 'package:kernel/ast.dart' as ir; 7 import 'package:kernel/ast.dart' as ir;
8 8
9 import '../common.dart'; 9 import '../common.dart';
10 import '../common/resolution.dart'; 10 import '../common/resolution.dart';
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 759
760 /// Return the [ir.Member] for the member [name] in [library]. 760 /// Return the [ir.Member] for the member [name] in [library].
761 ir.Member lookupConstructor(String name) { 761 ir.Member lookupConstructor(String name) {
762 _ensureMaps(); 762 _ensureMaps();
763 return _constructorMap[name]; 763 return _constructorMap[name];
764 } 764 }
765 765
766 void forEachMember(f(ir.Member member)) { 766 void forEachMember(f(ir.Member member)) {
767 _ensureMaps(); 767 _ensureMaps();
768 _memberMap.values.forEach(f); 768 _memberMap.values.forEach(f);
769 for (ir.Member member in _setterMap.values) {
770 if (member is ir.Procedure) {
771 f(member);
772 } else {
773 // Skip fields; these are also in _memberMap.
774 }
775 }
769 } 776 }
770 777
771 Iterable<ConstantExpression> getMetadata(KernelToElementMap worldBuilder) { 778 Iterable<ConstantExpression> getMetadata(KernelToElementMap worldBuilder) {
772 if (_metadata == null) { 779 if (_metadata == null) {
773 _metadata = worldBuilder.getMetadata(cls.annotations); 780 _metadata = worldBuilder.getMetadata(cls.annotations);
774 } 781 }
775 return _metadata; 782 return _metadata;
776 } 783 }
777 } 784 }
778 785
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 } 1271 }
1265 1272
1266 InterfaceType getMixinTypeForClass(KClass cls) { 1273 InterfaceType getMixinTypeForClass(KClass cls) {
1267 _KClassEnv env = builder._classEnvs[cls.classIndex]; 1274 _KClassEnv env = builder._classEnvs[cls.classIndex];
1268 ir.Supertype mixedInType = env.cls.mixedInType; 1275 ir.Supertype mixedInType = env.cls.mixedInType;
1269 if (mixedInType == null) return null; 1276 if (mixedInType == null) return null;
1270 return builder.createInterfaceType( 1277 return builder.createInterfaceType(
1271 mixedInType.classNode, mixedInType.typeArguments); 1278 mixedInType.classNode, mixedInType.typeArguments);
1272 } 1279 }
1273 } 1280 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/kernel/closed_world2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698