Add $completionContinuationContinuation and change InternalCoroutineContinuation...
commitbc42b9ddc5a6bf4d33179f2c4921a380e177beca
authorThomas Jiang <thomasjiang@fb.com>
Fri, 2 Mar 2018 07:06:40 +0000 (1 23:06 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 2 Mar 2018 07:29:02 +0000 (1 23:29 -0800)
tree9752eeccc5c795399f4fbba4329bbcd559d5bf48
parentcd295a0d0b63c5f19f5967d34ed499242aa1f4d7
Add $completionContinuationContinuation and change InternalCoroutineContinuation to abstract class

Summary:
As part of the change to the framework to allow for multiple resumption to behave in a depth first search manner, it is necessary to pass around a continuation which will be resumed by an `internalCompletionContinuation`. This is called `completionContinuationContinuation` in the framework.

Changed:
- Added `completionContinuationContinuation` as a nullable `InternalCoroutineContinuation` field to `InternalCoroutineContinuation`.
- Changed `InternalCoroutineContinuation` from an interface to an abstract class to accommodate the previous change.
- Added `completionContinuationContinuation` as one of the fields to copy in generated `clone()` methods for closure classes.
- Updated the `.php.exp` files to reflect the clone of the additional field.

This diff is part of a stack of two changes. This one reflects simply the inclusion of the field so that the core changes made by the second diff do not get lost in all of the tests that are updated due to the change to code generation.

Reviewed By: michaeltingley

Differential Revision: D6928699

fbshipit-source-id: f197cb516acf8d0b4dbc523397d930e6e17b1e56
hphp/hack/src/parser/coroutine/coroutine_closure_generator.ml
hphp/hack/src/parser/coroutine/coroutine_syntax.ml