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

Side by Side Diff: src/mips/lithium-mips.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 | « src/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // TODO(mstarzinger): The length check below should actually not 821 if (phi->HasMergedIndex()) {
822 // be necessary, but some array stubs already rely on it. This
823 // should be investigated and fixed.
824 if (phi->HasMergedIndex() &&
825 phi->merged_index() < last_environment->length()) {
826 last_environment->SetValueAt(phi->merged_index(), phi); 822 last_environment->SetValueAt(phi->merged_index(), phi);
827 } 823 }
828 } 824 }
829 for (int i = 0; i < block->deleted_phis()->length(); ++i) { 825 for (int i = 0; i < block->deleted_phis()->length(); ++i) {
830 if (block->deleted_phis()->at(i) < last_environment->length()) { 826 if (block->deleted_phis()->at(i) < last_environment->length()) {
831 last_environment->SetValueAt(block->deleted_phis()->at(i), 827 last_environment->SetValueAt(block->deleted_phis()->at(i),
832 graph_->GetConstantUndefined()); 828 graph_->GetConstantUndefined());
833 } 829 }
834 } 830 }
835 block->UpdateEnvironment(last_environment); 831 block->UpdateEnvironment(last_environment);
(...skipping 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after
2508 2504
2509 2505
2510 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2506 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2511 LOperand* object = UseRegister(instr->object()); 2507 LOperand* object = UseRegister(instr->object());
2512 LOperand* index = UseRegister(instr->index()); 2508 LOperand* index = UseRegister(instr->index());
2513 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2509 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2514 } 2510 }
2515 2511
2516 2512
2517 } } // namespace v8::internal 2513 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698