summaryrefslogtreecommitdiff
path: root/Zend/zend_inheritance.h
Commit message (Collapse)AuthorAgeFilesLines
* Added Inheritance Cache.Dmitry Stogov2021-02-091-2/+5
| | | | | | | | | | This is a new transparent technology that eliminates overhead of PHP class inheritance. PHP classes are compiled and cached (by opcahce) separately, however their "linking" was done at run-time - on each request. The process of "linking" may involve a number of compatibility checks and borrowing methods/properties/constants form parent and traits. This takes significant time, but the result is the same on each request. Inheritance Cache performs "linking" for unique set of all the depending classes (parent, interfaces, traits, property types, method types involved into compatibility checks) once and stores result in opcache shared memory. As a part of the this patch, I removed limitations for immutable classes (unresolved constants, typed properties and covariant type checks). So now all classes stored in opcache are "immutable". They may be lazily loaded into process memory, if necessary, but this usually occurs just once (on first linking). The patch shows 8% improvement on Symphony "Hello World" app.
* Replace zend_bool uses with boolNikita Popov2021-01-151-2/+2
| | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* Improve type declarations for Zend APIsGeorge Peter Banyard2020-08-281-1/+1
| | | | | | | | | 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
* Merge branch 'PHP-7.4'Nikita Popov2019-09-121-1/+1
|\
| * Allow throwing exception while loading parent classNikita Popov2019-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge branch 'PHP-7.4'Dmitry Stogov2019-06-271-2/+5
|\ \ | |/ | | | | | | * PHP-7.4: Avoid double checks on early binding
| * Avoid double checks on early bindingDmitry Stogov2019-06-271-2/+5
| |
* | Merge branch 'PHP-7.4'Dmitry Stogov2019-06-251-1/+1
|\ \ | |/ | | | | | | * PHP-7.4: Keep lowercased parent class name as second argument of DECLARE_CLASS to avoid extra work at run-time
| * Keep lowercased parent class name as second argument of DECLARE_CLASS to ↵Dmitry Stogov2019-06-251-1/+1
| | | | | | | | avoid extra work at run-time
* | Merge branch 'PHP-7.4'Nikita Popov2019-06-111-1/+1
|\ \ | |/
| * Register class before fetching parentNikita Popov2019-06-111-1/+1
| | | | | | | | | | We want the class declaration to be available while compiling the parent class.
* | Merge branch 'PHP-7.4'Nikita Popov2019-05-241-0/+1
|\ \ | |/
| * Avoid early-binding on unresolved typesNikita Popov2019-05-241-0/+1
| | | | | | | | | | | | Fixes bug #76451, and more importantly lays necessary groundwork for covariant/contravariant types. Bug #76451 is just an edge case, but once covariance is introduced this will become a common problem instead.
* | Merge branch 'PHP-7.4'Peter Kokot2019-02-031-10/+0
|\ \ | |/ | | | | | | * PHP-7.4: Remove local variables
| * Remove local variablesPeter Kokot2019-02-031-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
| * Adios, yearly copyright rangesZeev Suraski2019-01-301-1/+1
| |
* | Adios, yearly copyright rangesZeev Suraski2019-01-301-1/+1
| |
* | Remove support for legacy constructorsNikita Popov2019-01-291-1/+0
|/ | | | | This has been deprecated in PHP 7.0 by https://wiki.php.net/rfc/remove_php4_constructors.
* Implement typed propertiesNikita Popov2019-01-111-0/+1
| | | | | | | | | | RFC: https://wiki.php.net/rfc/typed_properties_v2 This is a squash of PR #3734, which is a squash of PR #3313. Co-authored-by: Bob Weinand <bobwei9@hotmail.com> Co-authored-by: Joe Watkins <krakjoe@php.net> Co-authored-by: Dmitry Stogov <dmitry@zend.com>
* Update email addresses. We're still @Zend, but future proofing it...Zeev Suraski2018-11-011-2/+2
|
* Cleanup class linkingDmitry Stogov2018-08-271-4/+2
|
* Move zend_verify_abstract_class() into zend_inheritance.cDmitry Stogov2018-08-271-0/+1
|
* Perform "early-binding" directly during compilationDmitry Stogov2018-08-241-1/+0
|
* Keep information about unresolved interfaces in ↵Dmitry Stogov2018-08-231-1/+1
| | | | | | | zend_class_entry->interface_names. Move interface implementation code into ZEND_DECLARE_*CLASS opcodes. Remove ZEND_ADD_INTERFACE and ZEND_VERIFY_ABSTRACT_CLASS opcodes.
* Replace zend_class_entry->traits by persistent zend_class_entry->trait_names.Dmitry Stogov2018-08-231-1/+0
| | | | | Move trait binding code into ZEND_DECLARE_*CLASS opcodes. Remove ZEND_ADD_TRIAIT and ZEND_BIND_TRAITS opcodes.
* year++Xinchen Hui2018-01-021-1/+1
|
* further sync for vim mode linesAnatol Belski2017-07-041-0/+2
|
* Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
|
* bump year which is missed in rev 49493a2Xinchen Hui2016-01-021-1/+1
|
* Deprecate PHP 4 constructorsAndrea Faulds2015-03-311-0/+2
|
* bump yearXinchen Hui2015-01-151-1/+1
|
* first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-6/+6
|
* Added missed mod strXinchen Hui2014-09-201-0/+7
|
* Split inheritance into separate fileNikita Popov2014-09-191-0/+39
This moves handling of inheritance and interface implementation from zend_compile.c into a separate zend_inheritance.c file, as this is not really related to compilation.