History log of /PHP-8.0/Zend/zend_vm_execute.h (Results 101 – 125 of 1857)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: php-7.3.15, php-7.2.27, php-7.4.2, php-7.3.14
# d9335916 08-Jan-2020 Nikita Popov

Add support for $obj::class

This allows $obj::class, which gives the same result as get_class($obj).
Anything other than an object results in TypeError.

RFC: https://wiki.php.ne

Add support for $obj::class

This allows $obj::class, which gives the same result as get_class($obj).
Anything other than an object results in TypeError.

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

Closes GH-5065.

show more ...


# fc0c71ad 10-Feb-2020 Nikita Popov

Deref slow-path ASSIGN_OBJ result

We should not store a reference inside IS_TMP_VAR.


# 5d0ef4c2 06-Feb-2020 Dmitry Stogov

Make opcodes to return de-refereced values of typed references (in the same was as for non-typed)


# d4de3f95 06-Feb-2020 Nikita Popov

Remove spurious const qualifier from function return type


# ef1e4891 31-Jan-2020 Nikita Popov

Fix bug #76047

Unlink the current stack frame before freeing CVs or extra args.
This means it will no longer show up in back traces that are
generated during CV destruction.

Fix bug #76047

Unlink the current stack frame before freeing CVs or extra args.
This means it will no longer show up in back traces that are
generated during CV destruction.

We already did this prior to destructing the object/closure,
presumably for the same reason.

show more ...


# db7193f3 31-Jan-2020 Dmitry Stogov

Fixed bug #79094 (Crashing when running recursion function)


# 28e650ab 23-Jan-2020 Christoph M. Becker

Revert "Merge branch 'PHP-7.4'"

This reverts commit 046dcfb531e242d36a7af2942b9b148290c3c7fe, due to
segfaults on Travis. This needs to be investigated.


# 4130fe43 15-Jan-2020 Christoph M. Becker

Make MSVCRT memory leak checking usable for the test suite

While basic support for MSVCRT debugging has been added long
ago[1], the leak checking is not usable for the test suite, becaus

Make MSVCRT memory leak checking usable for the test suite

While basic support for MSVCRT debugging has been added long
ago[1], the leak checking is not usable for the test suite, because we
are no longer calling `xmlCleanupParser()` on RSHUTDOWN of
ext/libxml[2], and therefore a few bogus leaks are reported whenever
ext/libxml is unloaded.

We therefore ignore memory leaks for this case. We introduce
`ZEND_IGNORE_LEAKS_BEGIN()` and `ZEND_IGNORE_LEAKS_END()` to keep
those ignores better readable, and also because these *might* be
useful for other leak checkers as well.

We also explicitly free the `zend_handlers_table` and the `p5s` to
avoid spurious leak reports.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=d756e1db2324c1f4ab6f9b52e329959ce6a02bc3>
[2] <http://git.php.net/?p=php-src.git;a=commit;h=8742276eb3905eb97a585417000c7b8df85006d4>

show more ...


Revision tags: php-7.3.14RC1, php-7.4.2RC1
# 3c72105e 30-Dec-2019 Tyson Andre

Remove leftover ZEND_CAST code for (unset) cast.

Followup for d74d3922ce6f9ea07c1226b0cb2a94fc333f7a02

Attempting to require a file with (unset) casts results in an E_COMPILE_ERROR

Remove leftover ZEND_CAST code for (unset) cast.

Followup for d74d3922ce6f9ea07c1226b0cb2a94fc333f7a02

Attempting to require a file with (unset) casts results in an E_COMPILE_ERROR
that can't be caught or handled by set_exception_handler/set_error_handler.

Also remove the (bool) cast, because the ZEND_BOOL opcode handles that.

Remove inference that array -> object cast can throw.
It was added in 2a286ad5991 - I don't know how creating an stdClass would throw.
(numeric keys, references, etc. don't cause it to throw)

Closes GH-5042

show more ...


# 77bf144d 14-Jan-2020 Dmitry Stogov

Inline hot parts of bitwise instructions into hybrid VM


# d0d1654a 08-Jan-2020 Nikita Popov

Fix #49555: Improve "function must be a string" error message

Be more specific for the individual cases and provide relevant
type information.


# 33476ec3 08-Jan-2020 Nikita Popov

Refer to method rather than function name in error message


# ae5d7604 08-Jan-2020 Nikita Popov

Fix #65274: Add class name to undef class constant error


Revision tags: php-7.4.1, php-7.2.26, php-7.3.13, php-7.4.1RC1
# dea62d4b 07-Dec-2019 Tyson Andre

Speed up ZEND_IS_IDENTICAL when it can't throw

Add a specialized opcode handler to use for `===`/`!==` when:

1. At least one side is a $cv, and the other is a $cv or CONST
(a

Speed up ZEND_IS_IDENTICAL when it can't throw

Add a specialized opcode handler to use for `===`/`!==` when:

1. At least one side is a $cv, and the other is a $cv or CONST
(avoids the need to free operands)
2. Neither operand can be undefined or a reference
(avoids the need for error handling and dereferencing)

```
// Elapsed time decreased from 0.275 seconds to 0.243 seconds in combination
// with PR #4982
function count_same(array $values) {
$same = 0;
foreach ($values as $x) {
foreach ($values as $y) {
if ($y === $x) {
$same++;
}
}
}
return $same;
}
$values = range(0, 5000);
$values[] = new stdClass();
$values[] = null;
$values[] = 3;
$start = microtime(true);
$total = count_same($values);
```

show more ...


# 885b3451 20-Dec-2019 Nikita Popov

Fix early free of assign_obj op_data

We need to make sure that op_data is only freed after populating
result, as op_data may be the only thing holding the value in the
case of an ove

Fix early free of assign_obj op_data

We need to make sure that op_data is only freed after populating
result, as op_data may be the only thing holding the value in the
case of an overloaded assignment.

This reverts the code to how it looked like in 7.3.

show more ...


# 621842e3 20-Dec-2019 Dmitry Stogov

RECV opcode optimization


# eb846939 19-Dec-2019 Dmitry Stogov

Fixed bug #78999 (Cycle leak when using function result as temporary)


# 189f625e 18-Dec-2019 Nikita Popov

Fix freeing of dynamic call name

We need to free op2 if the call construction fails.

Also remove a redundant check for !call.


# 11b041d3 16-Dec-2019 Nikita Popov

Fixed bug #78973

Save opline in leave helper to correctly handle destructor calls
during CV freeing (or other leave freeing).


# 20ef51db 10-Dec-2019 Dmitry Stogov

Fixed bug #78937 (Preloading unlinkable anonymous class can segfault)


# 32c1f375 09-Dec-2019 Nikita Popov

Fixed bug #78926: Handle class table reallocation on failed link

When we change back the bucket key on a class linking failure,
make sure to reload the bucket pointer, as the class table

Fixed bug #78926: Handle class table reallocation on failed link

When we change back the bucket key on a class linking failure,
make sure to reload the bucket pointer, as the class table may
have been reallocated in the meantime.

Also remove a bogus bucket key change in anon class registration:
We don't actually rename the class in this case anymore, the RTD
key is already the final name.

show more ...


# 0bac7854 06-Dec-2019 Nikita Popov

Optimize return type checking

Split off the fast-path case and avoid redundant checks.


Revision tags: php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12
# 7901913b 16-Nov-2019 Tyson Andre

Speed up foreach/FE_FREE (optimize for arrays without gc)

In the case where there are still references to an array being iterated
over when the iterator is freed (or the array is not ref

Speed up foreach/FE_FREE (optimize for arrays without gc)

In the case where there are still references to an array being iterated
over when the iterator is freed (or the array is not reference counted):

- There's need to save the opline.
- There's no need to check for exceptions.

```
// Before: 0.404 seconds
// After: 0.362 seconds
// loop_iter_empty(1000, 5000);
function loop_iter_empty(int $a, int $b) {
$values = array_fill(0, $b, []);
$total = 0;
for ($i = 0; $i < $b; $i++) {
foreach ($values as $v) {
foreach ($v as $x) {
$total += $x;
}
}
}
return $total;
}
```

show more ...


# a2c41c0e 15-Nov-2019 Tyson Andre

Fix $x = (bool)$x; for undefined with opcache

And `$x = !$x`

Noticed while working on GH-4912

The included test would not emit undefined variable errors in php 8.0
with

Fix $x = (bool)$x; for undefined with opcache

And `$x = !$x`

Noticed while working on GH-4912

The included test would not emit undefined variable errors in php 8.0
with opcache enabled. The command used:

```
php -d zend_extension=opcache.so --no-php-ini -d error_reporting=E_ALL \
-d opcache.file_cache= -d opcache.enable_cli=1 test.php
```

show more ...


# a7580899 13-Nov-2019 Tyson Andre

Support the same handler for multiple opcodes


12345678910>>...75