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

Unified Diff: runtime/vm/object.cc

Issue 11412137: Reenable function source fingerprint checks. Added checks to MethodRecognizer. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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/object.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 15218)
+++ runtime/vm/object.cc (working copy)
@@ -4215,12 +4215,25 @@
result = 31 * result + val;
tokens_iterator.Advance();
}
- result = result & ((static_cast<intptr_t>(1) << 30) - 1);
+ result = result & ((static_cast<uint32_t>(1) << 31) - 1);
ASSERT(result <= static_cast<uint32_t>(kMaxInt32));
return result;
}
+bool Function::CheckSourceFingerprint(intptr_t fp) const {
+ if (SourceFingerprint() != fp) {
+ OS::Print("FP mismatch while recogbnizing method %s:"
+ " expecting %"Pd" found %d\n",
+ ToFullyQualifiedCString(),
+ fp,
+ SourceFingerprint());
+ return false;
+ }
+ return true;
+}
+
+
const char* Function::ToCString() const {
const char* static_str = is_static() ? " static" : "";
const char* abstract_str = is_abstract() ? " abstract" : "";
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698