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

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

Issue 22494003: Allow HPhis to have an invalid merge index. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix comment. 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.h » ('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 if (phi->merged_index() < last_environment->length()) { 818 // TODO(mstarzinger): The length check below should actually not
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()) {
819 last_environment->SetValueAt(phi->merged_index(), phi); 823 last_environment->SetValueAt(phi->merged_index(), phi);
820 } 824 }
821 } 825 }
822 for (int i = 0; i < block->deleted_phis()->length(); ++i) { 826 for (int i = 0; i < block->deleted_phis()->length(); ++i) {
823 if (block->deleted_phis()->at(i) < last_environment->length()) { 827 if (block->deleted_phis()->at(i) < last_environment->length()) {
824 last_environment->SetValueAt(block->deleted_phis()->at(i), 828 last_environment->SetValueAt(block->deleted_phis()->at(i),
825 graph_->GetConstantUndefined()); 829 graph_->GetConstantUndefined());
826 } 830 }
827 } 831 }
828 block->UpdateEnvironment(last_environment); 832 block->UpdateEnvironment(last_environment);
(...skipping 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after
2609 2613
2610 2614
2611 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2615 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2612 LOperand* object = UseRegister(instr->object()); 2616 LOperand* object = UseRegister(instr->object());
2613 LOperand* index = UseRegister(instr->index()); 2617 LOperand* index = UseRegister(instr->index());
2614 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2618 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2615 } 2619 }
2616 2620
2617 2621
2618 } } // namespace v8::internal 2622 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698