summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | | 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
| | |
* | | Fixed bug #76509Nikita Popov2018-06-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In PHP static properties are shared between inheriting classes, unless they are explicitly overwritten. However, because this functionality was implemented using reference, it was possible to break the implementation by reassigning the static property reference. This is fixed by switching the implementation from using references to using INDIRECTs, which cannot be affected by userland code.
* | | Avoid reusing zend_function.common.prototype for magic things (use reserved ↵Dmitry Stogov2018-06-211-16/+0
| | | | | | | | | | | | fields instead).
* | | Normalize Reflection phpinfo() outputPeter Kokot2018-06-041-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch normalizes the Reflection extension version in the phpinfo output. It removes the Git attributes ident blob object name from Git repository as an extension version. Also the table output is synced with other extensions (i.e. enabled in a row instead of table header).
* | | Export standard object handlers, to avoid indirect accessDmitry Stogov2018-05-311-5/+2
| | |
* | | Removed useless zval_ptr_dtor()Dmitry Stogov2018-05-291-1/+1
| | |
* | | Use zend_string_release_ex() instread of zend_string_release() in places, ↵Dmitry Stogov2018-05-281-9/+9
| | | | | | | | | | | | where we sure about string persistence.
* | | Avoid useless checks, using zend_string_efree(), in cases where the string ↵Dmitry Stogov2018-05-081-1/+1
| | | | | | | | | | | | is known to be a temporary allocated zend_string.
* | | zend_fcall_info_cache.calling_scope is not used by zend_call_function() and ↵Dmitry Stogov2018-05-031-6/+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.
* | | Keep initialized object_handlers structures in read-only memory.Dmitry Stogov2018-03-141-1/+1
| | |
* | | Remove unused assignmentAnatol Belski2018-03-071-1/+0
| | |
* | | Fix typoGabriel Caruso2018-02-131-1/+1
| | |
* | | Remove no longer necessary type-name special casesNikita Popov2018-02-041-11/+3
| | | | | | | | | | | | | | | zend_get_type_by_name() now produces the correct value by itself, so we no longer need these workarounds.
* | | Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure ↵Dmitry Stogov2018-01-111-1/+1
| | | | | | | | | | | | object through address calculation, instead of op_array->prototype reuse. (reapply 781e1573afdc7c336b3577ceabc9c65cafea17e8, now it should be OK).
* | | Revert "Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to ↵Dmitry Stogov2018-01-111-1/+1
| | | | | | | | | | | | | | | | | | closure object through address calculation, instead of op_array->prototype reuse." (this patch is incomplete or wrong) This reverts commit 781e1573afdc7c336b3577ceabc9c65cafea17e8.
* | | Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure ↵Dmitry Stogov2018-01-111-1/+1
| | | | | | | | | | | | object through address calculation, instead of op_array->prototype reuse.
* | | Trailing whitespacesGabriel Caruso2018-01-031-5/+5
| | | | | | | | | | | | Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
* | | year++Xinchen Hui2018-01-021-1/+1
| | |
* | | zend_fcall_info_cache.initialized is removed (zend_fcall_info_cache is ↵Dmitry Stogov2017-12-271-6/+0
| | | | | | | | | | | | initialized if zend_fcall_info_cache.function_handler is set).
* | | Use cheaper APIXinchen Hui2017-12-181-1/+1
| | |
* | | Move constants into read-only data segmentDmitry Stogov2017-12-141-1/+1
| | |
* | | Use zend_string_tolower() where it's possible (to avoid reallocations).Dmitry Stogov2017-11-301-5/+2
| | | | | | | | | | | | Allow zend_string_tolower_ex() to create parsistent strings
* | | Add zend_object_alloc() APINikita Popov2017-11-251-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using ecalloc() to create objects is expensive, because the dynamic-size memset() is unreasonably slow. Make sure we only zero the main object structure with known size, as the properties are intialized separately anyway. Technically we do not need to zero the embedded zend_object structure either, but as long as the memset argument is constant, a couple more bytes don't really matter.
* | | Avoid unnecessary reference-counting on strings.Dmitry Stogov2017-11-161-6/+9
| | |
* | | Merge branch 'PHP-7.2'Sara Golemon2017-11-061-3/+3
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Revert BC break caused by fixing bug #74035
| * | Revert BC break caused by fixing bug #74035Michael Moravec2017-11-061-3/+3
| | | | | | | | | | | | This reverts commit 9ffc6ca62f53431a4b32b30cdda8180142f47cdb.
* | | RC manipulation cleanupXinchen Hui2017-11-011-2/+2
| | |
* | | Avoid reference counting (the value may be a persistent string)Dmitry Stogov2017-11-011-0/+3
| | |
* | | Use known strings for reflection propertiesNikita Popov2017-10-311-50/+50
| | |
* | | Remove some unnecessary duplicationsNikita Popov2017-10-301-17/+3
| | |
* | | Prevent reference-counting on persistent zvals (internal constants, default ↵Dmitry Stogov2017-10-301-7/+7
| | | | | | | | | | | | | | | | | | | | | properties and constants of internal classes). New macro ZVAL_COPY_OR_DUP() is used perform duplication, if necessary. This should eliminate related race-coditions in ZTS build and prevent reference-counting bugs after unclean shutdown.
* | | Encapsulate reference-counting primitives.Dmitry Stogov2017-10-271-2/+2
| | | | | | | | | | | | | | | | | | Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead. Added mactros to validate reference-counting (disabled for now). These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
* | | Avoid HashTable allocations for empty arrays (using zend_empty_array).Dmitry Stogov2017-10-241-8/+33
| | |
* | | Always use IS_CONSTANT_AST (IS_CONSTANT is removed).Dmitry Stogov2017-10-101-7/+18
| | |
* | | Changed the way VM accesses constant operands in 64-bit builds.Dmitry Stogov2017-10-041-5/+5
| | |
* | | Fix type-o in ext/reflection comment :speech_balloon:Sammy Kaye Powers2017-09-131-1/+1
|/ /
* | Merge branch 'PHP-7.1' into PHP-7.2Xinchen Hui2017-07-271-1/+16
|\ \ | |/ | | | | | | | | * PHP-7.1: Update NEWS Fixed bug #74949 (null pointer dereference in _function_string)
| * Merge branch 'PHP-7.0' into PHP-7.1Xinchen Hui2017-07-271-1/+16
| |\ | | | | | | | | | | | | * PHP-7.0: Fixed bug #74949 (null pointer dereference in _function_string)