summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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
| |
* | Merge remote-tracking branch 'origin/master' into native-tlsAnatol Belski2014-12-131-5/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: (37 commits) NEWS NEWS Fix bug #68601 buffer read overflow in gd_gif_in.c Fixed compilation warnings Removed unnecessary checks pcntl_signal_dispatch: Speed up by preventing system calls when unnecessary Merged PR #911. Removed ZEND_ACC_FINAL_CLASS which is unnecessary. This also fixed some currently defined classes as final which were just not being considered as such before. Updated NEWS Updated NEWS Updated NEWS Fix bug #68532: convert.base64-encode omits padding bytes Updated NEWS Updated NEWS Updated NEWS Fixed Bug #65576 (Constructor from trait conflicts with inherited constructor) Updated NEWS Updated NEWS Fix MySQLi tests Fixed gd test ...
| * | Removed ZEND_ACC_FINAL_CLASS which is unnecessary. This also fixed some ↵Guilherme Blanco2014-12-121-5/+5
| | | | | | | | | | | | currently defined classes as final which were just not being considered as such before.
* | | Merge remote-tracking branch 'origin/master' into native-tlsAnatol Belski2014-12-121-5/+5
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: updated NEWS PowerPC64 support for add and sub with overflow check PowerPC64 support for operators with overflow check Fixed bug #68583 Crash in timeout thread Reduced size of zend_op on 64-bit systems. Make ZEND_INIT_FCALL keep predcalculted size of necessary stack space in opline->op1.num to avoid its recalculation on each execution. Removed unused variables Improved array_merge() and array_replace() (1-st array may be added using simple procedure). Replaced zendi_convert_to_long() with _zval_get_long_func() Moved zend_is_true() from zend_execute.h/zend_execute_API.c into zend_operators.h/zend_operators.c. Splited the most expensive part of inline i_zend_is_true() into a separate zend_object_is_true(). Replaced zendi_convert_to_long() with cals to zend_is_true(). Revert "Save one xor instr" Save one xor instr Conflicts: Zend/zend_execute_API.c
| * | Reduced size of zend_op on 64-bit systems.Dmitry Stogov2014-12-121-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the main idea - the smaller the zend_op structure, the lees memory traffic is required to load VM instructions during execution. The patch reduces the size of each opcode from 48 to 32 bytes (saves 16 bytes for each opcode, and applications use thousands of opoceds). This reduced the number of CPU cache misses by 12% and improved performance of real-life apps by 1-2%. The patch affects how constants and jump targets are represented in VM during execution. Previously they were implemented as absolute 64-bit pointers. Now they are relative 32-bit offsets. In run-time constant now should be accessed as: RT_CONSTANT(op_array, opine->op1) instead of opline->op1.zv EX_CONSTANT(opline->op1) instead of opline->op1.zv Jump targets: OP_JMP_ADDR(opline, opline->op2) instead of opline->op2.jmp_addr The patch doesn't change zend_op representation for 32-bit systems. They still use absolute addresses. The compile-time representation is also kept the same.
* | | Merge remote-tracking branch 'origin/master' into native-tlsAnatol Belski2014-12-051-18/+61
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: (111 commits) Fix zend_fcall_info_arg*() to use ZVAL_COPY Fixed #65213 - cannot cast SplFileInfo to boolean add initial install switch to C travis project instead of PHP use the generic TRAVIS environment var to check for travis (see http://docs.travis-ci.com/user/ci-environment/) fix TS build add config option to target codegen architectures updated NEWS updated NEWS Fixed bug #55541 errors spawn MessageBox, which blocks test automation Get rid of duplicate handlers (ZEND_ADD_SPEC_TMP_TMP and ZEND_ADD_SPEC_VAR_VAR are absolutely the same). Use zend_string* for op_array->arg_info[]->name and op_array->arg_info[]->class_name. For internal functions we still use char*. Fixed __debugInfo() support Update UPGRADING for the new variadic functions, and re-sort. Improved POST INC/DEC make sure that we don't truncate the stack trace and cause false test failures when the test is executed in a directory with long path Missed closed folder mark Revert "Unecessary assignment" Fixed improper memory release Unecessary assignment ...
| * | Use zend_string* for op_array->arg_info[]->name and ↵Dmitry Stogov2014-12-031-18/+61
| | | | | | | | | | | | op_array->arg_info[]->class_name. For internal functions we still use char*.
* | | Merge remote-tracking branch 'origin/master' into native-tlsAnatol Belski2014-11-181-23/+21
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: (398 commits) NEWS add test for bug #68381 Fixed bug #68381 Set FPM log level earlier during init proper dllexport move to size_t where zend_string is used internally fix some datatype mismatches return after the warning, to fix uninitialized salt usage fix datatype mismatches add missing type specifier fix datatype mismatches fix unsigned check "extern" shouldn't be used for definitions joined identical conditional blocks simplify fpm tests SEND_VAR_NO_REF optimization Add test for bug #68442 Add various tests for FPM - covering recent bugs (68420, 68421, 68423, 68428) - for UDS - for ping and status URI - for multi pool and multi mode Include small MIT FastCGI client library from https://github.com/adoy/PHP-FastCGI-Client Get rid of zend_free_op structure (use zval* instead). Get rid of useless TSRMLS arguments. Add new FPM test for IPv4/IPv6 ... Conflicts: win32/build/config.w32
| * | removed useless checkAnatol Belski2014-11-141-6/+4
| | | | | | | | | | | | the offset member is an unsigned
| * | Improved object property access.Dmitry Stogov2014-11-061-1/+1
| | |
| * | fix datatype mismatchesAnatol Belski2014-10-291-17/+17
| | | | | | | | | | | | sizeof(struct _string) doesn't increase.
* | | Merge remote-tracking branch 'origin/master' into native-tlsAnatol Belski2014-10-181-3/+8
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | * origin/master: Fixed compilation Optimized property access handlers. Removed EG(std_property_info). Fixed bug #68199 (PDO::pgsqlGetNotify doesn't support NOTIFY payloads) News entry for new curl constants
| * | Optimized property access handlers. Removed EG(std_property_info).Dmitry Stogov2014-10-171-3/+8
| | |