#
f5dbebd8 |
| 07-Sep-2020 |
Nikita Popov |
Accept zend_string instead of zval in zend_compile_string
|
#
fa8d9b11 |
| 28-Aug-2020 |
George Peter Banyard |
Improve type declarations for Zend APIs Voidification of Zend API which always succeeded Use bool argument types instead of int for boolean arguments Use bool return type for functio
Improve type declarations for Zend APIs Voidification of Zend API which always succeeded Use bool argument types instead of int for boolean arguments Use bool return type for functions which return true/false (1/0) Use zend_result return type for functions which return SUCCESS/FAILURE as they don't follow normal boolean semantics Closes GH-6002
show more ...
|
Revision tags: php-7.4.6, php-7.2.31, php-7.4.6RC1, php-7.3.18RC1, php-7.2.30, php-7.4.5, php-7.3.17 |
|
#
d92229d8 |
| 06-Apr-2020 |
Nikita Popov |
Implement named parameters From an engine perspective, named parameters mainly add three concepts: * The SEND_* opcodes now accept a CONST op2, which is the argument nam
Implement named parameters 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.
show more ...
|
#
9bf11983 |
| 24-May-2020 |
Ilija Tovilo |
Implement nullsafe ?-> operator RFC: https://wiki.php.net/rfc/nullsafe_operator Closes GH-5619. Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
|
#
653e4ea1 |
| 14-May-2020 |
Nikita Popov |
Add flag to forbid dynamic property creation on internal classes While performing resource -> object migrations, we're adding defensive classes that are final, non-serializable and non-c
Add flag to forbid dynamic property creation on internal classes While performing resource -> object migrations, we're adding defensive classes that are final, non-serializable and non-clonable (unless they are, of course). This path adds a ZEND_ACC_NO_DYNAMIC_PROPERTIES flag, that also forbids the creation of dynamic properties on these objects. This is a subset of #3931 and targeted at internal usage only (though may be extended to userland at some point in the future). It's already possible to achieve this (what the removed WeakRef/WeakMap code does), but there's some caveats: First, this simple approach is only possible if the class has no declared properties, otherwise it's necessary to special-case those properties. Second, it's easy to make it overly strict, e.g. by forbidding isset($obj->prop) as well. And finally, it requires a lot of boilerplate code for each class. Closes GH-5572.
show more ...
|
#
b03cafd1 |
| 05-Jun-2020 |
Nikita Popov |
Fix bug #77966: Cannot alias a method named "namespace" This is a bit tricky: In this cases we have "namespace as", which means that we will only recognize "namespace" as an identifier w
Fix bug #77966: Cannot alias a method named "namespace" This is a bit tricky: In this cases we have "namespace as", which means that we will only recognize "namespace" as an identifier when the lookahead token is already at the "as". This means that zend_lex_tstring picks up the wrong identifier. We solve this by actually assigning the identifier as the semantic value on the parser stack -- as in almost all cases we will not actually need the identifier, this is just an (offset, size) reference, not a copy of the string. Additionally, we need to teach the lexer feedback mechanism used by tokenizer TOKEN_PARSE mode to apply feedback to something other than the very last token. To that purpose we pass through the token text and check the tokens in reverse order to find the right one. Closes GH-5668.
show more ...
|
#
88355dd3 |
| 07-Jun-2020 |
twosee |
Constify char * arguments of APIs Closes GH-5676.
|
Revision tags: php-7.4.5RC1, php-7.3.17RC1 |
|
#
064b4644 |
| 24-Mar-2020 |
Nikita Popov |
Implement "Constructor Promotion" RFC RFC: https://wiki.php.net/rfc/constructor_promotion Closes GH-5291.
|
#
a7908c2d |
| 24-May-2020 |
Benjamin Eberlei |
Add Attributes Co-authored-by: Martin Schröder <m.schroeder2007@gmail.com>
|
#
19e886d9 |
| 24-Apr-2020 |
Nikita Popov |
Avoid throw expression leaks Mark "throw" used in expression context with a flag, and don't treat it as a BB terminator in that case. This prevents us from optimizing away the follow
Avoid throw expression leaks Mark "throw" used in expression context with a flag, and don't treat it as a BB terminator in that case. This prevents us from optimizing away the following opcodes as unreachable, which may result in live ranges being dropped incorrectly. Close GH-5450.
show more ...
|
#
08c5c69e |
| 17-Apr-2020 |
Nikita Popov |
Remove ZEND_ACC_DTOR flag This is only used in reflection, where doing a simple string check is acceptable. I'm also dropping the "dtor" printing in the reflection dump. Dto
Remove ZEND_ACC_DTOR flag This is only used in reflection, where doing a simple string check is acceptable. I'm also dropping the "dtor" printing in the reflection dump. Dtors are just one of many magic methods, I don't think there's a point in explicitly highlighting them, when the name is already unambiguous.
show more ...
|
#
bac5137e |
| 14-Apr-2020 |
Nikita Popov |
Add zend_create_member_string() API This is a recurring pattern.
|
#
3709e74b |
| 06-Apr-2020 |
Máté Kocsis |
Store default parameter values of internal functions in arg info Closes GH-5353. From now on, PHP will have reflection information about default values of parameters of internal function
Store default parameter values of internal functions in arg info Closes GH-5353. From now on, PHP will have reflection information about default values of parameters of internal functions. Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
show more ...
|
#
1ed132e2 |
| 01-Apr-2020 |
Nikita Popov |
Unify checks for binary operator errors for ct eval Move everything into one function and share it with opcache. This fixes some discrepancies.
|
Revision tags: php-7.3.18, php-7.4.4, php-7.2.29, php-7.3.16, php-7.4.4RC1, php-7.3.16RC1 |
|
#
819a872c |
| 27-Feb-2020 |
Nikita Popov |
Avoid more null arithmetic
|
#
1949a26a |
| 27-Feb-2020 |
Nikita Popov |
Remove more null arithmetic UB Introduce an EX_NUM_TO_VAR macro to mirror EX_VAR_TO_NUM and replace usages of the ZEND_CALL_VAR_NUM(NULL) pattern.
|
#
0427ef91 |
| 27-Feb-2020 |
Nikita Popov |
Avoid null arithmetic UB in EX_VAR_TO_NUM
|
Revision tags: php-7.4.3, php-7.2.28 |
|
#
53e527ad |
| 06-Feb-2020 |
Nikita Popov |
Remove ZEND_ACC_IMPLEMENT_INTERFACES flag This is equivalent to checking ce->num_interfaces. The only subtle moment is during inheritance, where num_interface may change when parent
Remove ZEND_ACC_IMPLEMENT_INTERFACES flag This is equivalent to checking ce->num_interfaces. The only subtle moment is during inheritance, where num_interface may change when parent interfaces are inherited. The check in zend_do_link_class thus uses "interfaces", not "ce->num_interfaces".
show more ...
|
#
f57f0920 |
| 06-Feb-2020 |
Nikita Popov |
Remove ZEND_ACC_IMPLEMENTS_TRAITS flag This is equivalent to checking ce->num_traits.
|
#
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, php-7.4.3RC1 |
|
#
d6b04bfb |
| 03-Feb-2020 |
Derick Rethans |
Export zend_type_to_string() with ZEND_API
|
Revision tags: php-7.3.15, php-7.2.27, php-7.4.2, php-7.3.14, php-7.3.14RC1, php-7.4.2RC1, php-7.4.1, php-7.2.26, php-7.3.13, php-7.4.1RC1, 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.
|
#
1417352d |
| 22-Oct-2019 |
Dmitry Stogov |
Allow loading FFI bindings through ffi.preload directive
|