Re: com php-src: Fast parameter parsing API: Zend/zend.h Zend/zend_API.c Zend/zend_API.h Zend/zend_builtin_functions.c Zend/zend_operators.c
Zend/zend_operators.h ext/pcre/php_pcre.c ext/reflection/php_reflection.c ext/spl/spl_array.c ext/standard/array.c ext/standard/basic_functions.c
ext/standard/file.c ext/standard/filestat.c ext/standard/html.c ext/standard/math.c ext/standard/string.c ext/standard/type.c ext/standard/url.c
| From: | Dmitry Stogov | Date: | Tue, 22 Jul 2014 19:11:33 +0000 |
| Subject: | Re: com php-src: Fast parameter parsing API: Zend/zend.h Zend/zend_API.c Zend/zend_API.h Zend/zend_builtin_functions.c Zend/zend_operators.c Zend/zend_operators.h ext/pcre/php_pcre.c ext/reflection/php_reflection.c ext/spl/spl_array.c ext/standard/array.c ext/standard/basic_functions.c ext/standard/file.c ext/standard/filestat.c ext/standard/html.c ext/standard/math.c ext/standard/string.c ext/standard/type.c ext/standard/url.c |
||
| References: | 1 2 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-79561@lists.php.net to get a copy of this message | ||
Hi Nikita,
Thank you for information. I use gcc-4.8 and don't see such warnings.
It's not a big problem to remove "cold" attribute for old GCC versions
using appropriate #if ZEND_GCC_VERSION >= NNNN
However, I also saw warnings about unused labels when compiled with MSVC.
Unfortunately, MSVC doesn't have any useful way to hide them. I think the
generated code may be refactored using single "goto" or without "goto" at
all.
e.g. do { ... err=0; break ... err=1; break ... } while (0); switch (err)
{...}
I hope, it must be optimized to the same machine code.
I didn't like to do it right now (too many other tasks), but may be if
it'll take just an hour and I'll able to do it in nearest days.
Thanks. Dmitry.
On Tue, Jul 22, 2014 at 10:22 PM, Nikita Popov <nikita.ppv@gmail.com> wrote:
> On Fri, Jul 11, 2014 at 2:32 PM, Dmitry Stogov <dmitry@php.net> wrote:
>
>> Commit: 27f38798a1963de1c60aae4ef8a3675138255574
>> Author: Dmitry Stogov <dmitry@zend.com> Fri, 11 Jul 2014
>> 16:32:20 +0400
>> Parents: 8f229b285527a403d46be047546384032a0f6bb3
>> Branches: phpng
>>
>> Link:
>>
>> http://git.php.net/?p=php-src.git;a=commitdiff;h=27f38798a1963de1c60aae4ef8a3675138255574
>>
>> Log:
>> Fast parameter parsing API
>>
>> This API is experemental. It may be changed or removed.
>> It should be used only for really often used functions.
>> (Keep the original parsing code and wrap usage with #ifndef FAST_ZPP)
>>
>> Changed paths:
>> M Zend/zend.h
>> M Zend/zend_API.c
>> M Zend/zend_API.h
>> M Zend/zend_builtin_functions.c
>> M Zend/zend_operators.c
>> M Zend/zend_operators.h
>> M ext/pcre/php_pcre.c
>> M ext/reflection/php_reflection.c
>> M ext/spl/spl_array.c
>> M ext/standard/array.c
>> M ext/standard/basic_functions.c
>> M ext/standard/file.c
>> M ext/standard/filestat.c
>> M ext/standard/html.c
>> M ext/standard/math.c
>> M ext/standard/string.c
>> M ext/standard/type.c
>> M ext/standard/url.c
>>
>
> For me this change causes a huge amount of "warning: ‘cold’ attribute
> ignored [-Wattributes]" warnings (4 for every function using the new zpp
> API), due to the use of ZEND_ATTRIBUTE_UNUSED_LABEL in
> ZEND_PARSE_PARAMETERS_END. I'm using GCC 4.6.3.
>
> Nikita
>