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

Unified Diff: runtime/vm/flow_graph_inliner.cc

Issue 1390153004: Move deopt_id and related helpers/definitions from Isolate to Thread (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
Index: runtime/vm/flow_graph_inliner.cc
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
index 92faa18455c83c7907b04bf4accda71e753e0081..f8bcb22fdf9b928d01ed2540806560ca836bb72d 100644
--- a/runtime/vm/flow_graph_inliner.cc
+++ b/runtime/vm/flow_graph_inliner.cc
@@ -677,8 +677,8 @@ class CallSiteInliner : public ValueObject {
}
// Save and clear deopt id.
- const intptr_t prev_deopt_id = isolate()->deopt_id();
- isolate()->set_deopt_id(0);
+ const intptr_t prev_deopt_id = thread()->deopt_id();
+ thread()->set_deopt_id(0);
// Install bailout jump.
LongJumpScope jump;
if (setjmp(*jump.Set()) == 0) {
@@ -701,7 +701,7 @@ class CallSiteInliner : public ValueObject {
FlowGraphBuilder builder(*parsed_function,
*ic_data_array,
exit_collector,
- Isolate::kNoDeoptId);
+ Thread::kNoDeoptId);
builder.SetInitialBlockId(caller_graph_->max_block_id());
FlowGraph* callee_graph;
{
@@ -813,7 +813,7 @@ class CallSiteInliner : public ValueObject {
(size > FLAG_inlining_constant_arguments_max_size_threshold)) {
function.set_is_inlinable(false);
}
- isolate()->set_deopt_id(prev_deopt_id);
+ thread()->set_deopt_id(prev_deopt_id);
TRACE_INLINING(THR_Print(" Bailout: heuristics with "
"code size: %" Pd ", "
"call sites: %" Pd ", "
@@ -843,7 +843,7 @@ class CallSiteInliner : public ValueObject {
if (is_recursive_call) {
inlined_recursive_call_ = true;
}
- isolate()->set_deopt_id(prev_deopt_id);
+ thread()->set_deopt_id(prev_deopt_id);
call_data->callee_graph = callee_graph;
call_data->parameter_stubs = param_stubs;
@@ -873,7 +873,7 @@ class CallSiteInliner : public ValueObject {
Error& error = Error::Handle();
error = isolate()->object_store()->sticky_error();
isolate()->object_store()->clear_sticky_error();
- isolate()->set_deopt_id(prev_deopt_id);
+ thread()->set_deopt_id(prev_deopt_id);
TRACE_INLINING(THR_Print(" Bailout: %s\n", error.ToErrorCString()));
PRINT_INLINING_TREE("Bailout",
&call_data->caller, &function, call);
@@ -1497,7 +1497,7 @@ bool PolymorphicInliner::TryInlineRecognizedMethod(intptr_t receiver_cid,
GraphEntryInstr* graph_entry =
new(Z) GraphEntryInstr(*temp_parsed_function,
entry,
- Isolate::kNoDeoptId); // No OSR id.
+ Thread::kNoDeoptId); // No OSR id.
// Update polymorphic inliner state.
inlined_entries_.Add(graph_entry);
exit_collector_->Union(exit_collector);

Powered by Google App Engine
This is Rietveld 408576698