| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |