| Index: runtime/vm/object.cc
|
| ===================================================================
|
| --- runtime/vm/object.cc (revision 23242)
|
| +++ runtime/vm/object.cc (working copy)
|
| @@ -53,6 +53,7 @@
|
| DECLARE_FLAG(bool, trace_compiler);
|
| DECLARE_FLAG(bool, eliminate_type_checks);
|
| DECLARE_FLAG(bool, enable_type_checks);
|
| +DECLARE_FLAG(int, deoptimization_counter_threshold);
|
|
|
| static const char* kGetterPrefix = "get:";
|
| static const intptr_t kGetterPrefixLength = strlen(kGetterPrefix);
|
| @@ -3418,6 +3419,15 @@
|
| }
|
|
|
|
|
| +void Function::EnsureDeoptHistory() const {
|
| + Array& array = Array::Handle(deopt_history());
|
| + if (array.IsNull()) {
|
| + array = Array::New(FLAG_deoptimization_counter_threshold);
|
| + set_deopt_history(array);
|
| + }
|
| +}
|
| +
|
| +
|
| RawContextScope* Function::context_scope() const {
|
| if (IsClosureFunction()) {
|
| const Object& obj = Object::Handle(raw_ptr()->data_);
|
|
|