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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart

Issue 1572043002: dart2js cps: Do not remove unused refinements. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | pkg/compiler/lib/src/cps_ir/shrinking_reductions.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) 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 library dart2js.ir_nodes; 4 library dart2js.ir_nodes;
5 5
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'cps_fragment.dart' show CpsFragment; 7 import 'cps_fragment.dart' show CpsFragment;
8 import '../constants/values.dart' as values; 8 import '../constants/values.dart' as values;
9 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType; 9 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType;
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 /// but need to reason about value references being identical (i.e. referring 725 /// but need to reason about value references being identical (i.e. referring
726 /// to the same primitive). 726 /// to the same primitive).
727 class Refinement extends Primitive { 727 class Refinement extends Primitive {
728 Reference<Primitive> value; 728 Reference<Primitive> value;
729 final TypeMask refineType; 729 final TypeMask refineType;
730 730
731 Refinement(Primitive value, this.refineType) 731 Refinement(Primitive value, this.refineType)
732 : value = new Reference<Primitive>(value); 732 : value = new Reference<Primitive>(value);
733 733
734 bool get hasValue => true; 734 bool get hasValue => true;
735 bool get isSafeForElimination => true; 735 bool get isSafeForElimination => false;
736 bool get isSafeForReordering => false; 736 bool get isSafeForReordering => false;
737 737
738 accept(Visitor visitor) => visitor.visitRefinement(this); 738 accept(Visitor visitor) => visitor.visitRefinement(this);
739 739
740 Primitive get effectiveDefinition => value.definition.effectiveDefinition; 740 Primitive get effectiveDefinition => value.definition.effectiveDefinition;
741 741
742 void setParentPointers() { 742 void setParentPointers() {
743 value.parent = this; 743 value.parent = this;
744 } 744 }
745 } 745 }
(...skipping 2048 matching lines...) Expand 10 before | Expand all | Expand 10 after
2794 plug(new Branch.loose(_definitions.getCopy(node.condition), 2794 plug(new Branch.loose(_definitions.getCopy(node.condition),
2795 _copies[node.trueContinuation.definition], 2795 _copies[node.trueContinuation.definition],
2796 _copies[node.falseContinuation.definition]) 2796 _copies[node.falseContinuation.definition])
2797 ..isStrictCheck = node.isStrictCheck); 2797 ..isStrictCheck = node.isStrictCheck);
2798 } 2798 }
2799 2799
2800 visitUnreachable(Unreachable node) { 2800 visitUnreachable(Unreachable node) {
2801 plug(new Unreachable()); 2801 plug(new Unreachable());
2802 } 2802 }
2803 } 2803 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698