History log of /PHP-8.2/Zend/zend_compile.h (Results 1 – 25 of 998)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# d36874d0 02-Sep-2022 Ilija Tovilo

Merge branch 'PHP-8.1' into PHP-8.2

* PHP-8.1:
Fix class name FQN when AST dumping new and class const


# 2cfb028e 01-Sep-2022 Ilija Tovilo

Fix class name FQN when AST dumping new and class const

Fixes GH-9447
Closes GH-9462

# bf427b73 11-Jul-2022 Bob Weinand

Add an API to observe functions and classes being linked

To observe when the functions and classes start being officially available to the user

Signed-off-by: Bob Weinand <bobwei9@h

Add an API to observe functions and classes being linked

To observe when the functions and classes start being officially available to the user

Signed-off-by: Bob Weinand <bobwei9@hotmail.com>

show more ...

# 6a50af26 08-Aug-2022 Tyson Andre

Make `"{$g{'h'}}"` emit fatal error and no incorrect deprecation notice in 8.2 (#9264)

The ast node flag constants ZEND_DIM_ALTERNATIVE_SYNTAX and
ZEND_ENCAPS_VAR_DOLLAR_CURLY_VAR_VAR no

Make `"{$g{'h'}}"` emit fatal error and no incorrect deprecation notice in 8.2 (#9264)

The ast node flag constants ZEND_DIM_ALTERNATIVE_SYNTAX and
ZEND_ENCAPS_VAR_DOLLAR_CURLY_VAR_VAR node have identical values (1<<1),
causing a deprecation notice to be incorrectly emitted before the fatal error
for unsupported syntax.

Fixes GH-9263

Explicitly check for AST_VAR/AST_DIM kind for future compatibility

`AST_PROP`/`AST_METHOD_CALL` and nullsafe variants can also be found in
encapsulated strings - currently they have no flags but they may have flags in
the future. This also clarifies that this deprecation warning can only happen
for AST_VAR/AST_DIM nodes for certain `attr` values.

show more ...

# dc5475c1 28-Jul-2022 Bob Weinand

Save previous observer on the VM stack

This avoids a possible significant performance penalty, when some leaf function was observed, deep in the stack.
As a side effect, we are not itera

Save previous observer on the VM stack

This avoids a possible significant performance penalty, when some leaf function was observed, deep in the stack.
As a side effect, we are not iterating over prev_execute_data anymore and thus, non-observed fake frames, possibly on stack, cannot have any impact on the observer anymore (especially within zend_observer_fcall_end_all).

Saving the previous observer happens now directly on the VM stack. If there is any observer, function frames are allocated an extra zval (the last temporary), which will, on observed frames, contain the previous observed frame address.

show more ...

# 625f1649 20-Jul-2022 Bob Weinand

Include internal functions in the observer API

There are two main motivations to this:
a) The logic for handling internal and userland observation can be unified.
b) Unwinding of obs

Include internal functions in the observer API

There are two main motivations to this:
a) The logic for handling internal and userland observation can be unified.
b) Unwinding of observed functions on a bailout does notably not include observers. Even if users of observers were to ensure such handling themselves, it would be impossible to retain the relative ordering - either the user has to unwind all internal observed frames before the automatic unwinding (zend_observer_fcall_end_all) or afterwards, but not properly interleaved.

Signed-off-by: Bob Weinand <bobwei9@hotmail.com>

show more ...

# 5a855ee8 02-Jun-2022 Ilija Tovilo

Fix GH-8661: Nullsafe in coalesce triggers undefined variable warning

Closes GH-8690

# 7850c103 16-May-2022 Máté Kocsis

Add support for readonly classes (#7305)

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

# 9a90bd70 12-Mar-2022 Ilija Tovilo

Deprecate ${} string interpolation

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

# 32e2d97a 20-Dec-2021 Tyson Andre

Allow internal functions to declare if they support compile-time evaluation, add functions. (#7780)

https://wiki.php.net/rfc/strtolower-ascii means that these functions no longer
depend

Allow internal functions to declare if they support compile-time evaluation, add functions. (#7780)

https://wiki.php.net/rfc/strtolower-ascii means that these functions no longer
depend on the current locale in php 8.2. Before that, this was unsafe to
evaluate at compile time.

Followup to GH-7506

Add strcmp/strcasecmp/strtolower/strtoupper functions

Add bin2hex/hex2bin and related functions

Update test of garbage collection using strtolower to use something else to create a refcounted string

show more ...

# 192ea91d 16-Dec-2021 Dmitry Stogov

Avoid useless symbol table reattaching on retutn from an included op_array

# 902d6439 11-Oct-2021 Nikita Popov

Deprecate implicit dynamic properties

Writing to a proprety that hasn't been declared is deprecated,
unless the class uses the #[AllowDynamicProperties] attribute or
defines __get()/

Deprecate implicit dynamic properties

Writing to a proprety that hasn't been declared is deprecated,
unless the class uses the #[AllowDynamicProperties] attribute or
defines __get()/__set().

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

show more ...

# 16e9e666 20-Oct-2021 Nikita Popov

Encode string offset error reason in extended_value

For FETCH_DIM_W etc encode the context it is being used in
(dim, obj, ref or incdec) so we can throw an appropriate error
message

Encode string offset error reason in extended_value

For FETCH_DIM_W etc encode the context it is being used in
(dim, obj, ref or incdec) so we can throw an appropriate error
message for invalid string offset use, in a way that does not
require inspecting neighboring opcodes. The implementation is
similar to the flags used for FETCH_OBJ.

This means that we do not have to be careful about preserving
following opcodes during optimization.

Closes GH-7599.

show more ...

# 01c9282d 20-Oct-2021 Dmitry Stogov

Merge branch 'PHP-8.1'

* PHP-8.1:
JIT: Fixed megamorphic call detection


# 7e53b08c 20-Oct-2021 Dmitry Stogov

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
JIT: Fixed megamorphic call detection


# ddaf64b5 14-Oct-2021 Dmitry Stogov

Avoid non-immutable map_ptr indirection

# 5bda4cd2 04-Sep-2021 codinghuang

Support specifying start position in compile_string

Add additional zend_compile_position argument, which can be either
AT_SHEBANG, AT_OPEN_TAG or AFTER_OPEN_TAG. The previous behavior

Support specifying start position in compile_string

Add additional zend_compile_position argument, which can be either
AT_SHEBANG, AT_OPEN_TAG or AFTER_OPEN_TAG. The previous behavior
corresponds to AFTER_OPEN_TAG.

Closes GH-7462.

show more ...

# c19977d0 27-Sep-2021 Nikita Popov

Fix delayed early binding with optimization

It's possible for delayed early binding opcodes to get optimized
away if they are "unreachable". However, we still need to attempt
early b

Fix delayed early binding with optimization

It's possible for delayed early binding opcodes to get optimized
away if they are "unreachable". However, we still need to attempt
early binding for them. (In some cases we also corrupt the early
binding list outright during optimization, which is how I got here.)

Fix this by storing information about delayed early binding
independently of DECLARE_CLASS_DELAYED opcodes, so early binding is
performed even after the opcode has been dropped.

show more ...

# 15bbf6f3 24-Sep-2021 Nikita Popov

Automatically determine whether to reuse get_iterator()

Same as with the IteratorAggregate case, allow reusing get_iterator
if none of the Iterator methods are overridden. Drop the
R

Automatically determine whether to reuse get_iterator()

Same as with the IteratorAggregate case, allow reusing get_iterator
if none of the Iterator methods are overridden. Drop the
REUSE_GET_ITERATOR flag that previously allowed ArrayIterator to
opt-in to unconditional get_iterator reuse, and drop the override
handling it did, in favor of the automated approach.

show more ...

# 19888a69 15-Sep-2021 Nikita Popov

Initialize UNUSED operands to sentinel value

This makes it more likely that unintentional uses of UNUSED
operands will result in crash rather than some hard to detect
corruption of t

Initialize UNUSED operands to sentinel value

This makes it more likely that unintentional uses of UNUSED
operands will result in crash rather than some hard to detect
corruption of the call frame.

show more ...

# 07984435 26-Aug-2021 Nikita Popov

Mark private compiler functions as static

# 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.

12345678910>>...40