6efd3b3654
sync*/async/async* generators have two parts: an entry, which does checks and computes the element type of the result, and a body, which is transformed after lowering to JavaScript. The split ensures that the code for checks is done at function call time, rather than e.g. in the moveNext method of a sync* iterator. A following CL with optimize the split to generate one function when there are no checks and the type argument is simple enough for textual substitution. Change-Id: I5414109ca851f9267871aa113a2e29b16236986d Reviewed-on: https://dart-review.googlesource.com/54308 Commit-Queue: Stephen Adams <sra@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
17 lines
437 B
Dart
17 lines
437 B
Dart
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
import 'package:expect/expect.dart';
|
|
|
|
main() {
|
|
// This call is no longer on the stack when the error is thrown.
|
|
/*:main*/ test();
|
|
}
|
|
|
|
@NoInline()
|
|
test() async {
|
|
await null;
|
|
/*9:test*/ throw '>ExceptionMarker<';
|
|
}
|