Commit Graph

1479 Commits

Author SHA1 Message Date
Dmitry Stogov
3ced766da9 Removed duplicate code. zend_fetch_dimension_address_LIST_w() was a copy of zend_fetch_dimension_address_W(), ZEND_FETCH_LIST_W_SPEC_CV_... a copy of ZEND_FETCH_DIM_W_SPEC_CV_... 2018-07-30 10:53:39 +03:00
Xinchen Hui
a7746d10a5 Fixed bug #76667 (Segfault with divide-assign op and __get + __set) 2018-07-27 13:00:14 +08:00
Dmitry Stogov
ab8094c666 Pack zend_constant.flags and zend_constant.module_number into reserved space inside zend_constant.value. 2018-07-26 12:58:07 +03:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Dmitry Stogov
afc82e243c Micro-optimization 2018-07-23 10:52:00 +03:00
Dmitry Stogov
88dd38ee81 Reduce overhead of case-insensitive constants deprecation for "fast path" 2018-07-17 12:58:58 +03:00
Dmitry Stogov
70d0175a13 Fixed error messages. 2018-07-16 17:08:11 +03:00
Dmitry Stogov
67b4c3379a Uze ZVAL_COPY_DEREF() instead of ZVAL_DEREF() and ZVAL_COPY() 2018-07-09 12:46:46 +03:00
Xinchen Hui
9d1e9b73c5 rename ref_dtor_func to rc_dtor_func 2018-07-06 19:15:26 +08:00
Xinchen Hui
f9297387f4 Rename zval_dtor_func and ref_dotr_func 2018-07-06 18:47:30 +08:00
Xinchen Hui
e3355ac5ec Revert "Rename _zval_dtor_func to _ref_dtor_func"
This reverts commit a362ae6b12.
2018-07-06 18:37:45 +08:00
Xinchen Hui
a362ae6b12 Rename _zval_dtor_func to _ref_dtor_func 2018-07-06 18:32:27 +08:00
Dmitry Stogov
af341213f7 se zval_ptr_dtor_str() instead of zend_string_release_ex(Z_STR(*), 0) 2018-07-04 12:08:07 +03:00
Dmitry Stogov
177c7e3a72 Merge branch 'bug63217'
* bug63217:
  Another fix for bug #63217
  Partial revert of 30156d588c
2018-07-03 12:58:50 +03:00
Dmitry Stogov
3fd97a5b1f Better hot/cold code splitting 2018-07-03 11:07:39 +03:00
Dmitry Stogov
28b03f9605 Another fix for bug #63217 2018-07-03 01:09:58 +03:00
Dmitry Stogov
57af94c8b9 Partial revert of 30156d588c 2018-07-02 20:54:44 +03:00
Rudi Theunissen
30156d588c Fixed bug #63217
Don't automatically convert literal string keys to integers on
array access, as we may be dealing with an ArrayAccess object,
rather than a plain array.
2018-07-02 16:41:59 +02:00
Nikita Popov
7909d4532c Merge branch 'PHP-7.2' 2018-06-30 20:11:59 +02:00
Nikita Popov
0f1726e45d Merge branch 'PHP-7.1' into PHP-7.2 2018-06-30 20:11:39 +02:00
Nikita Popov
9b0df97a42 Fix handling of void return type on internal functions 2018-06-30 20:10:57 +02:00
Dmitry Stogov
d6ab163be8 cleanup 2018-06-29 12:35:14 +03:00
Dmitry Stogov
56450c6e65 Moved very rare exception check into a single place. 2018-06-27 13:34:15 +03:00
Xinchen Hui
3d8c82c353 Merge branch 'PHP-7.2'
* PHP-7.2:
  Update NEWS
  Fixed bug #76534 (PHP hangs on 'illegal string offset on string references with an error handler)

Conflicts:
	Zend/zend_vm_execute.h
2018-06-27 13:08:47 +08:00
Xinchen Hui
3521661bd1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76534 (PHP hangs on 'illegal string offset on string references with an error handler)

Conflicts:
	Zend/zend_execute.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2018-06-27 13:07:36 +08:00
Xinchen Hui
d1b1866a3a Fixed bug #76534 (PHP hangs on 'illegal string offset on string references with an error handler) 2018-06-27 13:05:11 +08:00
Dmitry Stogov
49a4e69584 Fixed ability to call plain functions through zend_call_method() 2018-06-25 23:01:21 +03:00
Dmitry Stogov
7f67513ca3 Lazy function copying from op_cache SHM into process memory 2018-06-25 19:53:58 +03:00
Nikita Popov
490a49d0bb Use COPY_DEREF for DIM_IS and LIST_R as well
Also add an upgrading note for the behavior change, not that we
expect anyone to be affected...
2018-06-25 14:23:06 +02:00
Nikita Popov
61d00a6cf3
Use COPY_DEREF instead of COPY_UNREF
This fixes the behavior when the storage location of the fetch is
modified before the operand is dereferenced by the using VM opcode.

Furthermore it elimiates references as a possible return value from
*_R opcodes, which will give us more opportunities for inferences,
in particular in regard to typed properties.
2018-06-25 11:23:59 +02:00
Nikita Popov
7498f0163b Fix handling of assign-ops on overloaded props with ref return
Assign-ops and incdec on overloaded properties are implemented
using a read_property followed by write_property. Previously, if
__get() returned by-reference, pre-incdec and assign-op
additionally also modified the reference, while post-incdec worked
correctly.

This change synchronizes the three code-paths to not modify the
reference. The pre-incdec implementation matches the post-incdec
implementation, the assign-op implementation uses a distinct
result operand.
2018-06-09 00:36:46 +02:00
Dmitry Stogov
b6a2ae3a5b Cleanup 2018-06-05 11:26:15 +03:00
Dmitry Stogov
655d249ac9 Eliminate some checks for zero character inside an inclue file name 2018-05-30 18:24:31 +03:00
Anatol Belski
6f4a01da21 Fix build without global registers 2018-05-28 20:44:58 +02:00
Dmitry Stogov
c9df8ac6c5 Separate common code into helper function 2018-05-28 18:11:43 +03:00
Dmitry Stogov
5eb1f92f31 Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. 2018-05-28 16:27:12 +03:00
David Carlier
112578fc35 Don't use optimize pragmas with clang 2018-03-23 19:05:51 +01:00
Xinchen Hui
6a59f3714a Merge branch 'PHP-7.2'
* PHP-7.2:
  Update NEWS
  Fixed bug #76025 (Segfault while throwing exception in error_handler).
2018-02-28 18:07:15 +08:00
Xinchen Hui
858ebd9285 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76025 (Segfault while throwing exception in error_handler).
2018-02-28 18:06:49 +08:00
Xinchen Hui
d5c171311d Fixed bug #76025 (Segfault while throwing exception in error_handler). 2018-02-28 18:06:37 +08:00
Dmitry Stogov
6fb9e24218 Allow generation of VM map 2018-02-22 15:31:00 +03:00
Dmitry Stogov
d393199e13 Fixed compilation warnings 2018-02-22 11:33:26 +03:00
Dmitry Stogov
bd908f6145 Fixed build without global register variables 2018-02-22 11:00:29 +03:00
Dmitry Stogov
927748b271 Reorganize make_real_object() related code 2018-02-21 18:43:38 +03:00
Dmitry Stogov
ecb52b8b3b Move exceprional code into helper & zend_fetch_var_address_helper() micro-optimization. 2018-02-21 17:09:42 +03:00
Dmitry Stogov
7559b1c50c Move result address calculation from specialized handlers to less specialized helpers 2018-02-21 16:06:29 +03:00
Dmitry Stogov
9c0427cada Mark exceptional helpers as "cold" 2018-02-21 12:07:29 +03:00
Dmitry Stogov
e1b1cff48d Move exceptional code into helpers 2018-02-21 10:10:04 +03:00
Dmitry Stogov
a00286921e Move cold code, duplicated by specializer, into helper functions 2018-02-20 23:44:25 +03:00
Dmitry Stogov
b46f10b43f Fixed build without global register variables 2018-02-20 20:39:02 +03:00