forked from facebook/hhvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix] Fix HPHPi bug with yield and closures
Summary: We do syntactic transformation of a function containing yield statements at the AST level. The original function body is turned into a statement that returns a Continuation object that is associated with a internally created closure function. In HPHPi, the associated closure function must be declared before it is used. In the newly added test case, the associated closure function isn't declared when it is used. I renamed the pendingStatements to prependingStatements and prepend the closure function before the original statement from which the closure function is spinned off so the closure function is declared prior to its usage. Task ID: # 554932 Blame Rev: Reviewers: qigao, mwilliams CC: hphp-diffs@lists Test Plan: make fast_tests make slow_tests Revert Plan: Tags: - begin *PUBLIC* platform impact section - Bugzilla: # - end platform impact - Differential Revision: 245798
- Loading branch information
myang
authored and
macvicar
committed
May 9, 2011
1 parent
2ab0c6a
commit 0071de0
Showing
6 changed files
with
62 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters