#
4f5f72c7 |
| 06-Feb-2020 |
Nikita Popov |
Remove ZEND_ACC_INHERITED flag It is equivalent to checking ce->parent != NULL. Just adds more state that needs to be kept in sync. |
Revision tags: php-7.3.15RC1 |
|
#
d6b04bfb |
| 03-Feb-2020 |
Derick Rethans |
Export zend_type_to_string() with ZEND_API |
Revision tags: php-7.3.15, php-7.3.14, php-7.3.14RC1, php-7.3.13, php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1, php-7.4.0RC3 |
|
#
999e32b6 |
| 25-Sep-2019 |
Nikita Popov |
Implement union types 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 t
Implement union types 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.
show more ...
|
Revision tags: php-7.2.23, php-7.3.10 |
|
#
ac4e0f08 |
| 20-Sep-2019 |
Nikita Popov |
Make zend_type a 2-field struct 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.
Make zend_type a 2-field struct 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.
show more ...
|
#
9d48bf51 |
| 27-Oct-2019 |
Tyson Andre |
Fix miscellaneous typos in docs and error messages Closes GH-4863. |
#
626a5837 |
| 22-Oct-2019 |
Dmitry Stogov |
Merge branch 'PHP-7.4' * PHP-7.4: Allow loading FFI bindings through ffi.preload directive
|
#
1417352d |
| 22-Oct-2019 |
Dmitry Stogov |
Allow loading FFI bindings through ffi.preload directive |
#
f6f32f2c |
| 09-Oct-2019 |
Dmitry Stogov |
SAMRT BRANCH improvement. Avoid need of insertion NOP opcoes between unrelated SMART BRANCH instruction and following JMPZ/JMPNZ. Now instead of checking the opcode of following instruct
SAMRT BRANCH improvement. Avoid need of insertion NOP opcoes between unrelated SMART BRANCH instruction and following JMPZ/JMPNZ. Now instead of checking the opcode of following instruction, the same information is encoded into SMART BRANH result_type.
show more ...
|
#
56ae3f6c |
| 08-Oct-2019 |
Dmitry Stogov |
Added "const" qualifier |
#
a66c60cc |
| 26-Sep-2019 |
Nikita Popov |
Throw Error when writing property of non-object This removes object auto-vivification support. This also means that we can remove the corresponding special handling for typed pr
Throw Error when writing property of non-object This removes object auto-vivification support. This also means that we can remove the corresponding special handling for typed properites: We no longer need to check that a property is convertible to stdClass if such a conversion might take place indirectly due to a nested property write. Additionally OBJ_W style operations now no longer modify the object operand, and as such we no longer need to treat op1 as a def in SSA form. The next step would be to actually compile the whole LHS of OBJ_W operations in R rather than W mode, but that causes issues with SimpleXML, whose object handlers depend on the current compilation structure. Part of https://wiki.php.net/rfc/engine_warnings.
show more ...
|
#
9e8ba789 |
| 19-Sep-2019 |
Nikita Popov |
Change representation of zend_type from type code to MAY_BE_* mask This switches zend_type from storing a single IS_* type code to storing a MAY_BE_* type mask. Right now most code still
Change representation of zend_type from type code to MAY_BE_* mask This switches zend_type from storing a single IS_* type code to storing a MAY_BE_* type mask. Right now most code still assumes that there is only a single type in the mask (or two together with MAY_BE_NULL). But this will make it a lot simpler to introduce union types. An additional advantage (and why I'm doing this separately), is that a number of special cases no longer need to be handled separately: We can do a single mask & (1 << type) check to handle all simple types, booleans (true|false) and null.
show more ...
|
Revision tags: php-7.4.0RC2 |
|
#
a86e0487 |
| 13-Sep-2019 |
Nikita Popov |
Merge branch 'PHP-7.4'
|
#
ee0bf4b2 |
| 13-Sep-2019 |
Nikita Popov |
Define OBJ_PROP_TO_OFFSET() using XtOffsetOf() This avoids null pointer arithmetic UB. |
#
f61f122b |
| 12-Sep-2019 |
Nikita Popov |
Merge branch 'PHP-7.4'
|
#
4b9ebd83 |
| 11-Sep-2019 |
Nikita Popov |
Allow throwing exception while loading parent class This is a fix for symfony/symfony#32995. The behavior is: * Throwing exception when loading parent/interface is allowed
Allow throwing exception while loading parent class This is a fix for symfony/symfony#32995. The behavior is: * Throwing exception when loading parent/interface is allowed (and we will also throw one if the class is simply not found). * If this happens, the bucket key for the class is reset, so it's possibly to try registering the same class again. * However, if the class has already been used due to a variance obligation, the exception is upgraded to a fatal error, as we cannot safely unregister the class stub anymore.
show more ...
|
#
403396e4 |
| 11-Sep-2019 |
Nikita Popov |
Merge branch 'PHP-7.4'
|
#
270e5e3c |
| 11-Sep-2019 |
Nikita Popov |
Only allow "nearly linked" classes for parent/interface The requirements for parent/interface are difference than for the variance checks in type declarations. The latter can work on ful
Only allow "nearly linked" classes for parent/interface The requirements for parent/interface are difference than for the variance checks in type declarations. The latter can work on fully unlinked classes, but the former need inheritance to be essentially finished, only variance checks may still be outstanding. Adding a new flag for this because we have lots of space, but we could also represent these "inheritance states" more compactly in the future.
show more ...
|
Revision tags: php-7.2.23RC1, php-7.3.10RC1, php-7.4.0RC1 |
|
#
dce8d19f |
| 02-Sep-2019 |
Ivan Enderlin |
Mention that arg_info[-1] holds the return info I lost some time trying to know how to find the returned type. It's not that obvious it is stored in the _argument_ information array.
Mention that arg_info[-1] holds the return info I lost some time trying to know how to find the returned type. It's not that obvious it is stored in the _argument_ information array. For the sake of Internet, here is the full code checking that a function _has_ a returned type: ```c zend_function *function = /* e.g. fci_cache->function_handler */; if (!(function->op_array.fn_flags & ZEND_ACC_HAS_RETURN_TYPE)) { php_printf("no return type\n"); } else { php_printf("has a return type\n"); php_printf("return type = %s\n", zend_get_type_by_const(ZEND_TYPE_CODE(function->common.arg_info[-1].type))); } ```
show more ...
|
#
33e10fe1 |
| 02-Sep-2019 |
Dmitry Stogov |
Merge branch 'PHP-7.4' * PHP-7.4: Free two bits in fn_flags by merging ZEND_ACC_HEAP_RT_CACHE/ZEND_ACC_USER_ARG_INFO and ZEND_ACC_DONE_PASS_TWO/ZEND_ACC_ARENA_ALLOCATED that may be use
Merge branch 'PHP-7.4' * PHP-7.4: Free two bits in fn_flags by merging ZEND_ACC_HEAP_RT_CACHE/ZEND_ACC_USER_ARG_INFO and ZEND_ACC_DONE_PASS_TWO/ZEND_ACC_ARENA_ALLOCATED that may be used only for user/internal functions
show more ...
|
#
c739023a |
| 02-Sep-2019 |
Dmitry Stogov |
Free two bits in fn_flags by merging ZEND_ACC_HEAP_RT_CACHE/ZEND_ACC_USER_ARG_INFO and ZEND_ACC_DONE_PASS_TWO/ZEND_ACC_ARENA_ALLOCATED that may be used only for user/internal functions |
#
633c5886 |
| 02-Sep-2019 |
Dmitry Stogov |
Merge branch 'PHP-7.4' * PHP-7.4: Fixed information about unused flags
|
#
e6d3a218 |
| 02-Sep-2019 |
Dmitry Stogov |
Fixed information about unused flags |
Revision tags: php-7.1.32, php-7.2.22, php-7.3.9 |
|
#
4e4cc9b4 |
| 23-Aug-2019 |
Nikita Popov |
Merge branch 'PHP-7.4'
|
Revision tags: php-7.4.0beta4 |
|
#
d1157cbc |
| 16-Aug-2019 |
Nikita Popov |
Relax closure $this unbinding deprecation Only deprecate unbinding of $this from a closure if $this is syntactically used within the closure. This is desired to support Laravel'
Relax closure $this unbinding deprecation Only deprecate unbinding of $this from a closure if $this is syntactically used within the closure. This is desired to support Laravel's macro system, see laravel/framework#29482. This should still allow us to implement the performance improvements we're interested in for PHP 8, without breaking existing use-cases.
show more ...
|
Revision tags: php-7.2.22RC1, php-7.3.9RC1, php-7.4.0beta2, php-7.1.31, php-7.2.21, php-7.3.8, php-7.4.0beta1 |
|
#
97912023 |
| 19-Jul-2019 |
Dmitry Stogov |
Merge branch 'PHP-7.4' * PHP-7.4: Use run-time cache to avoid repeatable hash lookups in ZEND_DECLARE_CLASS_DELAYED
|