648dca65ba
async. These functions contain a so-called async closure (with the actual body) that should not just return when encountering a return statement, but rather call the completer first and then return (null). Previously the last return node has been replaced with a completer.complete call. This does not work for return statements in nested blocks or try-catch-finally blocks. Instead of replacing return statements we now call the completer after resolving all steps necessary for return nodes, i.e., right after inlining all finally blocks. We also need "continuation" returns later on that do not complete the completer. We differentiate by whether a return node has its scope set or not. BUG= R=hausner@google.com, srdjan@google.com Review URL: https://codereview.chromium.org//460763002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39167 260f80e4-7a28-3924-810f-c04153c831b5