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
Dmitry Stogov
9e70d7672d
Move zend_object->guards into additional slot of zend_object->properties_table[]. As result size of objects without __get/__set/__unset/__isset magic methods is reduced.
2015-02-04 15:24:13 +03:00
Dejan Marjanovic
836dcb1da7
Rename __callstatic (internal name) to __callStatic (userland name) in error message
2015-02-03 17:04:52 +01:00
Levi Morrison
c8576c5a46
Implement return types
...
RFC is documented here: https://wiki.php.net/rfc/return_types
2015-01-27 11:49:56 -07:00
Dmitry Stogov
061c0ed9ee
Fixed double free and cleanup
2015-01-22 12:59:53 +03:00
Dmitry Stogov
3e31838d19
zend_read_property() has to provide a holder for return value.
...
Previously it was possible that zend_read_property() returned pointer to zval allocated on stack.
2015-01-22 11:50:42 +03:00
Xinchen Hui
6f67d5ad6e
Unused parse_arg_object_to_string
2015-01-20 12:02:54 +08:00
Xinchen Hui
fc33f52d8c
bump year
2015-01-15 23:27:30 +08:00
Xinchen Hui
2193de0d18
Faster sorting algo
2015-01-14 18:02:41 +08:00
Dmitry Stogov
7e93de101f
Handle run-time cache for static properties directly in executor.
...
Removed cache_slot argument in zend_std_get_static_property() and zend_std_unset_static_property().
2015-01-13 09:33:15 +03:00
Stanislav Malyshev
b7a7b1a624
trailing whitespace removal
2015-01-10 15:07:38 -08:00
Xinchen Hui
84f2311bc9
Fixed #68779 (Incorrect sizeof)
2015-01-10 10:58:22 -05:00
Andrea Faulds
41e3fdba8e
Make zend_parse_parameters share fast zpp implementation where possible
...
Rename shared implementation functions and build them unconditionally
Don't fail on empty path for zend_parse_arg_path
Update type names
Fix behaviour of by-reference "z"
Make 'o' use zend_parse_arg_object
Fix NULL string check in zend_parse_arg_path(_str)
2014-12-29 12:28:28 +00:00
Dmitry Stogov
f2c2acb9a9
For disabled function, to disable arguments checks, we have to reset num_args and some related flags (in addition to arg_info)
2014-12-24 15:34:52 +03:00
Dmitry Stogov
c42ac09518
Added new API function 'zend_string* zend_string_tolower(zend_string*)'.
...
It simplifies code and avoids unnecessary allocation and copying if string is already in lower case.
2014-12-24 15:04:51 +03:00
Dmitry Stogov
2646f7bcb9
Don't count variadic argument in zend_func.common.num_args. This allows faster CALL/RETURN code.
2014-12-22 16:44:39 +03:00
Andrea Faulds
e5eb9530ab
Use "float" and "integer" in typehint and zpp errors
2014-12-21 13:23:02 +00:00
Anatol Belski
61f90fbe0b
Merge remote-tracking branch 'origin/master' into native-tls
...
* origin/master:
Save 8 bytes on 64 bits
Conflicts:
Zend/zend_API.c
2014-12-15 07:13:09 +01:00
Xinchen Hui
8f177fde90
Save 8 bytes on 64 bits
2014-12-15 00:43:28 -05:00
Anatol Belski
bdeb220f48
first shot remove TSRMLS_* things
2014-12-13 23:06:14 +01:00