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

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

Issue 2425933002: Revert "Change TypeInference to handle super calls as direct invocations." and "Optimize needNoSuch… (Closed)
Patch Set: Created 4 years, 2 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/universe/use.dart ('k') | pkg/compiler/lib/src/world.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 universe; 5 library universe;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import '../common.dart'; 9 import '../common.dart';
10 import '../compiler.dart' show Compiler; 10 import '../compiler.dart' show Compiler;
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 ClassElement cls = type.element; 512 ClassElement cls = type.element;
513 if (!cls.isAbstract 513 if (!cls.isAbstract
514 // We can't use the closed-world assumption with native abstract 514 // We can't use the closed-world assumption with native abstract
515 // classes; a native abstract class may have non-abstract subclasses 515 // classes; a native abstract class may have non-abstract subclasses
516 // not declared to the program. Instances of these classes are 516 // not declared to the program. Instances of these classes are
517 // indistinguishable from the abstract class. 517 // indistinguishable from the abstract class.
518 || 518 ||
519 isNative 519 isNative
520 // Likewise, if this registration comes from the mirror system, 520 // Likewise, if this registration comes from the mirror system,
521 // all bets are off. 521 // all bets are off.
522 // TODO(herhut): Track classes required by mirrors separately. 522 // TODO(herhut): Track classes required by mirrors seperately.
523 || 523 ||
524 byMirrors) { 524 byMirrors) {
525 _directlyInstantiatedClasses.add(cls); 525 _directlyInstantiatedClasses.add(cls);
526 } 526 }
527 527
528 // TODO(johnniwinther): Replace this by separate more specific mappings that 528 // TODO(johnniwinther): Replace this by separate more specific mappings that
529 // include the type arguments. 529 // include the type arguments.
530 if (_implementedClasses.add(cls)) { 530 if (_implementedClasses.add(cls)) {
531 onImplemented(cls); 531 onImplemented(cls);
532 cls.allSupertypes.forEach((InterfaceType supertype) { 532 cls.allSupertypes.forEach((InterfaceType supertype) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 657
658 void forgetElement(Element element, Compiler compiler) { 658 void forgetElement(Element element, Compiler compiler) {
659 _directlyInstantiatedClasses.remove(element); 659 _directlyInstantiatedClasses.remove(element);
660 if (element is ClassElement) { 660 if (element is ClassElement) {
661 assert(invariant(element, element.thisType.isRaw, 661 assert(invariant(element, element.thisType.isRaw,
662 message: 'Generic classes not supported (${element.thisType}).')); 662 message: 'Generic classes not supported (${element.thisType}).'));
663 _instantiatedTypes..remove(element.rawType)..remove(element.thisType); 663 _instantiatedTypes..remove(element.rawType)..remove(element.thisType);
664 } 664 }
665 } 665 }
666 } 666 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/universe/use.dart ('k') | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698