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

Unified Diff: runtime/vm/code_generator.cc

Issue 11040058: Compress deoptimization information by sharing common suffixes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Ditto. Created 8 years, 2 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 | runtime/vm/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index f8e7c377ae0c60b0eaefc59960cbf9c545ddb222..b182fb948ccc1c76187049a02ee3fc2908f81487 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -1612,7 +1612,7 @@ DEFINE_LEAF_RUNTIME_ENTRY(intptr_t, DeoptimizeCopyFrame,
const intptr_t num_args =
function.HasOptionalParameters() ? 0 : function.num_fixed_parameters();
intptr_t unoptimized_stack_size =
- + deopt_info.Length() - num_args
+ + deopt_info.TranslationLength() - num_args
- 2; // Subtract caller FP and PC.
return unoptimized_stack_size * kWordSize;
}
@@ -1623,12 +1623,11 @@ END_LEAF_RUNTIME_ENTRY
static intptr_t DeoptimizeWithDeoptInfo(const Code& code,
const DeoptInfo& deopt_info,
const StackFrame& caller_frame) {
- const intptr_t len = deopt_info.Length();
+ const intptr_t len = deopt_info.TranslationLength();
GrowableArray<DeoptInstr*> deopt_instructions(len);
- for (intptr_t i = 0; i < len; i++) {
- deopt_instructions.Add(DeoptInstr::Create(deopt_info.Instruction(i),
- deopt_info.FromIndex(i)));
- }
+ const Array& deopt_table = Array::Handle(code.deopt_info_array());
+ ASSERT(!deopt_table.IsNull());
+ deopt_info.ToInstructions(deopt_table, &deopt_instructions);
intptr_t* start = reinterpret_cast<intptr_t*>(caller_frame.sp() - kWordSize);
const Function& function = Function::Handle(code.function());
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698