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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 } | 299 } |
300 return cur->block_id(); | 300 return cur->block_id(); |
301 } | 301 } |
302 | 302 |
303 Label* LChunk::GetAssemblyLabel(int block_id) const { | 303 Label* LChunk::GetAssemblyLabel(int block_id) const { |
304 LLabel* label = GetLabel(block_id); | 304 LLabel* label = GetLabel(block_id); |
305 ASSERT(!label->HasReplacement()); | 305 ASSERT(!label->HasReplacement()); |
306 return label->label(); | 306 return label->label(); |
307 } | 307 } |
308 | 308 |
| 309 |
309 void LChunk::MarkEmptyBlocks() { | 310 void LChunk::MarkEmptyBlocks() { |
310 LPhase phase("L_Mark empty blocks", this); | 311 LPhase phase("L_Mark empty blocks", this); |
311 for (int i = 0; i < graph()->blocks()->length(); ++i) { | 312 for (int i = 0; i < graph()->blocks()->length(); ++i) { |
312 HBasicBlock* block = graph()->blocks()->at(i); | 313 HBasicBlock* block = graph()->blocks()->at(i); |
313 int first = block->first_instruction_index(); | 314 int first = block->first_instruction_index(); |
314 int last = block->last_instruction_index(); | 315 int last = block->last_instruction_index(); |
315 LInstruction* first_instr = instructions()->at(first); | 316 LInstruction* first_instr = instructions()->at(first); |
316 LInstruction* last_instr = instructions()->at(last); | 317 LInstruction* last_instr = instructions()->at(last); |
317 | 318 |
318 LLabel* label = LLabel::cast(first_instr); | 319 LLabel* label = LLabel::cast(first_instr); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 | 493 |
493 | 494 |
494 LPhase::~LPhase() { | 495 LPhase::~LPhase() { |
495 if (ShouldProduceTraceOutput()) { | 496 if (ShouldProduceTraceOutput()) { |
496 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 497 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
497 } | 498 } |
498 } | 499 } |
499 | 500 |
500 | 501 |
501 } } // namespace v8::internal | 502 } } // namespace v8::internal |
OLD | NEW |