Commit Graph

406 Commits

Author SHA1 Message Date
Dmitry Stogov
550b07ae1b cleanup 2015-03-25 01:57:05 +03:00
Nikita Popov
ccfd53886f Revert "Use E_ERROR | E_EXCEPTION in FAST_ZPP mode too"
This reverts commit d4da7c20d2.

The argument passed to this function refers to the weak mode
severity, strict mode will get an exception in any case.
2015-03-22 09:17:42 +01:00
Bob Weinand
d4da7c20d2 Use E_ERROR | E_EXCEPTION in FAST_ZPP mode too 2015-03-22 00:17:33 +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
054591ab9a Imroved ZPP rules (condititins reoredered to prevent duplicate checks) 2015-03-20 17:27:03 +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
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
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
d22bfb8aa6 Merge in master, fix merge conflicts and update patch to support exceptions everywhere 2015-03-18 10:50:11 -04:00
Dmitry Stogov
8633685675 Use specialized macro for string zval creation 2015-03-12 16:53:51 +03:00
Rouven Weßling
bb0504534d Add ZEND_ARG_CALLABLE_INFO to allow internal function to type hint against callable 2015-03-08 23:00:13 +08:00
Anthony Ferrara
9109e48749 Merge in master 2015-02-18 10:35:39 -05:00
Anthony Ferrara
00b3e77ead Move declare() to the top of the file only, and allow int->float generalization 2015-02-18 10:26:29 -05:00
Anatol Belski
07fdc1c78b fix data types 2015-02-12 18:39:40 +01:00
Andrea Faulds
44ed070a9a Fix Gd usages of ZEND_WRONG_PARAM_COUNT, add usage note 2015-02-10 15:48:09 +00: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
Xinchen Hui
a3379d6691 Padding 2015-02-05 16:11:44 +08:00
Reeze Xia
bff4c47fa7 Implemented internal function return types 2015-02-05 01:04:54 +08: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
Rasmus Lerdorf
6c9621c937 typo 2015-01-17 11:38:40 -08:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08: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
Xinchen Hui
b5b617674e Micro optimaztion (yeah, I know compiler supposed to do that) 2014-12-22 00:10:46 -05:00
Andrea Faulds
e5eb9530ab Use "float" and "integer" in typehint and zpp errors 2014-12-21 13:23:02 +00:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Andrea Faulds
0ea0b591d7 Merge branch 'zppFailOnOverflow'
* zppFailOnOverflow:
  Fix MySQLi tests
  Fixed gd test
  Refactor ZEND_LONG_MAX/MIN checks into ZEND_DOUBLE_FITS_LONG()
  Fixed copy-and-paste error
  Fix more 32-bit tests
  Skip buncha tests on 32-bit
  skip simplexml
  skip posix 32-bit
  skip tests on 32-bit
  Fixes simplexml test
  Fixes posix tests
  Fixes iconv tests
  Marked tests as 32-bit
  Fixed more 32-bit tests
  Fixed some 32-bit tests
  Mark said ext/date tests as 32-bit only
  Fixed ext/date tests broken by zpp error on overflow
  Fixed broken tests
  Make zpp fail if NaN passed for int, or out-of-range float for non-capping int

Conflicts:
	ext/date/tests/getdate_variation7.phpt
	ext/date/tests/localtime_variation3.phpt
2014-12-13 18:38:15 +00:00
Dmitry Stogov
3893c1fc3d Fixed compilation warnings 2014-12-12 21:57:34 +03:00
Dmitry Stogov
5dd427eac2 Use zend_string* for op_array->arg_info[]->name and op_array->arg_info[]->class_name. For internal functions we still use char*. 2014-12-03 16:56:09 +03:00
Andrea Faulds
f90b877f41 Refactor ZEND_LONG_MAX/MIN checks into ZEND_DOUBLE_FITS_LONG() 2014-11-29 02:13:20 +00:00
Andrea Faulds
d19ce51854 Fixed copy-and-paste error 2014-11-29 01:52:23 +00:00
Andrea Faulds
01554bf3e4 Merge branch 'master' into zppFailOnOverflow 2014-11-29 01:45:54 +00:00
Dmitry Stogov
11384ba77b Pack EX(num_args) into EX(This).u2.num_args 2014-11-28 10:28:49 +03:00
Andrea Faulds
71566b994f Merge branch 'master' into zppFailOnOverflow 2014-11-01 22:49:53 +00:00
Anatol Belski
f7d3355e75 fix datatype mismatches
and convert len args to size_t where the underlaying API uses zend_string
2014-10-24 20:50:06 +02:00
Anatol Belski
f227922446 move key lengths to use size_t as zend_string is used internally anyway 2014-10-23 10:29:54 +02:00
Anatol Belski
a5e4f1f598 fix several datatype mismatches 2014-10-22 17:56:30 +02:00
Anatol Belski
5e24ae321d all the key_len use uint, fix the warning when using strlen on 64 bit 2014-10-22 17:56:22 +02:00
Nikita Popov
cf5920e8aa Fix procedural finfo calls in methods
getThis() will return the $this of the calling method.
2014-10-16 14:24:23 +02:00
Anatol Belski
8a55159258 Merge branch 'PHP-5.6'
* PHP-5.6:
  DLL export several APIs needed for phpdbg
2014-10-12 19:22:40 +02:00
Anatol Belski
c96a6b4493 DLL export several APIs needed for phpdbg 2014-10-12 19:22:03 +02:00
Nikita Popov
df79b9b27a Update get_class_name semantics
* get_class_name is now only used for displaying the class name
   in debugging functions like var_dump, print_r, etc. It is no
   longer used in get_class() etc.
 * As it is no longer used in get_parent_class() the parent
   argument is now gone. This also fixes incorrect parent classes
   being reported in COM.
 * get_class_name is now always required (previously some places
   made it optional and some required it) and is also required
   to return a non-NULL value.
 * Remove zend_get_object_classname. This also fixes a number of
   potential leaks due to incorrect usage of this function.
2014-10-09 20:48:27 +02:00
Nikita Popov
e5e9d8346f Remove zend_get_class_entry function 2014-10-09 14:17:30 +02:00
Dmitry Stogov
bd9a234645 Replaced EG(This) and EX(object) with EX(This).
Internal functions now recieves zend_execute_data as the first argument.
2014-10-03 19:32:46 +04:00
Andrea Faulds
bb55397bab Make zpp fail if NaN passed for int, or out-of-range float for non-capping int 2014-09-22 17:06:16 +01:00
Anatol Belski
993d475126 fix condition
A char array like val[1] would always be valid when checking like
!val. Probably better were to check for ->len, but actually ->val[0]
is fine as the actual zend_string should have been initalized
before.
2014-09-13 00:03:42 +02:00
Anatol Belski
5d5a70205c reduce the struct size by 8 byte on 64 bit 2014-09-12 21:35:20 +02:00