Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: src/arm/lithium-arm.cc

Issue 22589005: Make sure polymorphic element access creates non-replaying phis. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 block->UpdateEnvironment(last_environment); 808 block->UpdateEnvironment(last_environment);
809 ASSERT(pred->argument_count() >= 0); 809 ASSERT(pred->argument_count() >= 0);
810 argument_count_ = pred->argument_count(); 810 argument_count_ = pred->argument_count();
811 } else { 811 } else {
812 // We are at a state join => process phis. 812 // We are at a state join => process phis.
813 HBasicBlock* pred = block->predecessors()->at(0); 813 HBasicBlock* pred = block->predecessors()->at(0);
814 // No need to copy the environment, it cannot be used later. 814 // No need to copy the environment, it cannot be used later.
815 HEnvironment* last_environment = pred->last_environment(); 815 HEnvironment* last_environment = pred->last_environment();
816 for (int i = 0; i < block->phis()->length(); ++i) { 816 for (int i = 0; i < block->phis()->length(); ++i) {
817 HPhi* phi = block->phis()->at(i); 817 HPhi* phi = block->phis()->at(i);
818 // TODO(mstarzinger): The length check below should actually not 818 if (phi->HasMergedIndex()) {
819 // be necessary, but some array stubs already rely on it. This
820 // should be investigated and fixed.
821 if (phi->HasMergedIndex() &&
822 phi->merged_index() < last_environment->length()) {
823 last_environment->SetValueAt(phi->merged_index(), phi); 819 last_environment->SetValueAt(phi->merged_index(), phi);
824 } 820 }
825 } 821 }
826 for (int i = 0; i < block->deleted_phis()->length(); ++i) { 822 for (int i = 0; i < block->deleted_phis()->length(); ++i) {
827 if (block->deleted_phis()->at(i) < last_environment->length()) { 823 if (block->deleted_phis()->at(i) < last_environment->length()) {
828 last_environment->SetValueAt(block->deleted_phis()->at(i), 824 last_environment->SetValueAt(block->deleted_phis()->at(i),
829 graph_->GetConstantUndefined()); 825 graph_->GetConstantUndefined());
830 } 826 }
831 } 827 }
832 block->UpdateEnvironment(last_environment); 828 block->UpdateEnvironment(last_environment);
(...skipping 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after
2613 2609
2614 2610
2615 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2611 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2616 LOperand* object = UseRegister(instr->object()); 2612 LOperand* object = UseRegister(instr->object());
2617 LOperand* index = UseRegister(instr->index()); 2613 LOperand* index = UseRegister(instr->index());
2618 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2614 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2619 } 2615 }
2620 2616
2621 2617
2622 } } // namespace v8::internal 2618 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698