| 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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 int index = GetNextSpillIndex(is_double); | 375 int index = GetNextSpillIndex(is_double); |
| 376 if (is_double) { | 376 if (is_double) { |
| 377 return LDoubleStackSlot::Create(index); | 377 return LDoubleStackSlot::Create(index); |
| 378 } else { | 378 } else { |
| 379 return LStackSlot::Create(index); | 379 return LStackSlot::Create(index); |
| 380 } | 380 } |
| 381 } | 381 } |
| 382 | 382 |
| 383 | 383 |
| 384 void LChunk::MarkEmptyBlocks() { | 384 void LChunk::MarkEmptyBlocks() { |
| 385 HPhase phase("Mark empty blocks", this); | 385 HPhase phase("L Mark empty blocks", this); |
| 386 for (int i = 0; i < graph()->blocks()->length(); ++i) { | 386 for (int i = 0; i < graph()->blocks()->length(); ++i) { |
| 387 HBasicBlock* block = graph()->blocks()->at(i); | 387 HBasicBlock* block = graph()->blocks()->at(i); |
| 388 int first = block->first_instruction_index(); | 388 int first = block->first_instruction_index(); |
| 389 int last = block->last_instruction_index(); | 389 int last = block->last_instruction_index(); |
| 390 LInstruction* first_instr = instructions()->at(first); | 390 LInstruction* first_instr = instructions()->at(first); |
| 391 LInstruction* last_instr = instructions()->at(last); | 391 LInstruction* last_instr = instructions()->at(last); |
| 392 | 392 |
| 393 LLabel* label = LLabel::cast(first_instr); | 393 LLabel* label = LLabel::cast(first_instr); |
| 394 if (last_instr->IsGoto()) { | 394 if (last_instr->IsGoto()) { |
| 395 LGoto* goto_instr = LGoto::cast(last_instr); | 395 LGoto* goto_instr = LGoto::cast(last_instr); |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 | 538 |
| 539 Representation LChunk::LookupLiteralRepresentation( | 539 Representation LChunk::LookupLiteralRepresentation( |
| 540 LConstantOperand* operand) const { | 540 LConstantOperand* operand) const { |
| 541 return graph_->LookupValue(operand->index())->representation(); | 541 return graph_->LookupValue(operand->index())->representation(); |
| 542 } | 542 } |
| 543 | 543 |
| 544 | 544 |
| 545 LChunk* LChunkBuilder::Build() { | 545 LChunk* LChunkBuilder::Build() { |
| 546 ASSERT(is_unused()); | 546 ASSERT(is_unused()); |
| 547 chunk_ = new(zone()) LChunk(info(), graph()); | 547 chunk_ = new(zone()) LChunk(info(), graph()); |
| 548 HPhase phase("Building chunk", chunk_); | 548 HPhase phase("L Building chunk", chunk_); |
| 549 status_ = BUILDING; | 549 status_ = BUILDING; |
| 550 const ZoneList<HBasicBlock*>* blocks = graph()->blocks(); | 550 const ZoneList<HBasicBlock*>* blocks = graph()->blocks(); |
| 551 for (int i = 0; i < blocks->length(); i++) { | 551 for (int i = 0; i < blocks->length(); i++) { |
| 552 HBasicBlock* next = NULL; | 552 HBasicBlock* next = NULL; |
| 553 if (i < blocks->length() - 1) next = blocks->at(i + 1); | 553 if (i < blocks->length() - 1) next = blocks->at(i + 1); |
| 554 DoBasicBlock(blocks->at(i), next); | 554 DoBasicBlock(blocks->at(i), next); |
| 555 if (is_aborted()) return NULL; | 555 if (is_aborted()) return NULL; |
| 556 } | 556 } |
| 557 status_ = DONE; | 557 status_ = DONE; |
| 558 return chunk_; | 558 return chunk_; |
| (...skipping 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2327 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2327 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2328 LOperand* object = UseRegister(instr->object()); | 2328 LOperand* object = UseRegister(instr->object()); |
| 2329 LOperand* index = UseTempRegister(instr->index()); | 2329 LOperand* index = UseTempRegister(instr->index()); |
| 2330 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2330 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2331 } | 2331 } |
| 2332 | 2332 |
| 2333 | 2333 |
| 2334 } } // namespace v8::internal | 2334 } } // namespace v8::internal |
| 2335 | 2335 |
| 2336 #endif // V8_TARGET_ARCH_X64 | 2336 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |