RE: [PHP-DEV] hasType() for internal function parameters?
| From: | Anatol Belski | Date: | Mon, 22 Jun 2015 22:14:24 +0000 |
| Subject: | RE: [PHP-DEV] hasType() for internal function parameters? | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-86798@lists.php.net to get a copy of this message | ||
Hi,
> -----Original Message-----
> From: Rasmus Lerdorf [mailto:rasmus@lerdorf.com]
> Sent: Monday, June 22, 2015 9:10 PM
> To: Dmitry Stogov
> Cc: Bob Weinand; Anatol Belski; Kalle Sommer Nielsen; Stanislav Malyshev;
> Nikita Popov; PHP internals
> Subject: Re: [PHP-DEV] hasType() for internal function parameters?
>
> On 06/22/2015 03:00 PM, Dmitry Stogov wrote:
> >
> >
> > On Mon, Jun 22, 2015 at 8:35 PM, Rasmus Lerdorf <rasmus@lerdorf.com
> > <mailto:rasmus@lerdorf.com>> wrote:
> >
> > On 06/22/2015 01:27 PM, Dmitry Stogov wrote:
> > > Actually, when you added type hints, php compiler stopped optimizing and
> > > using ZEND_DEFINED (and others) instead of internal function calls, but
> > > of course this shouldn't change behavior. I'll need to take a look into
> > > difference.
> >
> > Right, behaviour shouldn't change, but couldn't we also make it so that
> > arginfo for internal calls is only used by reflection? We can do all the
> > type checking we need right in ZPP as we do now. Let's just ignore
> > arginfo entirely for these calls.
> >
> >
> > In general, we can, if we remove corresponding code in zend_vm_def.h,
> > and also some checks for ZEND_HAS_TYPE_INFO and internal functions in
> > zend_compile.c.
>
> I think that is the way to go. We didn't have any type info there before so we are
> not losing any functionality, and obviously adding it produces weird side effects
> and slows things down. Plus we should get a very small performance increase by
> removing the type info check entirely.
>
Are we talking about including this in 7.0?
-- If so - do you think we can have it ready short after alpha2?
---- If yes - great, let's do it.
---- If no - lets defer it for 7.1.
While I'm still confident we can stabilize it in a beta if there's a strong support, but
better we're "boringly stable" in 7.0 than "shiny all in". Some side effect
we can stabilize in beta? For the core? For external exts? It clearly suggests itself to check for a
couple of step ahead.
Thanks
Anatol