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

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

Issue 2918913003: Handle list and map literals (Closed)
Patch Set: Updated cf. comments Created 3 years, 6 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.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 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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 _ensureSupertypes(cls, env); 542 _ensureSupertypes(cls, env);
543 return env.orderedTypeSet; 543 return env.orderedTypeSet;
544 } 544 }
545 545
546 int _getHierarchyDepth(KClass cls) { 546 int _getHierarchyDepth(KClass cls) {
547 _KClassEnv env = _classEnvs[cls.classIndex]; 547 _KClassEnv env = _classEnvs[cls.classIndex];
548 _ensureSupertypes(cls, env); 548 _ensureSupertypes(cls, env);
549 return env.orderedTypeSet.maxDepth; 549 return env.orderedTypeSet.maxDepth;
550 } 550 }
551 551
552 InterfaceType _substByContext(InterfaceType type, InterfaceType context) { 552 DartType _substByContext(DartType type, InterfaceType context) {
553 return type.subst( 553 return type.subst(
554 context.typeArguments, _getThisType(context.element).typeArguments); 554 context.typeArguments, _getThisType(context.element).typeArguments);
555 } 555 }
556 556
557 InterfaceType _getSuperType(KClass cls) { 557 InterfaceType _getSuperType(KClass cls) {
558 _KClassEnv env = _classEnvs[cls.classIndex]; 558 _KClassEnv env = _classEnvs[cls.classIndex];
559 _ensureSupertypes(cls, env); 559 _ensureSupertypes(cls, env);
560 return env.supertype; 560 return env.supertype;
561 } 561 }
562 562
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
1547 return node.isExternal && 1547 return node.isExternal &&
1548 !elementMap.isForeignLibrary(node.enclosingLibrary); 1548 !elementMap.isForeignLibrary(node.enclosingLibrary);
1549 } 1549 }
1550 1550
1551 @override 1551 @override
1552 bool isJsInteropMember(MemberEntity element) { 1552 bool isJsInteropMember(MemberEntity element) {
1553 // TODO(johnniwinther): Compute this. 1553 // TODO(johnniwinther): Compute this.
1554 return false; 1554 return false;
1555 } 1555 }
1556 } 1556 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/type_test_registry.dart ('k') | pkg/compiler/lib/src/kernel/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698