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

Unified Diff: src/hydrogen-instructions.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen-escape-analysis.cc ('k') | src/hydrogen-osr.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index f977a750d946a6b24d657b08229fc4a238c368b2..25bcbda840bef5a41c031943710b7450c46698b6 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -3020,7 +3020,7 @@ class HPhi: public HValue {
non_phi_uses_[i] = 0;
indirect_uses_[i] = 0;
}
- ASSERT(merged_index >= 0);
+ ASSERT(merged_index >= 0 || merged_index == kInvalidMergedIndex);
SetFlag(kFlexibleRepresentation);
SetFlag(kAllowUndefinedAsNaN);
}
@@ -3043,6 +3043,7 @@ class HPhi: public HValue {
bool HasRealUses();
bool IsReceiver() const { return merged_index_ == 0; }
+ bool HasMergedIndex() const { return merged_index_ != kInvalidMergedIndex; }
int merged_index() const { return merged_index_; }
@@ -3105,6 +3106,9 @@ class HPhi: public HValue {
void SimplifyConstantInputs();
+ // Marker value representing an invalid merge index.
+ static const int kInvalidMergedIndex = -1;
+
protected:
virtual void DeleteFromGraph();
virtual void InternalSetOperandAt(int index, HValue* value) {
« no previous file with comments | « src/hydrogen-escape-analysis.cc ('k') | src/hydrogen-osr.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698