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

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

Issue 9722009: Remove possibility of critical edges. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « runtime/vm/flow_graph_builder.h ('k') | runtime/vm/intermediate_language.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 "vm/ast_printer.h" 7 #include "vm/ast_printer.h"
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/intermediate_language.h" 9 #include "vm/intermediate_language.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 AddInstruction(join); 715 AddInstruction(join);
716 join->SetSuccessor(for_body.entry()); 716 join->SetSuccessor(for_body.entry());
717 Instruction* body_exit = for_body.is_empty() ? join : for_body.exit(); 717 Instruction* body_exit = for_body.is_empty() ? join : for_body.exit();
718 718
719 if (body_exit != NULL) { 719 if (body_exit != NULL) {
720 TargetEntryInstr* target_entry = new TargetEntryInstr(); 720 TargetEntryInstr* target_entry = new TargetEntryInstr();
721 target_entry->SetSuccessor(for_test.entry()); 721 target_entry->SetSuccessor(for_test.entry());
722 body_exit->SetSuccessor(target_entry); 722 body_exit->SetSuccessor(target_entry);
723 } 723 }
724 724
725 *for_test.true_successor_address() = join; 725 TargetEntryInstr* back_target_entry = new TargetEntryInstr();
726 *for_test.true_successor_address() = back_target_entry;
727 back_target_entry->SetSuccessor(join);
726 exit_ = *for_test.false_successor_address() = new TargetEntryInstr(); 728 exit_ = *for_test.false_successor_address() = new TargetEntryInstr();
727 } 729 }
728 730
729 731
730 void EffectGraphVisitor::VisitForNode(ForNode* node) { 732 void EffectGraphVisitor::VisitForNode(ForNode* node) {
731 EffectGraphVisitor for_initializer(owner(), temp_index()); 733 EffectGraphVisitor for_initializer(owner(), temp_index());
732 node->initializer()->Visit(&for_initializer); 734 node->initializer()->Visit(&for_initializer);
733 Append(for_initializer); 735 Append(for_initializer);
734 ASSERT(is_open()); 736 ASSERT(is_open());
735 737
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1684 char* chars = reinterpret_cast<char*>( 1686 char* chars = reinterpret_cast<char*>(
1685 Isolate::Current()->current_zone()->Allocate(len)); 1687 Isolate::Current()->current_zone()->Allocate(len));
1686 OS::SNPrint(chars, len, kFormat, function_name, reason); 1688 OS::SNPrint(chars, len, kFormat, function_name, reason);
1687 const Error& error = Error::Handle( 1689 const Error& error = Error::Handle(
1688 LanguageError::New(String::Handle(String::New(chars)))); 1690 LanguageError::New(String::Handle(String::New(chars))));
1689 Isolate::Current()->long_jump_base()->Jump(1, error); 1691 Isolate::Current()->long_jump_base()->Jump(1, error);
1690 } 1692 }
1691 1693
1692 1694
1693 } // namespace dart 1695 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.h ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698