df6b4b13f8
A chained future is one that will give exactly the same result as another future. It is used to handle, e.g., futures returned by .then handlers. Currently we chaing futures by simply making the future itself a listener on the future it is chained to. This change makes the future move all its listeners to the future it is chained to, and forward future listeners as well. It avoids long chains of futures depending on each other. Effectively, chained futures form equivalence classes. This makes the equivalence classess all be represented by the future that every other element depends on, and it applies path shortening to make the dependency graph as flat as possible. R=floitsch@google.com Review URL: https://codereview.chromium.org//15942010 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23807 260f80e4-7a28-3924-810f-c04153c831b5