Hi Rasmus, Your latest changes broke more than 100 tests. Sorry, but I had to revert your commits and related Bob's fixes. You may find them in internal-arg-info branch.
Please, don't do experiments on the common code base at beta stage. On the other hand, I don't see a big problem committing this, when a complete solution is ready. Thanks. Dmitry. On Mon, Jun 22, 2015 at 4:55 AM, Rasmus Lerdorf <ras...@lerdorf.com> wrote: > On 06/21/2015 06:11 PM, Stanislav Malyshev wrote: > > Hi! > > > >> Before making more extensive use of arginfo types, I think we should > first > >> do some adjustments to the way they are handled. In particular adding > types > >> means that internal fcalls will take the branch in > >> http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_vm_def.h#3669. As this is > hot > >> code, it is likely important to avoid doing those duplicate type checks > >> (that will also happen in zpp anyway). As such I would suggest to make > >> arginfo for internal functions reflection-only. Return type hints are > >> already only enforced in debug mode. > > > > Agreed, for internals arginfo types should be reflection-only. I imagine > > that would be very easy to fix just by checking for function type? > > Ok, I have fixed the arginfo for all the built-in engine functions. > I wrote a little script which generates it from the doc-comments in the > code. I think the easiest way to do it is to first go through the file > and check the "{{{ proto" comments to make sure the optional args are > denoted correctly and no args are missing. > > To run it: > > script/dev/genarginfo.php Zend/zend_builtin_functions.c > > for example. > > -Rasmus > >