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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 block->UpdateEnvironment(last_environment); | 861 block->UpdateEnvironment(last_environment); |
862 ASSERT(pred->argument_count() >= 0); | 862 ASSERT(pred->argument_count() >= 0); |
863 argument_count_ = pred->argument_count(); | 863 argument_count_ = pred->argument_count(); |
864 } else { | 864 } else { |
865 // We are at a state join => process phis. | 865 // We are at a state join => process phis. |
866 HBasicBlock* pred = block->predecessors()->at(0); | 866 HBasicBlock* pred = block->predecessors()->at(0); |
867 // No need to copy the environment, it cannot be used later. | 867 // No need to copy the environment, it cannot be used later. |
868 HEnvironment* last_environment = pred->last_environment(); | 868 HEnvironment* last_environment = pred->last_environment(); |
869 for (int i = 0; i < block->phis()->length(); ++i) { | 869 for (int i = 0; i < block->phis()->length(); ++i) { |
870 HPhi* phi = block->phis()->at(i); | 870 HPhi* phi = block->phis()->at(i); |
871 if (phi->merged_index() < last_environment->length()) { | 871 if (phi->HasMergedIndex()) { |
872 last_environment->SetValueAt(phi->merged_index(), phi); | 872 last_environment->SetValueAt(phi->merged_index(), phi); |
873 } | 873 } |
874 } | 874 } |
875 for (int i = 0; i < block->deleted_phis()->length(); ++i) { | 875 for (int i = 0; i < block->deleted_phis()->length(); ++i) { |
876 if (block->deleted_phis()->at(i) < last_environment->length()) { | 876 if (block->deleted_phis()->at(i) < last_environment->length()) { |
877 last_environment->SetValueAt(block->deleted_phis()->at(i), | 877 last_environment->SetValueAt(block->deleted_phis()->at(i), |
878 graph_->GetConstantUndefined()); | 878 graph_->GetConstantUndefined()); |
879 } | 879 } |
880 } | 880 } |
881 block->UpdateEnvironment(last_environment); | 881 block->UpdateEnvironment(last_environment); |
(...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2745 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2745 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2746 LOperand* object = UseRegister(instr->object()); | 2746 LOperand* object = UseRegister(instr->object()); |
2747 LOperand* index = UseTempRegister(instr->index()); | 2747 LOperand* index = UseTempRegister(instr->index()); |
2748 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2748 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2749 } | 2749 } |
2750 | 2750 |
2751 | 2751 |
2752 } } // namespace v8::internal | 2752 } } // namespace v8::internal |
2753 | 2753 |
2754 #endif // V8_TARGET_ARCH_IA32 | 2754 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |