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

Unified Diff: runtime/vm/deopt_instructions.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/deopt_instructions.h ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/deopt_instructions.cc
diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
index 54fbb010a9c88887859e4755d5269d8a6fc8da2a..adca206f71781be7123f00545f965baf618aafcd 100644
--- a/runtime/vm/deopt_instructions.cc
+++ b/runtime/vm/deopt_instructions.cc
@@ -1018,7 +1018,7 @@ intptr_t DeoptInfoBuilder::FindMaterialization(
}
-RawDeoptInfo* DeoptInfoBuilder::CreateDeoptInfo() {
+RawDeoptInfo* DeoptInfoBuilder::CreateDeoptInfo(const Array& deopt_table) {
// TODO(vegorov): enable compression of deoptimization info containing object
// materialization instructions.
const bool disable_compression =
@@ -1054,14 +1054,17 @@ RawDeoptInfo* DeoptInfoBuilder::CreateDeoptInfo() {
node = new TrieNode(instr, current_info_number_);
node->AddChild(child);
}
- suffix->AddChild(node);
if (suffix_length > 1) {
+ suffix->AddChild(node);
DeoptInstr* instr =
new DeoptSuffixInstr(suffix->info_number(), suffix_length);
deopt_info.SetAt(length - 1, instr->kind(), instr->from_index());
+ } else {
+ trie_root_->AddChild(node);
}
+ ASSERT(deopt_info.VerifyDecompression(instructions_, deopt_table));
instructions_.Clear();
materializations_.Clear();
frame_start_ = -1;
« no previous file with comments | « runtime/vm/deopt_instructions.h ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698