Index: runtime/vm/compiler.cc |
=================================================================== |
--- runtime/vm/compiler.cc (revision 23242) |
+++ runtime/vm/compiler.cc (working copy) |
@@ -499,11 +499,7 @@ |
} |
// If not yet present, allocate deoptimization history array. |
- Array& deopt_history = Array::Handle(function.deopt_history()); |
- if (deopt_history.IsNull()) { |
- deopt_history = Array::New(FLAG_deoptimization_counter_threshold); |
- function.set_deopt_history(deopt_history); |
- } |
+ function.EnsureDeoptHistory(); |
for (intptr_t i = 0; i < guarded_fields.length(); i++) { |
const Field& field = *guarded_fields[i]; |