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

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

Issue 557413002: Merge chains of straight-line blocks. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: fixed assertion Created 6 years 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 | « runtime/vm/flow_graph_optimizer.cc ('k') | 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/cpu.h" 8 #include "vm/cpu.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_allocator.h" 10 #include "vm/flow_graph_allocator.h"
(...skipping 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after
2135 } 2135 }
2136 2136
2137 return this; 2137 return this;
2138 } 2138 }
2139 2139
2140 2140
2141 Definition* BooleanNegateInstr::Canonicalize(FlowGraph* flow_graph) { 2141 Definition* BooleanNegateInstr::Canonicalize(FlowGraph* flow_graph) {
2142 Definition* defn = value()->definition(); 2142 Definition* defn = value()->definition();
2143 if (defn->IsComparison() && defn->HasOnlyUse(value())) { 2143 if (defn->IsComparison() && defn->HasOnlyUse(value())) {
2144 // Comparisons always have a bool result. 2144 // Comparisons always have a bool result.
2145 ASSERT(value()->Type()->ToCid() == kBoolCid); 2145 ASSERT(value()->definition()->Type()->ToCid() == kBoolCid);
2146 defn->AsComparison()->NegateComparison(); 2146 defn->AsComparison()->NegateComparison();
2147 return defn; 2147 return defn;
2148 } 2148 }
2149 return this; 2149 return this;
2150 } 2150 }
2151 2151
2152 2152
2153 static bool MayBeBoxableNumber(intptr_t cid) { 2153 static bool MayBeBoxableNumber(intptr_t cid) {
2154 return (cid == kDynamicCid) || 2154 return (cid == kDynamicCid) ||
2155 (cid == kMintCid) || 2155 (cid == kMintCid) ||
(...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after
3434 case Token::kTRUNCDIV: return 0; 3434 case Token::kTRUNCDIV: return 0;
3435 case Token::kMOD: return 1; 3435 case Token::kMOD: return 1;
3436 default: UNIMPLEMENTED(); return -1; 3436 default: UNIMPLEMENTED(); return -1;
3437 } 3437 }
3438 } 3438 }
3439 3439
3440 3440
3441 #undef __ 3441 #undef __
3442 3442
3443 } // namespace dart 3443 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698