06713e62266ad5e4f9a0f0539ee91e16647efcbf
The only places where ReturnStatement is constructed are: - onReturn(check_yield=true) -> not allowed in generator - onReturn(check_yield=false) -> coming from transform_yield_break, right after creating hphp_continuation_done() - MethodStatement, end of function call -> hphp_continuation_done() is created at end of generator in prepare_generator() Emitter is emitting ContExit in ReturnStatements used in generators. As can be seen from the analysis above, it's always preceded by emitting ContDone from hphp_continuation_done(). Let's emit ContDone inside the ReturnStatement directly and kill usage of hphp_continuation_done(). transform_yield_break() becomes a simple onReturn(check_yield=false), so let's inline it into onYield and create ReturnStatement directly. After this change, check_yield flag is always true and can be killed. ContExit was also used after emitting a generator method in case the end of method is still reachable. ContDone is added so that the generator is properly closed. I believe this is never actually used, as MethodStatement creates ReturnStatement at the end of method anyway.
HipHop VM for PHP
HipHop VM (HHVM) is a new open-source virtual machine designed for executing programs written in PHP. HHVM uses a just-in-time compilation approach to achieve superior performance while maintaining the flexibility that PHP developers are accustomed to. HipHop VM (and before it HPHPc) has realized >5x increase in throughput for Facebook compared with Zend PHP 5.2.
Required Packages, and Installing and Running HipHop VM
The latest information is available on the wiki.
Contributing to HipHop VM
HipHop VM is licensed under the PHP and Zend licenses except as otherwise noted.
Before changes can be accepted a Contributors Licensing Agreement must be signed and returned.
Descrição
Linguagens
C++
59.4%
PHP
34.1%
C
4.1%
Hack
1.4%
CMake
0.3%
Outra
0.6%