Hi Nikita,
Personally, I don't see any reason to build AST. As you mentioned
yourself, it will be slower and will require more memory. On the other
hand AST itself would allow to perform only very basic optimizations.
Most of them can be easily done on VM opcode level as well.
Also, as it's not an easy task, the old "ugly hacks" will be replaced
with new mistakes, which would require new "hacks" in the future :)
The only real advantage could be an ability to expose AST to PHP
scripts, but only few people may need it.
Thanks. Dmitry.
On 09/04/2012 11:57 PM, Nikita Popov wrote:
Hey folks!
Some people asked me what the advantages of using an AST-based
parsing/compilation process are, so I put together a few quick notes
in an RFC:
https://wiki.php.net/rfc/ast_based_parsing_compilation_process
It would be nice to get a few comments from other core devs on this.
Nikita
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php