Commit Graph

13147 Commits

Author SHA1 Message Date
Gabriel Caruso
6400264856 Trailing whitespaces
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a76eeea736 Merge branch 'PHP-7.2'
* PHP-7.2:
  Happy new year (Update copyright to 2018)

Conflicts:
	ext/phar/LICENSE
2018-01-03 16:02:15 +08:00
Xinchen Hui
0e62639d28 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Happy new year (Update copyright to 2018)
2018-01-03 16:00:34 +08:00
Lior Kaplan
fbfdd1e1c4 Happy new year (Update copyright to 2018) 2018-01-02 23:42:29 +02: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
Nikita Popov
b6581038eb Use GC_FLAGS_SHIFT in a few more places
Rather than hardcoding 8.
2017-12-30 23:40:25 +01:00
Dmitry Stogov
5c8f8f8fce Use ZEND_FAST_CONCAT instead of ZEND_CONCAT for CONST operands. 2017-12-29 13:54:18 +03:00
Dmitry Stogov
f010423335 Use IS_EQUAL instead of CASE when first operand is CV or CONST. Removed CASE handlers that duplicated IS_EQUAL. 2017-12-29 12:57:58 +03:00
Dmitry Stogov
27206f9cc5 Removed useless specialization 2017-12-29 12:02:50 +03:00
Xinchen Hui
7dffc6e301 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #75742 (potential memleak in internal classes's static members)
2017-12-28 16:31:40 +08:00
Xinchen Hui
650264e360 Fixed bug #75742 (potential memleak in internal classes's static members) 2017-12-28 16:31:09 +08:00
Dmitry Stogov
ac2fdc56fb zend_fcall_info_cache.initialized is removed (zend_fcall_info_cache is initialized if zend_fcall_info_cache.function_handler is set). 2017-12-27 16:02:20 +03:00
Dmitry Stogov
d9f5ea691f zend_fcall_info_cache.initialized is removed (zend_fcall_info_cache is initialized if zend_fcall_info_cache.function_handler is set). 2017-12-27 15:15:03 +03:00
Dmitry Stogov
a6fcbb7c87 Use zend_hash_find() instead of zend_hash_find_ptr() to avoid double check 2017-12-27 13:26:06 +03: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
6e23e84332 Use zval constructors instead ZVAL_COPY if we know the types 2017-12-26 16:49:34 +03:00
Nikita Popov
b2b2b437af Add _IS_NUMBER as cast_object() target type
convert_scalar_to_number() will now call cast_object() with an
_IS_NUMBER argument, in which case the cast handler should return
either an integer or floating point number, whichever is more
appropriate.

Previously convert_scalar_to_number() unconditionally converted
objects to integers instead.

Fixes bug #53033.
Fixes bug #54973.
Fixes bug #73108.
2017-12-26 12:39:06 +01:00
Dmitry Stogov
efcbea4345 Cheaper reference construction 2017-12-26 13:30:25 +03:00
Nikita Popov
182317f6b6 Remove unnecessary type check 2017-12-25 21:21:05 +01:00
Nikita Popov
2667ddc46d Remove unnecessary readobj==writeobj checks
This can no longer be the case since PHP 7. The writeobj must
always point to a different zval.
2017-12-25 21:19:45 +01:00
Nikita Popov
688b9136ab Fixed bug #54043 2017-12-23 13:35:08 +01:00
Nikita Popov
66c8a9d672 Remove EH_SUPPRESS mode
It is unused and does not work in any meaningful way:
Warnings are suppressed, but everything else (both notices and
fatals) are not. It would make some sense if it suppressed
warnings and lower, but right now this is a pointless mode.
2017-12-23 13:28:09 +01:00
Dmitry Stogov
35b3fdfd0a Separate exceptional code into cold functions. 2017-12-22 16:35:52 +03:00
Dmitry Stogov
4691cbe5d1 Fixed possible local assembler labels conflicts. 2017-12-20 21:44:24 +03:00
Dmitry Stogov
f860ae451a fixed "unused function" compilation warning 2017-12-18 11:43:12 +03:00
Dmitry Stogov
b337b90bac Fix warning in the proper place 2017-12-18 11:28:59 +03:00
Xinchen Hui
4dfbfe93aa Use cheaper API 2017-12-18 11:55:14 +08:00
Nikita Popov
3fde27d87d Merge branch 'PHP-7.2' 2017-12-16 17:10:09 +01:00
Pedro Magalhães
83964e0468 Fix #75607 - Check if existing static trait property is a ref before comparing 2017-12-16 17:07:12 +01:00
Nikita Popov
93c7a3803f Fix const qualifier warning 2017-12-15 21:58:52 +01:00
Li-Wen Hsu
72ec23d823 Fix bug #75677: Drop fastcall attribute on variadic function
Fastcall generally doesn't make sense on variadic functions. For
clang in particular this eliminates a "fastcall calling convention
ignored on variadic function" warning.
2017-12-15 21:56:08 +01:00
Anatol Belski
32db45ca54 Drop unused code 2017-12-15 14:58:43 +01:00
Anatol Belski
f3f6cd24e9 Modernize realpath and integrate quick variant into virtual_file_ex
The slower I/O as a traditional bottleneck on Windows which is
the target of this patch. The recursive path resolution, while being
an allround solution, is expensive when it comes to the common case.
Files with proper ACLs set can be resolved in one go by usage of specific
API. Those are available since Vista, so actually can be called old. Those
simpler api is used for the cases where no CWD_EXPAND is requested. For
the cases where ACLs are improper, the existing solution based on
FindFirstFile still does good job also partially providing quirks. Cases
involing reparse tags and other non local filesystems are also partially
server by new APIs.

The approach uses both APIs - the quick one for the common case still
integrating realpath cache, and the existing one as a fallback. The tests
show the I/O load drop on the realpath resolution part due to less
system calls for the sub part resolution of paths. In most case it is
justified, as the sub parts were otherwise cached or unused as well. The
realpath() implementation in ioutil is also closer to the POSIX.
2017-12-15 13:23:34 +01:00
Dmitry Stogov
66a604171c Array addition is not commutative 2017-12-15 14:40:19 +03:00
Dmitry Stogov
588f1df7a2 Remove duplicate handlers for commutative operations 2017-12-15 13:42:54 +03:00
Dmitry Stogov
83e495e0fd Move constants into read-only data segment 2017-12-14 22:14:36 +03:00
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
Dmitry Stogov
1db8402208 Move zend_object_iterator_funcs structures into read-only data segment 2017-12-14 14:21:22 +03:00
Dmitry Stogov
175e461369 Use fastcall calling convention for objects and resources API 2017-12-14 13:50:39 +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
Dmitry Stogov
dd1050fa6c Improved branch prediction and code locality 2017-12-14 02:22:07 +03:00
Nikita Popov
76a001e32a Merge branch 'PHP-7.2' 2017-12-13 21:25:38 +01:00
Nikita Popov
652d30acdc Merge branch 'PHP-7.1' into PHP-7.2 2017-12-13 21:25:21 +01:00
Levi Morrison
580bae4a2c Fix copy-and-paste bugs 2017-12-13 21:25:00 +01:00
Dmitry Stogov
dc47171523 Avoid temporary string creation and destruction. 2017-12-11 18:18:30 +03:00
Anatol Belski
0673aa7f61 Apply calling convention explicitly to the function, not to the decl. 2017-12-11 12:33:27 +01:00
Dmitry Stogov
f3aca3c852 Use "fastcal" calling convention for internal PHP functions on x86 2017-12-11 10:55:15 +03:00