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

Side by Side Diff: pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart

Issue 2954123002: Remove special casing of == null (Closed)
Patch Set: Updated cf. comments 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 6
7 import '../closure.dart'; 7 import '../closure.dart';
8 import '../common.dart'; 8 import '../common.dart';
9 import '../compiler.dart'; 9 import '../compiler.dart';
10 import '../constants/expressions.dart'; 10 import '../constants/expressions.dart';
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 } 573 }
574 574
575 TypeMask typeOfInvocation(ir.MethodInvocation send, ClosedWorld closedWorld) { 575 TypeMask typeOfInvocation(ir.MethodInvocation send, ClosedWorld closedWorld) {
576 ast.Node operatorNode = _astAdapter.kernel.nodeToAstOperator[send]; 576 ast.Node operatorNode = _astAdapter.kernel.nodeToAstOperator[send];
577 if (operatorNode != null) { 577 if (operatorNode != null) {
578 return _resultOf(_target).typeOfOperator(operatorNode); 578 return _resultOf(_target).typeOfOperator(operatorNode);
579 } 579 }
580 if (send.name.name == '[]=') { 580 if (send.name.name == '[]=') {
581 return closedWorld.commonMasks.dynamicType; 581 return closedWorld.commonMasks.dynamicType;
582 } 582 }
583 return _resultOf(_target).typeOfSend(_astAdapter.getNode(send)); 583 ast.Node node = _astAdapter.getNodeOrNull(send);
584 if (node == null) {
585 assert(send.name.name == '==');
586 return closedWorld.commonMasks.dynamicType;
587 }
588 return _resultOf(_target).typeOfSend(node);
584 } 589 }
585 590
586 TypeMask typeOfGet(ir.PropertyGet getter) { 591 TypeMask typeOfGet(ir.PropertyGet getter) {
587 return _resultOf(_target).typeOfSend(_astAdapter.getNode(getter)); 592 return _resultOf(_target).typeOfSend(_astAdapter.getNode(getter));
588 } 593 }
589 594
590 TypeMask typeOfSet(ir.PropertySet setter, ClosedWorld closedWorld) { 595 TypeMask typeOfSet(ir.PropertySet setter, ClosedWorld closedWorld) {
591 return closedWorld.commonMasks.dynamicType; 596 return closedWorld.commonMasks.dynamicType;
592 } 597 }
593 598
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 TypeMask selectorTypeOf(Selector selector, TypeMask mask) { 667 TypeMask selectorTypeOf(Selector selector, TypeMask mask) {
663 return TypeMaskFactory.inferredTypeForSelector( 668 return TypeMaskFactory.inferredTypeForSelector(
664 selector, mask, _globalInferenceResults); 669 selector, mask, _globalInferenceResults);
665 } 670 }
666 671
667 TypeMask typeFromNativeBehavior( 672 TypeMask typeFromNativeBehavior(
668 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) { 673 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) {
669 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld); 674 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld);
670 } 675 }
671 } 676 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | tests/compiler/dart2js/kernel/compile_from_dill_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698