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
Dmitry Stogov
8b7cdbaa49
Separate slow path with make_real_object() and related code into "cold" function.
2018-02-20 17:22:11 +03:00
Dmitry Stogov
cbf2d91911
Separate cold paths of ISSET_ISEMPTY_DIM_OBJ
2018-02-20 14:42:53 +03:00
Dmitry Stogov
a3afad5af0
Added tracer to collect frequency of opcode handler call chains
2018-02-19 16:50:24 +03:00
Nikita Popov
b0af9ac733
Avoid live range references in opcodes
...
Don't store the live range of the freed variable for FREE_ON_RETURN
frees, instead look it up at runtime. As this is an extremely
unlikely codepath (in particular, it requires a loop variable with
a throwing destructor), saving the runtime lookup of the live range
is not worth the extra complexity this adds everywhere else.
2018-02-16 21:30:48 +01:00
Dmitry Stogov
6fadb72c0b
Move exceptional code into "cold" helpers
2018-02-16 02:45:31 +03:00
Dmitry Stogov
02aea893fb
Use Z_TYPE_INFO_REFCOUNTED() macro
2018-02-15 21:54:49 +03:00
Dmitry Stogov
ca035f26aa
Moved "zval.u2.cache_slot" into free room of "zend_op"
2018-02-05 19:41:47 +03:00
Dmitry Stogov
3a794d39f0
Avoid repeatable ARG_SHOULD_BE_SENT_BY_REF() checks in FETCH_*FUNC_ARG and following SEND_VAR_EX. Perform the check once in a new CHECK_FUNC_ARG opcode and reuse in the following FETCH_*FUNC_ARG and SEND_FUNC_ARG (SEND_VAR_EX replacement).
2018-02-05 19:40:06 +03:00
Dmitry Stogov
9a6100f9dd
Break dependency between IS_TYPE_REFCOUNTED and ZEND_CALL_FREE_EXTRA_ARGS
2018-02-02 17:38:07 +03:00
Dmitry Stogov
1d7eab12e6
Avoid redundand mask extraction
2018-01-31 13:34:34 +03:00
Dmitry Stogov
7141631cc8
Change FETCH/ISSET instruction modifiers:
...
- Get rid of ZEND_ISEMPTY and ZEND_ISSET_ISEMPTY_MASK. Use just single ZEND_ISSET bit to make distinct between isset() and empty()
- Use ZEND_FETCH_GLOBAL, ZEND_FETCH_LOCAL and ZEND_FETCH_GLOBAL_LOCK as bitmask
- Removed unused ZEND_FETCH_STANDARD
- Extended ZEND_FETCH_ARG_MASK
2018-01-30 22:06:05 +03:00
Dmitry Stogov
1613b6a06b
Expand SEPARATE_STRING()
2018-01-18 02:30:07 +03:00
Dmitry Stogov
25a44cb99e
Eliminate duplication, increment_string() performs it anyway.
2018-01-17 20:09:28 +03:00
Dmitry Stogov
12c386f5b9
Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse. (reapply 781e1573af
, now it should be OK).
2018-01-11 22:15:45 +03:00
Dmitry Stogov
6ba10a03e7
Revert "Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse." (this patch is incomplete or wrong)
...
This reverts commit 781e1573af
.
2018-01-11 17:27:26 +03:00
Dmitry Stogov
781e1573af
Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse.
2018-01-11 16:25:28 +03:00
Gabriel Caruso
6400264856
Trailing whitespaces
...
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a6519d0514
year++
2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49
year++
2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7
year++
2018-01-02 12:53:31 +08:00
Dmitry Stogov
6e4d18924b
Combine READY_TO_DESTROY, EXTRACT_ZVAL_PTR and FREE_OP_VAR_PTR into single, better optimized, macro.
2017-12-26 16:50:34 +03:00
Dmitry Stogov
35b3fdfd0a
Separate exceptional code into cold functions.
2017-12-22 16:35:52 +03:00
Dmitry Stogov
3aceab825a
Manual loop optimizaton.
...
Cost of the loops body is still the same, but the loop headers are improved.
2017-12-14 03:39:22 +03:00
Dmitry Stogov
4d19bc2279
Disable some "bad" GCC optimizations
2017-12-14 03:25:20 +03:00
David Walker
6d4de4cf05
Implement list() reference assignments
...
Support list() reference assignments of the form:
list(&$a, list(&$b, $c)) = $d;
RFC: https://wiki.php.net/rfc/list_reference_assignment
2017-12-09 13:39:52 +01:00