Re: [PHP-DEV] Change in type-hint representation

2017-01-12 Thread Dmitry Stogov
Dmitry Stogov Cc: Derick Rethans; PHP internals list; Joe Watkins; Zeev Suraski; Anatol Belski (a...@php.net); Nikita Popov; Xinchen Hui Subject: Re: [PHP-DEV] Change in type-hint representation > Am 11.01.2017 um 17:37 schrieb Dmitry Stogov <dmi...@zend.com>: > > The patch

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Levi Morrison
On Wed, Jan 11, 2017 at 3:30 PM, Andrea Faulds wrote: > Hi Levi, > > Levi Morrison wrote: >> >> As part of this effort can we refactor the IS_LONG, IS_ARRAY, >> IS_OBJECT, etc macros to use an enum? Maybe `zend_type_code` if you >> like the `code` name for it? Also we already use

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Andrea Faulds
Hi Levi, Levi Morrison wrote: As part of this effort can we refactor the IS_LONG, IS_ARRAY, IS_OBJECT, etc macros to use an enum? Maybe `zend_type_code` if you like the `code` name for it? Also we already use "kind" in the AST; should it be `ZEND_TYPE_KIND` and `zend_type_kind` instead? C's

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Nikita Nefedov
> On 11 Jan 2017, at 19:37, Dmitry Stogov wrote: > > The patch was updated according to feedback: added comments, better names and > encapsulation, less magic, better code reuse, keep a free bit in zend_type > for future extension. >

RE: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Anatol Belski
> Cc: Zeev Suraski <z...@zend.com>; Anatol Belski (a...@php.net) <a...@php.net>; > Nikita Popov <ni...@php.net>; Xinchen Hui <xinchen....@roguewave.com> > Subject: [PHP-DEV] Change in type-hint representation > > Hi, > > > I propose to introduce a u

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Bob Weinand
> Am 11.01.2017 um 17:37 schrieb Dmitry Stogov : > > The patch was updated according to feedback: added comments, better names and > encapsulation, less magic, better code reuse, keep a free bit in zend_type > for future extension. >

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Levi Morrison
; From: Derick Rethans <der...@php.net> > Sent: Wednesday, January 11, 2017 6:43:50 PM > To: Dmitry Stogov > Cc: PHP internals list; Bob Weinand; Joe Watkins; Zeev Suraski; Anatol Belski > (a...@php.net); Nikita Popov; Xinchen Hui > Subject: Re: [PHP-DEV] Change in type-hin

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Dmitry Stogov
kins; Zeev Suraski; Anatol Belski (a...@php.net); Nikita Popov; Xinchen Hui Subject: Re: [PHP-DEV] Change in type-hint representation On Wed, 11 Jan 2017, Dmitry Stogov wrote: > Hi, > > > I propose to introduce a unified type representation (zend_type). > > Now it's goin

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Derick Rethans
On Wed, 11 Jan 2017, Dmitry Stogov wrote: > Hi, > > > I propose to introduce a unified type representation (zend_type). > > Now it's going to be used for typing of arguments and return values. > > Later we should use it for properties and other things. > > >

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Dmitry Stogov
On Jan 11, 2017 4:51 PM, Michał Brzuchalski wrote: 2017-01-11 14:35 GMT+01:00 Nikita Nefedov >: On Wed, 11 Jan 2017 15:07:39 +0300, Dmitry Stogov > wrote: Hi, I propose to

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Dmitry Stogov
On Jan 11, 2017 4:36 PM, Nikita Nefedov wrote: On Wed, 11 Jan 2017 15:07:39 +0300, Dmitry Stogov wrote: > Hi, > > > I propose to introduce a unified type representation (zend_type). > > Now it's going to be used for typing of arguments and return values. >

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Markus Fischer
On 11.01.17 13:07, Dmitry Stogov wrote: > https://gist.github.com/dstogov/1b25079856afccf0d69f77d499cb0ab1 - there's a typo "/* this is a calss name */" a few times - a few times I see this condition: "if (info->type > 0x3ff) {" Shouldn't we use *some* descriptive constant for this seamingly

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Joe Watkins
Morning Dmitry, I know bob has already requested some additions ... nothing to really say about it ... I just wanted to chime in with VERY NICE :D (shouting intentional) ... Oh and, I think an RFC is pretty pointless ... */me looks forward to master having this* Cheers Joe On Wed, Jan 11,

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Bob Weinand
> Am 11.01.2017 um 14:35 schrieb Nikita Nefedov : > > On Wed, 11 Jan 2017 15:07:39 +0300, Dmitry Stogov wrote: > >> Hi, >> >> >> I propose to introduce a unified type representation (zend_type). >> >> Now it's going to be used for typing of arguments and

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Niklas Keller
Michał Brzuchalski schrieb am Mi., 11. Jan. 2017, 14:51: > 2017-01-11 14:35 GMT+01:00 Nikita Nefedov : > > > On Wed, 11 Jan 2017 15:07:39 +0300, Dmitry Stogov > wrote: > > > > Hi, > >> > >> > >> I propose to introduce a unified type

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Michał Brzuchalski
2017-01-11 14:57 GMT+01:00 Nikita Nefedov : > On Wed, 11 Jan 2017 16:51:22 +0300, Michał Brzuchalski < > mic...@brzuchalski.com> wrote: > > >> >> 2017-01-11 14:35 GMT+01:00 Nikita Nefedov : >> >>> -- snip -- >>> >>> >>> [ ]

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Nikita Nefedov
On Wed, 11 Jan 2017 16:51:22 +0300, Michał Brzuchalski wrote: 2017-01-11 14:35 GMT+01:00 Nikita Nefedov : -- snip -- [ ] xxy0 - for IS_OBJECT type hint where the ``s are a (zend_string *) pointer and

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Michał Brzuchalski
2017-01-11 14:35 GMT+01:00 Nikita Nefedov : > On Wed, 11 Jan 2017 15:07:39 +0300, Dmitry Stogov wrote: > > Hi, >> >> >> I propose to introduce a unified type representation (zend_type). >> >> Now it's going to be used for typing of arguments and return

Re: [PHP-DEV] Change in type-hint representation

2017-01-11 Thread Nikita Nefedov
On Wed, 11 Jan 2017 15:07:39 +0300, Dmitry Stogov wrote: Hi, I propose to introduce a unified type representation (zend_type). Now it's going to be used for typing of arguments and return values. Later we should use it for properties and other things.

[PHP-DEV] Change in type-hint representation

2017-01-11 Thread Dmitry Stogov
Hi, I propose to introduce a unified type representation (zend_type). Now it's going to be used for typing of arguments and return values. Later we should use it for properties and other things. https://gist.github.com/dstogov/1b25079856afccf0d69f77d499cb0ab1 The main changes are in