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

Unified Diff: runtime/vm/kernel_to_il.cc

Issue 2697083002: Revert "Enable causal stacktrace in kernel" (Closed)
Patch Set: Created 3 years, 10 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 | « pkg/kernel/lib/transformations/continuation.dart ('k') | tests/language/language_kernel.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_to_il.cc
diff --git a/runtime/vm/kernel_to_il.cc b/runtime/vm/kernel_to_il.cc
index fd383f817ff5b0b1b0ca1492cdfb0b8e0bbc153d..984de1d4aeabf6f9dda81ac56c48f9fd6ca966c9 100644
--- a/runtime/vm/kernel_to_il.cc
+++ b/runtime/vm/kernel_to_il.cc
@@ -720,15 +720,6 @@ void ScopeBuilder::VisitFunctionNode(FunctionNode* node) {
scope_->CaptureVariable(temp);
}
}
- if (FLAG_causal_async_stacks) {
- // TODO(28777): Either remove the variable here, or update the dart side
- // so we don't always generate it if this flag is not set.
- LocalVariable* temp =
- scope_->LookupVariable(Symbols::AsyncStackTraceVar(), true);
- if (temp != NULL) {
- scope_->CaptureVariable(temp);
- }
- }
}
}
@@ -2564,17 +2555,6 @@ Fragment FlowGraphBuilder::Return(TokenPosition position) {
new (Z) DebugStepCheckInstr(position, RawPcDescriptors::kRuntimeCall);
}
- if (FLAG_causal_async_stacks &&
- function.name() == Symbols::AsyncOperation().raw()) {
- // We are returning from an asynchronous closure. Before we do that, be
- // sure to clear the thread's asynchronous stack trace.
- const Function& target = Function::ZoneHandle(
- Z, I->object_store()->async_clear_thread_stack_trace());
- ASSERT(!target.IsNull());
- instructions += StaticCall(TokenPosition::kNoSource, target, 0);
- instructions += Drop();
- }
-
ReturnInstr* return_instr = new (Z) ReturnInstr(position, value);
if (exit_collector_ != NULL) exit_collector_->AddExit(return_instr);
@@ -3191,7 +3171,7 @@ FlowGraph* FlowGraphBuilder::BuildGraphOfFunction(FunctionNode* function,
// The code we are building will be executed right after we enter
// the function and before any nested contexts are allocated.
// Reset current context_depth_ to match this.
- const intptr_t current_context_depth = context_depth_;
+ intptr_t current_context_depth = context_depth_;
context_depth_ = scopes_->yield_jump_variable->owner()->context_level();
// Prepend an entry corresponding to normal entry to the function.
@@ -3257,37 +3237,6 @@ FlowGraph* FlowGraphBuilder::BuildGraphOfFunction(FunctionNode* function,
context_depth_ = current_context_depth;
}
- if (FLAG_causal_async_stacks &&
- dart_function.name() == Symbols::AsyncOperation().raw()) {
- // The code we are building will be executed right after we enter
- // the function and before any nested contexts are allocated.
- // Reset current context_depth_ to match this.
- const intptr_t current_context_depth = context_depth_;
- context_depth_ = scopes_->yield_jump_variable->owner()->context_level();
-
- Fragment instructions;
- LocalScope* scope = parsed_function_->node_sequence()->scope();
-
- const Function& target = Function::ZoneHandle(
- Z, I->object_store()->async_set_thread_stack_trace());
- ASSERT(!target.IsNull());
-
- // Fetch and load :async_stack_trace
- LocalVariable* async_stack_trace_var =
- scope->LookupVariable(Symbols::AsyncStackTraceVar(), false);
- ASSERT((async_stack_trace_var != NULL) &&
- async_stack_trace_var->is_captured());
- instructions += LoadLocal(async_stack_trace_var);
- instructions += PushArgument();
-
- // Call _asyncSetThreadStackTrace
- instructions += StaticCall(TokenPosition::kNoSource, target, 1);
- instructions += Drop();
-
- body = instructions + body;
- context_depth_ = current_context_depth;
- }
-
if (FLAG_support_debugger && function->position().IsDebugPause() &&
!dart_function.is_native() && dart_function.is_debuggable()) {
// If a switch was added above: Start the switch by injecting a debugable
« no previous file with comments | « pkg/kernel/lib/transformations/continuation.dart ('k') | tests/language/language_kernel.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698