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

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

Issue 1151163004: Implementation of null-aware operators. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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/typechecker.dart ('k') | pkg/compiler/lib/src/warnings.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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 static const Name CALL_NAME = const PublicName(Compiler.CALL_OPERATOR_NAME); 537 static const Name CALL_NAME = const PublicName(Compiler.CALL_OPERATOR_NAME);
538 538
539 Selector.internal(this.kind, 539 Selector.internal(this.kind,
540 this.memberName, 540 this.memberName,
541 this.callStructure, 541 this.callStructure,
542 this.hashCode) { 542 this.hashCode) {
543 assert(kind == SelectorKind.INDEX || 543 assert(kind == SelectorKind.INDEX ||
544 (memberName != INDEX_NAME && memberName != INDEX_SET_NAME)); 544 (memberName != INDEX_NAME && memberName != INDEX_SET_NAME));
545 assert(kind == SelectorKind.OPERATOR || 545 assert(kind == SelectorKind.OPERATOR ||
546 kind == SelectorKind.INDEX || 546 kind == SelectorKind.INDEX ||
547 !Elements.isOperatorName(memberName.text)); 547 !Elements.isOperatorName(memberName.text) ||
548 identical(memberName.text, '??'));
548 assert(kind == SelectorKind.CALL || 549 assert(kind == SelectorKind.CALL ||
549 kind == SelectorKind.GETTER || 550 kind == SelectorKind.GETTER ||
550 kind == SelectorKind.SETTER || 551 kind == SelectorKind.SETTER ||
551 Elements.isOperatorName(memberName.text)); 552 Elements.isOperatorName(memberName.text) ||
553 identical(memberName.text, '??'));
552 } 554 }
553 555
554 // TODO(johnniwinther): Extract caching. 556 // TODO(johnniwinther): Extract caching.
555 static Map<int, List<Selector>> canonicalizedValues = 557 static Map<int, List<Selector>> canonicalizedValues =
556 new Map<int, List<Selector>>(); 558 new Map<int, List<Selector>>();
557 559
558 factory Selector(SelectorKind kind, 560 factory Selector(SelectorKind kind,
559 Name name, 561 Name name,
560 CallStructure callStructure) { 562 CallStructure callStructure) {
561 // TODO(johnniwinther): Maybe use equality instead of implicit hashing. 563 // TODO(johnniwinther): Maybe use equality instead of implicit hashing.
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 862
861 Selector extendIfReachesAll(Compiler compiler) { 863 Selector extendIfReachesAll(Compiler compiler) {
862 bool canReachAll = compiler.enabledInvokeOn 864 bool canReachAll = compiler.enabledInvokeOn
863 && mask.needsNoSuchMethodHandling(this, compiler.world); 865 && mask.needsNoSuchMethodHandling(this, compiler.world);
864 return canReachAll 866 return canReachAll
865 ? new TypedSelector( 867 ? new TypedSelector(
866 compiler.typesTask.dynamicType, this, compiler.world) 868 compiler.typesTask.dynamicType, this, compiler.world)
867 : this; 869 : this;
868 } 870 }
869 } 871 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/typechecker.dart ('k') | pkg/compiler/lib/src/warnings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698