summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
Commit message (Collapse)AuthorAgeFilesLines
* Use NULL where possible for exception classAaron Piotrowski2015-07-071-5/+5
| | | | Matches usage of zend_throw_exception()/zend_throw_exception_ex().
* Throw TypeError for invalid callbackAaron Piotrowski2015-07-061-1/+1
| | | | | Matches behavior of zend_internal_type_error() if E_ERROR is passed to zend_wrong_callback_error().
* Remove need to pass error levelAaron Piotrowski2015-07-031-8/+15
|
* Enable throwing custom exceptions from errorsAaron Piotrowski2015-07-031-8/+8
|
* Use ZSTR_ API to access zend_string elements (this is just renaming without ↵Dmitry Stogov2015-06-301-104/+104
| | | | semantick changes).
* Improved zend_string API (Francois Laupretre)Dmitry Stogov2015-06-291-8/+8
| | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit d96eab8d79b75ac83d49d49ae4665f948d15a804 Author: Francois Laupretre <francois@tekwire.net> Date: Fri Jun 26 01:23:31 2015 +0200 Use the new 'ZSTR' macros in the rest of the code. Does not change anything to the generated code (thanks to compat macros) but cleaner. commit b3526439104ac7a89a8e0c79dbebf33b22bd01b8 Author: Francois Laupretre <francois@tekwire.net> Date: Thu Jun 25 13:45:06 2015 +0200 Improve zend_string API Add missing methods
* Drop superfluous __toString handling codeNikita Popov2015-06-221-10/+1
| | | | | This is already covered by the cast_object invokation above it. We do not use this kind of fallback in any other casting code anymore.
* Avoid zval duplication in ZVAL_ZVAL() macro (it was necessary only in few ↵Dmitry Stogov2015-06-121-1/+1
| | | | | | places). Switch from ZVAL_ZVAL() to simpler macros where possible (it makes sense to review remaining places)
* micro-optimizationDmitry Stogov2015-06-031-12/+7
|
* Fixed zend_update_class_constants() to always resolve all constants.Dmitry Stogov2015-05-211-88/+73
| | | | Call zend_update_class_constants() only when necessary.
* Use zend_string to represent pdo_column_data.name and avoid duplication.Dmitry Stogov2015-05-051-0/+17
|
* Micro optimizationsDmitry Stogov2015-04-281-9/+15
|
* Don't propogate "fake" EX(called_scope) and EX(This) into each internal ↵Dmitry Stogov2015-04-231-19/+30
| | | | | | function. They need quite seldom and it's cheaper to get them from corresponfing upper stack frame.
* Use fast method to check if first arguments should be passed by reference ↵Dmitry Stogov2015-04-221-0/+1
| | | | (not tested onbig endian).
* Remove duplicated assignmentXinchen Hui2015-04-161-1/+0
|
* Squashed commit of the following:Dmitry Stogov2015-04-101-23/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-11/+33
| | | | | | | | | | | | | | 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.
* Clarify that some zpp errors are just for debuggingNikita Popov2015-04-041-19/+13
| | | | | | | These occur when the extension author messed up, not during normal script execution. Make these core errors and show them even with PARAMS_QUIET.
* Convert fatal errors into EngineExceptionDmitry Stogov2015-04-021-2/+2
|
* Fixed performance degradation introduced with lateast EnfineException ↵Dmitry Stogov2015-04-021-1/+1
| | | | | | related changes. Restore original errors order in executor.
* Convert fatal errors into EngineExceptionsDmitry Stogov2015-04-021-12/+28
| | | | Make zval_update_constant_ex(), zval_update_constant(), zend_update_class_constants() and zend_ast_evaluate() return SUCCESS or FAILURE.
* Convert fatal errors into EngineExceptionsDmitry Stogov2015-04-011-1/+1
|
* Convert fatal errors into EngineExceptionsDmitry Stogov2015-04-011-1/+2
|
* Use zend_error_noreturn() for fatal errorsDmitry Stogov2015-04-011-11/+11
|
* Drop support for static calls from incompatible contextNikita Popov2015-04-011-18/+6
| | | | Implemented by NULLing $this.
* Reclassify E_STRICT noticesNikita Popov2015-04-011-4/+4
| | | | | | | Per RFC https://wiki.php.net/rfc/reclassify_e_strict While reviewing this, found that there are still three E_STRICTs left in libraries - need to discuss those.
* Patch improvement:Dmitry Stogov2015-03-301-9/+0
| | | | | | | | 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.
* Constness to zend_get_object_type(), thanks Michael!Kalle Sommer Nielsen2015-03-251-1/+1
|
* Change "Cannot redeclare class X" into "Cannot redeclare ↵Kalle Sommer Nielsen2015-03-251-0/+12
| | | | | | | | | | | class/interface/trait X", meaning that the following: C:\> php -r "trait A { } trait A { }" Will now properly print "Cannot redeclare trait A" instead of "Cannot redeclare class A" to make error messages a tiny bit clearer. Admittedly, a better solution can most likely be made by actually telling what the colliding object is a type of. Internally this adds a new function: zend_get_object_type()
* Partially revert "Fix uninitialized value condition"Nikita Popov2015-03-221-2/+2
| | | | | | | This reverts commit e874f76096a346c5ee073c8aaf252d916f3be925, which broke zpp quite mode. Only the initialization of the "severity" variable is retained.
* Fix uninitialized value conditionBob Weinand2015-03-221-3/+3
|
* ZPP changed to lazely check for "strict/weak" only if it's really necessary.Dmitry Stogov2015-03-201-101/+245
| | | | Cleanup.
* Improved type hinting:Dmitry Stogov2015-03-201-5/+5
| | | | | | | | | | EX_PREV_USES_STRICT_TYPES() and family changed/renamed to fit with other macros Optimized zend_verify_internal_arg_type() and family (they don't need "strict" argument anymore) Standerd ZPP is called from VM only for weak type check or strict exception (int -> double) Fixed ZEND_RECV_VARIADIC Fixed ZEND_STRLEN TODO: should we accept IS_NULL for non-nullable arguments?
* Fixed white spacesDmitry Stogov2015-03-201-1/+1
|
* Refactor as to not use call info, but add the flag to the op_array.Anthony Ferrara2015-03-191-5/+5
|
* Fix severity issues with callbacks, start work porting ZEND_STRLEN opcode to ↵Anthony Ferrara2015-03-191-3/+8
| | | | work with strict mode, more refactoring to come
* Fix C89 compatibility by moving a misplaced if statementAnthony Ferrara2015-03-181-4/+5
|
* Style cleanup, as well as fixing bug with missing argument for ↵Anthony Ferrara2015-03-181-0/+1
| | | | WRONG_PARAM_COUNT_WITH_RETVAL
* Clean up API renames for zend_wrong_param_count to maintain BC, introducing ↵Anthony Ferrara2015-03-181-1/+10
| | | | a zend_wrong_param_count_ex() function when you know strict value
* Refactor error implementation significantly to centralize error mode ↵Anthony Ferrara2015-03-181-21/+14
| | | | behavior. Add zend_internal_type_error() function
* Merge in master, fix merge conflicts and update patch to support exceptions ↵Anthony Ferrara2015-03-181-22/+36
|\ | | | | | | everywhere
| * Merge branch 'pull-request/1049'Stanislav Malyshev2015-03-081-2/+2
| |\ | | | | | | | | | | | | * pull-request/1049: Rename __callstatic (internal name) to __callStatic (userland name) in error message
| | * Rename __callstatic (internal name) to __callStatic (userland name) in error ↵Dejan Marjanovic2015-02-031-2/+2
| | | | | | | | | | | | message
| * | Merge commit 'refs/pull/1066/head' of git://github.com/php/php-srcDmitry Stogov2015-03-041-2/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | * git://github.com/php/php-src: Add zend assert deleted by accident Let's keep it simple Improve internal function return types checking for parent
| | * | Add zend assert deleted by accidentReeze Xia2015-02-071-0/+1
| | | |
| | * | Let's keep it simpleReeze Xia2015-02-071-10/+1
| | | |
| | * | Improve internal function return types checking for parentReeze Xia2015-02-071-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the checking was against 'self', 'parent' need to be checked as user land declearation as well. This also add two missing test cases.
| * | | Remove wrong commit committed by accidentXinchen Hui2015-03-031-1/+0
| | | |
| * | | Fixed bug #69167 (call_user_func does not support references anymore)Xinchen Hui2015-03-031-2/+9
| | | |
* | | | Merge branch 'master' into scalar_type_hints_v5Anthony Ferrara2015-02-201-1/+1
|\ \ \ \ | |/ / /