summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
Commit message (Collapse)AuthorAgeFilesLines
* Do not create a fake Closure for real Closuresphp-7.0.0RC5Bob Weinand2015-10-141-1/+6
| | | | That is solved by just returning the Closure as is, which is safe due to Closures being immutable objects
* Forbid "fake" closure rebindingDmitry Stogov2015-10-121-3/+3
|
* Get rid of implicit type casting in GC_*() macros in Zend/zend_types.h.Dmitry Stogov2015-08-131-1/+1
| | | | | | This prevented compilation warnings and disclosed few incorrect usages in Zend/zend_vm_def.h and ext/dom/xpath.c. Now explicit type casting may be required on call site. This may break some C extension code, but it shoulfn't be a problem to add explicit casting.
* Switch position of ce in exception ce variable namesAaron Piotrowski2015-07-031-1/+1
|
* Change zend_exception_get_default() to zend_exception_ceAaron Piotrowski2015-07-031-1/+1
|
* Use ZSTR_ API to access zend_string elements (this is just renaming without ↵Dmitry Stogov2015-06-301-107/+107
| | | | semantick changes).
* Fix more proto commentsRasmus Lerdorf2015-06-231-2/+2
|
* Drop now superflous check for VIA_TRAMPOLINENikita Popov2015-06-161-3/+1
| | | | This is not handled by USE_ARG_INFO.
* Fixed bug #69802 (Reflection on Closure::__invoke borks type hint class ↵Dmitry Stogov2015-06-161-1/+1
| | | | name) (onr more problem)
* Complete fix for problems related to bug #69802Dmitry Stogov2015-06-161-13/+17
|
* Fixed bug #69802 (Reflection on Closure::__invoke borks type hint class name)Dmitry Stogov2015-06-151-2/+6
|
* Get rid of more ZVAL_ZVAL() macrosDmitry Stogov2015-06-121-4/+7
|
* Avoid zval duplication in ZVAL_ZVAL() macro (it was necessary only in few ↵Dmitry Stogov2015-06-121-2/+2
| | | | | | places). Switch from ZVAL_ZVAL() to simpler macros where possible (it makes sense to review remaining places)
* Reflection support for type hints and return typesMatteo Beccati2015-06-081-66/+107
|
* Merge remote-tracking branch 'pollita/reflection.typehint'Sara Golemon2015-06-081-0/+150
| | | | | | Conflicts: ext/reflection/php_reflection.c ext/reflection/tests/ReflectionExtension_getClasses_basic.phpt
* Avoid possible uninitialized value assignmentReeze Xia2015-05-181-1/+1
|
* Merge branch 'pull-request/1277'Stanislav Malyshev2015-05-161-1/+1
|\ | | | | | | | | * pull-request/1277: fix typos
| * fix typosolshevskiy872015-05-131-1/+1
| | | | | | | | Signed-off-by: olshevskiy87 <olshevskiy87@bk.ru>
* | Add ReflectionGenerator classBob Weinand2015-05-141-0/+197
|/
* Fix buildNikita Popov2015-05-051-3/+3
|
* Rebase Joe's anon classes implementationkrakjoe2015-04-261-0/+16
|
* Fix bug #69448Levi Morrison2015-04-141-0/+1
| | | | | | | ReflectionClass::newInstanceWithoutConstructor should not call object_init_ex when the class is internal and final. This is because the class dtor may rely on the ctor being called and in some cases this will cause a segfault.
* Squashed commit of the following:Dmitry Stogov2015-04-101-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 2399fc84c541da9c2176c5b7f6dd039a3c84dc64 Author: Dmitry Stogov <dmitry@zend.com> Date: Fri Apr 10 12:38:08 2015 +0300 Removed useless assignment commit 796b6338174348eee0d74a67706d77b7ce1a60c3 Author: Dmitry Stogov <dmitry@zend.com> Date: Fri Apr 10 12:35:31 2015 +0300 Fixed execution with overriden zend_execute_ex() commit 4a9fb125aa999059f8bc42ebb6ee573c7866b35b Author: Dmitry Stogov <dmitry@zend.com> Date: Fri Apr 10 02:02:58 2015 +0300 Fixed executor without global registers commit d456c30e00589ccda35a4b57ae903ef2d3c07d95 Author: Dmitry Stogov <dmitry@zend.com> Date: Fri Apr 10 01:30:35 2015 +0300 Restored original behavior for tests/classes/__call_004.phpt commit 479646d37fef050536f1afb12b082618f1f1a3d0 Author: Dmitry Stogov <dmitry@zend.com> Date: Fri Apr 10 00:32:17 2015 +0300 Fixed test. We don't keep stack frame for fake function anymore. commit 9ae61e33e24b2c811d4ab1ca4ab22847c64a780e Author: Dmitry Stogov <dmitry@zend.com> Date: Fri Apr 10 00:30:09 2015 +0300 Use ZEND_ACC_CALL_VIA_TRAMPOLINE instead of ZEND_ACC_CALL_VIA_HANDLER. Keep ZEND_ACC_CALL_VIA_HANDLER for compatibility. commit 0a8403a2a0c27aa3db271774f8559739a6b8400e Author: Dmitry Stogov <dmitry@zend.com> Date: Fri Apr 10 00:05:43 2015 +0300 Rename PROXY_CALL into CALL_TRAMPLINE. Generalize API to allow reuse EG(trampline) for other purposes. commit 4ea0525c10554e36185a0b8b6303106813b6a1c2 Author: Dmitry Stogov <dmitry@zend.com> Date: Thu Apr 9 23:22:25 2015 +0300 Reuse EG(proxy_call_op) for all proxy. Move proxy related functions from zend_objects_API to zend_object_handlers. commit 529bf737ca388ad56fb4ae20ccb81e6276f25ec0 Author: Dmitry Stogov <dmitry@zend.com> Date: Thu Apr 9 21:42:23 2015 +0300 Accurate use of proxy_call commit 5d62837d5ba3855743fe1981786ebd65d9da0b63 Merge: 83e749f 690843f Author: Dmitry Stogov <dmitry@zend.com> Date: Thu Apr 9 19:40:00 2015 +0300 Merge branch 'master' into opcodefy-call * master: Fixed GOTO executor Fixed typo Changed ArrayIterator implementation using zend_hash_iterator_... API. Allowed modification of itterated ArrayObject using the same behavior as proposed in `Fix "foreach" behavior`. Removed "Array was modified outside object and internal position is no longer valid" hack. commit 83e749ff3b6623e39b236a72e9b907d5b788ae5e Author: Dmitry Stogov <dmitry@zend.com> Date: Thu Apr 9 19:39:10 2015 +0300 Improved ZEND_PROXY_CALL commit 0c829afc534e6d5ff27a0dea3a4815da303bd1ef Author: Dmitry Stogov <dmitry@zend.com> Date: Thu Apr 9 15:14:49 2015 +0300 Reverted white-space changes commit df65144488afa3e9020d75e1ada5529b138afc5a Merge: 5fd2f97 97756d9 Author: Dmitry Stogov <dmitry@zend.com> Date: Thu Apr 9 14:37:07 2015 +0300 Merge branch 'opcodefy-call' of github.com:laruence/php-src into opcodefy-call * 'opcodefy-call' of github.com:laruence/php-src: Ready for PR Fixed static call Improve performance by using prealloated op_arrray Respect called_scope Support internal magical __call/__callStatic opcode-fy magical __callStatic Opcode-fy magical __call commit 97756d9190e07a072a7b48135304dc25a964845f Author: Xinchen Hui <laruence@gmail.com> Date: Thu Apr 9 19:07:59 2015 +0800 Ready for PR commit 74f993084627061e783645a866390b68e2981698 Author: Xinchen Hui <laruence@gmail.com> Date: Thu Apr 9 19:03:00 2015 +0800 Fixed static call commit ec1d9eb592db0c3b7b0e3d21e7f445ed8bccfd4d Author: Xinchen Hui <laruence@gmail.com> Date: Thu Apr 9 18:23:17 2015 +0800 Improve performance by using prealloated op_arrray commit df7fbbf949c99f2c5ae3da2a1199235651c7cc82 Author: Xinchen Hui <laruence@gmail.com> Date: Thu Apr 9 15:10:02 2015 +0800 Respect called_scope commit 769d1d59fb48b6f7f93d7412eefbf26135fa3e59 Author: Xinchen Hui <laruence@gmail.com> Date: Thu Apr 9 12:19:23 2015 +0800 Support internal magical __call/__callStatic commit a980fedd5b0e0683713dd4f6eaad62adf4b4732f Author: Xinchen Hui <laruence@gmail.com> Date: Wed Apr 8 18:35:41 2015 +0800 opcode-fy magical __callStatic commit 73855f7d53baa2efc2b8a88314f51c784c81b59d Author: Xinchen Hui <laruence@gmail.com> Date: Wed Apr 8 14:21:55 2015 +0800 Opcode-fy magical __call
* Always throw TypeException on throwing zpp failuresNikita Popov2015-04-061-60/+26
| | | | | | | | | | | | | | Introduces a ZEND_PARSE_PARAMS_THROW flag for zpp, which forces to report FAILURE errors using a TypeException instead of a Warning, like it would happen in strict mode. Adds a zend_parse_parameters_throw() convenience function, which invokes zpp with this flag. Converts all cases I could identify, where we currently have throwing zpp usage in constructors and replaces them with this API. Error handling is still replaced to EH_THROW in some cases to handle other, domain-specific errors in constructors.
* Convert fatal errors into EngineExceptionsDmitry Stogov2015-04-021-14/+48
| | | | Make zval_update_constant_ex(), zval_update_constant(), zend_update_class_constants() and zend_ast_evaluate() return SUCCESS or FAILURE.
* Patch improvement:Dmitry Stogov2015-03-301-1/+1
| | | | | | | | Removed the corresponding core code. Fixed ext/com_dotnet and ext/date. Refactored ext/intl changes. Improved ext/fileinfo and ext/pdo changes. Fixed tests.
* Merge branch 'InternalClassClean' of github.com:Danack/php-src into ↵Dmitry Stogov2015-03-301-22/+58
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InternalClassClean * 'InternalClassClean' of github.com:Danack/php-src: Fixed indentation. Fixed comment style. Fixed commented out code. Reverted change to function name and added note of why it is different from the class it is actually changing. Made UConverter throw an exception if the constructor fails. Fixed PDO constructor to not return null. Fixed fileinfo behaviour. Made Phar throw exception on bad constructor. Converted intl extension to use IntlException in constructors. Fixed SplFixedArray and tests. Fixed ReflectionExtension and ReflectionProperty. Fixed ReflectionFunction, ReflectionMethod and ReflectionParameter. Fixed PDORow behaviour and message.
| * Fixed ReflectionExtension and ReflectionProperty.Danack2015-03-011-3/+22
| |
| * Fixed ReflectionFunction, ReflectionMethod and ReflectionParameter.Danack2015-03-011-19/+36
| |
* | cleanup mod version macros and mod defs, round xAnatol Belski2015-03-231-1/+1
| |
* | Optimize zend_string_realloc() add more specialized versions ↵Dmitry Stogov2015-03-201-2/+2
| | | | | | | | zend_string_extend() and zend_string_truncate()
* | Fix folder markReeze Xia2015-03-141-1/+2
| |
* | Use specialized macro for string zval creationDmitry Stogov2015-03-121-15/+15
|/
* Lazy duplication of op_array->static_variablesDmitry Stogov2015-02-201-0/+6
|
* Add test to ensure ReflectionClass works correctly with traitsNikita Popov2015-02-121-1/+1
| | | | | Some of these were not working correctly before Guilherme's patch. Another was broken by it and is fixed in this commit as well.
* Made ZEND_ACC_TRAIT a saner valueGuilherme Blanco2015-02-121-3/+3
| | | | CC_TRAIT valued as 0x120 is too magical to be comprehensible by others.
* Revert removal of two ReflectionParameter functionsBob Weinand2015-02-101-0/+50
| | | | Rather fix them for now by exempting function parameter defaults from *any* (non-ct) constant substitution (also from persistent constant substitution, which was already broken before)
* Revert "Revert "Improve and generalize class constant substitution""Bob Weinand2015-02-101-50/+0
| | | | | | | This reverts commit 400e65e955f08ad6ae57c1a15be04d5852107252. Removing ReflectionParameter::getDefaultValueConstantName() and isDefaultValueConstant() They become useless with such optimizations and already anyway are (e.g. CONSTANT?:CONSTANT ... yields the constant back without telling isDefaultValueConstant() about it etc.)
* Use new ZEND_HASH_FOREACH_... API.Dmitry Stogov2015-02-101-72/+27
|
* Move zend_object->guards into additional slot of ↵Dmitry Stogov2015-02-041-2/+2
| | | | zend_object->properties_table[]. As result size of objects without __get/__set/__unset/__isset magic methods is reduced.
* Merge branch 'pull-request/1012'Stanislav Malyshev2015-01-311-0/+1
|\ | | | | | | | | * pull-request/1012: Fix uninitalized variables reads. See CWE-457 for more info.
| * Fix uninitalized variables reads. See CWE-457 for more info.Joshua Rogers2015-01-211-0/+1
| |
* | Implement return typesLevi Morrison2015-01-271-0/+18
| | | | | | | | RFC is documented here: https://wiki.php.net/rfc/return_types
* | zend_read_property() has to provide a holder for return value.Dmitry Stogov2015-01-221-1/+2
|/ | | | Previously it was possible that zend_read_property() returned pointer to zval allocated on stack.
* bump yearXinchen Hui2015-01-151-1/+1
|
* Handle run-time cache for static properties directly in executor.Dmitry Stogov2015-01-131-2/+2
| | | | Removed cache_slot argument in zend_std_get_static_property() and zend_std_unset_static_property().
* trailing whitespace removalStanislav Malyshev2015-01-101-7/+7
|
* Drop duplicate arg from hash_get_current_key_exNikita Popov2014-12-261-13/+6
|
* Don't count variadic argument in zend_func.common.num_args. This allows ↵Dmitry Stogov2014-12-221-9/+28
| | | | faster CALL/RETURN code.
* first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-329/+329
|