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

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

Issue 730013003: Documentation to follow up on CLs 714843002 and 719443002. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased on r41772. Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | dart/pkg/dart2js_incremental/lib/library_updater.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 '../elements/elements.dart'; 7 import '../elements/elements.dart';
8 import '../dart2jslib.dart'; 8 import '../dart2jslib.dart';
9 import '../dart_types.dart'; 9 import '../dart_types.dart';
10 import '../types/types.dart'; 10 import '../types/types.dart';
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 hashCode) { 741 hashCode) {
742 assert(mask != null); 742 assert(mask != null);
743 assert(asUntyped.mask == null); 743 assert(asUntyped.mask == null);
744 } 744 }
745 745
746 static Map<Selector, Map<TypeMask, TypedSelector>> canonicalizedValues = 746 static Map<Selector, Map<TypeMask, TypedSelector>> canonicalizedValues =
747 new Map<Selector, Map<TypeMask, TypedSelector>>(); 747 new Map<Selector, Map<TypeMask, TypedSelector>>();
748 748
749 factory TypedSelector(TypeMask mask, Selector selector, World world) { 749 factory TypedSelector(TypeMask mask, Selector selector, World world) {
750 if (!world.hasClosedWorldAssumption) { 750 if (!world.hasClosedWorldAssumption) {
751 // TODO(johnniwinther): Improve use of TypedSelector in an open world.
751 bool isNullable = mask.isNullable; 752 bool isNullable = mask.isNullable;
752 mask = world.compiler.typesTask.dynamicType; 753 mask = world.compiler.typesTask.dynamicType;
753 if (isNullable) { 754 if (isNullable) {
754 mask = mask.nullable(); 755 mask = mask.nullable();
755 } 756 }
756 } 757 }
757 // TODO(johnniwinther): Allow more TypeSelector kinds during resoluton. 758 // TODO(johnniwinther): Allow more TypeSelector kinds during resoluton.
758 assert(world.isClosed || mask.isExact); 759 assert(world.isClosed || mask.isExact);
759 if (selector.mask == mask) return selector; 760 if (selector.mask == mask) return selector;
760 Selector untyped = selector.asUntyped; 761 Selector untyped = selector.asUntyped;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 804
804 Selector extendIfReachesAll(Compiler compiler) { 805 Selector extendIfReachesAll(Compiler compiler) {
805 bool canReachAll = compiler.enabledInvokeOn 806 bool canReachAll = compiler.enabledInvokeOn
806 && mask.needsNoSuchMethodHandling(this, compiler.world); 807 && mask.needsNoSuchMethodHandling(this, compiler.world);
807 return canReachAll 808 return canReachAll
808 ? new TypedSelector( 809 ? new TypedSelector(
809 compiler.typesTask.dynamicType, this, compiler.world) 810 compiler.typesTask.dynamicType, this, compiler.world)
810 : this; 811 : this;
811 } 812 }
812 } 813 }
OLDNEW
« no previous file with comments | « no previous file | dart/pkg/dart2js_incremental/lib/library_updater.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698