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

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

Issue 2982733002: Use entities in most of MirrorsData (Closed)
Patch Set: Created 3 years, 5 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.kernel.env; 5 library dart2js.kernel.env;
6 6
7 import 'package:kernel/ast.dart' as ir; 7 import 'package:kernel/ast.dart' as ir;
8 import 'package:kernel/clone.dart'; 8 import 'package:kernel/clone.dart';
9 import 'package:kernel/type_algebra.dart'; 9 import 'package:kernel/type_algebra.dart';
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 for (ir.Member member in _setterMap.values) { 139 for (ir.Member member in _setterMap.values) {
140 if (member is ir.Procedure) { 140 if (member is ir.Procedure) {
141 f(member); 141 f(member);
142 } else { 142 } else {
143 // Skip fields; these are also in _memberMap. 143 // Skip fields; these are also in _memberMap.
144 } 144 }
145 } 145 }
146 } 146 }
147 } 147 }
148 148
149 class LibraryData {
150 final ir.Library library;
151 Iterable<ConstantValue> _metadata;
152
153 LibraryData(this.library);
154
155 Iterable<ConstantValue> getMetadata(KernelToElementMapBase elementMap) {
156 return _metadata ??= elementMap.getMetadata(library.annotations);
157 }
158
159 LibraryData copy() {
160 return new LibraryData(library);
161 }
162 }
163
149 /// Environment for fast lookup of class members. 164 /// Environment for fast lookup of class members.
150 class ClassEnv { 165 class ClassEnv {
151 final ir.Class cls; 166 final ir.Class cls;
152 final bool isUnnamedMixinApplication; 167 final bool isUnnamedMixinApplication;
153 168
154 Map<String, ir.Member> _constructorMap; 169 Map<String, ir.Member> _constructorMap;
155 Map<String, ir.Member> _memberMap; 170 Map<String, ir.Member> _memberMap;
156 Map<String, ir.Member> _setterMap; 171 Map<String, ir.Member> _setterMap;
157 172
158 ClassEnv(this.cls) 173 ClassEnv(this.cls)
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 } 454 }
440 } 455 }
441 return _constant; 456 return _constant;
442 } 457 }
443 458
444 @override 459 @override
445 FieldData copy() { 460 FieldData copy() {
446 return new FieldData(node); 461 return new FieldData(node);
447 } 462 }
448 } 463 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map_impl.dart ('k') | pkg/compiler/lib/src/kernel/kernel_strategy.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698