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

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

Issue 3001823002: Revert "Various redemptions" (Closed)
Patch Set: 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
« no previous file with comments | « pkg/compiler/lib/src/js_model/closure.dart ('k') | pkg/compiler/lib/src/kernel/env.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 '../closure.dart' show BoxLocal; 9 import '../closure.dart' show BoxLocal;
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 _ensureThisAndRawType(cls, data); 612 _ensureThisAndRawType(cls, data);
613 return data.rawType; 613 return data.rawType;
614 } 614 }
615 615
616 FunctionType _getFunctionType(IndexedFunction function) { 616 FunctionType _getFunctionType(IndexedFunction function) {
617 assert(checkFamily(function)); 617 assert(checkFamily(function));
618 FunctionData data = _memberData[function.memberIndex]; 618 FunctionData data = _memberData[function.memberIndex];
619 return data.getFunctionType(this); 619 return data.getFunctionType(this);
620 } 620 }
621 621
622 DartType _getFieldType(IndexedField field) {
623 assert(checkFamily(field));
624 FieldData data = _memberData[field.memberIndex];
625 return data.getFieldType(this);
626 }
627
628 ClassEntity _getAppliedMixin(IndexedClass cls) { 622 ClassEntity _getAppliedMixin(IndexedClass cls) {
629 assert(checkFamily(cls)); 623 assert(checkFamily(cls));
630 ClassData data = _classData[cls.classIndex]; 624 ClassData data = _classData[cls.classIndex];
631 _ensureSupertypes(cls, data); 625 _ensureSupertypes(cls, data);
632 return data.mixedInType?.element; 626 return data.mixedInType?.element;
633 } 627 }
634 628
635 bool _isMixinApplication(IndexedClass cls) { 629 bool _isMixinApplication(IndexedClass cls) {
636 assert(checkFamily(cls)); 630 assert(checkFamily(cls));
637 ClassData data = _classData[cls.classIndex]; 631 ClassData data = _classData[cls.classIndex];
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 ClassEntity cls, List<DartType> typeArguments) { 1330 ClassEntity cls, List<DartType> typeArguments) {
1337 return new InterfaceType(cls, typeArguments); 1331 return new InterfaceType(cls, typeArguments);
1338 } 1332 }
1339 1333
1340 @override 1334 @override
1341 FunctionType getFunctionType(FunctionEntity function) { 1335 FunctionType getFunctionType(FunctionEntity function) {
1342 return elementMap._getFunctionType(function); 1336 return elementMap._getFunctionType(function);
1343 } 1337 }
1344 1338
1345 @override 1339 @override
1346 DartType getFieldType(FieldEntity field) {
1347 return elementMap._getFieldType(field);
1348 }
1349
1350 @override
1351 FunctionType getLocalFunctionType(covariant KLocalFunction function) { 1340 FunctionType getLocalFunctionType(covariant KLocalFunction function) {
1352 return function.functionType; 1341 return function.functionType;
1353 } 1342 }
1354 1343
1355 @override 1344 @override
1356 DartType getUnaliasedType(DartType type) => type; 1345 DartType getUnaliasedType(DartType type) => type;
1357 1346
1358 @override 1347 @override
1359 ConstructorEntity lookupConstructor(ClassEntity cls, String name, 1348 ConstructorEntity lookupConstructor(ClassEntity cls, String name,
1360 {bool required: false}) { 1349 {bool required: false}) {
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
2321 /// 2310 ///
2322 /// These names are not used in generated code, just as element name. 2311 /// These names are not used in generated code, just as element name.
2323 String _getClosureVariableName(String name, int id) { 2312 String _getClosureVariableName(String name, int id) {
2324 return "_captured_${name}_$id"; 2313 return "_captured_${name}_$id";
2325 } 2314 }
2326 2315
2327 String getDeferredUri(ir.LibraryDependency node) { 2316 String getDeferredUri(ir.LibraryDependency node) {
2328 throw new UnimplementedError('JsKernelToElementMap.getDeferredUri'); 2317 throw new UnimplementedError('JsKernelToElementMap.getDeferredUri');
2329 } 2318 }
2330 } 2319 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_model/closure.dart ('k') | pkg/compiler/lib/src/kernel/env.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698