1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 23:48:14 +02:00
Commit Graph

1045 Commits

Author SHA1 Message Date
Dmitry Stogov 0f811bb7b6 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed CFG construction for SWITCH opcodes
2019-04-03 03:09:47 +03:00
Dmitry Stogov 56a5d0bd91 Fixed CFG construction for SWITCH opcodes 2019-04-03 03:09:03 +03:00
Nikita Popov da7add3525 Merge branch 'PHP-7.2' into PHP-7.3 2019-03-18 10:51:00 +01:00
Nikita Popov 54bf8c820f Fixed bug #77743 2019-03-18 10:49:53 +01:00
Nikita Popov 3f00c9367d Fixed bug #77691
We cannot replace an op1_def opcode with an ASSIGN, if it also has
a used res_def. Usually this doesn't happen because the res_def use
can be eliminated first. The example is a case where operand replacement
on the res_def use fails.
2019-03-04 13:11:12 +01:00
Nikita Popov 66fda0cdb1 Remove result def during jmp_set optimization 2019-02-22 13:41:47 +01:00
Nikita Popov 33c2b47de3 Merge branch 'PHP-7.2' into PHP-7.3 2019-02-22 12:00:20 +01:00
Nikita Popov 2cfb09caa7 Fix inference warning about missing key type 2019-02-22 11:55:16 +01:00
Joe Watkins e1c93d1fb2 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Properly check for array_replace_recursive in sccp.c
2019-02-03 08:41:26 +01:00
Tyson Andre cf56832d00 Properly check for array_replace_recursive in sccp.c
Due to a typo, this code used to check for array_merge_recursive
twice.
2019-02-03 08:40:21 +01:00
Nikita Popov 76760901fa Fixed bug #77287
There may be an EXT_NOP opcode before the parameter list, we should
skip over it.
2019-01-22 12:15:06 +01:00
Nikita Popov ade702a0d2 Fixed bug #77434
Mark arrays containing partial arrays as partial. This was already
done for the ADD_ARRAY_ELEMENT case, but not for ASSIGN_DIM.
2019-01-10 10:25:55 +01:00
Xinchen Hui 16176ad0e3 Incase of invalid read 2019-01-10 14:50:39 +08:00
Nikita Popov bf4dab0163 Make operator swapping depend on IGNORE_OVERLOADING flag
Add MUL back to the list and instead make the entire optimization
depend on IGNORE_OVERLOADING, which is there exactly so we can make
these kinds of assumptions.
2019-01-09 09:27:56 +01:00
Xinchen Hui cd49db9d47 Fixed bug #77266 (Assertion failed in dce_live_ranges) 2019-01-08 19:19:01 +08:00
Nikita Popov 7f8cab2535 Merge branch 'PHP-7.2' into PHP-7.3 2019-01-08 09:38:02 +01:00
Nikita Popov 1165a9068c Don't swap operands of ZEND_MUL
If this is used with operator overloading, then the operation does
not necessarily commute (for example, matrix multiplication).
2019-01-08 09:37:49 +01:00
Nikita Popov 6f75890e7b Fix one issue reported in bug #77310
SCCP did not handle array ASSIGN_* with a BOT operand correctly.
2019-01-07 10:05:23 +01:00
Nikita Popov 325a113974 Possible fix for bug #77287
The cache size could be off by 4, if we're on a 32-bit system and
the slot had to be bumped for alignment reasons.

I wasn't able to reproduce the issue reported in bug #77287, but I
think this might be the cause.
2019-01-02 14:12:58 +01:00
Nikita Popov 91888cc372 Fixed bug #77257
Correctly handle the case of duplicate predecessors, by removing the
duplicate predecessor and corresponding phi node operands.

For the future, it would be better to instead allow duplicate
predecessors and avoid this kind of fragile code...
2019-01-02 09:31:50 +01:00
Nikita Popov 93aabf1533 Fixed bug #77275
Instead of juggling with this problem during literal compaction,
make sure that we always initialize Z_EXTRA for literals, which
seems like the more robust solution.
2018-12-10 13:36:23 +01:00
Nikita Popov 59cacdcefd Fix typos in compact literals debugging code 2018-12-10 13:35:55 +01:00
Nikita Popov f4eec70260 Merge branch 'PHP-7.2' into PHP-7.3 2018-11-28 20:10:17 +01:00
Nikita Popov 17f8b9fb36 Fixed bug #77215
Remove invalid assertion: A block can have multiple switch frees,
so if we don't do live range block splitting, it is not necessarily
true that the free is located at the start of a block.
2018-11-28 20:08:39 +01:00
Nikita Popov d92f7630f7 Merge branch 'PHP-7.2' into PHP-7.3 2018-11-02 14:30:50 +01:00
Nikita Popov 4daa413898 Fixed bug #77092
Weird that this worked for so long, probably because nearly all
ext/standard functions use fast ZPP rather than ordinary ZPP.
2018-11-02 14:29:03 +01:00
Zeev Suraski 9afce019e0 Future-proof email addresses 2018-11-01 18:35:32 +02:00
Nikita Popov b9431ef4d5 Don't optimize function if inference failed
This was respected only for the single-function optimizations, not
in func-info mode.
2018-10-25 16:44:24 +02:00
Nikita Popov 78c2e0e342 Merge branch 'PHP-7.2' into PHP-7.3 2018-10-25 16:44:19 +02:00
Nikita Popov 902ec36710 Merge branch 'PHP-7.1' into PHP-7.2 2018-10-25 16:43:36 +02:00
Nikita Popov f1ceec5533 Fixed bug #77058
Account for the fact that undef must be interpreted as null for
the purposes of INC/DEC inference.
2018-10-25 16:37:41 +02:00
Nikita Popov e7153e8a2f Improve "narrowing" error message
By including the opcode name.
2018-10-25 16:36:23 +02:00
Peter Kokot 902d39a3a7 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +02:00
Peter Kokot 7f6387b59a Trim trailing whitespace in source code files 2018-10-13 14:12:55 +02:00
Dmitry Stogov b8ffa3707c Fixed bug #76711 (OPcache enabled triggers false-positive "Illegal string offset") 2018-09-20 12:33:46 +03:00
Dmitry Stogov 64dad57d19 Fixed wrong assertion 2018-09-10 15:26:38 +03:00
Nikita Popov a32c563e50 Merge branch 'PHP-7.2' into PHP-7.3 2018-09-07 14:02:51 +02:00
Nikita Popov cfdd828163 Fixed bug #76796 2018-09-07 14:02:03 +02:00
Dmitry Stogov b8828926f2 Avoid hash lookups in BIND_STATIC and BIND_LEXICAL opcode handlers.
Encode static variable offset into opline->extended_value.
2018-08-20 16:10:09 +03:00
Peter Kokot cf8ef08e20 Fix typos in code 2018-07-27 16:27:41 +02: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
Dmitry Stogov f950128cd6 Encode parent class name as IS_CONST operand in DECLARE_INHERITED_CLASS and DECLARE_ANON_INHERITED_CLASS opcodes (eliminate FETCH_CLAS
S opcode).
2018-07-25 13:40:47 +03:00
Peter Kokot a5e80b22e1 Fix typos in code comments 2018-07-25 11:57:11 +02: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 004a0568f4 Eliminated REFCOUNTED checks on persistent constant operands in SEND_VAL[_EX] and QM_ASSIGN. 2018-07-03 13:10:22 +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 5d7be2c2bc Merge branch 'PHP-7.2' 2018-06-30 19:50:56 +02:00
Nikita Popov 34deda13a8 Merge branch 'PHP-7.1' into PHP-7.2 2018-06-30 19:50:40 +02:00