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

Side by Side Diff: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart

Issue 2967153002: Change MemberTypeInformation.member type to MemberEntity (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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 compiler.src.inferrer.type_graph_nodes; 5 library compiler.src.inferrer.type_graph_nodes;
6 6
7 import 'dart:collection' show IterableBase; 7 import 'dart:collection' show IterableBase;
8 8
9 import '../common.dart'; 9 import '../common.dart';
10 import '../common/names.dart' show Identifiers; 10 import '../common/names.dart' show Identifiers;
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 * A call site is either an AST [ast.Node], an [Element] (see uses of 386 * A call site is either an AST [ast.Node], an [Element] (see uses of
387 * [synthesizeForwardingCall] in [SimpleTypeInferrerVisitor]). 387 * [synthesizeForwardingCall] in [SimpleTypeInferrerVisitor]).
388 * 388 *
389 * The global information is summarized in [cleanup], after which [_callers] 389 * The global information is summarized in [cleanup], after which [_callers]
390 * is set to `null`. 390 * is set to `null`.
391 */ 391 */
392 Map<MemberEntity, Setlet<Spannable>> _callers; 392 Map<MemberEntity, Setlet<Spannable>> _callers;
393 393
394 MemberTypeInformation._internal(this._member) : super._internal(null); 394 MemberTypeInformation._internal(this._member) : super._internal(null);
395 395
396 MemberElement get member => _member; 396 MemberEntity get member => _member;
397 397
398 String get debugName => '$member'; 398 String get debugName => '$member';
399 399
400 void addCall(MemberEntity caller, Spannable node) { 400 void addCall(MemberEntity caller, Spannable node) {
401 assert(node is ast.Node || node is Element); 401 assert(node is ast.Node || node is Element);
402 _callers ??= <MemberEntity, Setlet<Spannable>>{}; 402 _callers ??= <MemberEntity, Setlet<Spannable>>{};
403 _callers.putIfAbsent(caller, () => new Setlet()).add(node); 403 _callers.putIfAbsent(caller, () => new Setlet()).add(node);
404 } 404 }
405 405
406 void removeCall(MemberEntity caller, node) { 406 void removeCall(MemberEntity caller, node) {
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
1889 // TODO(ngeoffray): Narrow to bound. 1889 // TODO(ngeoffray): Narrow to bound.
1890 return type; 1890 return type;
1891 } else { 1891 } else {
1892 ResolutionInterfaceType interfaceType = annotation; 1892 ResolutionInterfaceType interfaceType = annotation;
1893 otherType = new TypeMask.nonNullSubtype(interfaceType.element, closedWorld); 1893 otherType = new TypeMask.nonNullSubtype(interfaceType.element, closedWorld);
1894 } 1894 }
1895 if (isNullable) otherType = otherType.nullable(); 1895 if (isNullable) otherType = otherType.nullable();
1896 if (type == null) return otherType; 1896 if (type == null) return otherType;
1897 return type.intersection(otherType, closedWorld); 1897 return type.intersection(otherType, closedWorld);
1898 } 1898 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/node_tracer.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698