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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 10828414: Fix a bug in Equals for UseVal and ConstantVal. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 11030)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -44,6 +44,18 @@
}
+bool UseVal::AttributesEqual(Computation* other) const {
+ return other->IsUse()
+ && definition() == other->AsUse()->definition();
+}
+
+
+bool ConstantVal::AttributesEqual(Computation* other) const {
+ return other->IsConstant()
+ && value().raw() == other->AsConstant()->value().raw();
+}
+
+
bool CheckClassComp::AttributesEqual(Computation* other) const {
CheckClassComp* other_check = other->AsCheckClass();
if (other_check == NULL) return false;
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698