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

Unified Diff: runtime/vm/object.cc

Issue 23788012: Fix an off-by-one error in deoptimization compression. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added changes to all platform files. Created 7 years, 3 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/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
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index c3d31e7de87fedd51eabc943f6144eabb59684c9..8851c622f9d459273ef975bbd858bdb5c12bf00a 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -8567,6 +8567,20 @@ const char* DeoptInfo::ToCString() const {
}
+// Returns a bool so it can be asserted.
+bool DeoptInfo::VerifyDecompression(const GrowableArray<DeoptInstr*>& original,
+ const Array& deopt_table) const {
+ intptr_t length = TranslationLength();
+ GrowableArray<DeoptInstr*> unpacked(length);
+ ToInstructions(deopt_table, &unpacked);
+ ASSERT(unpacked.length() == original.length());
+ for (intptr_t i = 0; i < unpacked.length(); ++i) {
+ ASSERT(unpacked[i]->Equals(*original[i]));
+ }
+ return true;
+}
+
+
void DeoptInfo::PrintToJSONStream(JSONStream* stream, bool ref) const {
JSONObject jsobj(stream);
}
« 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