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

Unified Diff: runtime/vm/parser.cc

Issue 2712003003: Avoid marking functions inlinable when FLAG_causal_async_stacks is false (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index bc6740cd67e8c6f34b7b1142f08060463ce24a6e..94485a81fdc4710dde3e44833c0021ab016c8aab 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -3578,16 +3578,20 @@ SequenceNode* Parser::ParseFunc(const Function& func, bool check_semicolon) {
ASSERT(!func.is_generated_body());
// The code of an async function is synthesized. Disable debugging.
func.set_is_debuggable(false);
- // In order to collect causal asynchronous stacks efficiently we rely on
- // this function not being inlined.
- func.set_is_inlinable(!FLAG_causal_async_stacks);
+ if (FLAG_causal_async_stacks) {
+ // In order to collect causal asynchronous stacks efficiently we rely on
+ // this function not being inlined.
+ func.set_is_inlinable(false);
+ }
generated_body_closure = OpenAsyncFunction(func.token_pos());
} else if (func.IsAsyncClosure()) {
// The closure containing the body of an async function is debuggable.
ASSERT(func.is_debuggable());
- // In order to collect causal asynchronous stacks efficiently we rely on
- // this function not being inlined.
- func.set_is_inlinable(!FLAG_causal_async_stacks);
+ if (FLAG_causal_async_stacks) {
+ // In order to collect causal asynchronous stacks efficiently we rely on
+ // this function not being inlined.
+ func.set_is_inlinable(false);
+ }
OpenAsyncClosure();
} else if (func.IsSyncGenerator()) {
// The code of a sync generator is synthesized. Disable debugging.
@@ -3599,16 +3603,20 @@ SequenceNode* Parser::ParseFunc(const Function& func, bool check_semicolon) {
async_temp_scope_ = current_block_->scope;
} else if (func.IsAsyncGenerator()) {
func.set_is_debuggable(false);
- // In order to collect causal asynchronous stacks efficiently we rely on
- // this function not being inlined.
- func.set_is_inlinable(!FLAG_causal_async_stacks);
+ if (FLAG_causal_async_stacks) {
+ // In order to collect causal asynchronous stacks efficiently we rely on
+ // this function not being inlined.
+ func.set_is_inlinable(false);
+ }
generated_body_closure = OpenAsyncGeneratorFunction(func.token_pos());
} else if (func.IsAsyncGenClosure()) {
// The closure containing the body of an async* function is debuggable.
ASSERT(func.is_debuggable());
- // In order to collect causal asynchronous stacks efficiently we rely on
- // this function not being inlined.
- func.set_is_inlinable(!FLAG_causal_async_stacks);
+ if (FLAG_causal_async_stacks) {
+ // In order to collect causal asynchronous stacks efficiently we rely on
+ // this function not being inlined.
+ func.set_is_inlinable(false);
+ }
OpenAsyncGeneratorClosure();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698