Hi Dmitry:

On 13 Jan 2012, at 10:36, Dmitry Stogov wrote:

> As I understood the copying was done only for proper handling of __CLASS__  
> constant in trait methods. I think it's too radical solution.
> I've introduced ZEND_CLASS_NAME instruction instead and made op_arrays to 
> share their opcodes (in the same way as inherited methods). The only 
> difference that methods from traits may be renamed.
> 
> The patch is attached (it requires executor/scanner/parser regeneration)
> I would like to commit it into 5.4 and trunk. Note that the patch makes 
> binary compatibility break and can't be applied to 5.4.* after 5.4.0 release.

I looked at the patch, looks good as far as I can see.

The comment in zend_traits_copy_function (has a typo 'destroied') makes me 
wonder what it means exactly. Does it mean we got a memory leak with regard to 
trait aliases?


And, I would have one stylistical request: could you separate out the 
optimizations you do in zend_language_scanner.l? I think it would be better to 
have the proper use of interned strings committed on their own. Especially, 
since they regard not only trait-related functionality.

Thanks
Stefan


-- 
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax:   +32 2 629 3525


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to