Skip to content

Commit

Permalink
[vm/kernel] Untangle the spaghetti-code in BuildGraphOfFunction and f…
Browse files Browse the repository at this point in the history
…ix bugs.

Also remove Fragment initializer-list constructor.

Bugs:

1. We were always building the body of a constructor even if the initializers
   graph was closed. This would confuse the inliner exit collector which was
   informed about return instructions inside the body which were never linked
   into the graph.

2. We were not checking for stack overflow on each call to an sync-yielding
   closure; only on the first call.

3. Not a behavioral bug, but the prologue flow graph is no longer built out of
   order (dartbug.com/29737).

Change-Id: I467fbf171fd627492bf01cd96d6353c57e143eaa
Reviewed-on: https://dart-review.googlesource.com/67561
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
  • Loading branch information
sjindel-google authored and commit-bot@chromium.org committed Aug 3, 2018
1 parent 368bcc4 commit 8d3d82a
Show file tree
Hide file tree
Showing 6 changed files with 374 additions and 294 deletions.
6 changes: 0 additions & 6 deletions runtime/vm/compiler/frontend/base_flow_graph_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ class Fragment {

Fragment() {}

Fragment(std::initializer_list<Fragment> list) {
for (Fragment i : list) {
*this += i;
}
}

explicit Fragment(Instruction* instruction)
: entry(instruction), current(instruction) {}

Expand Down
Loading

0 comments on commit 8d3d82a

Please sign in to comment.