| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 ASSERT(!IsStartBlock()); | 90 ASSERT(!IsStartBlock()); |
| 91 phis_.Add(phi); | 91 phis_.Add(phi); |
| 92 phi->SetBlock(this); | 92 phi->SetBlock(this); |
| 93 } | 93 } |
| 94 | 94 |
| 95 | 95 |
| 96 void HBasicBlock::RemovePhi(HPhi* phi) { | 96 void HBasicBlock::RemovePhi(HPhi* phi) { |
| 97 ASSERT(phi->block() == this); | 97 ASSERT(phi->block() == this); |
| 98 ASSERT(phis_.Contains(phi)); | 98 ASSERT(phis_.Contains(phi)); |
| 99 ASSERT(phi->HasNoUses() || !phi->is_live()); | 99 ASSERT(phi->HasNoUses() || !phi->is_live()); |
| 100 phi->ClearOperands(); | 100 phi->Kill(); |
| 101 phis_.RemoveElement(phi); | 101 phis_.RemoveElement(phi); |
| 102 phi->SetBlock(NULL); | 102 phi->SetBlock(NULL); |
| 103 } | 103 } |
| 104 | 104 |
| 105 | 105 |
| 106 void HBasicBlock::AddInstruction(HInstruction* instr) { | 106 void HBasicBlock::AddInstruction(HInstruction* instr) { |
| 107 ASSERT(!IsStartBlock() || !IsFinished()); | 107 ASSERT(!IsStartBlock() || !IsFinished()); |
| 108 ASSERT(!instr->IsLinked()); | 108 ASSERT(!instr->IsLinked()); |
| 109 ASSERT(!IsFinished()); | 109 ASSERT(!IsFinished()); |
| 110 if (first_ == NULL) { | 110 if (first_ == NULL) { |
| (...skipping 7785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7896 } | 7896 } |
| 7897 } | 7897 } |
| 7898 | 7898 |
| 7899 #ifdef DEBUG | 7899 #ifdef DEBUG |
| 7900 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 7900 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
| 7901 if (allocator_ != NULL) allocator_->Verify(); | 7901 if (allocator_ != NULL) allocator_->Verify(); |
| 7902 #endif | 7902 #endif |
| 7903 } | 7903 } |
| 7904 | 7904 |
| 7905 } } // namespace v8::internal | 7905 } } // namespace v8::internal |
| OLD | NEW |