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

Side by Side Diff: runtime/vm/flow_graph_builder.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/flow_graph_allocator.cc ('k') | runtime/vm/flow_graph_compiler.h » ('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/flow_graph_builder.h" 5 #include "vm/flow_graph_builder.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/code_descriptors.h" 9 #include "vm/code_descriptors.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 } 286 }
287 // The call block is now the immediate dominator of blocks whose 287 // The call block is now the immediate dominator of blocks whose
288 // immediate dominator was the callee entry. 288 // immediate dominator was the callee entry.
289 call_block->ClearDominatedBlocks(); 289 call_block->ClearDominatedBlocks();
290 for (intptr_t i = 0; i < callee_entry->dominated_blocks().length(); ++i) { 290 for (intptr_t i = 0; i < callee_entry->dominated_blocks().length(); ++i) {
291 BlockEntryInstr* block = callee_entry->dominated_blocks()[i]; 291 BlockEntryInstr* block = callee_entry->dominated_blocks()[i];
292 call_block->AddDominatedBlock(block); 292 call_block->AddDominatedBlock(block);
293 } 293 }
294 } 294 }
295 295
296 // Neither call nor callee entry are in the graph at this point. Remove them 296 // Neither call nor callee entry nor the graph entry (if present) are in the
297 // from use lists. 297 // graph at this point. Remove them from use lists.
298 callee_entry->UnuseAllInputs(); 298 callee_entry->UnuseAllInputs();
299 if (callee_entry->PredecessorCount() > 0) {
300 callee_entry->PredecessorAt(0)->AsGraphEntry()->UnuseAllInputs();
301 }
299 call_->UnuseAllInputs(); 302 call_->UnuseAllInputs();
300 } 303 }
301 304
302 305
303 void EffectGraphVisitor::Append(const EffectGraphVisitor& other_fragment) { 306 void EffectGraphVisitor::Append(const EffectGraphVisitor& other_fragment) {
304 ASSERT(is_open()); 307 ASSERT(is_open());
305 if (other_fragment.is_empty()) return; 308 if (other_fragment.is_empty()) return;
306 if (is_empty()) { 309 if (is_empty()) {
307 entry_ = other_fragment.entry(); 310 entry_ = other_fragment.entry();
308 exit_ = other_fragment.exit(); 311 exit_ = other_fragment.exit();
(...skipping 3078 matching lines...) Expand 10 before | Expand all | Expand 10 after
3387 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 3390 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
3388 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 3391 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
3389 OS::SNPrint(chars, len, kFormat, function_name, reason); 3392 OS::SNPrint(chars, len, kFormat, function_name, reason);
3390 const Error& error = Error::Handle( 3393 const Error& error = Error::Handle(
3391 LanguageError::New(String::Handle(String::New(chars)))); 3394 LanguageError::New(String::Handle(String::New(chars))));
3392 Isolate::Current()->long_jump_base()->Jump(1, error); 3395 Isolate::Current()->long_jump_base()->Jump(1, error);
3393 } 3396 }
3394 3397
3395 3398
3396 } // namespace dart 3399 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_allocator.cc ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698