On Sun, Jan 18, 2015 at 3:58 AM, Sara Golemon <poll...@php.net> wrote:
> https://github.com/php/php-src/pull/1004 > > Wondering if anyone has an objection to me merging this. It just > offers extensions a chance to alter the AST prior to bytecode > emission. Mostly for evil things, but potentially for 3rd-party > optimizers or whatevs. Does it need an RFC? The very minor > indirection cost hides itself behind OpCache, so it should harm > anything... > Totally okay with making that hookable, but not sure if compile_top_stmt is the best place to do that, at least in the form implemented in the PR. Assuming that you want to implement a preprocessing pass on the AST the fast that zend_compile_top_stmt is called recursively might be somewhat inconvenient. Maybe compile_top_stmt should at least also call compile_top_stmt instead of zend_compile_top_stmt? Nikita