Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(783)

Unified Diff: runtime/vm/kernel_to_il.h

Issue 2903993002: Remember deopt-id -> context-level mappings in var descriptors. (Closed)
Patch Set: update descriptor tests Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intrinsifier.cc ('k') | runtime/vm/kernel_to_il.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « runtime/vm/intrinsifier.cc ('k') | runtime/vm/kernel_to_il.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698