Skip to content

Commit 2d6532c

Browse files
mralephwhesse
authored andcommitted
Check comparison tag before checking attributes in IfThenElseInstr::AttributesEqual.
AttributesEqual must only be invoked on the instructions of the same type. [email protected], [email protected] BUG=http://dartbug.com/25422 Review URL: https://codereview.chromium.org/1586043005 .
1 parent 3f71333 commit 2d6532c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

runtime/vm/intermediate_language.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3194,7 +3194,8 @@ class IfThenElseInstr : public Definition {
31943194
}
31953195
virtual bool AttributesEqual(Instruction* other) const {
31963196
IfThenElseInstr* other_if_then_else = other->AsIfThenElse();
3197-
return comparison()->AttributesEqual(other_if_then_else->comparison()) &&
3197+
return (comparison()->tag() == other_if_then_else->comparison()->tag()) &&
3198+
comparison()->AttributesEqual(other_if_then_else->comparison()) &&
31983199
(if_true_ == other_if_then_else->if_true_) &&
31993200
(if_false_ == other_if_then_else->if_false_);
32003201
}

0 commit comments

Comments
 (0)