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

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

Issue 2681783005: Support mixin application equivalence in impact_test. (Closed)
Patch Set: Created 3 years, 10 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/impact_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 import 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/backend_api.dart'; 8 import '../common/backend_api.dart';
9 import '../common/names.dart'; 9 import '../common/names.dart';
10 import '../compile_time_constants.dart'; 10 import '../compile_time_constants.dart';
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 throw new ArgumentError("No library found for $member"); 799 throw new ArgumentError("No library found for $member");
800 } 800 }
801 return builder._getLibrary(library); 801 return builder._getLibrary(library);
802 } 802 }
803 803
804 KLibrary getLibraryForFunction(KFunction function) => 804 KLibrary getLibraryForFunction(KFunction function) =>
805 _getLibrary(function, builder._methodMap); 805 _getLibrary(function, builder._methodMap);
806 806
807 KLibrary getLibraryForField(KField field) => 807 KLibrary getLibraryForField(KField field) =>
808 _getLibrary(field, builder._fieldMap); 808 _getLibrary(field, builder._fieldMap);
809
810 KClass getSuperclassForClass(KClass cls) {
811 KClassEnv env = builder._classEnvs[cls.classIndex];
812 ir.Supertype supertype = env.cls.supertype;
813 if (supertype == null) return null;
814 return builder.getClass(supertype.classNode);
815 }
816
817 InterfaceType getMixinTypeForClass(KClass cls) {
818 KClassEnv env = builder._classEnvs[cls.classIndex];
819 ir.Supertype mixedInType = env.cls.mixedInType;
820 if (mixedInType == null) return null;
821 return builder.createInterfaceType(
822 mixedInType.classNode, mixedInType.typeArguments);
823 }
809 } 824 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/kernel/impact_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698