summaryrefslogtreecommitdiff
path: root/Zend/zend_interfaces.c
Commit message (Collapse)AuthorAgeFilesLines
* Support full variance if autoloading is usedNikita Popov2019-06-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep track of delayed variance obligations and check them after linking a class is otherwise finished. Obligations may either be unresolved method compatibility (because the necessecary classes aren't available yet) or open parent/interface dependencies. The latter occur because we allow the use of not fully linked classes as parents/interfaces now. An important aspect of the implementation is we do not require classes involved in variance checks to be fully linked in order for the class to be fully linked. Because the involved types do have to exist in the class table (as partially linked classes) and we do check these for correct variance, we have the guarantee that either those classes will successfully link lateron or generate an error, but there is no way to actually use them until that point and as such no possibility of violating the variance contract. This is important because it ensures that a class declaration always either errors or will produce an immediately usable class afterwards -- there are no cases where the finalization of the class declaration has to be delayed until a later time, as earlier variants of this patch did. Because variance checks deal with classes in various stages of linking, we need to use a special instanceof implementation that supports this, and also introduce finer-grained flags that tell us which parts have been linked already and which haven't. Class autoloading for variance checks is delayed into a separate stage after the class is otherwise linked and before delayed variance obligations are processed. This separation is needed to handle cases like A extends B extends C, where B is the autoload root, but C is required to check variance. This could end up loading C while the class structure of B is in an inconsistent state.
* Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macrosDmitry Stogov2019-05-281-1/+2
|
* Forbid use of not fully linked classesNikita Popov2019-05-231-2/+2
|
* Fixed bug #77633Dmitry Stogov2019-02-181-2/+14
| | | | | | Add a new class flag to inherit get_iterator() when implementing the Iterator/IteratorAggregate interfaces and use it for ArrayIterator.
* 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
|
* Micro optimizationsDmitry Stogov2018-10-171-26/+40
|
* Replace ZEND_ACC_ANON_BOUND, ZEND_ACC_UNRESOLVED_PARENT and ↵Dmitry Stogov2018-09-181-2/+2
| | | | ZEND_ACC_UNRESOLVED_INTERFACES with single ZEND_ACC_LINKED.
* Get rid of ZEND_ACC_CTOR, ZEND_ACC_DTOR and ZEND_ACC_IMPLEMENTED_ABSTRACTDmitry Stogov2018-09-051-1/+1
|
* Keep information about unresolved interfaces in ↵Dmitry Stogov2018-08-231-3/+7
| | | | | | | zend_class_entry->interface_names. Move interface implementation code into ZEND_DECLARE_*CLASS opcodes. Remove ZEND_ADD_INTERFACE and ZEND_VERIFY_ABSTRACT_CLASS opcodes.
* Fix some misspellingsGabriel Caruso2018-08-121-1/+1
|
* Removed useless IS_UNDEF checksDmitry Stogov2018-07-311-5/+3
|
* Remove unused Git attributes identPeter Kokot2018-07-251-2/+0
| | | | | | | | | | | | | | | The $Id$ keywords were used in Subversion where they can be substituted with filename, last revision number change, last changed date, and last user who changed it. In Git this functionality is different and can be done with Git attribute ident. These need to be defined manually for each file in the .gitattributes file and are afterwards replaced with 40-character hexadecimal blob object name which is based only on the particular file contents. This patch simplifies handling of $Id$ keywords by removing them since they are not used anymore.
* Improved user iterator implementation to reduce zend_class_entry memory ↵Dmitry Stogov2018-07-121-15/+36
| | | | consumption and avoid race condition during resolving/caching of user iterator functions of internal classes in ZTS build.
* Fixed ability to call plain functions through zend_call_method()Dmitry Stogov2018-06-251-6/+13
|
* zend_fcall_info_cache.calling_scope is not used by zend_call_function() and ↵Dmitry Stogov2018-05-031-1/+0
| | | | | | doesn't have to be initialized. It's used only as a result of zend_is_callable() in forward_static_call and spl_autoload.
* year++Xinchen Hui2018-01-021-1/+1
|
* zend_fcall_info_cache.initialized is removed (zend_fcall_info_cache is ↵Dmitry Stogov2017-12-271-1/+0
| | | | initialized if zend_fcall_info_cache.function_handler is set).
* Move constants into read-only data segmentDmitry Stogov2017-12-141-6/+6
|
* Move zend_object_iterator_funcs structures into read-only data segmentDmitry Stogov2017-12-141-1/+1
|
* further sync for vim mode linesAnatol Belski2017-07-041-0/+2
|
* "Countable" interface is moved from SPL to CoreDmitry Stogov2017-05-251-0/+18
|
* Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
|
* Drop dead code in zend_call_methodNikita Popov2016-10-291-9/+0
| | | | As no_separation=1 is used this can not happen anymore.
* Merge branch 'PHP-7.1'Nikita Popov2016-10-291-10/+8
|\
| * Optimize __get etcNikita Popov2016-10-291-10/+8
| | | | | | | | | | Cheap 20% win by skipping the function name allocation if we don't need it.
* | Drop some pieces of commented-out codeNikita Popov2016-09-041-19/+0
|/
* Removed "zend_fcall_info.function_table". It was assigned in many places, ↵Dmitry Stogov2016-04-271-1/+0
| | | | but is never used.
* Removed zend_fcall_info.symbol_tableDmitry Stogov2016-03-021-1/+0
|
* bump year which is missed in rev 49493a2Xinchen Hui2016-01-021-1/+1
|
* Use NULL where possible for exception classAaron Piotrowski2015-07-071-1/+1
| | | | Matches usage of zend_throw_exception()/zend_throw_exception_ex().
* Remove need to pass error levelAaron Piotrowski2015-07-031-1/+1
|
* Enable throwing custom exceptions from errorsAaron Piotrowski2015-07-031-1/+1
|
* Use ZSTR_ API to access zend_string elements (this is just renaming without ↵Dmitry Stogov2015-06-301-17/+17
| | | | semantick changes).
* Rename interface macrosAaron Piotrowski2015-06-171-10/+7
| | | | | | | | | Renamed REGISTER_INTERFACE (formerly REGISTER_ITERATOR_INTERFACE) to REGISTER_MAGIC_INTERFACE and renamed REGISTER_ITERATOR_IMPLEMENT to REGISTER_MAGIC_IMPLEMENT. Both have now been moved to zend_interfaces.h.
* Move definition of Throwable to zend_exceptions.h/cAaron Piotrowski2015-06-151-43/+5
| | | | | Also moved REGISTER_ITERATOR_INTERFACE macro to zend_interfaces.h and renamed it to REGISTER_INTERFACE.
* Update exception error messagesAaron Piotrowski2015-06-141-2/+4
|
* Throwable method signatures.Aaron Piotrowski2015-05-181-2/+12
|
* Remodel exceptions based on Throwable interfaceAaron Piotrowski2015-05-161-1/+19
| | | | | | | | | | | Added Throwable interface that exceptions must implement in order to be thrown. BaseException was removed, EngineException renamed to Error, and TypeException and ParseException renamed to TypeError and ParseError. Exception and Error no longer extend a common base class, rather they both implement the Throwable interface.
* Don't propogate "fake" EX(called_scope) and EX(This) into each internal ↵Dmitry Stogov2015-04-231-6/+9
| | | | | | function. They need quite seldom and it's cheaper to get them from corresponfing upper stack frame.
* Convert fatal errors into EngineExceptionDmitry Stogov2015-04-021-1/+2
|
* Convert fatal errors into EngineExceptionsDmitry Stogov2015-04-021-1/+3
| | | | Make zval_update_constant_ex(), zval_update_constant(), zend_update_class_constants() and zend_ast_evaluate() return SUCCESS or FAILURE.
* Use zend_error_noreturn() for fatal errorsDmitry Stogov2015-04-011-6/+6
|
* bump yearXinchen Hui2015-01-151-1/+1
|
* trailing whitespace removalStanislav Malyshev2015-01-101-2/+2
|
* first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-39/+39
|
* Fixed compilation warningsDmitry Stogov2014-12-121-4/+4
|
* fix signature, zend_string is used for function nameAnatol Belski2014-10-281-1/+1
|
* Remove support for classes without class entriesNikita Popov2014-10-091-2/+1
| | | | get_class_entry must be non-NULL and return non-NULL.
* revamp serialization to work with size_t for SerializableAnatol Belski2014-09-151-4/+4
|