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

Side by Side Diff: runtime/vm/intermediate_language.cc

Issue 12079074: When comparing symbols during the range analysis check that both of them are not affected by side-e… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 4
5 #include "vm/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/flow_graph_allocator.h" 9 #include "vm/flow_graph_allocator.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 2106 matching lines...) Expand 10 before | Expand all | Expand 10 after
2117 while (defn->IsConstraint()) { 2117 while (defn->IsConstraint()) {
2118 defn = defn->AsConstraint()->value()->definition(); 2118 defn = defn->AsConstraint()->value()->definition();
2119 } 2119 }
2120 return defn; 2120 return defn;
2121 } 2121 }
2122 2122
2123 2123
2124 static bool AreEqualDefinitions(Definition* a, Definition* b) { 2124 static bool AreEqualDefinitions(Definition* a, Definition* b) {
2125 a = UnwrapConstraint(a); 2125 a = UnwrapConstraint(a);
2126 b = UnwrapConstraint(b); 2126 b = UnwrapConstraint(b);
2127 return (a == b) || (!a->AffectedBySideEffect() && a->Equals(b)); 2127 return (a == b) || (!a->AffectedBySideEffect() &&
Florian Schneider 2013/01/30 13:02:37 I'd reformat this: return (a == b) || (!a->Af
Vyacheslav Egorov (Google) 2013/01/30 13:04:56 I don't like when one lines ends with && and start
2128 !b->AffectedBySideEffect() &&
2129 a->Equals(b));
2128 } 2130 }
2129 2131
2130 2132
2131 // Returns true if two range boundaries refer to the same symbol. 2133 // Returns true if two range boundaries refer to the same symbol.
2132 static bool DependOnSameSymbol(const RangeBoundary& a, const RangeBoundary& b) { 2134 static bool DependOnSameSymbol(const RangeBoundary& a, const RangeBoundary& b) {
2133 return a.IsSymbol() && b.IsSymbol() && 2135 return a.IsSymbol() && b.IsSymbol() &&
2134 AreEqualDefinitions(a.symbol(), b.symbol()); 2136 AreEqualDefinitions(a.symbol(), b.symbol());
2135 } 2137 }
2136 2138
2137 2139
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
2756 default: 2758 default:
2757 UNREACHABLE(); 2759 UNREACHABLE();
2758 } 2760 }
2759 return kPowRuntimeEntry; 2761 return kPowRuntimeEntry;
2760 } 2762 }
2761 2763
2762 2764
2763 #undef __ 2765 #undef __
2764 2766
2765 } // namespace dart 2767 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698