dart-sdk/docs/language
Lasse Reichstein Holst Nielsen 843bb96813 Change how the language specification describes control flow.
Changed to compositionally describing how an expression or statement can
complete (normally, throw, return, break, continue), and propagating the
completion to the surrounding statements handling those behaviors.

This should not change the current behavior except in a few cases where
the existing specification was vague, misleading or just wrong.

Actual changes:
- The super call in an initializer list is now always called at the end,
  even if it is allowed to be written earlier. This matches existing
  VM behavior.
  Initialization of initializer expressions are specified
  as part of constructor execution, not something happening
  at the `new` operator.
- The cancel call to a stream subscription when exiting an async for-in
  loop is now made explicit, and its returned future is explicitly
  awaited for.
  Previously it was unclear what happened with that future.
- Pausing a surrounding async-for loop has been added everywhere
  the body of the loop can suspend, just before the suspension.
  The loop subscription is not resumed until reaching the end of the body,
  which is equivalent to resuming it after each suspend
  and then pausing it again when the synchronous execution reaches
  the next suspend.
  So, easier and doesn't change the behavior of the loop itself,
  but it's a visible change if you check the onPause/onResume
  of the loop stream.
  Spec now recognizes that the pause call may throw on an invalid
  implementation of StreamSubscription.

Addresses issues #25859, #25856, #25850, #25848, #25847, #25749, #25634, #25539, #25421, #25412, #25381, #25234, #25005, #24859, #24748, #23779, #23700, #23628, #22908, #21858 (and likely more).

BUG= http://dartbug.com/25859 http://dartbug.com/25856 http://dartbug.com/25850 http://dartbug.com/25848 http://dartbug.com/25847 http://dartbug.com/25749 http://dartbug.com/25634 http://dartbug.com/25539 http://dartbug.com/25421 http://dartbug.com/25412 http://dartbug.com/25381 http://dartbug.com/25234 http://dartbug.com/25005 http://dartbug.com/24859 http://dartbug.com/24748 http://dartbug.com/23779 http://dartbug.com/23700 http://dartbug.com/23628 http://dartbug.com/22908 http://dartbug.com/21858
R=eernst@google.com

Review URL: https://codereview.chromium.org/2399343002 .
2016-11-25 09:30:17 +01:00
..
dart.sty Spec: Rewrite lambdas to simpler semantics instead. 2016-11-09 13:21:39 +01:00
dartLangSpec.tex Change how the language specification describes control flow. 2016-11-25 09:30:17 +01:00
Makefile Specify behavior of e?.v++ and e?.v-- 2015-06-11 15:01:06 -07:00