-
-
Save caitp/589dcc90e80ddc37d3ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc | |
index eb9261d..9bc01a7 100644 | |
--- a/src/crankshaft/hydrogen.cc | |
+++ b/src/crankshaft/hydrogen.cc | |
@@ -339,8 +339,8 @@ void HBasicBlock::RegisterPredecessor(HBasicBlock* pred) { | |
DCHECK(IsLoopHeader() || first_ == NULL); | |
HEnvironment* incoming_env = pred->last_environment(); | |
if (IsLoopHeader()) { | |
- DCHECK_EQ(phis()->length(), incoming_env->length()); | |
- for (int i = 0; i < phis_.length(); ++i) { | |
+ //DCHECK_EQ(phis()->length(), incoming_env->length()); | |
+ for (int i = 0; i < std::min(phis_.length(), incoming_env->length()); ++i) { | |
phis_[i]->AddInput(incoming_env->values()->at(i)); | |
} | |
} else { | |
@@ -13176,9 +13176,9 @@ void HEnvironment::Initialize(const HEnvironment* other) { | |
void HEnvironment::AddIncomingEdge(HBasicBlock* block, HEnvironment* other) { | |
DCHECK(!block->IsLoopHeader()); | |
- DCHECK(values_.length() == other->values_.length()); | |
+ //DCHECK(values_.length() >= other->values_.length()); | |
- int length = values_.length(); | |
+ int length = std::min(values_.length(), other->values_.length()); | |
for (int i = 0; i < length; ++i) { | |
HValue* value = values_[i]; | |
if (value != NULL && value->IsPhi() && value->block() == block) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment