1
0
mirror of https://github.com/php/php-src.git synced 2026-03-31 04:32:19 +02:00
Commit Graph

517 Commits

Author SHA1 Message Date
Dmitry Stogov
8d533934e3 Merge branch 'PHP-7.1'
* PHP-7.1:
  Allow optional splitting of basic blocks at RECV/RECV_INIT opcodes.
2016-08-29 20:36:08 +03:00
Dmitry Stogov
94fbcbe172 Allow optional splitting of basic blocks at RECV/RECV_INIT opcodes. 2016-08-29 20:35:17 +03:00
Dmitry Stogov
6318c80347 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #72944 (Null pointer deref in zval_delref_p).
2016-08-29 12:15:37 +03:00
Dmitry Stogov
b5bab0fce8 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #72944 (Null pointer deref in zval_delref_p).
2016-08-29 12:07:54 +03:00
Dmitry Stogov
b66039db33 Fixed bug #72944 (Null pointer deref in zval_delref_p). 2016-08-29 12:02:50 +03:00
Dmitry Stogov
7edaed6fba Merge branch 'PHP-7.1'
* PHP-7.1:
  op_arrays may be optimized independetly and "script" might be NULL
2016-08-23 13:18:51 +03:00
Dmitry Stogov
129e8dadf4 op_arrays may be optimized independetly and "script" might be NULL 2016-08-23 13:17:53 +03:00
Dmitry Stogov
6e7c37228f Merge branch 'PHP-7.1'
* PHP-7.1:
  Don't keep dangling pointers.
2016-08-23 12:59:23 +03:00
Dmitry Stogov
76707dc204 Don't keep dangling pointers. 2016-08-23 12:58:46 +03:00
Dmitry Stogov
d79492c218 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed CFG construction for stackless execution (split basic blocks after calls)
2016-08-22 16:49:31 +03:00
Dmitry Stogov
caf890b291 Fixed CFG construction for stackless execution (split basic blocks after calls) 2016-08-22 16:48:26 +03:00
Xinchen Hui
eefe3ec786 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed segfault introduced in 447e57a1e1
  Remove outdate checks

Conflicts:
	ext/opcache/Optimizer/zend_inference.c
2016-08-18 15:39:23 +08:00
Xinchen Hui
66a527b8c1 Fixed segfault introduced in 447e57a1e1 2016-08-18 15:37:39 +08:00
Kalle Sommer Nielsen
447e57a1e1 Fixed 7.1 build, decls first please! 2016-08-17 20:26:32 +02:00
Nikita Popov
89f6377971 Return true for is_object() on Incomplete_Class 2016-08-15 23:13:09 +02:00
Nikita Popov
f29149b419 Merge branch 'PHP-7.1' 2016-08-05 16:32:25 +02:00
Nikita Popov
1a780e6727 Add assertion to prevent type narrowing
Currently type narrowing is always a bug, make sure we know about
it.
2016-08-05 16:30:57 +02:00
Nikita Popov
fc7c81ff54 Fixed bug #72762 2016-08-05 16:27:55 +02:00
Kalle Sommer Nielsen
59a7da7b49 Fix opcache build 2016-07-30 17:55:20 +02:00
Nikita Popov
42260325a4 Fix optimization of $i = $i++ 2016-07-17 22:47:49 +02:00
Dmitry Stogov
0da7c08e39 Prevent wrong optimization 2016-07-13 15:05:11 +03:00
Nikita Popov
5f6effed43 Add opcodes to zend_wrong_string_offset() 2016-07-10 15:15:34 +02:00
Aaron Piotrowski
d9a9cf8eca Merge branch 'master' into iterable 2016-07-03 22:42:10 -05:00
Dmitry Stogov
acdafc0a27 Prevent inlining through call_user_func() and call_user_func_array() 2016-07-01 00:16:54 +03:00
Dmitry Stogov
f2e4fc307b Fixed ext/opcache/tests/bug70207.phpt 2016-06-30 21:50:57 +03:00
Dmitry Stogov
1a14533806 Introduce new CHECK_VAR instruction to keep warnings about undefined variables. 2016-06-30 21:40:34 +03:00
Dmitry Stogov
3a45242669 Disable inlining for $this->foo(), because $this may be not in object context 2016-06-30 21:05:48 +03:00
Dmitry Stogov
c3667a5eed Disable inlining for $this->foo(), because $this may be used not in object context 2016-06-30 21:03:08 +03:00
Dmitry Stogov
5ae07dc34a Fixed incorrect constant propagation 2016-06-30 20:48:16 +03:00
Nikita Popov
6f8273e3bf Fix RT_CONSTANT_EX typo 2016-06-30 17:42:57 +02:00
Dmitry Stogov
d898344663 Inline simple constant functions 2016-06-30 17:04:25 +03:00
Dmitry Stogov
871cd76af4 clanup 2016-06-29 17:53:39 +03:00
Nikita Popov
2710ce22a0 Remove assert for now 2016-06-28 18:47:29 +02:00
Nikita Popov
cdd58edf42 More type inferences fixes 2016-06-28 11:49:50 +02:00
Dmitry Stogov
1433162083 Fixed compilation warnings 2016-06-21 20:12:29 +03:00
Nikita Popov
a171522983 Exception safety for direct CV assign of *CALL instrs
Converting T = *CALL; ASSIGN $v, T into $v = *CALL may not be
safe if an exception is thrown after the return value has been
populated -- in this case the value might be destroyed twice.
2016-06-18 00:08:38 +02:00
Nikita Popov
811dfba4bf More type inference fixes 2016-06-16 14:25:48 +02:00
Dmitry Stogov
ff363e2e7c Implemented RFC: Replace "Missing argument" warning with "Too few arguments" exception
Squashed commit of the following:

commit 8b45fa2acb
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jun 16 01:52:50 2016 +0300

    Separate slow path of ZEND_RECV into a cold function.

commit 9e18895ee5
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jun 15 23:26:28 2016 +0300

    Required argument can't be IS_UNDEF anymore.

commit 662db66e39
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue May 31 17:14:50 2016 +0300

    Replace "Missing argument" warning by "Too few arguments" exception.
2016-06-16 02:32:02 +03:00
Dmitry Stogov
a9512af810 Implemented RFC: Fix inconsistent behavior of $this variable
Squashed commit of the following:

commit bdd3b6895c
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jun 16 00:19:42 2016 +0300

    Fixed GOTO VM

commit 2f1d7c8b89
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jun 15 21:01:57 2016 +0300

    Removed unused variable

commit cf749c42b0
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jun 15 19:06:16 2016 +0300

    Protection from $this reassign through mb_parse_str()

commit 59a9a6c83c
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jun 15 18:14:50 2016 +0300

    Added type inference rule for FETCH_THIS opcode

commit 73f8d14a85
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Jun 15 18:11:18 2016 +0300

    Restored PHP-7 behavior of isset($this->foo).
    It throws exception if not in object context.
    Removed useless opcode handlers.

commit fa0881381e
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue May 31 12:25:47 2016 +0300

    Changed "Notice: Undefined variable: this" into "Exception: Using $this when not in object context".

commit e32cc528c0
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue May 24 02:02:43 2016 +0300

    Throw exception on attempt to re-assign $this through extract() and parse_str().

commit 41f1531b52
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon May 23 22:18:36 2016 +0300

    Fixed inconsistent $this behavior
2016-06-16 02:30:23 +03:00
Nikita Popov
fba6f90ae3 Fix type inference bugs
* Add proper array_key_any|array_of_any|array_of_ref in some more
  places
* strlen() on objects may be null
* IS fetch on string dim may be null
2016-06-15 22:52:48 +02:00
Dmitry Stogov
d12987256a Fixed mistakes in type inference rules. 2016-06-15 23:04:17 +03:00
Nikita Popov
046889518d Add support for "instanceof" pi nodes 2016-06-13 19:03:59 +02:00
Nikita Popov
9877d8f019 Use union for pi constraints
This will make it easier to extend pi constraints without impacting
structure sizes.
2016-06-13 19:03:57 +02:00
Aaron Piotrowski
0dc772c9b4 Add iterable type to opcache 2016-06-10 19:01:27 -05:00
Nikita Popov
be37de1ff1 Use LCA for object(ce) type joins
For B, C extending A the join of object(B) and object(C) should
be object(instanceof A). For simplicity we only handle the class
hierarchy, as computing the least common unique ancestor for
interfaces would be more involved.

Also ignore phi sources that don't have an object type: The join
of null and object(A) is now null|object(A) rather than
null|object.
2016-06-07 20:42:00 +02:00
Nikita Popov
d8a2370884 Cleanup 2016-06-07 20:42:00 +02:00
Dmitry Stogov
80b39b498a Improve type narrowing (check only SSA definitions). 2016-06-06 14:57:02 +03:00
Nikita Popov
543649bd4c Fix correctness issues with type narrowing
Fixes bug #72335.
2016-06-06 14:56:17 +03:00
Nikita Popov
e6296f0dcc Fix VERIFY_RETURN_TYPE elision
This both fixes incorrect elision and allows elision for cases
where we only have a subset (e.g. true of bool).
2016-06-05 23:44:08 +02:00
Nikita Popov
7b4618e396 Fix SSA NOP removal
NOPs need to be tracked in the shiftlist as well, as there may be
jumps to NOPs.
2016-06-05 23:00:32 +02:00