Hi Michael, > -----Original Message----- > From: Michael Lively Jr. [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 30, 2006 8:53 PM > To: Dmitry Stogov > Cc: 'Andi Gutmans'; 'PHP-DEV'; 'Marcus Boerger' > Subject: Re: [PHP-DEV] [PATCH] Late Static Binding (Take 2) > > > I took a quick glance through it and it mostly makes sense to me. If > anyone could clear up a question when time permits: I don't fully > understand why both executor_globals and and execute_data are used to > store the caller_scope pointer.
EX(caller_scope) is just a temporary value it is set in ZEND_INIT_METHOD_CALL and copied into EG(caller_scope) in ZEND_DO_FCALL_BY_NAME. It is possible situation when sequence of instructions will have several ZEND_INIT_METHOD_CALL before first ZEND_DO_FCALL_BY_NAME. For example the following PHP code will produce it: Foo::bar(test()); To handle this situation EX(caller_scope) stored into special stack. (I made EG(caller_scope) work near in the same way as EG(This) works). > I almost had a finished another patch myself using EG() but I had to > take a break to pay my bills :/. Thanks for looking at this Dmitry. I > will go ahead and put together a more exhaustive use case for > this over > the weekend. Would you like to add (modify) something to my patch? Thanks. Dmitry. > Mike Lively > > Dmitry Stogov wrote: > > Hi Mike, > > > > I finally found a day to look into your patch and make it > work in all > > (may be I forgot something) cases. > > > > Improved patch and test cases are attached. > > > > I still don't like name - "static", > > and I am not sure that this concept is necessary for PHP. > > > > Thanks. Dmitry. > > > > > >> -----Original Message----- > >> From: Mike Lively [mailto:[EMAIL PROTECTED] > >> Sent: Thursday, March 09, 2006 12:06 AM > >> To: Dmitry Stogov > >> Cc: Andi Gutmans; PHP-DEV; Marcus Boerger > >> Subject: [PHP-DEV] [PATCH] Late Static Binding (Take 2) > >> > >> > >> On Wed, 2006-03-01 at 17:37 +0300, Dmitry Stogov wrote: > >> > >>> 1) I would very like to see some real example where "static" is > >>> necessary? > >>> > >>> 2) "static" is really bad name. I suggest "caller", Marcus thought > >>> about "class". > >>> > >>> 3) I COMPLETELY DISAGREE TO ADD RUNTIME DATA INTO > >>> zend_function/zend_op_array. We can try to store > "caller_scope" in > >>> execute_data. > >>> > >>> Thanks. Dmitry. > >>> > >>> > >> Rewrote the patch to use execute_data to store caller_scope. > >> I have not renamed any functions or keywords (still using > >> static::) as I did not see any consensus on that yet. > >> > >> Please review the implementation of caller_scope and I can > >> take care of the naming issues when names are decided on. > >> > >> patch attached and also available at > >> http://test.ft11.net/_mlively/late-static-binding.patch > >> > >> It would be nice if the patch in PAT could be changed to > >> reference this new version if the appropriate people have time. > >> > >> > >> > --------------------------------------------------------------------- > >> --- > >> > >> No virus found in this incoming message. > >> Checked by AVG Free Edition. > >> Version: 7.1.385 / Virus Database: 268.3.3/296 - Release Date: > >> 3/29/2006 > >> > > > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php