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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 block->UpdateEnvironment(last_environment); | 811 block->UpdateEnvironment(last_environment); |
812 ASSERT(pred->argument_count() >= 0); | 812 ASSERT(pred->argument_count() >= 0); |
813 argument_count_ = pred->argument_count(); | 813 argument_count_ = pred->argument_count(); |
814 } else { | 814 } else { |
815 // We are at a state join => process phis. | 815 // We are at a state join => process phis. |
816 HBasicBlock* pred = block->predecessors()->at(0); | 816 HBasicBlock* pred = block->predecessors()->at(0); |
817 // No need to copy the environment, it cannot be used later. | 817 // No need to copy the environment, it cannot be used later. |
818 HEnvironment* last_environment = pred->last_environment(); | 818 HEnvironment* last_environment = pred->last_environment(); |
819 for (int i = 0; i < block->phis()->length(); ++i) { | 819 for (int i = 0; i < block->phis()->length(); ++i) { |
820 HPhi* phi = block->phis()->at(i); | 820 HPhi* phi = block->phis()->at(i); |
821 if (phi->merged_index() < last_environment->length()) { | 821 if (phi->HasMergedIndex()) { |
822 last_environment->SetValueAt(phi->merged_index(), phi); | 822 last_environment->SetValueAt(phi->merged_index(), phi); |
823 } | 823 } |
824 } | 824 } |
825 for (int i = 0; i < block->deleted_phis()->length(); ++i) { | 825 for (int i = 0; i < block->deleted_phis()->length(); ++i) { |
826 if (block->deleted_phis()->at(i) < last_environment->length()) { | 826 if (block->deleted_phis()->at(i) < last_environment->length()) { |
827 last_environment->SetValueAt(block->deleted_phis()->at(i), | 827 last_environment->SetValueAt(block->deleted_phis()->at(i), |
828 graph_->GetConstantUndefined()); | 828 graph_->GetConstantUndefined()); |
829 } | 829 } |
830 } | 830 } |
831 block->UpdateEnvironment(last_environment); | 831 block->UpdateEnvironment(last_environment); |
(...skipping 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2529 | 2529 |
2530 | 2530 |
2531 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2531 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2532 LOperand* object = UseRegister(instr->object()); | 2532 LOperand* object = UseRegister(instr->object()); |
2533 LOperand* index = UseRegister(instr->index()); | 2533 LOperand* index = UseRegister(instr->index()); |
2534 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2534 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2535 } | 2535 } |
2536 | 2536 |
2537 | 2537 |
2538 } } // namespace v8::internal | 2538 } } // namespace v8::internal |
OLD | NEW |