Index: runtime/vm/compiler.cc |
=================================================================== |
--- runtime/vm/compiler.cc (revision 23072) |
+++ runtime/vm/compiler.cc (working copy) |
@@ -373,6 +373,14 @@ |
Code::Handle(function.unoptimized_code()).EntryPoint()); |
} |
+ // If not yet present, allocate deoptimization history array. |
+ const Array& deopt_history = Array::Handle(function.deopt_history()); |
Kevin Millikin (Google)
2013/05/24 11:39:21
You can use just one handle here.
Array& deopt_hi
Florian Schneider
2013/05/24 11:53:02
Done.
|
+ if (deopt_history.IsNull()) { |
+ const Array& array = |
+ Array::Handle(Array::New(FLAG_deoptimization_counter_threshold)); |
+ function.set_deopt_history(array); |
+ } |
+ |
for (intptr_t i = 0; i < guarded_fields.length(); i++) { |
const Field& field = *guarded_fields[i]; |
field.RegisterDependentCode(code); |