summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge branch 'PHP-7.3'Nikita Popov2018-10-031-7/+5
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2018-10-031-7/+5
| |\ \ | | |/
| | * Merge branch 'PHP-7.1' into PHP-7.2Nikita Popov2018-10-031-7/+5
| | |\
| | | * Reflection: Copy invoke function also in the variadic caseNikita Popov2018-10-031-7/+5
| | | | | | | | | | | | | | | | | | | | It doesn't matter how the parameters are provided, we always have to copy the trampoline invoke function.
* | | | Remove uses of apply_with_arguments API in reflectionNikita Popov2018-10-031-124/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of ZEND_HASH_FOREACH. As a side-effect, this fixes a latent bug in _addmethod, where a zval was interpreted as a zval*. Also apply some optimizations to getProperties() while at it: For declared properties, use the HT key instead of unmangling the property name. For dynamic properties check INDIRECT instead of looking up prop info to determine if the property is dynamic.
* | | | Some reflection cleanupsNikita Popov2018-10-021-55/+35
| | | | | | | | | | | | | | | | | | | | Use zend_string and zend_string_tolower in more places, clean up __invoke handling slightly.
* | | | Merge branch 'PHP-7.3'Nikita Popov2018-10-021-0/+10
|\ \ \ \ | |/ / /
| * | | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2018-10-021-0/+10
| |\ \ \ | | |/ /
| | * | Fixed bug #66430Nikita Popov2018-10-021-0/+10
| | | |
* | | | Fixed bug #76737Nikita Popov2018-09-291-13/+19
| | | | | | | | | | | | | | | | | | | | Explicitly prohibit serialization and unserialization of reflection objects.
* | | | Remove redundant ce from reflection property_referenceNikita Popov2018-09-281-8/+5
| | | | | | | | | | | | | | | | | | | | The ce is already stored in the main reflection object, no need to store it twice.
* | | | Only store zend_type inside reflection type_referenceNikita Popov2018-09-281-20/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need the full arg_info and the baggage associated with it. Storing the type should be safe, as it's part of structures which are never released during a request (arg_info and in the future prop_info).
* | | | Remove unused "dummy" member in reflection_objectNikita Popov2018-09-251-1/+0
| | | |
* | | | Reformat macros in php_reflection.cNikita Popov2018-09-251-20/+19
| | | |
* | | | Replace ZEND_ACC_ANON_BOUND, ZEND_ACC_UNRESOLVED_PARENT and ↵Dmitry Stogov2018-09-181-3/+3
| | | | | | | | | | | | | | | | ZEND_ACC_UNRESOLVED_INTERFACES with single ZEND_ACC_LINKED.
* | | | Get rid of ZEND_ACC_IMPLICIT_PUBLICDmitry Stogov2018-09-111-24/+32
| | | |
* | | | Squashed commit of the following:Dmitry Stogov2018-09-111-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 2d3cac9e005d6bef9aa73ab57cc674aa53125954 Author: Dmitry Stogov <dmitry@zend.com> Date: Tue Sep 11 11:54:47 2018 +0300 Fixed static property access commit 31786ee27282f319f3ef2a07635b1f325cbd67c6 Author: Dmitry Stogov <dmitry@zend.com> Date: Tue Sep 11 11:05:29 2018 +0300 Avoid duplicate checks commit 5ae502b979ea33d058d01a9421eec5afd0084e8d Author: Dmitry Stogov <dmitry@zend.com> Date: Tue Sep 11 10:39:17 2018 +0300 Optimization commit 82c17f0e8af02c9cf7d1bbdae4e3158330148203 Author: Dmitry Stogov <dmitry@zend.com> Date: Tue Sep 11 09:26:50 2018 +0300 Removed unused zend_duplicate_property_info() commit ba53d1d0dd91d5530328a11cac93ff9e75c462b5 Merge: eacc11b8fd c4b14370cf Author: Dmitry Stogov <dmitry@zend.com> Date: Tue Sep 11 09:24:13 2018 +0300 Merge branch 'master' into shadow * master: 7.0.33 next Sync NEWS [ci skip] add NEWS for 76582 Enforce ordering of property compare in object comparisons Fixed wrong assertion Skip test on unsuitable env commit eacc11b8fdeb002ee6a149defd8b5a8c3412896a Author: Dmitry Stogov <dmitry@zend.com> Date: Mon Sep 10 13:12:39 2018 +0300 Fixed failure of ext/spl/tests/array_017.phpt commit 62d1871430a1b81c84b790460afff0682648689a Author: Dmitry Stogov <dmitry@zend.com> Date: Mon Sep 10 11:55:07 2018 +0300 Fixed issues commit 1d37e3a40e4d07c4b933ed6f9d2e649dd01180f0 Merge: d6c3f098b6 1e550e6f7e Author: Dmitry Stogov <dmitry@zend.com> Date: Mon Sep 10 10:21:20 2018 +0300 Merge branch 'master' into shadow * master: Update NEWS Fix for bug #76582 Fix ssl stream reneg limit test to print only after first renegotiation Make a copy unconditionally Fix memory leak in pcre cache Remove not needed checking for <errno.h> Remove HAVE_ASSERT_H Add test for bug #76850 Fixed bug #76850 Exit code mangled by set locale/preg_match Remove empty PHP tags from test Fix #75273: php_zlib_inflate_filter() may not update bytes_consumed Fix PCRE2 exclusion and remove dead libs in Makefile.gcov Report mem leaks to stderr if no Win debugger is present Use combined assignment contanation operator Fixed bug #76796 Support fixed address mmap without replacement commit d6c3f098b6015e76d042691de0af2e1426c66829 Author: Dmitry Stogov <dmitry@zend.com> Date: Fri Sep 7 13:56:30 2018 +0300 Get rid of ZEND_ACC_SHADOW
* | | | Merge branch 'PHP-7.3'Christoph M. Becker2018-09-051-2/+4
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.3: Fix #74454: Wrong exception being thrown when using ReflectionMethod
| * | | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2018-09-051-2/+4
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.2: Fix #74454: Wrong exception being thrown when using ReflectionMethod
| | * | Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-09-051-2/+4
| | |\ \ | | | |/ | | | | | | | | | | | | * PHP-7.1: Fix #74454: Wrong exception being thrown when using ReflectionMethod
| | | * Fix #74454: Wrong exception being thrown when using ReflectionMethodChristoph M. Becker2018-09-051-2/+4
| | | | | | | | | | | | | | | | | | | | If zend_throw_exception_ex() already threw an exception, we should not throw again.
* | | | Get rid of ZEND_ACC_CTOR, ZEND_ACC_DTOR and ZEND_ACC_IMPLEMENTED_ABSTRACTDmitry Stogov2018-09-051-5/+5
| | | |
* | | | Keep information about unresolved interfaces in ↵Dmitry Stogov2018-08-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+8
| | | | | | | | | | | | | | | | | | | | Move trait binding code into ZEND_DECLARE_*CLASS opcodes. Remove ZEND_ADD_TRIAIT and ZEND_BIND_TRAITS opcodes.
* | | | Fix some misspellingsGabriel Caruso2018-08-121-1/+1
|/ / /
* | | Pack zend_constant.flags and zend_constant.module_number into reserved space ↵Dmitry Stogov2018-07-261-2/+2
| | | | | | | | | | | | inside zend_constant.value.
* | | Changed structure of zend_class_entry.trait_aliases and ↵Dmitry Stogov2018-07-111-3/+3
| | | | | | | | | | | | zend_class_entry.trait_precedences to avoid keeping "intermediate" trait references, that are used only during inheritance.
* | | Uze ZVAL_COPY_DEREF() instead of ZVAL_DEREF() and ZVAL_COPY()Dmitry Stogov2018-07-091-10/+5
| | |
* | | Use zval_ptr_dtor() instead of zval_dtor() in internal functions that ↵Dmitry Stogov2018-07-051-2/+2
| | | | | | | | | | | | destroy new created object (This is safer and produces less code)
* | | Use zval_ptr_dtor() instead of zval_dtor() in internal functions that ↵Dmitry Stogov2018-07-051-5/+5
| | | | | | | | | | | | destroy new created object (This is safer and produces less code)
* | | Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized ↵Dmitry Stogov2018-07-041-4/+4
| | | | | | | | | | | | | | | | | | | | | destructors. zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places. Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
* | | Fix check for invoking abstract methodNikita Popov2018-07-021-15/+13
| | |
* | | Add $ before property name in error messageNikita Popov2018-07-021-2/+2
| | |
* | | Merge branch 'PHP-7.2'Nikita Popov2018-07-021-1/+1
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.1' into PHP-7.2Nikita Popov2018-07-021-1/+1
| |\ \ | | |/
| | * Fixed bug #75231Nikita Popov2018-07-021-1/+1
| | | | | | | | | | | | The behavior is now consistent with ReflectionMethod.
* | | Remove unnecessary explicit argc checkNikita Popov2018-07-021-18/+6
| | | | | | | | | | | | | | | Instead specify a default value for the argument, which is more idiomatic.
* | | Remove METHOD_NOTSTATIC checks in reflectionNikita Popov2018-07-021-42/+0
| | | | | | | | | | | | | | | PHP does not allow static calls to non-static internal methods anyway, so these checks are redundant.
* | | Add zend_update_static_property_ex APINikita Popov2018-06-291-15/+1
| | | | | | | | | | | | | | | And cleanup the implementation to perform a normal by-value assignment.
* | | Add zend_read_static_property_ex APINikita Popov2018-06-291-5/+1
| | | | | | | | | | | | For symmetry with zend_read_property_ex.
* | | Fix ReflectionProperty::get/setValue() on internal static propertyNikita Popov2018-06-281-31/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | This was broken by 6dc0cd868d972885249ce40f2d64097cd0ba6c1f, which moved static property initialization outside of constant updating. Instead of replicating logic, use zend_get_static_property() API in the reflection implementation, just like we're using read_property for non-static proprety access.
* | | Merge branch 'PHP-7.2'Xinchen Hui2018-06-281-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | * PHP-7.2: Update NEWS Fixed bug #76536 (PHP crashes with core dump when throwing exception in error handler). (Laruence)
| * | Merge branch 'PHP-7.1' into PHP-7.2Xinchen Hui2018-06-281-1/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Fixed bug #76536 (PHP crashes with core dump when throwing exception in error handler). (Laruence)
| | * Fixed bug #76536 (PHP crashes with core dump when throwing exception in ↵Xinchen Hui2018-06-281-1/+1
| | | | | | | | | | | | error handler). (Laruence)
| | * year++Xinchen Hui2018-01-021-1/+1
| | |
| * | year++Xinchen Hui2018-01-021-1/+1
| | |
* | | Store unmangled name in ReflectionPropertyNikita Popov2018-06-271-47/+37
| | | | | | | | | | | | Avoid redundant unmangles and string copies, where possible.
* | | Optimize ReflectionProperty constructorNikita Popov2018-06-271-12/+8
| | | | | | | | | | | | | | | | | | | | | Perform HT lookups using a zend_string. Don't copy the name for the "name" property. We can always use the original name directly, as properties case case-sensitive, so the original name should always match the unmangled name of the fetched property info.
* | | Lazy function copying from op_cache SHM into process memoryDmitry Stogov2018-06-251-2/+2
| | |
* | | Micro-optimizationDmitry Stogov2018-06-251-15/+16
| | |