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

Unified Diff: runtime/vm/compiler.cc

Issue 335173002: Save ICData of unoptimized code in the function, thus preserving it across repated unoptimized comp… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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/flow_graph_compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
===================================================================
--- runtime/vm/compiler.cc (revision 37375)
+++ runtime/vm/compiler.cc (working copy)
@@ -241,6 +241,7 @@
}
+
// Return false if bailed out.
static bool CompileParsedFunctionHelper(ParsedFunction* parsed_function,
bool optimized,
@@ -283,9 +284,7 @@
// builder uses it to attach it to nodes.
ASSERT(function.deoptimization_counter() <
FLAG_deoptimization_counter_threshold);
- const Code& unoptimized_code =
- Code::Handle(function.unoptimized_code());
- ic_data_array = unoptimized_code.ExtractTypeFeedbackArray();
+ ic_data_array = function.RestoreICDataMap();
}
// Build the flow graph.
@@ -576,7 +575,10 @@
const Field* field = (*flow_graph->guarded_fields())[i];
field->RegisterDependentCode(code);
}
- } else {
+ } else { // not optimized.
+ if (function.ic_data_array() == Array::null()) {
+ function.SaveICDataMap(graph_compiler.deopt_id_to_ic_data());
+ }
function.set_unoptimized_code(code);
function.AttachCode(code);
ASSERT(CodePatcher::CodeIsPatchable(code));
@@ -767,7 +769,7 @@
TIMERSCOPE(isolate, time_compilation);
Timer per_compile_timer(FLAG_trace_compiler, "Compilation time");
per_compile_timer.Start();
- ParsedFunction* parsed_function = new ParsedFunction(
+ ParsedFunction* parsed_function = new(isolate) ParsedFunction(
isolate, Function::ZoneHandle(isolate, function.raw()));
if (FLAG_trace_compiler) {
OS::Print("Compiling %s%sfunction: '%s' @ token %" Pd ", size %" Pd "\n",
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698