History log of /PHP-8.1/Zend/zend_compile.h (Results 1 – 25 of 980)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 2cfb028e 01-Sep-2022 Ilija Tovilo

Fix class name FQN when AST dumping new and class const

Fixes GH-9447
Closes GH-9462


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
# 7e53b08c 20-Oct-2021 Dmitry Stogov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
JIT: Fixed megamorphic call detection


Revision tags: php-7.3.31
# 07984435 26-Aug-2021 Nikita Popov

Mark private compiler functions as static

Revision tags: php-7.3.30
# b5746a4c 29-Jul-2021 Nikita Popov

Drop HAS_UNLINKED_USES flag

Instead always use the unlinked_uses table, which is already used
if opcache is used. Not much point in having a different mechanism
for the non-opcache c

Drop HAS_UNLINKED_USES flag

Instead always use the unlinked_uses table, which is already used
if opcache is used. Not much point in having a different mechanism
for the non-opcache case.

show more ...

# dcf5e5bb 27-Jul-2021 Nikita Popov

Reuse part of the class binding logic

This part of DECLARE_CLASS and DECLARE_CLASS_DELAYED is the
same.

# 70195c35 27-Jul-2021 Nikita Popov

Don't force property type resolution for include preloading

Having all property types resolved is no longer a hard requirement
for preloading, resolving the types is just an optimization

Don't force property type resolution for include preloading

Having all property types resolved is no longer a hard requirement
for preloading, resolving the types is just an optimization. As
such, drop the special logic that forced loading of property
types when include-based preloading is used. Instead only keep
the code that resolves types based on actually preloaded classes.

Also drop the ZEND_ACC_PROPERTY_TYPES_RESOLVED flag, which is now
nearly useless and takes up flag space...

show more ...

# c4f4f1ec 23-Jul-2021 Nikita Popov

Share zval_make_interned_string() helper

The same function was defined in zend_compile.c and zend_API.c.

# 89d01154 23-Jul-2021 Nikita Popov

Remove zend_cleanup_internal_classes()

If fast_shutdown is used, then we don't need to destroy static
members at all. If fast_shutdown is not used, then we already
loop over classes

Remove zend_cleanup_internal_classes()

If fast_shutdown is used, then we don't need to destroy static
members at all. If fast_shutdown is not used, then we already
loop over classes to destroy static members and static variables
in methods.

show more ...

Revision tags: php-7.3.29
# 6780aaa5 02-Jun-2021 Nikita Popov

Implement readonly properties

Add support for readonly properties, for which only a single
initializing assignment from the declaring scope is allowed.

RFC: https://wiki.php.net

Implement readonly properties

Add support for readonly properties, for which only a single
initializing assignment from the declaring scope is allowed.

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

Closes GH-7089.

show more ...

# 814a9327 16-Jul-2021 Nikita Popov

Add ZEND_ACC_NOT_SERIALIZABLE flag

This prevents serialization and unserialization of a class and its
children in a way that does not depend on the zend_class_serialize_deny
and zend

Add ZEND_ACC_NOT_SERIALIZABLE flag

This prevents serialization and unserialization of a class and its
children in a way that does not depend on the zend_class_serialize_deny
and zend_class_unserialize_deny handlers that will be going away
in PHP 9 together with the Serializable interface.

In stubs, `@not-serializable` can be used to set this flag.

This patch only uses the new flag for a handful of Zend classes,
converting the remainder is left for later.

Closes GH-7249.
Fixes bug #81111.

show more ...

# 52d3d0d8 15-Jun-2021 Nikita Popov

Add limited support for new in initializers

Add support for new expressions inside parameter default values,
static variable initializers, global constant initializers and
attribute

Add limited support for new in initializers

Add support for new expressions inside parameter default values,
static variable initializers, global constant initializers and
attribute arguments.

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

Closes GH-7153.

show more ...

# b6958bb8 31-May-2021 George Peter Banyard

Implement "Deprecate implicit non-integer-compatible float to int conversions" RFC. (#6661)

RFC: https://wiki.php.net/rfc/implicit-float-int-deprecate

Co-authored-by: Nikita Popov <

Implement "Deprecate implicit non-integer-compatible float to int conversions" RFC. (#6661)

RFC: https://wiki.php.net/rfc/implicit-float-int-deprecate

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>

show more ...

# ba9c0b38 27-May-2021 Nikita Popov

Export zend_unary_op_produces_error() and use in optimizer

Don't repeat this logic, as it's going to become more complex.

# b227a722 21-May-2021 Joe Watkins

ReflectionFunctionAbstract::getClosureUsedVariables

Make a distinction at compile time between bind types for static
variables

getStaticVariables remains unchanged

ReflectionFunctionAbstract::getClosureUsedVariables

Make a distinction at compile time between bind types for static
variables

getStaticVariables remains unchanged

Fixes #80071

show more ...

# 532c60cb 06-May-2021 Máté Kocsis

Add support for tentative return types of internal methods

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

Closses GH-6971

# 81d1c1bc 29-Apr-2021 Nikita Popov

Remove accidentally added flag

# 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
# 462da6e0 31-Mar-2021 Josh Soref

Fix spelling and grammar mistakes

This PR corrects misspellings identified by the check-spelling action.

The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465

Fix spelling and grammar mistakes

This PR corrects misspellings identified by the check-spelling action.

The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465

The action reports that the changes in this PR would make it happy: jsoref@602417c

Closes GH-6822.

show more ...

# b196d4ae 09-Apr-2021 Nikita Popov

Accept zend_string instead of zval in compile_filename

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.

Revision tags: php-7.3.19, php-7.4.7RC1, php-7.3.19RC1
# 47a2e5c7 18-May-2020 Nikita Popov

Reference dynamic functions through dynamic_defs

Currently, dynamically declared functions and closures are inserted
into the function table under a runtime definition key, and then late

Reference dynamic functions through dynamic_defs

Currently, dynamically declared functions and closures are inserted
into the function table under a runtime definition key, and then later
possibly renamed. When opcache is not used and a file containing a
closure is repeatedly included, this leads to a very large memory leak,
as the no longer needed closure declarations will never be freed
(https://bugs.php.net/bug.php?id=76982).

With this patch, dynamic functions are instead stored in a
dynamic_func_defs member on the op_array, which opcodes reference
by index. When the parent op_array is destroyed, the dynamic_func_defs
it contains are also destroyed (unless they are stilled used elsewhere,
e.g. because they have been bound, or are used by a live closure). This
resolves the fundamental part of the leak, though doesn't completely
fix it yet due to some arena allocations.

The main non-obvious change here is to static variable handling:
We can't destroy static_variables_ptr in destroy_op_array, as e.g.
that would clear the static variables in a dynamic function when
the op_array containing it is destroyed. Static variable destruction
is separated out for this reason (we already do static variable
destruction separately for normal functions, so we only need to
handle main scripts).

Closes GH-5595.

show more ...

# 5d160e30 17-Feb-2021 Nikita Popov

Fix static variable behavior with inheritance

When a method is inherited, the static variables will now always
use the initial values, rather than the values at the time of
inheritan

Fix static variable behavior with inheritance

When a method is inherited, the static variables will now always
use the initial values, rather than the values at the time of
inheritance. As such, behavior no longer depends on whether
inheritance happens before or after a method has been called.

This is implemented by always keeping static_variables as the
original values, and static_variables_ptr as the modified copy.

Closes GH-6705.

show more ...

# 4b79dba9 09-Feb-2021 Dmitry Stogov

Added Inheritance Cache.

This is a new transparent technology that eliminates overhead of PHP class inheritance.

PHP classes are compiled and cached (by opcahce) separately, howeve

Added Inheritance Cache.

This is a new transparent technology that eliminates overhead of PHP class inheritance.

PHP classes are compiled and cached (by opcahce) separately, however their "linking" was done at run-time - on each request. The process of "linking" may involve a number of compatibility checks and borrowing methods/properties/constants form parent and traits. This takes significant time, but the result is the same on each request.

Inheritance Cache performs "linking" for unique set of all the depending classes (parent, interfaces, traits, property types, method types involved into compatibility checks) once and stores result in opcache shared memory. As a part of the this patch, I removed limitations for immutable classes (unresolved constants, typed properties and covariant type checks). So now all classes stored in opcache are "immutable". They may be lazily loaded into process memory, if necessary, but this usually occurs just once (on first linking).

The patch shows 8% improvement on Symphony "Hello World" app.

show more ...

# 1d2fd57c 26-Jan-2021 Dmitry Stogov

Merge branch 'PHP-8.0'

* PHP-8.0:
Allow observer handlers disabling optimization in RETURN opcode handler, that may cause loss value of returned local variable.


# b529d02d 26-Jan-2021 Dmitry Stogov

Allow observer handlers disabling optimization in RETURN opcode handler, that may cause loss value of returned local variable.

12345678910>>...40