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

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

Issue 12335063: Add functions for setting an environment and rebinding a use. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased and incorportated review comments. Created 7 years, 9 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 | runtime/vm/flow_graph.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 8
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/code_generator.h" 10 #include "vm/code_generator.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 // Do another round of CSE to take secondary effects into account: 227 // Do another round of CSE to take secondary effects into account:
228 // e.g. when eliminating dependent loads (a.x[0] + a.x[0]) 228 // e.g. when eliminating dependent loads (a.x[0] + a.x[0])
229 // TODO(fschneider): Change to a one-pass optimization pass. 229 // TODO(fschneider): Change to a one-pass optimization pass.
230 DominatorBasedCSE::Optimize(flow_graph); 230 DominatorBasedCSE::Optimize(flow_graph);
231 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 231 DEBUG_ASSERT(flow_graph->VerifyUseLists());
232 } 232 }
233 } 233 }
234 if (FLAG_loop_invariant_code_motion && 234 if (FLAG_loop_invariant_code_motion &&
235 (parsed_function.function().deoptimization_counter() < 235 (parsed_function.function().deoptimization_counter() <
236 (FLAG_deoptimization_counter_threshold - 1))) { 236 (FLAG_deoptimization_counter_threshold - 1))) {
237 LICM::Optimize(flow_graph); 237 LICM licm(flow_graph);
238 licm.Optimize();
238 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 239 DEBUG_ASSERT(flow_graph->VerifyUseLists());
239 } 240 }
240 241
241 if (FLAG_range_analysis) { 242 if (FLAG_range_analysis) {
242 // We have to perform range analysis after LICM because it 243 // We have to perform range analysis after LICM because it
243 // optimistically moves CheckSmi through phis into loop preheaders 244 // optimistically moves CheckSmi through phis into loop preheaders
244 // making some phis smi. 245 // making some phis smi.
245 optimizer.InferSmiRanges(); 246 optimizer.InferSmiRanges();
246 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 247 DEBUG_ASSERT(flow_graph->VerifyUseLists());
247 } 248 }
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 Object::Handle(isolate->object_store()->sticky_error()); 647 Object::Handle(isolate->object_store()->sticky_error());
647 isolate->object_store()->clear_sticky_error(); 648 isolate->object_store()->clear_sticky_error();
648 isolate->set_long_jump_base(base); 649 isolate->set_long_jump_base(base);
649 return result.raw(); 650 return result.raw();
650 } 651 }
651 UNREACHABLE(); 652 UNREACHABLE();
652 return Object::null(); 653 return Object::null();
653 } 654 }
654 655
655 } // namespace dart 656 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698