dart2js: Improve performance of nested yield*
dart2js: Improve performance of nested yield*

Avoid O(n^2) behaviour in the following code by tracking the innermost sync* iterator rather than the outermost.

from(n) sync* {
  yield n;
  yield* from(n + 1);
}

main() {
  print(from(0).take(1000));
}

R=floitsch@google.com, sigurdm@google.com

Review URL: https://codereview.chromium.org/1873413002 .

dart-lang/sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk