History log of /PHP-8.4/Zend/zend_compile.c (Results 76 – 100 of 2585)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 414f71a9 16-Apr-2023 Máté Kocsis

Typed class constants (#10444)

RFC: https://wiki.php.net/rfc/typed_class_constants

Co-Authored-By: Ben <7127204+moliata@users.noreply.github.com>
Co-Authored-By: Bob Weinand <31

Typed class constants (#10444)

RFC: https://wiki.php.net/rfc/typed_class_constants

Co-Authored-By: Ben <7127204+moliata@users.noreply.github.com>
Co-Authored-By: Bob Weinand <3154871+bwoebi@users.noreply.github.com>
Co-Authored-By: Ilija Tovilo <ilija.tovilo@me.com>

show more ...


# c4a1100f 10-Apr-2023 Ilija Tovilo

Fix unevaluated rhs of class constant fetch in constant expression (#11047)

Fixes oss-fuzz #57821


# cf9b030a 01-Apr-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-8841: php-cli core dump calling a badly formed function

It's actually not php-cli specific, nor SAPI specific.
We should delay the registration of the function into the function t

Fix GH-8841: php-cli core dump calling a badly formed function

It's actually not php-cli specific, nor SAPI specific.
We should delay the registration of the function into the function table
until after the compilation was successful, otherwise the function is
mistakingly registered and a NULL dereference will happen when trying to
call it.

I based my test of Nikita's test, so credits to him for the test:
https://github.com/php/php-src/pull/8933#issuecomment-1259881008

Closes GH-10989.

show more ...


# 9d5f2f13 20-Mar-2023 Ilija Tovilo

Use new ZSTR_INIT_LITERAL macro (#10879)


# b9a5bfc3 12-Feb-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-10570: Assertion `(key)->h != 0 && "Hash must be known"' failed.

Fixes GH-10570, see GH-10570 for analysis.

Closes GH-10572


# d5c649b3 23-Feb-2023 Max Kellermann

zend_compiler, ...: use `uint8_t` instead of `zend_uchar` (#10621)

`zend_uchar` suggests that the value is an ASCII character, but here,
it's about very small integers. This is misleadi

zend_compiler, ...: use `uint8_t` instead of `zend_uchar` (#10621)

`zend_uchar` suggests that the value is an ASCII character, but here,
it's about very small integers. This is misleading, so let's use a
C99 integer instead.

On all architectures currently supported by PHP, `zend_uchar` and
`uint8_t` are identical. This change is only about code readability.

show more ...


# bb07e202 21-Feb-2023 Max Kellermann

Two `enum`s instead of preprocessor macros (#10617)

* Zend/zend_compile: convert `memoize_mode` macros to enum

* Zend/zend_stack: convert `ZEND_STACK_APPLY_*` macros to enum


# 49c1e6eb 20-Feb-2023 Max Kellermann

Make various pointers const in Zend/ (#10608)

* Zend/zend_operators: pass const pointers to zend_is_identical()

* Zend/zend_operators: pass const pointers to zend_get_{long,double}(

Make various pointers const in Zend/ (#10608)

* Zend/zend_operators: pass const pointers to zend_is_identical()

* Zend/zend_operators: pass const pointers to zend_get_{long,double}()

* Zend/Optimizer/sccp: make pointers const

* Zend/Optimizer/scdf: make pointers const

* Zend/Optimizer/zend_worklist: make pointers const

* Zend/Optimizer/zend_optimizer: make pointers const

* Zend/zend_compile: make pointers const

show more ...


# e52684ea 19-Jan-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-10377: Unable to have an anonymous readonly class

This fixes the oversight that an anonymous class should be able to be
readonly. Other identifiers such as final and abstract do n

Fix GH-10377: Unable to have an anonymous readonly class

This fixes the oversight that an anonymous class should be able to be
readonly. Other identifiers such as final and abstract do not make
sense. As we still want nice errors for when users try to use these
modifiers, or use multiple modifiers, we introduce a new function
zend_add_anonymous_class_modifier that will perform verification for
anonymous class modifiers, just like zend_add_class_modifier does for
non-anonymous classes.

Closes GH-10381

show more ...


# fb670f2b 02-Feb-2023 Ilija Tovilo

Move setting of CG(zend_lineno)

This way it will also work for zend_ast_create_zval


# 848a6e50 02-Feb-2023 Ilija Tovilo

Fix incorrect line number of constant in constant expression

Fixes GH-10356


# 35a36b13 02-Feb-2023 Ilija Tovilo

Fix comp-time and constant evaluation of dynamic class constant fetch

Fixes GH-10486
Fixes oss-fuzz #55436
Fixes oss-fuzz #55472
Closes GH-10487


# 02bd52b5 20-Oct-2022 Ilija Tovilo

Implement dynamic class const fetch

https://wiki.php.net/rfc/dynamic_class_constant_fetch

Closes GH-9793


# 7936c808 23-Jan-2023 Máté Kocsis

Fix GH-8329 Print true/false instead of bool in error and debug messages (#8385)


# bf1cfc07 16-Jan-2023 Christoph M. Becker

Revert GH-10300

Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>.

This reverts commit 68ada76f9a659745f572539b72afa06fa75a866f.
his reverts commit 45384c6

Revert GH-10300

Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>.

This reverts commit 68ada76f9a659745f572539b72afa06fa75a866f.
his reverts commit 45384c6e201eda9963e2fcc18946a9446230a2d6.
This reverts commit ef7fbfd71025f034b0bfcb413efd181ce798fc1b.
This reverts commit 9b9ea0d7c696f2990a159b2a2dafbc04547dc10f.
This reverts commit f15747c26be4a2330dc0cf3ea442f53f30f84cac.
This reverts commit e883ba93c40827fafd7868517eb48e04569f76ab.
This reverts commit 7e87551c3775d26e20b06a4032a00053db6452cc.
This reverts commit 921274d2b8966641a00c0a767ae40ba7187bdffc.
This reverts commit fc1f528e5e3ee45ab17ae8dcfad6a6422ff2002d.
This reverts commit 0961715cdafb5d39124667ff94f3b56453ce71f1.
This reverts commit a93f264526e1cdade71d887800c1c448c411bfdc.
This reverts commit 72dd94e1c6d29203b8f6473317f626e6d6d6fbdc.
This reverts commit 29b2dc89645e741f91cc920964432dccd2aaef14.
This reverts commit 05c7653bba7571852f5ce6fc0d220a1a829bc4c0.
This reverts commit 5190e5c260ee05e3f3c3d1168263a1a6637441d0.
This reverts commit 6b55bf228cb2da8705737d414f394950a92d8aae.
This reverts commit 184b4a12d3215d105720d005b31e365249e2eb21.
This reverts commit 4c31b7888a561e920fd3889ba8d99368f3c2d9e6.
This reverts commit d44e9680f080b4918cfed268b96f90ea35975617.
This reverts commit 4069a5c43f419d76e1254c8e49b4cad9968a408f.

show more ...


# 72dd94e1 04-Jan-2023 Max Kellermann

Zend/zend_compile: include cleanup


# a11c8a30 16-Dec-2022 Arnaud Le Blanc

Limit stack size (#9104)


# 77ee92a5 28-Nov-2022 Jorg Adam Sowa

Remove unnecessary usage of CONST_CS

Closes GH-9685.


# adfdfb2e 17-Nov-2022 Ilija Tovilo

Improvements in modifier parsing (#9926)

Use a shared non-terminal for all class modifiers. This avoids conflicts when
adding modifiers that are only valid for certain targets. This chan

Improvements in modifier parsing (#9926)

Use a shared non-terminal for all class modifiers. This avoids conflicts when
adding modifiers that are only valid for certain targets. This change is
necessary for asymmetric visibility but might be useful for other future
additions.

Closes GH-9926

show more ...


# 6bd8f402 09-Nov-2022 Bob Weinand

Move observer_declared_function_notify until after pass_two()

For early observing, there already exists a op_array_ctor hook on zend_extension.
However the goal of the declared_function

Move observer_declared_function_notify until after pass_two()

For early observing, there already exists a op_array_ctor hook on zend_extension.
However the goal of the declared_function observer is noting the time when a fully defined function starts existing in the function_tables.
This also prevents the observer being called in case there were compilation errors.

Ultimately, this now gives a consistent behaviour with respect to how it works when opcache is enabled:
- pass_two is done, opcodes and flags are all finalized.
- similarly class_linked notifications also only happen once the class is actually finalized.
- any extension wanting to delay the observer call may add the ZEND_COMPILE_IGNORE_OBSERVER compiler_option, then call it itself.

show more ...


# fdd088fc 03-Oct-2022 Martin Schröder

Properly deal with internal attributes used on promoted properties.

Closes GH-9661


# cb3adf35 24-Oct-2022 George Peter Banyard

Fix OpCache build after 0b0259a418b78c05cd5cd23f756582615d9b5918

The intersection type needs to be marked as being allocated on the arena otherwise zend_persist_type() tries to free it and c

Fix OpCache build after 0b0259a418b78c05cd5cd23f756582615d9b5918

The intersection type needs to be marked as being allocated on the arena otherwise zend_persist_type() tries to free it and corrupts the Zend MM Heap

Also we only need to allocate the space for a list of size 1 and not the whole length of the intersection type

show more ...


# 8c2df899 24-Oct-2022 George Peter Banyard

Revert 01eb06a0def9fb5facf0abf0f4168fcacbbb5789

We do not need this shim anymore since it is converted to a proper DNF type at compile time


# 0b0259a4 24-Oct-2022 George Peter Banyard

Convert Implicitly nullable pure intersection types to DNF

If we don't then Reflection would give us a ReflectionIntersectionType even if the type is currently displayed as (X&Y)|null


# eecbb60d 17-Oct-2022 Dmitry Stogov

Fix memory leak

Fixes oss-fuzz #52479


12345678910>>...104