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

Unified Diff: runtime/vm/flow_graph_inliner.cc

Issue 2713593004: Don't inline functions that the parser decides shouldn't be inlined. (Closed)
Patch Set: Also fix 28759 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 | tests/co19/co19-runtime.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_inliner.cc
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
index f07e7cd1f2e5bf0cf2591d91301594b0fa571be5..a19916150d304af5ab7c7d6f5bea78d31317fb97 100644
--- a/runtime/vm/flow_graph_inliner.cc
+++ b/runtime/vm/flow_graph_inliner.cc
@@ -780,8 +780,15 @@ class CallSiteInliner : public ValueObject {
{
CSTAT_TIMER_SCOPE(thread(), graphinliner_parse_timer);
parsed_function = GetParsedFunction(function, &in_cache);
+ if (!function.CanBeInlined()) {
+ // As a side effect of parsing the function, it may be marked
Kevin Millikin (Google) 2017/02/24 14:32:28 We already know whether the function is async or a
+ // as not inlinable. This happens for async and async* functions
+ // when causal stack traces are being tracked.
+ return false;
+ }
}
+
// Build the callee graph.
InlineExitCollector* exit_collector =
new (Z) InlineExitCollector(caller_graph_, call);
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698