| 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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 | 641 |
| 642 void HValue::SetOperandAt(int index, HValue* value) { | 642 void HValue::SetOperandAt(int index, HValue* value) { |
| 643 RegisterUse(index, value); | 643 RegisterUse(index, value); |
| 644 InternalSetOperandAt(index, value); | 644 InternalSetOperandAt(index, value); |
| 645 } | 645 } |
| 646 | 646 |
| 647 | 647 |
| 648 void HValue::DeleteAndReplaceWith(HValue* other) { | 648 void HValue::DeleteAndReplaceWith(HValue* other) { |
| 649 // We replace all uses first, so Delete can assert that there are none. | 649 // We replace all uses first, so Delete can assert that there are none. |
| 650 if (other != NULL) ReplaceAllUsesWith(other); | 650 if (other != NULL) ReplaceAllUsesWith(other); |
| 651 ASSERT(HasNoUses()); | |
| 652 Kill(); | 651 Kill(); |
| 653 DeleteFromGraph(); | 652 DeleteFromGraph(); |
| 654 } | 653 } |
| 655 | 654 |
| 656 | 655 |
| 657 void HValue::ReplaceAllUsesWith(HValue* other) { | 656 void HValue::ReplaceAllUsesWith(HValue* other) { |
| 658 while (use_list_ != NULL) { | 657 while (use_list_ != NULL) { |
| 659 HUseListNode* list_node = use_list_; | 658 HUseListNode* list_node = use_list_; |
| 660 HValue* value = list_node->value(); | 659 HValue* value = list_node->value(); |
| 661 ASSERT(!value->block()->IsStartBlock()); | 660 ASSERT(!value->block()->IsStartBlock()); |
| (...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1892 HValue* value = OperandAt(i); | 1891 HValue* value = OperandAt(i); |
| 1893 stream->Add(" "); | 1892 stream->Add(" "); |
| 1894 value->PrintNameTo(stream); | 1893 value->PrintNameTo(stream); |
| 1895 stream->Add(" "); | 1894 stream->Add(" "); |
| 1896 } | 1895 } |
| 1897 stream->Add(" uses%d_%di_%dd_%dt", | 1896 stream->Add(" uses%d_%di_%dd_%dt", |
| 1898 UseCount(), | 1897 UseCount(), |
| 1899 int32_non_phi_uses() + int32_indirect_uses(), | 1898 int32_non_phi_uses() + int32_indirect_uses(), |
| 1900 double_non_phi_uses() + double_indirect_uses(), | 1899 double_non_phi_uses() + double_indirect_uses(), |
| 1901 tagged_non_phi_uses() + tagged_indirect_uses()); | 1900 tagged_non_phi_uses() + tagged_indirect_uses()); |
| 1902 stream->Add("%s%s]", | 1901 stream->Add("%s]", IsConvertibleToInteger() ? "" : "_ncti"); |
| 1903 is_live() ? "_live" : "", | |
| 1904 IsConvertibleToInteger() ? "" : "_ncti"); | |
| 1905 } | 1902 } |
| 1906 | 1903 |
| 1907 | 1904 |
| 1908 void HPhi::AddInput(HValue* value) { | 1905 void HPhi::AddInput(HValue* value) { |
| 1909 inputs_.Add(NULL, value->block()->zone()); | 1906 inputs_.Add(NULL, value->block()->zone()); |
| 1910 SetOperandAt(OperandCount() - 1, value); | 1907 SetOperandAt(OperandCount() - 1, value); |
| 1911 // Mark phis that may have 'arguments' directly or indirectly as an operand. | 1908 // Mark phis that may have 'arguments' directly or indirectly as an operand. |
| 1912 if (!CheckFlag(kIsArguments) && value->CheckFlag(kIsArguments)) { | 1909 if (!CheckFlag(kIsArguments) && value->CheckFlag(kIsArguments)) { |
| 1913 SetFlag(kIsArguments); | 1910 SetFlag(kIsArguments); |
| 1914 } | 1911 } |
| (...skipping 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3621 | 3618 |
| 3622 | 3619 |
| 3623 void HCheckFunction::Verify() { | 3620 void HCheckFunction::Verify() { |
| 3624 HInstruction::Verify(); | 3621 HInstruction::Verify(); |
| 3625 ASSERT(HasNoUses()); | 3622 ASSERT(HasNoUses()); |
| 3626 } | 3623 } |
| 3627 | 3624 |
| 3628 #endif | 3625 #endif |
| 3629 | 3626 |
| 3630 } } // namespace v8::internal | 3627 } } // namespace v8::internal |
| OLD | NEW |