#
93fc88e8 |
| 25-May-2022 |
Ilija Tovilo |
Fix Enum::from/tryFrom memory leak in JIT for internal enums when passing an int to a string enum. Previously, the int was coerced to a string. The JIT skips parameter clean up when unne
Fix Enum::from/tryFrom memory leak in JIT for internal enums when passing an int to a string enum. Previously, the int was coerced to a string. The JIT skips parameter clean up when unnecessary. In this particular case, passing int to from(int|string) normally doesn't cause a coercion so no dtor for the $value zval is generated. To circumvent this we avoid coersion by explicitly allowing ints and converting them to strings ourselves. Then we can free it appropriately. See GH-8518 Closes GH-8633
show more ...
|
Revision tags: php-8.1.7RC1, php-8.1.4RC1, php-8.1.3, php-8.1.2RC1, php-8.1.0, php-7.3.33, php-7.3.32, php-7.3.31 |
|
#
c03f97cd |
| 31-Aug-2021 |
Nikita Popov |
Add missing const qualitier in zend_register_internal_enum() |
Revision tags: php-7.3.30 |
|
#
a0272472 |
| 13-Aug-2021 |
Nikita Popov |
Fix message in test Looks like I did not "git add" the message update. Also drop the now dead ZEND_ENUM_PROPERTY_ERROR() macro while here. |
#
caefc6a5 |
| 13-Aug-2021 |
Nikita Popov |
Don't use custom object handlers for enum properties Instead mark name/value as readonly and the class as NO_DYNAMIC_PROPERTIES. This gives us the desired limitations using native fe
Don't use custom object handlers for enum properties Instead mark name/value as readonly and the class as NO_DYNAMIC_PROPERTIES. This gives us the desired limitations using native features. In fact, this also fixes a bug where opcache cache slot merging might result in a write to the name/value properties being allowed. The readonly implementation handles this case correctly.
show more ...
|
#
aef3bb70 |
| 27-Jul-2021 |
Nikita Popov |
Fix enum cast AST allocation, again We always need to allocate space for the three children, and only don't need one of the zend_ast_zval structures. |
#
645ef626 |
| 27-Jul-2021 |
Nikita Popov |
Fix enum cast AST allocation I missed this occurrence of the hardcoded number "3". |
#
a374230c |
| 22-Jul-2021 |
Nikita Popov |
Add support for internal enums This adds support for internal enums with the same basic approach as userland enums. Enum values are stored as CONSTANT_AST and objects created during
Add support for internal enums This adds support for internal enums with the same basic approach as userland enums. Enum values are stored as CONSTANT_AST and objects created during constant updating at runtime. This means that we need to use mutable_data for internal enums. This just adds basic support and APIs, it does not include the stubs integration from #7212. Closes GH-7302.
show more ...
|
Revision tags: php-7.3.29 |
|
#
fd1d5ec2 |
| 28-Apr-2021 |
Nikita Popov |
Add ZEND_CLASS_CONST_FLAGS() macro And drop Z_ACCESS_FLAGS(). We no longer store *only* access flags in these. |
Revision tags: php-7.3.28 |
|
#
84a843df |
| 30-Mar-2021 |
Dmitry Stogov |
Use better function |
Revision tags: php-7.3.27, php-7.3.26, php-7.3.26RC1, php-7.3.25, php-7.3.25RC1, php-7.3.24, php-7.3.24RC1, php-7.3.23, php-7.3.23RC1, php-7.3.22, php-7.3.22RC1, php-7.3.21, php-7.3.21RC1, php-7.3.20, php-7.3.20RC1 |
|
#
269c8dac |
| 10-Jun-2020 |
Ilija Tovilo |
Implement enums RFC: https://wiki.php.net/rfc/enumerations Co-authored-by: Nikita Popov <nikita.ppv@gmail.com> Closes GH-6489. |