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

Issue 2713593004: Don't inline functions that the parser decides shouldn't be inlined. (Closed)

Created:
3 years, 10 months ago by Cutch
Modified:
3 years, 10 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Don't inline functions that the parser decides shouldn't be inlined. Fixes #28857 Fixes #28759 BUG= R=rmacnak@google.com Committed: https://github.com/dart-lang/sdk/commit/88b68b30b46e2f636e5e1ec8618d4bdb9b410244

Patch Set 1 #

Patch Set 2 : Also fix 28759 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -6 lines) Patch
M runtime/vm/flow_graph_inliner.cc View 1 chunk +7 lines, -0 lines 1 comment Download
M tests/co19/co19-runtime.status View 1 1 chunk +0 lines, -3 lines 0 comments Download
M tests/standalone/standalone.status View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 9 (5 generated)
Cutch
3 years, 10 months ago (2017-02-23 20:10:47 UTC) #3
rmacnak
lgtm
3 years, 10 months ago (2017-02-23 20:29:53 UTC) #5
Cutch
Committed patchset #2 (id:20001) manually as 88b68b30b46e2f636e5e1ec8618d4bdb9b410244 (presubmit successful).
3 years, 10 months ago (2017-02-23 20:32:49 UTC) #7
Kevin Millikin (Google)
3 years, 10 months ago (2017-02-24 14:32:28 UTC) #9
Message was sent while issue was closed.
I'm also bit nervous about this code in the parser:

  func.set_is_inlinable(!FLAG_causal_async_stacks);

It means that we could potentially get into a case where a function we determine
is not inlinable for some good reason, is actually inlinable after all because
FLAG_causal_async_stacks is false.  I'd rather have:

  if (FLAG_causal_async_stacks) func.set_is_inlinable(false);

https://codereview.chromium.org/2713593004/diff/20001/runtime/vm/flow_graph_i...
File runtime/vm/flow_graph_inliner.cc (right):

https://codereview.chromium.org/2713593004/diff/20001/runtime/vm/flow_graph_i...
runtime/vm/flow_graph_inliner.cc:784: // As a side effect of parsing the
function, it may be marked
We already know whether the function is async or async* (when we created it), so
we shouldn't need to parse it.  I suggest marking async and async* functions not
inlinable at the same time that their modifier is set and letting the earlier
CanBeInlined() test in this method catch them without going through all the
other work.

Powered by Google App Engine
This is Rietveld 408576698