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

Side by Side Diff: src/hydrogen.cc

Issue 134733007: Fix for potential issue related to replacing CheckMaps with values. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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-check-elimination.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 3897 matching lines...) Expand 10 before | Expand all | Expand 10 after
3908 3908
3909 #ifdef DEBUG 3909 #ifdef DEBUG
3910 for (int i = 0; i < block->phis()->length(); i++) { 3910 for (int i = 0; i < block->phis()->length(); i++) {
3911 HPhi* phi = block->phis()->at(i); 3911 HPhi* phi = block->phis()->at(i);
3912 ASSERT(phi->ActualValue() == phi); 3912 ASSERT(phi->ActualValue() == phi);
3913 } 3913 }
3914 #endif 3914 #endif
3915 3915
3916 for (HInstructionIterator it(block); !it.Done(); it.Advance()) { 3916 for (HInstructionIterator it(block); !it.Done(); it.Advance()) {
3917 HInstruction* instruction = it.Current(); 3917 HInstruction* instruction = it.Current();
3918 if (instruction->ActualValue() != instruction) { 3918 if (instruction->CheckFlag(HValue::kIsDead)) {
3919 // The instruction was marked as deleted but left in the graph
3920 // as a control flow dependency point for subsequent
3921 // instructions.
3922 instruction->DeleteAndReplaceWith(instruction->ActualValue());
titzer 2014/01/23 18:34:46 Not sure this is safe for every kind of instructio
Igor Sheludko 2014/01/28 17:45:05 Done.
3923
3924 } else if (instruction->ActualValue() != instruction) {
3919 ASSERT(instruction->IsInformativeDefinition()); 3925 ASSERT(instruction->IsInformativeDefinition());
3920 if (instruction->IsPurelyInformativeDefinition()) { 3926 if (instruction->IsPurelyInformativeDefinition()) {
3921 instruction->DeleteAndReplaceWith(instruction->RedefinedOperand()); 3927 instruction->DeleteAndReplaceWith(instruction->RedefinedOperand());
3922 } else { 3928 } else {
3923 instruction->ReplaceAllUsesWith(instruction->ActualValue()); 3929 instruction->ReplaceAllUsesWith(instruction->ActualValue());
3924 } 3930 }
3925 } 3931 }
3926 } 3932 }
3927 } 3933 }
3928 } 3934 }
(...skipping 7077 matching lines...) Expand 10 before | Expand all | Expand 10 after
11006 if (ShouldProduceTraceOutput()) { 11012 if (ShouldProduceTraceOutput()) {
11007 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 11013 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
11008 } 11014 }
11009 11015
11010 #ifdef DEBUG 11016 #ifdef DEBUG
11011 graph_->Verify(false); // No full verify. 11017 graph_->Verify(false); // No full verify.
11012 #endif 11018 #endif
11013 } 11019 }
11014 11020
11015 } } // namespace v8::internal 11021 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-check-elimination.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698