Dmitry Stogov
605e0de357
Clenup "smart branch" handling
2019-10-18 00:11:30 +03:00
Dmitry Stogov
65c4cc231d
Fixed wrong shift
2019-10-17 23:31:47 +03:00
Nikita Popov
e80934d747
Pass cache slot when printing type errors
...
Instead of using a separate ce.
2019-10-17 17:06:48 +02:00
Dmitry Stogov
3df64af965
Relay on DO_ICALL/DO_UCALL opcode to avoid generation of useless code
2019-10-17 12:55:36 +03:00
Dmitry Stogov
3a88c5b87a
Fixed exception handling
2019-10-16 22:38:01 +03:00
Dmitry Stogov
5431837a6c
Clenup "smart branch" handling
2019-10-16 12:28:30 +03:00
Dmitry Stogov
51da02375a
Fixed exception handling
2019-10-16 02:36:06 +03:00
Dmitry Stogov
902b00e68e
Fixed exception source
2019-10-16 01:26:35 +03:00
Dmitry Stogov
0d55456d73
Use "const" qualifier
2019-10-15 11:06:11 +03:00
Dmitry Stogov
cef1960ce7
Use "const" qualifier
2019-10-14 21:49:08 +03:00
Dmitry Stogov
5213612359
Fixed compilation warning
2019-10-14 21:47:46 +03:00
Dmitry Stogov
2958fecb8b
Fixed incorrect JIT compilation
2019-10-14 21:32:10 +03:00
Joe Watkins
f8e3970ff0
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix checksum calculation for opcache
2019-10-14 16:50:56 +02:00
Joe Watkins
042e3b227e
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix checksum calculation for opcache
2019-10-14 16:50:23 +02:00
Joe Watkins
22ac57b064
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix checksum calculation for opcache
2019-10-14 16:49:48 +02:00
Mitch Hagstrand
e2a6bf482f
Fix checksum calculation for opcache
2019-10-14 16:46:42 +02:00
Dmitry Stogov
3f50922aee
Fixed incorrect JIT compilation
2019-10-14 16:45:58 +03:00
Dmitry Stogov
4273865bba
Drop checkpoint that leaded to use after free
2019-10-14 13:37:22 +03:00
Dmitry Stogov
5197d0cd5e
Reduced number of CFG pass iterations
2019-10-14 11:37:10 +03:00
Dmitry Stogov
daac578b51
Fixed JIT of preloaded script
2019-10-11 12:54:07 +03:00
Dmitry Stogov
2068ce9adf
Use RT_CONSTANT() or CT_CONSTANT() macro depending on ZEND_ACC_DONE_PASS_TWO flag
2019-10-11 12:54:07 +03:00
Dmitry Stogov
3db5dc44bc
JMP optimization cleanup.
...
Make JMP optimisation in pass3 and JMP optimization from CFG pass to be almost identical.
2019-10-11 11:23:02 +03:00
Dmitry Stogov
3ad20f80f5
Revert/redo pass_two only once
2019-10-10 23:20:36 +03:00
Dmitry Stogov
ca265b04d0
Removed #if HAVE_DFA_PASS
2019-10-10 21:46:24 +03:00
Dmitry Stogov
833821ac24
Eliminate CHECK_VAR instructions for defined CVs
2019-10-10 16:07:31 +03:00
Dmitry Stogov
6a459a8a3f
Separate common code and add few more patterns
2019-10-10 12:19:06 +03:00
Dmitry Stogov
0cb977a691
Fixed edge cases introduced by 170ed1f5a7
2019-10-10 11:48:31 +03:00
Dmitry Stogov
d9964efe23
One more place
2019-10-10 02:21:37 +03:00
Dmitry Stogov
bf5d299ef4
Fixed typo
2019-10-10 02:17:50 +03:00
Dmitry Stogov
fa0a17a76f
Move ECHO handling into common switch
2019-10-09 23:24:41 +03:00
Dmitry Stogov
fd69af38c8
Cleanup JMP optimization. Remove duplicate code (conditional jums with constant operand) and outdated commented code.
2019-10-09 23:07:32 +03:00
Dmitry Stogov
78a1c8c811
Cleanup JMP optimization pass
2019-10-09 22:52:09 +03:00
Dmitry Stogov
d37f5da75e
typo and cleanup
2019-10-09 17:58:35 +03:00
Dmitry Stogov
f6f32f2cf0
SAMRT BRANCH improvement.
...
Avoid need of insertion NOP opcoes between unrelated SMART BRANCH instruction and following JMPZ/JMPNZ.
Now instead of checking the opcode of following instruction, the same information is encoded into SMART BRANH result_type.
2019-10-09 13:48:39 +03:00
Dmitry Stogov
170ed1f5a7
Otimize out useless QM_ASSIGN
2019-10-09 09:08:25 +03:00
Remi Collet
3dabce087c
Merge branch 'PHP-7.4'
...
* PHP-7.4:
add librt for opcache
2019-10-08 10:49:30 +02:00
Remi Collet
e1362b3cf0
add librt for opcache
2019-10-08 10:48:10 +02:00
Dmitry Stogov
b02b81299c
Comparison cleanup:
...
- introduce zend_compare() that returns -1,0,1 dirctly (without intermediate zval)
- remove compare_objects() object handler, and keep only compare() handler
2019-10-07 17:57:49 +03:00
Nikita Popov
fdc133063d
Convert count_chars invalid mode error to ValueError
2019-10-07 11:10:05 +02:00
Tyson Andre
dd61edfd7c
Update opcache return type info for gd functions
...
Many of these now have reflection types,
making the old signatures redundant or inaccurate.
(Some methods also throw Errors instead of returning null/false)
Closes GH-4785.
2019-10-07 10:16:50 +02:00
Tyson Andre
02f2056864
Update zend_func_info for pcre/curl/iconv/json
...
preg_quote and curl_error now have a non-null return type of `string`.
zend_func_info now duplicates many real reflection types
(some of which are now non-null)
Closes GH-4788.
2019-10-07 10:16:31 +02:00
Tyson Andre
52dfe873ab
Remove redundant zend_func_info for zlib/hash/session
...
E.g. hash_equals is outdated - it has a non-null reflection type of bool.
Remove redundant signatures for types that are obviously not reference
counted (`F0`).
Closes GH-4787.
2019-10-07 10:16:08 +02:00
Tyson Andre
d0f7a7e7c9
Remove redundant func info for ctype/bc/fileinfo
...
This is limited to types that aren't reference counted.
I assume the info that there is exactly one reference
should be preserved (e.g. for bcsqrt)
Closes GH-4786.
2019-10-07 10:15:50 +02:00
Tyson Andre
3c2ba240a9
Update zend_func_info for zend, array extensions
...
Some of these functions now have real reflection types
and will throw instead of return null/false.
Others provide the exact same reflection type information
that zend_func_info does. (or would after updating outdated types)
Closes GH-4790.
2019-10-07 10:15:30 +02:00
Dmitry Stogov
dc3c8c75da
Prefer optimization without JMPZNZ instruction
2019-10-04 12:52:46 +03:00
Dmitry Stogov
bf56daa8c8
Remove "finally" restriction.
2019-10-04 02:53:24 +03:00
Dmitry Stogov
204660fd9a
Simplify protection from infinity loops
2019-10-04 02:04:00 +03:00
Dmitry Stogov
3a78c3aaf5
Moved non-constant JMP optimizations from pass1 to pass3.
...
Removed useless "break"s, that stopped optimization too early.
2019-10-04 00:27:49 +03:00
Dmitry Stogov
39d1e50b2d
Avoid "$a = $a + ..." to "$a += ..." conversion (compound assignments work slower).
...
Added DFA optimization patters (e.g. "$a = $a + 1" to "++$a"), that previously worked only for compound assignments.
2019-10-03 16:33:17 +03:00
Dmitry Stogov
de3c1eb85e
Move obvious optimization patterns from pass1 directly to compiler
2019-10-03 14:57:20 +03:00