History log of /php-src/Zend/zend_vm_execute.h (Results 176 – 200 of 2360)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 353f963b 01-Jul-2021 Nikita Popov

Init STRLEN result when deprecation promoted to exception

Move the result initialization before HANDLE_EXCEPTION(), the
actual value doesn't matter.

This fixes one of the issues

Init STRLEN result when deprecation promoted to exception

Move the result initialization before HANDLE_EXCEPTION(), the
actual value doesn't matter.

This fixes one of the issues report in bug #81190.

show more ...

# b6421387 15-Jun-2021 Nikita Popov

Fix missing error for single index unset on wrong type

The error was correctly thrown for a nested index, but not for a
single index. Make sure both have the same behavior.

# 34257e1c 15-Jun-2021 Nikita Popov

Remove unnecessary IS_UNUSED check

This operand cannot be UNUSED.

# 821a5a12 14-Jun-2021 Nikita Popov

Drop fast_div_function

This is the same as div_function nowadays.

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

# 27be6670 31-May-2021 Nikita Popov

Correctly parse array_slice() argument in call_user_func_array() opt

We should be treating this argument using the normal zpp rules,
rather than performing a simple integer cast.

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

# 5fe20625 18-May-2021 Dmitry Stogov

Correct DWARF frame description.

Now GDB correctly shows backtraces that involves JIT-ed code for
functional/tracing JIT, HYBRID/CALL VM, x86/AArch64 CPU.
(opcache.jit_debug=0x100 sh

Correct DWARF frame description.

Now GDB correctly shows backtraces that involves JIT-ed code for
functional/tracing JIT, HYBRID/CALL VM, x86/AArch64 CPU.
(opcache.jit_debug=0x100 should be set).

show more ...

# 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.4.18, php-7.3.28, php-8.0.5
# 6cd0b48c 19-Apr-2021 Matt Brown

Implement never return type

The never type can be used to indicate that a function never
returns, for example because it always unwinds.

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

Implement never return type

The never type can be used to indicate that a function never
returns, for example because it always unwinds.

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

Closes GH-6761.

show more ...

Revision tags: php-8.0.5RC1, php-7.4.18RC1
# 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 ...

# 9e12dbba 05-Apr-2021 Dmitry Stogov

micro-optimization

# c2fc25fd 01-Apr-2021 Dmitry Stogov

Avoid reading of property name in ASSIGN_OBJ if it can be accessed through run-time cache slot.

# 1b94b5b6 01-Apr-2021 Dmitry Stogov

Avoid reading of property name in FETCH_OBJ_R/IS if it can be accessed through run-time cache slot.

# 4df39f4b 18-Mar-2021 Nikita Popov

Don't imply SILENT from NO_AUTOLOAD

We have separate flags for non-autoloading class fetches and
silent class fetches. There's no reason why NO_AUTOLOAD should
be special-cased to be

Don't imply SILENT from NO_AUTOLOAD

We have separate flags for non-autoloading class fetches and
silent class fetches. There's no reason why NO_AUTOLOAD should
be special-cased to be implicitly silent.

show more ...

Revision tags: php-8.0.4RC1
# 53e9c36c 16-Mar-2021 Nikita Popov

Add sanity check for type of read_property return value

If an internal class overrides read_property and declared property
types, make sure that the returned value matches the declared

Add sanity check for type of read_property return value

If an internal class overrides read_property and declared property
types, make sure that the returned value matches the declared
type (in debug builds).

show more ...

Revision tags: php-7.4.17RC1
# 3d117433 11-Mar-2021 Dmitry Stogov

Inline "array" part of FE_FETCH_R handler into HYBRID VM

# 278d452a 11-Mar-2021 Dmitry Stogov

zend_verify_recv_arg_type_helper is not "cold".

Revision tags: php-8.0.3, php-7.4.16
# 9da66e6a 01-Mar-2021 Dmitry Stogov

Optimized object conversion to array without rebulding properties HashTable

Revision tags: php-8.0.3RC1, php-7.4.16RC1, php-8.0.2, php-7.4.15, php-7.3.27, php-8.0.2RC1, php-7.4.15RC2, php-7.4.15RC1, php-8.0.1, php-7.4.14, php-7.3.26, php-7.4.14RC1, php-8.0.1RC1, php-7.3.26RC1, php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23, php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1, php-8.0.0beta3, php-7.4.10, php-7.3.22, php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1, php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21, php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1, php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20, php-8.0.0alpha1, php-7.4.8RC1, php-7.3.20RC1, php-7.4.7, 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 ...

# 6dd85f83 22-Feb-2021 Nikita Popov

Fixed bug #80781

zend_find_array_dim_slow() may throw, make sure to handle this.
This backports the code we already use for this on PHP-8.0,
and also backports an exception check tha

Fixed bug #80781

zend_find_array_dim_slow() may throw, make sure to handle this.
This backports the code we already use for this on PHP-8.0,
and also backports an exception check that makes this easier to
catch.

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

# 8b4ae72e 16-Feb-2021 Nikita Popov

Fix unused variable warning

# f8cf7152 16-Feb-2021 Dmitry Stogov

Microoptimization of STRLEN and IN_ARRAY opcodes (based on https://github.com/php/php-src/pull/4981)

# 8ffc20ac 13-Feb-2021 Tyson Andre

Optimize Traversable unpacking in zend_vm_def.h

The C compiler sees that a dynamic function is being called, so it cannot infer
that iter->funcs has not changed.

This results in

Optimize Traversable unpacking in zend_vm_def.h

The C compiler sees that a dynamic function is being called, so it cannot infer
that iter->funcs has not changed.

This results in more assembly instructions and slightly more time to execute that code
path.

Unpacking traversables to arrays(`ZEND_ADD_ARRAY_UNPACK`),
starting foreach loops (`ZEND_FE_FETCH*`), etc. are affected.

```
<?php
/*
* Before: 1.576 seconds
* After: 1.474 seconds
*/
function example() {
$start = hrtime(true);
$it = new SplFixedArray(1000);
$total = 0;
for ($i = 0; $i < 100000; $i++) {
$total += count([...$it]);
}
$end = hrtime(true);
printf("Elapsed: %.6f\n", ($end - $start) / 1_000_000_000);
}
example();
```

show more ...

12345678910>>...95