Dmitry Stogov
70c86732cb
Use zend_string to represent pdo_column_data.name and avoid duplication.
2015-05-05 16:19:51 +03:00
Dmitry Stogov
388c2cbdbc
Micro optimizations
2015-04-28 19:11:45 +03:00
Dmitry Stogov
49cf7c5d12
Don't propogate "fake" EX(called_scope) and EX(This) into each internal function.
...
They need quite seldom and it's cheaper to get them from corresponfing upper stack frame.
2015-04-23 12:16:37 +03:00
Dmitry Stogov
15a5f61cf4
Use fast method to check if first arguments should be passed by reference (not tested onbig endian).
2015-04-22 21:46:13 +03:00
Xinchen Hui
ec8671d429
Remove duplicated assignment
2015-04-16 11:58:50 +08:00
Dmitry Stogov
5e8133f453
Squashed commit of the following:
...
commit 2399fc84c5
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Apr 10 12:38:08 2015 +0300
Removed useless assignment
commit 796b633817
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Apr 10 12:35:31 2015 +0300
Fixed execution with overriden zend_execute_ex()
commit 4a9fb125aa
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Apr 10 02:02:58 2015 +0300
Fixed executor without global registers
commit d456c30e00
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 479646d37f
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 9ae61e33e2
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 0a8403a2a0
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 4ea0525c10
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 529bf737ca
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Apr 9 21:42:23 2015 +0300
Accurate use of proxy_call
commit 5d62837d5b
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 83e749ff3b
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Apr 9 19:39:10 2015 +0300
Improved ZEND_PROXY_CALL
commit 0c829afc53
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Apr 9 15:14:49 2015 +0300
Reverted white-space changes
commit df65144488
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 97756d9190
Author: Xinchen Hui <laruence@gmail.com>
Date: Thu Apr 9 19:07:59 2015 +0800
Ready for PR
commit 74f9930846
Author: Xinchen Hui <laruence@gmail.com>
Date: Thu Apr 9 19:03:00 2015 +0800
Fixed static call
commit ec1d9eb592
Author: Xinchen Hui <laruence@gmail.com>
Date: Thu Apr 9 18:23:17 2015 +0800
Improve performance by using prealloated op_arrray
commit df7fbbf949
Author: Xinchen Hui <laruence@gmail.com>
Date: Thu Apr 9 15:10:02 2015 +0800
Respect called_scope
commit 769d1d59fb
Author: Xinchen Hui <laruence@gmail.com>
Date: Thu Apr 9 12:19:23 2015 +0800
Support internal magical __call/__callStatic
commit a980fedd5b
Author: Xinchen Hui <laruence@gmail.com>
Date: Wed Apr 8 18:35:41 2015 +0800
opcode-fy magical __callStatic
commit 73855f7d53
Author: Xinchen Hui <laruence@gmail.com>
Date: Wed Apr 8 14:21:55 2015 +0800
Opcode-fy magical __call
2015-04-10 23:01:00 +03:00
Nikita Popov
122d759618
Always throw TypeException on throwing zpp failures
...
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.
2015-04-06 11:27:34 +02:00
Nikita Popov
f920f974c4
Clarify that some zpp errors are just for debugging
...
These occur when the extension author messed up, not during normal
script execution.
Make these core errors and show them even with PARAMS_QUIET.
2015-04-04 10:28:37 +02:00
Dmitry Stogov
ad863c1740
Convert fatal errors into EngineException
2015-04-02 14:19:52 +03:00
Dmitry Stogov
53d20140fb
Fixed performance degradation introduced with lateast EnfineException related changes.
...
Restore original errors order in executor.
2015-04-02 03:56:42 +03:00
Dmitry Stogov
ea09a9fa32
Convert fatal errors into EngineExceptions
...
Make zval_update_constant_ex(), zval_update_constant(), zend_update_class_constants() and zend_ast_evaluate() return SUCCESS or FAILURE.
2015-04-02 02:05:25 +03:00
Dmitry Stogov
ec760d8fff
Convert fatal errors into EngineExceptions
2015-04-01 20:01:57 +03:00
Dmitry Stogov
780a8123fe
Convert fatal errors into EngineExceptions
2015-04-01 16:48:15 +03:00
Dmitry Stogov
acfc31c0f8
Use zend_error_noreturn() for fatal errors
2015-04-01 13:32:23 +03:00
Nikita Popov
085774997b
Drop support for static calls from incompatible context
...
Implemented by NULLing $this.
2015-04-01 11:42:05 +02:00
Nikita Popov
8d00385871
Reclassify E_STRICT notices
...
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.
2015-04-01 11:17:55 +02:00
Dmitry Stogov
1018f462d8
Patch improvement:
...
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.
2015-03-30 18:53:38 +03:00
Kalle Sommer Nielsen
02be73b5fa
Constness to zend_get_object_type(), thanks Michael!
2015-03-25 07:01:04 +01:00
Kalle Sommer Nielsen
927d53fda4
Change "Cannot redeclare class X" into "Cannot redeclare 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()
2015-03-25 06:31:11 +01:00
Nikita Popov
a50e9d87f2
Partially revert "Fix uninitialized value condition"
...
This reverts commit e874f76096
,
which broke zpp quite mode.
Only the initialization of the "severity" variable is retained.
2015-03-22 09:25:32 +01:00
Bob Weinand
e874f76096
Fix uninitialized value condition
2015-03-22 00:14:47 +01:00
Dmitry Stogov
35f9b90bb8
ZPP changed to lazely check for "strict/weak" only if it's really necessary.
...
Cleanup.
2015-03-20 23:18:52 +03:00
Dmitry Stogov
5935612666
Improved type hinting:
...
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?
2015-03-20 16:04:04 +03:00
Dmitry Stogov
44669e8f41
Fixed white spaces
2015-03-20 11:10:29 +03:00
Anthony Ferrara
7044f9c6df
Refactor as to not use call info, but add the flag to the op_array.
2015-03-19 13:30:11 -04:00
Anthony Ferrara
0ef80ac351
Fix severity issues with callbacks, start work porting ZEND_STRLEN opcode to work with strict mode, more refactoring to come
2015-03-19 12:26:34 -04:00
Anthony Ferrara
78d2399493
Fix C89 compatibility by moving a misplaced if statement
2015-03-18 18:38:16 -04:00
Anthony Ferrara
579e7fa457
Style cleanup, as well as fixing bug with missing argument for WRONG_PARAM_COUNT_WITH_RETVAL
2015-03-18 15:45:16 -04:00
Anthony Ferrara
8be4266f6a
Clean up API renames for zend_wrong_param_count to maintain BC, introducing a zend_wrong_param_count_ex() function when you know strict value
2015-03-18 15:42:49 -04:00
Anthony Ferrara
7feebead1b
Refactor error implementation significantly to centralize error mode behavior. Add zend_internal_type_error() function
2015-03-18 12:23:09 -04:00
Anthony Ferrara
d22bfb8aa6
Merge in master, fix merge conflicts and update patch to support exceptions everywhere
2015-03-18 10:50:11 -04:00
Stanislav Malyshev
69d183dd19
Merge branch 'pull-request/1049'
...
* pull-request/1049:
Rename __callstatic (internal name) to __callStatic (userland name) in error message
2015-03-08 17:57:47 -07:00
Dmitry Stogov
ff039c3c6d
Merge commit 'refs/pull/1066/head' of git://github.com/php/php-src
...
* 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
2015-03-04 18:17:06 +03:00
Xinchen Hui
aa63449b6e
Remove wrong commit committed by accident
2015-03-03 18:29:26 +08:00
Xinchen Hui
7ad6711a4d
Fixed bug #69167 (call_user_func does not support references anymore)
2015-03-03 18:11:56 +08:00
Anthony Ferrara
dc35868a77
Merge branch 'master' into scalar_type_hints_v5
2015-02-20 13:33:35 -05:00
Dmitry Stogov
5f76eed14e
don't count op_arrays stored in opcache SHM
2015-02-20 14:59:30 +03:00
Anthony Ferrara
9109e48749
Merge in master
2015-02-18 10:35:39 -05:00
Guilherme Blanco
8c81d80e10
Made ZEND_ACC_TRAIT a saner value
...
CC_TRAIT valued as 0x120 is too magical to be comprehensible by others.
2015-02-12 23:20:19 +01:00
Anatol Belski
07fdc1c78b
fix data types
2015-02-12 18:39:40 +01:00
Andrea Faulds
86b0685f55
Prefix zend_wrong_param_count with _ to discourage use
2015-02-10 15:48:07 +00:00
Andrea Faulds
fe663cc404
Partial ZPP strictness implementation
2015-02-10 15:48:06 +00:00
Andrea Faulds
1a28ad036e
Forbid scalar type hint names for use, class_alias
2015-02-10 15:48:05 +00:00
Andrea Faulds
c3c0f531a2
Scalar type hints with ZPP casting rules
2015-02-10 15:48:04 +00:00
Reeze Xia
49073fcf38
Add zend assert deleted by accident
2015-02-07 19:45:22 +08:00
Reeze Xia
61239e1e8b
Let's keep it simple
2015-02-07 19:43:00 +08:00
Reeze Xia
d9c28c5581
Improve internal function return types checking for parent
...
Previously the checking was against 'self', 'parent' need
to be checked as user land declearation as well.
This also add two missing test cases.
2015-02-07 14:19:56 +08:00
Dmitry Stogov
f5a9cfc33a
Merge branch 'internal-function-return-types' of github.com:reeze/php-src into test
...
* 'internal-function-return-types' of github.com:reeze/php-src:
Add load time return type checking to match user land logic
Add test function arguments
Implemented internal function return types
2015-02-05 11:01:07 +03:00
Reeze Xia
601fcc31af
Add load time return type checking to match user land logic
2015-02-05 11:22:11 +08:00
Reeze Xia
bff4c47fa7
Implemented internal function return types
2015-02-05 01:04:54 +08:00