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

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

Issue 23072026: fix cpp11 compile errors (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | « runtime/vm/il_printer.cc ('k') | runtime/vm/isolate.cc » ('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 4
5 #include "vm/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.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 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after
1451 // Replace the comparison if the replacement is used at this branch, 1451 // Replace the comparison if the replacement is used at this branch,
1452 // and has exactly one use. 1452 // and has exactly one use.
1453 Value* use = comp->input_use_list(); 1453 Value* use = comp->input_use_list();
1454 if ((use->instruction() == this) && comp->HasOnlyUse(use)) { 1454 if ((use->instruction() == this) && comp->HasOnlyUse(use)) {
1455 RemoveEnvironment(); 1455 RemoveEnvironment();
1456 flow_graph->CopyDeoptTarget(this, comp); 1456 flow_graph->CopyDeoptTarget(this, comp);
1457 1457
1458 comp->RemoveFromGraph(); 1458 comp->RemoveFromGraph();
1459 SetComparison(comp); 1459 SetComparison(comp);
1460 if (FLAG_trace_optimization) { 1460 if (FLAG_trace_optimization) {
1461 OS::Print("Merging comparison v%"Pd"\n", comp->ssa_temp_index()); 1461 OS::Print("Merging comparison v%" Pd "\n", comp->ssa_temp_index());
1462 } 1462 }
1463 // Clear the comparison's temp index and ssa temp index since the 1463 // Clear the comparison's temp index and ssa temp index since the
1464 // value of the comparison is not used outside the branch anymore. 1464 // value of the comparison is not used outside the branch anymore.
1465 ASSERT(comp->input_use_list() == NULL); 1465 ASSERT(comp->input_use_list() == NULL);
1466 comp->ClearSSATempIndex(); 1466 comp->ClearSSATempIndex();
1467 comp->ClearTempIndex(); 1467 comp->ClearTempIndex();
1468 } 1468 }
1469 } 1469 }
1470 return this; 1470 return this;
1471 } 1471 }
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
2167 2167
2168 range_ = new Range(min, max); 2168 range_ = new Range(min, max);
2169 2169
2170 // Mark branches that generate unsatisfiable constraints as constant. 2170 // Mark branches that generate unsatisfiable constraints as constant.
2171 if (target() != NULL && range_->IsUnsatisfiable()) { 2171 if (target() != NULL && range_->IsUnsatisfiable()) {
2172 BranchInstr* branch = 2172 BranchInstr* branch =
2173 target()->PredecessorAt(0)->last_instruction()->AsBranch(); 2173 target()->PredecessorAt(0)->last_instruction()->AsBranch();
2174 if (target() == branch->true_successor()) { 2174 if (target() == branch->true_successor()) {
2175 // True unreachable. 2175 // True unreachable.
2176 if (FLAG_trace_constant_propagation) { 2176 if (FLAG_trace_constant_propagation) {
2177 OS::Print("Range analysis: True unreachable (B%"Pd")\n", 2177 OS::Print("Range analysis: True unreachable (B%" Pd ")\n",
2178 branch->true_successor()->block_id()); 2178 branch->true_successor()->block_id());
2179 } 2179 }
2180 branch->set_constant_target(branch->false_successor()); 2180 branch->set_constant_target(branch->false_successor());
2181 } else { 2181 } else {
2182 ASSERT(target() == branch->false_successor()); 2182 ASSERT(target() == branch->false_successor());
2183 // False unreachable. 2183 // False unreachable.
2184 if (FLAG_trace_constant_propagation) { 2184 if (FLAG_trace_constant_propagation) {
2185 OS::Print("Range analysis: False unreachable (B%"Pd")\n", 2185 OS::Print("Range analysis: False unreachable (B%" Pd ")\n",
2186 branch->false_successor()->block_id()); 2186 branch->false_successor()->block_id());
2187 } 2187 }
2188 branch->set_constant_target(branch->true_successor()); 2188 branch->set_constant_target(branch->true_successor());
2189 } 2189 }
2190 } 2190 }
2191 } 2191 }
2192 2192
2193 2193
2194 void LoadFieldInstr::InferRange() { 2194 void LoadFieldInstr::InferRange() {
2195 if ((range_ == NULL) && 2195 if ((range_ == NULL) &&
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
2601 default: 2601 default:
2602 UNREACHABLE(); 2602 UNREACHABLE();
2603 } 2603 }
2604 return kPowRuntimeEntry; 2604 return kPowRuntimeEntry;
2605 } 2605 }
2606 2606
2607 2607
2608 #undef __ 2608 #undef __
2609 2609
2610 } // namespace dart 2610 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698