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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 block->UpdateEnvironment(last_environment); | 805 block->UpdateEnvironment(last_environment); |
806 ASSERT(pred->argument_count() >= 0); | 806 ASSERT(pred->argument_count() >= 0); |
807 argument_count_ = pred->argument_count(); | 807 argument_count_ = pred->argument_count(); |
808 } else { | 808 } else { |
809 // We are at a state join => process phis. | 809 // We are at a state join => process phis. |
810 HBasicBlock* pred = block->predecessors()->at(0); | 810 HBasicBlock* pred = block->predecessors()->at(0); |
811 // No need to copy the environment, it cannot be used later. | 811 // No need to copy the environment, it cannot be used later. |
812 HEnvironment* last_environment = pred->last_environment(); | 812 HEnvironment* last_environment = pred->last_environment(); |
813 for (int i = 0; i < block->phis()->length(); ++i) { | 813 for (int i = 0; i < block->phis()->length(); ++i) { |
814 HPhi* phi = block->phis()->at(i); | 814 HPhi* phi = block->phis()->at(i); |
815 if (phi->merged_index() < last_environment->length()) { | 815 if (phi->HasMergedIndex()) { |
816 last_environment->SetValueAt(phi->merged_index(), phi); | 816 last_environment->SetValueAt(phi->merged_index(), phi); |
817 } | 817 } |
818 } | 818 } |
819 for (int i = 0; i < block->deleted_phis()->length(); ++i) { | 819 for (int i = 0; i < block->deleted_phis()->length(); ++i) { |
820 if (block->deleted_phis()->at(i) < last_environment->length()) { | 820 if (block->deleted_phis()->at(i) < last_environment->length()) { |
821 last_environment->SetValueAt(block->deleted_phis()->at(i), | 821 last_environment->SetValueAt(block->deleted_phis()->at(i), |
822 graph_->GetConstantUndefined()); | 822 graph_->GetConstantUndefined()); |
823 } | 823 } |
824 } | 824 } |
825 block->UpdateEnvironment(last_environment); | 825 block->UpdateEnvironment(last_environment); |
(...skipping 1712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2538 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2538 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2539 LOperand* object = UseRegister(instr->object()); | 2539 LOperand* object = UseRegister(instr->object()); |
2540 LOperand* index = UseTempRegister(instr->index()); | 2540 LOperand* index = UseTempRegister(instr->index()); |
2541 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2541 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2542 } | 2542 } |
2543 | 2543 |
2544 | 2544 |
2545 } } // namespace v8::internal | 2545 } } // namespace v8::internal |
2546 | 2546 |
2547 #endif // V8_TARGET_ARCH_X64 | 2547 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |