Re: com php-src: Fix class constant fetching: Zend/tests/class_constant_to_reference_cached.phpt Zend/zend_execute.c Zend/zend_vm_def.h
Zend/zend_vm_execute.h

From: Date: Fri, 30 May 2014 05:02:47 +0000
Subject: Re: com php-src: Fix class constant fetching: Zend/tests/class_constant_to_reference_cached.phpt Zend/zend_execute.c Zend/zend_vm_def.h
Zend/zend_vm_execute.h
References: 1 2 3 4 5  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-78645@lists.php.net to get a copy of this message
Yes. Lua and most compiled languages use this approach. I agree, func_get_arg() and backtrace won't work out of the box, but may be we can collect additional arguments into an array in the similar way as you did it for foo(...$a). Thanks. Dmitry. On Fri, May 30, 2014 at 2:27 AM, Nikita Popov <nikita.ppv@gmail.com> wrote: > On Thu, May 29, 2014 at 11:34 AM, Dmitry Stogov <dmitry@zend.com> wrote: > >> Thanks. I saw the patch, but didn't check it yet. >> >> BTW: I have one big improvement idea, that might correlate with the work >> you made. >> >> Currently, when we pass an argument to user php function, it's always >> copied twice. >> Once by SEND instruction, and then by RECV. >> It means that we not only do the double work, but also keep two copies of >> the same zval on VM stack. >> I started thinking (in background yet) how it might be improved. >> It's not going to be easy and may require significant redesign, but it >> must make significant gain. >> what do you think? >> > > I think this is a good idea in principle (and iirc this is what LuaJIT > does), but I'm not sure whether this is really feasible for PHP. If we > share the storage for args pushed on the stack and the CVs used to refer to > them in functions, this means that any change to the CV will also change > the passed argument. That usually doesn't matter, but for example > func_get_arg(s) should always return the original argument(s), which > wouldn't work anymore with such an approach. Same applies to backtraces for > exceptions etc. > > Nikita >

« previous php.cvs (#78645) next »