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

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

Issue 14682020: Optimize functions containing try-catch. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: rebased Created 7 years, 7 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/assembler_x64.h ('k') | 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 // The final canonicalization pass before the code generation. 289 // The final canonicalization pass before the code generation.
290 if (FLAG_propagate_types) { 290 if (FLAG_propagate_types) {
291 // Recompute types after code movement was done to ensure correct 291 // Recompute types after code movement was done to ensure correct
292 // reaching types for hoisted values. 292 // reaching types for hoisted values.
293 FlowGraphTypePropagator propagator(flow_graph); 293 FlowGraphTypePropagator propagator(flow_graph);
294 propagator.Propagate(); 294 propagator.Propagate();
295 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 295 DEBUG_ASSERT(flow_graph->VerifyUseLists());
296 } 296 }
297 297
298 // Optimize try-blocks.
299 TryCatchAnalyzer::Optimize(flow_graph);
300
298 // Detach environments from the instructions that can't deoptimize. 301 // Detach environments from the instructions that can't deoptimize.
299 // Do it before we attempt to perform allocation sinking to minimize 302 // Do it before we attempt to perform allocation sinking to minimize
300 // amount of materializations it has to perform. 303 // amount of materializations it has to perform.
301 optimizer.EliminateEnvironments(); 304 optimizer.EliminateEnvironments();
302 305
303 // Attempt to sink allocations of temporary non-escaping objects to 306 // Attempt to sink allocations of temporary non-escaping objects to
304 // the deoptimization path. 307 // the deoptimization path.
305 AllocationSinking* sinking = NULL; 308 AllocationSinking* sinking = NULL;
306 if (FLAG_allocation_sinking) { 309 if (FLAG_allocation_sinking) {
307 sinking = new AllocationSinking(flow_graph); 310 sinking = new AllocationSinking(flow_graph);
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 Object::Handle(isolate->object_store()->sticky_error()); 736 Object::Handle(isolate->object_store()->sticky_error());
734 isolate->object_store()->clear_sticky_error(); 737 isolate->object_store()->clear_sticky_error();
735 isolate->set_long_jump_base(base); 738 isolate->set_long_jump_base(base);
736 return result.raw(); 739 return result.raw();
737 } 740 }
738 UNREACHABLE(); 741 UNREACHABLE();
739 return Object::null(); 742 return Object::null();
740 } 743 }
741 744
742 } // namespace dart 745 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/flow_graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698