| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | | |
This needs to use the previously computed argument target.
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix memory leak when yielding from non-iterable
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fix memory leak when yielding from non-iterable
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix refcounting
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix #79979: passing value to by-ref param via CUFA crashes
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If a by-val send is not allowed, we must not do so. Instead we wrap
the value in a temporary reference.
Closes GH-6000
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Dereference the value before checking the type. As the happy path
necessarily has to check for references, I'm not bothering to
delay the comparison.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fixed bug #79947
|
| | |
| | |
| | |
| | |
| | |
| | | |
Move the FREE_OP for op_data out of the zend_binary_assign_op_dim_slow()
slow path, so it can be used by the other error path as well. This
makes ASSIGN_DIM_OP structurally more similar to ASSIGN_DIM.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
From an engine perspective, named parameters mainly add three
concepts:
* The SEND_* opcodes now accept a CONST op2, which is the
argument name. For now, it is looked up by linear scan and
runtime cached.
* This may leave UNDEF arguments on the stack. To avoid having
to deal with them in other places, a CHECK_UNDEF_ARGS opcode
is used to either replace them with defaults, or error.
* For variadic functions, EX(extra_named_params) are collected
and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS.
RFC: https://wiki.php.net/rfc/named_params
Closes GH-5357.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Fetch arg_info only once (it's always the same one...) and check
ZEND_TYPE_IS_SET on it, rather than checking if *any* parameter
has a type.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
RFC: https://wiki.php.net/rfc/nullsafe_operator
Closes GH-5619.
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes GH-5590
|
| | |
| | |
| | |
| | |
| | | |
Only destroy the variable directly before reassigning it. The
value could be read in the meantime.
|
| | |
| | |
| | |
| | |
| | |
| | | |
RFC: https://wiki.php.net/rfc/match_expression_v2
Closes GH-5371.
|
| | |
| | |
| | |
| | |
| | |
| | | |
In master normal FREE_OPs work like FREE_UNFETCHED_OP used to, so
there is no point in keeping this distinction anymore, it's just
confusing.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Switch back to FREE_UNFETCHED_OP_DATA
|
| | |
| | |
| | |
| | |
| | | |
Some of the code paths leading to this do not fetch op data.
Hopefully this fixes the release build failure.
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | | |
* PHP-7.4:
Fix bug #79599 in a different way
Revert "Fixed bug #97599 (coredump in set_error_handler)"
|
| | |
| | |
| | |
| | |
| | | |
Move the emission of the undefined variable notice before the
array separation.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Some code paths were checking this manually, but we can turn this
into a general assertion to avoid surprises (functions returning
failure without throwing).
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
exit() is now internally implemented by throwing an exception,
performing a normal stack unwind and a clean shutdown. This ensures
that no persistent resource leaks occur.
The exception is internal, cannot be caught and does not result in
the execution of finally blocks. This may be relaxed in the future.
Closes GH-5768.
|
| | |
| | |
| | |
| | | |
check
|
| | |
| | |
| | |
| | |
| | |
| | | |
RFC: https://wiki.php.net/rfc/non-capturing_catches
Closes GH-5345.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Respect typed references in catch assignment
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I decided to null out EG(exception) early here, which means only
the exception from the dtor / ref assign is preserved, and the
previous exception is not chained in. This is more robust, and
I don't think this situation is common enough to be bothered about
the precise behavior.
|
| | |
| | |
| | |
| | | |
UNDEF the opcode result instead of addref'ing the exception.
|
| | |
| | |
| | |
| | |
| | | |
Closes GH-5446
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
|
| | |
| | |
| | |
| | | |
Rather than zend_get_type_by_const(Z_TYPE_P()).
|
| | |
| | |
| | |
| | |
| | |
| | | |
We have a bunch of APIs for getting type names and it's sometimes
hard to keep them apart ... make it clear that this is the one
you definitely do not want to use.
|
| | |
| | |
| | |
| | |
| | | |
The 'int dummy' parameter to this function makes it appear that it was intended as a
signal handler, but it is not being used as such. So remove the redundant parameter.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This has the minor benefit of avoiding loading the address of the
jump table when the expression for the switch isn't a string/long.
gcc doesn't seem to optimize that.
The previous function body is the original implementation: ad8652818a5
```
// Before: 0.267s, after: 0.265s
function test_switch($x) {
for ($i = 0; $i < 10000000; $i++) {
switch ($x) {
case 'a':
case 'b':
echo "i=$i\n";
}
}
}
test_switch(null);
```
Closes GH-5419
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Don't check all the remaining arguments after one check failed.
I don't think this makes an observable behavior difference,
because we already suppress duplicate exceptions in argument
type error reporting.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
zend_timeout() may access EX(opline)
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
zend_timeout() may access EX(opline)
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes GH-5312
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit bb43a3822e42dbd15b1d416a166549d3980b379a.
After thinking about this a bit more, this is now going to be
a complete solution for the "readonly properties" case, for example:
unset($foo->readOnly->bar);
should also be legal and
$foo->readOnly['bar'] = 42;
should also be legal if $foo->readOnly is not an array but an
ArrayAccess object.
I think it may be better to distinguish better on the BP_VAR flag
level. Reverting for now.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
$a->b->c = 'd';
is now compiled the same way as
$b = $a->b;
$b->c = 'd';
That is, we perform a read fetch on $a->b, rather than a write
fetch.
This is possible, because PHP 8 removed auto-vivification support
for objects, so $a->b->c = 'd' may no longer modify $a->b proper
(i.e. not counting interior mutability of the object).
Closes GH-5250.
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
* PHP-7.4:
Check asserts early
identation fix
Call global code of preloaded script in global context
Avoid "Anonymous class wasn't preloaded" error by lazely loading of not preloaded part of a preloaded script
|
| | | |
|