Hi Stas, Dmitry, On Tue, May 12, 2009 at 2:01 AM, Stanislav Malyshev <s...@zend.com> wrote: > IHMO it's not static enough. I.e., since PHP is not compiled, we can not > create VD table for the class until runtime inheritance, which means that > the code using this class can use method resolution more efficient than > name->function, i.e. hashtable. These lookups can be cached (i.e. CV style) > but I don't see how they can be altogether prevented.
On Tue, May 12, 2009 at 7:25 AM, Dmitry Stogov <dmi...@zend.com> wrote: > The real things is even worse as during compilation of a class it's parent > class doesn't have to be known. So construction of VMTs becomes a bit > problematic. BTW we could think in this way... Apologies, I'm not familiar with run-time inheritence in PHP. My understanding was that when a classes source code is compiled, its parent classes must be known. When is this not the case? Must it be known for the class' first instantiation? In the worst case, it _might_ be cheaper to build it at instantiation time, but I would have to look up how expensive that is in a more static language to be sure. Certainly, it is currently so expensive that almost anything else would be better (including the OP's patch). Thanks, Paul -- Paul Biggar paul.big...@gmail.com -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php