| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add ZVAL_CHAR/RETVAL_CHAR/RETURN_CHAR as a shortcut for using
ZVAL_INTERNED_STRING and ZSTR_CHAR.
Add zend_string_init_fast() as a helper for the empty string /
one char interned string / zend_string_init() pattern.
Also add corresponding ZVAL_STRINGL_FAST etc macros.
Closes GH-5684.
|
| |
|
|
|
|
| |
Co-authored-by: Martin Schröder <m.schroeder2007@gmail.com>
|
|
|
|
|
|
|
| |
From now on, we always display the given object's type instead of just reporting "object".
Additionally, make the format of return type errors match the format of argument errors.
Closes GH-5625
|
|\
| |
| |
| |
| | |
* PHP-7.4:
Fix zend_assign_to_typed_ref() implementation
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There was some confusion going on here regarding the original
value vs the copied value.
I've dropped the needs_copy variable, because this code is not
inlined, so it would always be true anyway.
What we need to do is perform a move-assignment of the copied
value (in which case we don't care about performing the assignment
before destroying garbage), and destroying the original value
for the VAR/TMP cases. This is a bit complicated by the fact that
references are passed in via a separate ref variable, so we can't
just ptr_dtor the original variable.
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.3:
Fixed bug #79434
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Closes GH-5446
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
|
| | | |
|
| | |
| | |
| | |
| | | |
Rather than zend_get_type_by_const(Z_TYPE_P()).
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes GH-5312
|
| | |
| | |
| | |
| | | |
If no error is passed, it is always silent.
|
| | |
| | |
| | |
| | | |
Closes GH-5211
|
| | |
| | |
| | |
| | |
| | | |
First check for IS_INDIRECT and de-indirect it directly there.
Handle the error cases later.
|
| | |
| | |
| | |
| | | |
Closes GH-5092
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
RFC: https://wiki.php.net/rfc/static_return_type
The "static" type is represented as MAY_BE_STATIC, rather than
a class type like "self" and "parent", as it has special
resolution semantics, and cannot be cached in the runtime cache.
Closes GH-5062.
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Make opcodes to return de-refereced values of typed references (in the same was as for non-typed)
|
| | |
| | |
| | |
| | | |
was as for non-typed)
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Apply tidy formatting
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fixed bug #79094 (Crashing when running recursion function)
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Internal constants can be marked as CONST_DEPRECATED, in which
case accessing them will throw a deprecation warning.
For now this is only supported on global constants, not class
constants. Complain to me if you need to deprecate a class
constant...
Closes GH-5072.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of having a completely independent encoding for type list
entries. This is going to use more memory, but I'm not particularly
concerned about that, as type unions that contain multiple classes
should be uncommon. On the other hand, this allows us to treat
top-level types and types inside lists mostly the same.
A new ZEND_TYPE_FOREACH macros allows to transparently treat list
and non-list types the same way. I'm not using it everywhere it could be
used for now, just the places that seemed most obvious.
Of course, this will make any future type system changes much simpler,
as it will not be necessary to duplicate all logic two times.
|
| | |
| | |
| | |
| | |
| | | |
Be more specific for the individual cases and provide relevant
type information.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Convert the empty string assignment to an Error as per RFC [1]
Add a warning that only the first byte will be assigned to the offset if provided
a needle that is longer than one byte.
[1] https://wiki.php.net/rfc/engine_warnings
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Properly propagate url_stat exceptions during include
|
| | |
| | |
| | |
| | |
| | | |
Make sure we abort operations early, and that we don't emit
additional warnings or errors if an exception has been thrown.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Avoid signed integer overflow in string offset check
|
| | |
| | |
| | |
| | | |
Cast to size_t before performing operations instead of afterwards.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix leak in assign_ref with function
|
| | |
| | |
| | |
| | |
| | | |
As far as I can see, the retval copying is already done in all
callers of this function, so it should not be duplicated here.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix const/cv freeing on failed reference assignment
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Export zend_init_func_run_time_cache()
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Split off the fast-path case and avoid redundant checks.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
According to RFC: https://wiki.php.net/rfc/union_types_v2
The type representation now makes use of both the pointer payload
and the type mask at the same time. Additionall, zend_type_list is
introduced as a new kind of pointer payload, which is used to store
multiple class types. Each of the class types is a tagged pointer,
which may be either a class name or class entry. The latter is only
used for typed properties, while arguments/returns will instead use
cache slots. A type list can contain a mix of both names and CEs at
the same time, as not all classes may be resolvable.
One thing this is missing is support for union types in arginfo
and stubs, which I want to handle separately.
I've also dropped the special object code from the JIT implementation
for now -- I plan to add this back in a different form at a later time.
For now I did not want to include non-trivial JIT changes together
with large functional changes.
Another possible piece of follow-up work is to implement "iterable"
as an internal alias for "array|Traversable". I believe this will
eliminate quite a few special-cases that had to be implemented.
Closes GH-4838.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We now store the pointer payload and the type mask separately. This
is in preparation for union types, where we will be using both at
the same time.
To avoid increasing the size of arginfo structures, the
pass_by_reference and is_variadic fields are now stored as part of
the type_mask (8-bit are reserved for custom use).
Different types of pointer payloads are distinguished based on bits
in the type_mask.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Change a number of "resource used as offset" notices to warnings,
which were previously missed.
* Throw the "resource used as offset" warning for isset() as well.
* Make array_key_exists() behavior with regard to different key
types consistent with isset() and normal array accesses. All key
types now use the usual coercions and array/object keys throw
TypeError.
Closes GH-4887.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Weird that there was no test for this...
This code is somewhat inefficient, because it will be performed
for every arg, rather than only once.
|
| | |
| | |
| | |
| | |
| | | |
We don't emit VERIFY_RETURN_TYPE for void functions, so there's
no need to check it here. It's always an error.
|