| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 template<typename T, int N> | 126 template<typename T, int N> |
| 127 void OperandContainer<T, N>::PrintOperandsTo(StringStream* stream) { | 127 void OperandContainer<T, N>::PrintOperandsTo(StringStream* stream) { |
| 128 for (int i = 0; i < N; i++) { | 128 for (int i = 0; i < N; i++) { |
| 129 if (i > 0) stream->Add(" "); | 129 if (i > 0) stream->Add(" "); |
| 130 elems_[i]->PrintTo(stream); | 130 elems_[i]->PrintTo(stream); |
| 131 } | 131 } |
| 132 } | 132 } |
| 133 | 133 |
| 134 | 134 |
| 135 void LLabel::PrintDataTo(StringStream* stream) { | 135 void LLabel::PrintDataTo(StringStream* stream) { |
| 136 LGap::PrintDataTo(stream); | |
| 137 LLabel* rep = replacement(); | 136 LLabel* rep = replacement(); |
| 138 if (rep != NULL) { | 137 if (rep != NULL) { |
| 139 stream->Add(" Dead block replaced with B%d", rep->block_id()); | 138 stream->Add(" Dead block replaced with B%d", rep->block_id()); |
| 140 } | 139 } |
| 141 } | 140 } |
| 142 | 141 |
| 143 | 142 |
| 144 bool LGap::IsRedundant() const { | 143 bool LGap::IsRedundant() const { |
| 145 for (int i = 0; i < 4; i++) { | 144 for (int i = 0; i < 4; i++) { |
| 146 if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant()) { | 145 if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant()) { |
| 147 return false; | 146 return false; |
| 148 } | 147 } |
| 149 } | 148 } |
| 150 | |
| 151 return true; | 149 return true; |
| 152 } | 150 } |
| 153 | 151 |
| 154 | 152 |
| 155 void LGap::PrintDataTo(StringStream* stream) { | 153 void LGap::PrintDataTo(StringStream* stream) { |
| 156 for (int i = 0; i < 4; i++) { | 154 for (int i = 0; i < 4; i++) { |
| 157 stream->Add("("); | 155 stream->Add("("); |
| 158 if (parallel_moves_[i] != NULL) { | 156 if (parallel_moves_[i] != NULL) { |
| 159 parallel_moves_[i]->PrintDataTo(stream); | 157 parallel_moves_[i]->PrintDataTo(stream); |
| 160 } | 158 } |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 HBasicBlock* block = graph()->blocks()->at(i); | 379 HBasicBlock* block = graph()->blocks()->at(i); |
| 382 int first = block->first_instruction_index(); | 380 int first = block->first_instruction_index(); |
| 383 int last = block->last_instruction_index(); | 381 int last = block->last_instruction_index(); |
| 384 LInstruction* first_instr = instructions()->at(first); | 382 LInstruction* first_instr = instructions()->at(first); |
| 385 LInstruction* last_instr = instructions()->at(last); | 383 LInstruction* last_instr = instructions()->at(last); |
| 386 | 384 |
| 387 LLabel* label = LLabel::cast(first_instr); | 385 LLabel* label = LLabel::cast(first_instr); |
| 388 if (last_instr->IsGoto()) { | 386 if (last_instr->IsGoto()) { |
| 389 LGoto* goto_instr = LGoto::cast(last_instr); | 387 LGoto* goto_instr = LGoto::cast(last_instr); |
| 390 if (!goto_instr->include_stack_check() && | 388 if (!goto_instr->include_stack_check() && |
| 391 label->IsRedundant() && | |
| 392 !label->is_loop_header()) { | 389 !label->is_loop_header()) { |
| 393 bool can_eliminate = true; | 390 bool can_eliminate = true; |
| 394 for (int i = first + 1; i < last && can_eliminate; ++i) { | 391 for (int i = first + 1; i < last && can_eliminate; ++i) { |
| 395 LInstruction* cur = instructions()->at(i); | 392 LInstruction* cur = instructions()->at(i); |
| 396 if (cur->IsGap()) { | 393 if (cur->IsGap()) { |
| 397 LGap* gap = LGap::cast(cur); | 394 LGap* gap = LGap::cast(cur); |
| 398 if (!gap->IsRedundant()) { | 395 if (!gap->IsRedundant()) { |
| 399 can_eliminate = false; | 396 can_eliminate = false; |
| 400 } | 397 } |
| 401 } else { | 398 } else { |
| (...skipping 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2197 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 2194 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
| 2198 HEnvironment* outer = current_block_->last_environment()->outer(); | 2195 HEnvironment* outer = current_block_->last_environment()->outer(); |
| 2199 current_block_->UpdateEnvironment(outer); | 2196 current_block_->UpdateEnvironment(outer); |
| 2200 return NULL; | 2197 return NULL; |
| 2201 } | 2198 } |
| 2202 | 2199 |
| 2203 | 2200 |
| 2204 } } // namespace v8::internal | 2201 } } // namespace v8::internal |
| 2205 | 2202 |
| 2206 #endif // V8_TARGET_ARCH_IA32 | 2203 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |