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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 int index = GetNextSpillIndex(is_double); | 433 int index = GetNextSpillIndex(is_double); |
434 if (is_double) { | 434 if (is_double) { |
435 return LDoubleStackSlot::Create(index); | 435 return LDoubleStackSlot::Create(index); |
436 } else { | 436 } else { |
437 return LStackSlot::Create(index); | 437 return LStackSlot::Create(index); |
438 } | 438 } |
439 } | 439 } |
440 | 440 |
441 | 441 |
442 void LChunk::MarkEmptyBlocks() { | 442 void LChunk::MarkEmptyBlocks() { |
443 HPhase phase("Mark empty blocks", this); | 443 HPhase phase("L Mark empty blocks", this); |
444 for (int i = 0; i < graph()->blocks()->length(); ++i) { | 444 for (int i = 0; i < graph()->blocks()->length(); ++i) { |
445 HBasicBlock* block = graph()->blocks()->at(i); | 445 HBasicBlock* block = graph()->blocks()->at(i); |
446 int first = block->first_instruction_index(); | 446 int first = block->first_instruction_index(); |
447 int last = block->last_instruction_index(); | 447 int last = block->last_instruction_index(); |
448 LInstruction* first_instr = instructions()->at(first); | 448 LInstruction* first_instr = instructions()->at(first); |
449 LInstruction* last_instr = instructions()->at(last); | 449 LInstruction* last_instr = instructions()->at(last); |
450 | 450 |
451 LLabel* label = LLabel::cast(first_instr); | 451 LLabel* label = LLabel::cast(first_instr); |
452 if (last_instr->IsGoto()) { | 452 if (last_instr->IsGoto()) { |
453 LGoto* goto_instr = LGoto::cast(last_instr); | 453 LGoto* goto_instr = LGoto::cast(last_instr); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 | 545 |
546 Representation LChunk::LookupLiteralRepresentation( | 546 Representation LChunk::LookupLiteralRepresentation( |
547 LConstantOperand* operand) const { | 547 LConstantOperand* operand) const { |
548 return graph_->LookupValue(operand->index())->representation(); | 548 return graph_->LookupValue(operand->index())->representation(); |
549 } | 549 } |
550 | 550 |
551 | 551 |
552 LChunk* LChunkBuilder::Build() { | 552 LChunk* LChunkBuilder::Build() { |
553 ASSERT(is_unused()); | 553 ASSERT(is_unused()); |
554 chunk_ = new(zone()) LChunk(info(), graph()); | 554 chunk_ = new(zone()) LChunk(info(), graph()); |
555 HPhase phase("Building chunk", chunk_); | 555 HPhase phase("L Building chunk", chunk_); |
556 status_ = BUILDING; | 556 status_ = BUILDING; |
557 const ZoneList<HBasicBlock*>* blocks = graph()->blocks(); | 557 const ZoneList<HBasicBlock*>* blocks = graph()->blocks(); |
558 for (int i = 0; i < blocks->length(); i++) { | 558 for (int i = 0; i < blocks->length(); i++) { |
559 HBasicBlock* next = NULL; | 559 HBasicBlock* next = NULL; |
560 if (i < blocks->length() - 1) next = blocks->at(i + 1); | 560 if (i < blocks->length() - 1) next = blocks->at(i + 1); |
561 DoBasicBlock(blocks->at(i), next); | 561 DoBasicBlock(blocks->at(i), next); |
562 if (is_aborted()) return NULL; | 562 if (is_aborted()) return NULL; |
563 } | 563 } |
564 status_ = DONE; | 564 status_ = DONE; |
565 return chunk_; | 565 return chunk_; |
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2325 | 2325 |
2326 | 2326 |
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 = UseRegister(instr->index()); | 2329 LOperand* index = UseRegister(instr->index()); |
2330 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2330 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2331 } | 2331 } |
2332 | 2332 |
2333 | 2333 |
2334 } } // namespace v8::internal | 2334 } } // namespace v8::internal |
OLD | NEW |