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

Unified Diff: runtime/vm/intermediate_language.h

Issue 1586043005: Check comparison tag before checking attributes in IfThenElseInstr::AttributesEqual. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 876a015020e4c08416a878efba78cb993308cd84..0a408487a340bd03e16b585b7eccd342a4c0fbe5 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -3194,7 +3194,8 @@ class IfThenElseInstr : public Definition {
}
virtual bool AttributesEqual(Instruction* other) const {
IfThenElseInstr* other_if_then_else = other->AsIfThenElse();
- return comparison()->AttributesEqual(other_if_then_else->comparison()) &&
+ return (comparison()->tag() == other_if_then_else->comparison()->tag()) &&
+ comparison()->AttributesEqual(other_if_then_else->comparison()) &&
(if_true_ == other_if_then_else->if_true_) &&
(if_false_ == other_if_then_else->if_false_);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698