| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 compare->SetSuccessorAt(0, first_true_block_); | 788 compare->SetSuccessorAt(0, first_true_block_); |
| 789 compare->SetSuccessorAt(1, first_false_block_); | 789 compare->SetSuccessorAt(1, first_false_block_); |
| 790 } | 790 } |
| 791 builder_->FinishCurrentBlock(compare); | 791 builder_->FinishCurrentBlock(compare); |
| 792 needs_compare_ = false; | 792 needs_compare_ = false; |
| 793 return compare; | 793 return compare; |
| 794 } | 794 } |
| 795 | 795 |
| 796 | 796 |
| 797 void HGraphBuilder::IfBuilder::Or() { | 797 void HGraphBuilder::IfBuilder::Or() { |
| 798 ASSERT(!needs_compare_); |
| 798 ASSERT(!did_and_); | 799 ASSERT(!did_and_); |
| 799 did_or_ = true; | 800 did_or_ = true; |
| 800 HEnvironment* env = first_false_block_->last_environment(); | 801 HEnvironment* env = first_false_block_->last_environment(); |
| 801 if (split_edge_merge_block_ == NULL) { | 802 if (split_edge_merge_block_ == NULL) { |
| 802 split_edge_merge_block_ = | 803 split_edge_merge_block_ = |
| 803 builder_->CreateBasicBlock(env->Copy()); | 804 builder_->CreateBasicBlock(env->Copy()); |
| 804 builder_->GotoNoSimulate(first_true_block_, split_edge_merge_block_); | 805 builder_->GotoNoSimulate(first_true_block_, split_edge_merge_block_); |
| 805 first_true_block_ = split_edge_merge_block_; | 806 first_true_block_ = split_edge_merge_block_; |
| 806 } | 807 } |
| 807 builder_->set_current_block(first_false_block_); | 808 builder_->set_current_block(first_false_block_); |
| 808 first_false_block_ = builder_->CreateBasicBlock(env->Copy()); | 809 first_false_block_ = builder_->CreateBasicBlock(env->Copy()); |
| 809 } | 810 } |
| 810 | 811 |
| 811 | 812 |
| 812 void HGraphBuilder::IfBuilder::And() { | 813 void HGraphBuilder::IfBuilder::And() { |
| 814 ASSERT(!needs_compare_); |
| 813 ASSERT(!did_or_); | 815 ASSERT(!did_or_); |
| 814 did_and_ = true; | 816 did_and_ = true; |
| 815 HEnvironment* env = first_false_block_->last_environment(); | 817 HEnvironment* env = first_false_block_->last_environment(); |
| 816 if (split_edge_merge_block_ == NULL) { | 818 if (split_edge_merge_block_ == NULL) { |
| 817 split_edge_merge_block_ = builder_->CreateBasicBlock(env->Copy()); | 819 split_edge_merge_block_ = builder_->CreateBasicBlock(env->Copy()); |
| 818 builder_->GotoNoSimulate(first_false_block_, split_edge_merge_block_); | 820 builder_->GotoNoSimulate(first_false_block_, split_edge_merge_block_); |
| 819 first_false_block_ = split_edge_merge_block_; | 821 first_false_block_ = split_edge_merge_block_; |
| 820 } | 822 } |
| 821 builder_->set_current_block(first_true_block_); | 823 builder_->set_current_block(first_true_block_); |
| 822 first_true_block_ = builder_->CreateBasicBlock(env->Copy()); | 824 first_true_block_ = builder_->CreateBasicBlock(env->Copy()); |
| (...skipping 9025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9848 if (ShouldProduceTraceOutput()) { | 9850 if (ShouldProduceTraceOutput()) { |
| 9849 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 9851 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 9850 } | 9852 } |
| 9851 | 9853 |
| 9852 #ifdef DEBUG | 9854 #ifdef DEBUG |
| 9853 graph_->Verify(false); // No full verify. | 9855 graph_->Verify(false); // No full verify. |
| 9854 #endif | 9856 #endif |
| 9855 } | 9857 } |
| 9856 | 9858 |
| 9857 } } // namespace v8::internal | 9859 } } // namespace v8::internal |
| OLD | NEW |