| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 void HGraphBuilder::IfBuilder::Then() { | 796 void HGraphBuilder::IfBuilder::Then() { |
| 797 ASSERT(!captured_); | 797 ASSERT(!captured_); |
| 798 ASSERT(!finished_); | 798 ASSERT(!finished_); |
| 799 did_then_ = true; | 799 did_then_ = true; |
| 800 if (needs_compare_) { | 800 if (needs_compare_) { |
| 801 // Handle if's without any expressions, they jump directly to the "else" | 801 // Handle if's without any expressions, they jump directly to the "else" |
| 802 // branch. However, we must pretend that the "then" branch is reachable, | 802 // branch. However, we must pretend that the "then" branch is reachable, |
| 803 // so that the graph builder visits it and sees any live range extending | 803 // so that the graph builder visits it and sees any live range extending |
| 804 // constructs within it. | 804 // constructs within it. |
| 805 HConstant* constant_false = builder_->graph()->GetConstantFalse(); | 805 HConstant* constant_false = builder_->graph()->GetConstantFalse(); |
| 806 ToBooleanStub::Types boolean_type = ToBooleanStub::no_types(); | 806 ToBooleanStub::Types boolean_type = ToBooleanStub::Types(); |
| 807 boolean_type.Add(ToBooleanStub::BOOLEAN); | 807 boolean_type.Add(ToBooleanStub::BOOLEAN); |
| 808 HBranch* branch = | 808 HBranch* branch = |
| 809 new(zone()) HBranch(constant_false, first_true_block_, | 809 new(zone()) HBranch(constant_false, first_true_block_, |
| 810 first_false_block_, boolean_type); | 810 first_false_block_, boolean_type); |
| 811 builder_->current_block()->Finish(branch); | 811 builder_->current_block()->Finish(branch); |
| 812 } | 812 } |
| 813 builder_->set_current_block(first_true_block_); | 813 builder_->set_current_block(first_true_block_); |
| 814 } | 814 } |
| 815 | 815 |
| 816 | 816 |
| (...skipping 10766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11583 } | 11583 } |
| 11584 } | 11584 } |
| 11585 | 11585 |
| 11586 #ifdef DEBUG | 11586 #ifdef DEBUG |
| 11587 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 11587 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
| 11588 if (allocator_ != NULL) allocator_->Verify(); | 11588 if (allocator_ != NULL) allocator_->Verify(); |
| 11589 #endif | 11589 #endif |
| 11590 } | 11590 } |
| 11591 | 11591 |
| 11592 } } // namespace v8::internal | 11592 } } // namespace v8::internal |
| OLD | NEW |