Hi Ben:

On 10 Apr 2012, at 03:34, Ben Schmidt wrote:

> During the flattening process, is a copy made of the trait code (or
> bytecode or whatever)?


Thanks to Dmitry, the op_array, i.e., the methods op codes are not copied but 
shared between the methods.

Thus, there is a certain memory benefit of sharing code in traits, compared to 
manual copy and past.

Best regards
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