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

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

Issue 2997843002: Implement methods in KernelClosedWorldMixin (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_emitter/program_builder/program_builder.dart ('k') | no next file » | 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 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 if (element.isAbstract) { 1588 if (element.isAbstract) {
1589 ClassEntity enclosingClass = element.enclosingClass; 1589 ClassEntity enclosingClass = element.enclosingClass;
1590 return hasConcreteMatch( 1590 return hasConcreteMatch(
1591 elementEnvironment.getSuperClass(enclosingClass), selector); 1591 elementEnvironment.getSuperClass(enclosingClass), selector);
1592 } 1592 }
1593 return selector.appliesUntyped(element); 1593 return selector.appliesUntyped(element);
1594 } 1594 }
1595 1595
1596 @override 1596 @override
1597 bool isNamedMixinApplication(ClassEntity cls) { 1597 bool isNamedMixinApplication(ClassEntity cls) {
1598 throw new UnimplementedError( 1598 return elementMap._isMixinApplication(cls) &&
1599 'KernelClosedWorldMixin.isNamedMixinApplication'); 1599 elementMap._isUnnamedMixinApplication(cls);
1600 } 1600 }
1601 1601
1602 @override 1602 @override
1603 ClassEntity getAppliedMixin(ClassEntity cls) { 1603 ClassEntity getAppliedMixin(ClassEntity cls) {
1604 throw new UnimplementedError('KernelClosedWorldMixin.getAppliedMixin'); 1604 return elementMap._getAppliedMixin(cls);
1605 } 1605 }
1606 1606
1607 @override 1607 @override
1608 Iterable<ClassEntity> getInterfaces(ClassEntity cls) { 1608 Iterable<ClassEntity> getInterfaces(ClassEntity cls) {
1609 throw new UnimplementedError('KernelClosedWorldMixin.getInterfaces'); 1609 return elementMap._getInterfaces(cls).map((t) => t.element);
1610 } 1610 }
1611 1611
1612 @override 1612 @override
1613 ClassEntity getSuperClass(ClassEntity cls) { 1613 ClassEntity getSuperClass(ClassEntity cls) {
1614 return elementMap._getSuperType(cls)?.element; 1614 return elementMap._getSuperType(cls)?.element;
1615 } 1615 }
1616 1616
1617 @override 1617 @override
1618 int getHierarchyDepth(ClassEntity cls) { 1618 int getHierarchyDepth(ClassEntity cls) {
1619 return elementMap._getHierarchyDepth(cls); 1619 return elementMap._getHierarchyDepth(cls);
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
2153 /// 2153 ///
2154 /// These names are not used in generated code, just as element name. 2154 /// These names are not used in generated code, just as element name.
2155 String _getClosureVariableName(String name, int id) { 2155 String _getClosureVariableName(String name, int id) {
2156 return "_captured_${name}_$id"; 2156 return "_captured_${name}_$id";
2157 } 2157 }
2158 2158
2159 String getDeferredUri(ir.LibraryDependency node) { 2159 String getDeferredUri(ir.LibraryDependency node) {
2160 throw new UnimplementedError('JsKernelToElementMap.getDeferredUri'); 2160 throw new UnimplementedError('JsKernelToElementMap.getDeferredUri');
2161 } 2161 }
2162 } 2162 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698