| Index: runtime/vm/kernel_to_il.cc
|
| diff --git a/runtime/vm/kernel_to_il.cc b/runtime/vm/kernel_to_il.cc
|
| index 6d95f78172a293f71ad406982c9b9860b78493df..9f2d4601307fbe47a96f02a3a28c0840969d7750 100644
|
| --- a/runtime/vm/kernel_to_il.cc
|
| +++ b/runtime/vm/kernel_to_il.cc
|
| @@ -2311,23 +2311,14 @@ Fragment FlowGraphBuilder::AdjustContextTo(int depth) {
|
| }
|
|
|
|
|
| -bool FlowGraphBuilder::HasContextScope() const {
|
| - const ContextScope& context_scope =
|
| - ContextScope::Handle(parsed_function_->function().context_scope());
|
| - return !context_scope.IsNull() && context_scope.num_variables() > 0;
|
| -}
|
| -
|
| -
|
| Fragment FlowGraphBuilder::PushContext(int size) {
|
| ASSERT(size > 0);
|
| Fragment instructions = AllocateContext(size);
|
| - if (context_depth_ != 0 || HasContextScope()) {
|
| - LocalVariable* context = MakeTemporary();
|
| - instructions += LoadLocal(context);
|
| - instructions += LoadLocal(parsed_function_->current_context_var());
|
| - instructions +=
|
| - StoreInstanceField(TokenPosition::kNoSource, Context::parent_offset());
|
| - }
|
| + LocalVariable* context = MakeTemporary();
|
| + instructions += LoadLocal(context);
|
| + instructions += LoadLocal(parsed_function_->current_context_var());
|
| + instructions +=
|
| + StoreInstanceField(TokenPosition::kNoSource, Context::parent_offset());
|
| instructions += StoreLocal(TokenPosition::kNoSource,
|
| parsed_function_->current_context_var());
|
| ++context_depth_;
|
|
|