| Index: runtime/vm/kernel_to_il.h
|
| diff --git a/runtime/vm/kernel_to_il.h b/runtime/vm/kernel_to_il.h
|
| index cc3f0069abbbac382eb681a24ee54029391fca9b..7663fd393cc7e234236583bc296549a305d5a19f 100644
|
| --- a/runtime/vm/kernel_to_il.h
|
| +++ b/runtime/vm/kernel_to_il.h
|
| @@ -786,6 +786,7 @@ class FlowGraphBuilder : public ExpressionVisitor, public StatementVisitor {
|
| FlowGraphBuilder(TreeNode* node,
|
| ParsedFunction* parsed_function,
|
| const ZoneGrowableArray<const ICData*>& ic_data_array,
|
| + ZoneGrowableArray<intptr_t>* context_level_array,
|
| InlineExitCollector* exit_collector,
|
| intptr_t osr_id,
|
| intptr_t first_block_id = 1);
|
| @@ -1052,14 +1053,21 @@ class FlowGraphBuilder : public ExpressionVisitor, public StatementVisitor {
|
| ParsedFunction* parsed_function_;
|
| intptr_t osr_id_;
|
| const ZoneGrowableArray<const ICData*>& ic_data_array_;
|
| + // Contains (deopt_id, context_level) pairs.
|
| + ZoneGrowableArray<intptr_t>* context_level_array_;
|
| InlineExitCollector* exit_collector_;
|
|
|
| intptr_t next_block_id_;
|
| intptr_t AllocateBlockId() { return next_block_id_++; }
|
|
|
| intptr_t GetNextDeoptId() {
|
| - // TODO(rmacnak): Record current scope / context level.
|
| - return thread_->GetNextDeoptId();
|
| + intptr_t deopt_id = thread_->GetNextDeoptId();
|
| + if (context_level_array_ != NULL) {
|
| + intptr_t level = context_depth_;
|
| + context_level_array_->Add(deopt_id);
|
| + context_level_array_->Add(level);
|
| + }
|
| + return deopt_id;
|
| }
|
|
|
| intptr_t next_function_id_;
|
|
|