Nikita Popov
9cebdc5d47
Fix yield-by-ref of constant
...
Typo in the condition...
2016-02-11 16:32:45 +01:00
Nikita Popov
7453348ca8
Merge branch 'PHP-7.0'
2016-02-11 16:25:55 +01:00
Nikita Popov
1322672c0b
Fix dangling send target when using yield from
...
Also drop some unnecessary TRY_DELREFs -- leftovers from the days
when null was refcounted.
2016-02-11 16:25:16 +01:00
Dmitry Stogov
81721a7ddd
Specialize DO_FCALL (and variations) according to used/unused return value
2016-02-05 15:46:52 +03:00
Dmitry Stogov
2f5a119281
Use extra specialization to eliminate run-time checks for conditions known at compile time in SEND_VAL_EX and SEND_VAR_EX.
2016-02-05 15:07:58 +03:00
Dmitry Stogov
ef98adce30
Specialize ASSIGN according to used/unused return value
2016-02-05 13:18:58 +03:00
Bob Weinand
00a2c30c59
Add extra VM operand specialization
...
For now RETVAL and OP_DATA= are supported
2016-02-04 16:49:50 +01:00
Dmitry Stogov
d510255879
Rename IS_ERROR into _IS_ERROR (to prevent redefinition on Windows).
2016-02-01 11:12:28 +03:00
Xinchen Hui
08e5dc461d
Merge branch 'PHP-7.0'
2016-01-29 22:05:59 -08:00
Xinchen Hui
e062759401
Fixed bug #71485 (Return typehint on interanal func causes Fatal error when it throws exception).
2016-01-29 22:05:52 -08:00
Dmitry Stogov
86f54fcdf7
Use special type IS_ERROR instread of EG(error_zval). (we still need EG(error_zval) for SPL support).
2016-01-28 18:00:06 +03:00
Dmitry Stogov
e99fe9865e
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Fixed bug #71474 (Crash because of VM stack corruption on Magento2).
2016-01-28 11:54:48 +03:00
Dmitry Stogov
6039d2d914
Fixed bug #71474 (Crash because of VM stack corruption on Magento2).
2016-01-28 11:41:15 +03:00
Dmitry Stogov
6579e48417
Introduced BIND_STATIC opcode instead of FETCH_R/FETCH_W(static)+ASSIGN/ASSIGN_REF (similar to BIND_GLOBAL).
...
In the future we may refer to static variable by index instead of name, to eliminate hash lookup.
2016-01-12 12:20:35 +03:00
Xinchen Hui
563659822d
Merge branch 'PHP-7.0'
2016-01-02 17:56:54 +08:00
Xinchen Hui
97a9470d97
bump year which is missed in rev 49493a2
2016-01-02 17:56:11 +08:00
Xinchen Hui
3537e95dae
bump year which is missed in rev 49493a2
2016-01-02 17:51:24 +08:00
Nikita Popov
65e456f364
Introduce BIND_LEXICAL
...
This opcodes inserts a local CV into the closure static variable
table. This replaces the previous mechanism of having static
variables marked as LEXICAL, which perform a symtable lookup
during copying.
This means a) functions which contain closures no longer have to
rebuild their symtable (better performance) and b) we can now track
used variables in SSA.
2015-12-29 23:14:53 +01:00
Dmitry Stogov
00a3714e05
Support for optimization introduced in DFA pass (it may change type of instruction return oprand to IS_CV)
2015-12-23 19:02:14 +03:00
Xinchen Hui
70f9ba00f7
This check become useless after 98885bfa1e
2015-12-23 20:56:49 +08:00
Dmitry Stogov
98885bfa1e
Consolidate indirect string offset modification checks (Nikita, Dmitry)
...
Check it once, instead of dozens of times.
2015-12-23 13:52:15 +03:00
Dmitry Stogov
6e6280a388
Corrected error messages:
...
- we don't use NULL for overlaoded objects for ages
- fixed array/object mess
2015-12-22 20:55:11 +03:00
Nikita Popov
88eae43ff9
Remove uses of VARs in extended_value
...
The DECLARE_(ANON_)INHERITED_CLASS(_DELAYED) opcodes were
referencing the parent ce VAR through extended_value. This is
hacky and we can't track the def-use chain in SSA.
To avoid this, the layout of declaration opcodes is changed
as follows: op1 points to the lcname and rtd_key literals, in
that order. (For anon/lambda declarations only one of lcname or
rtd_key is present.) This frees up op2, which is now used to
reference the parent ce VAR in inheriting declarations. The
jmp offset for anon class declarations is moved frop op2 to
extended_value.
The changes were applied both to class and function declarations
to keep everything symmetric.
2015-12-21 14:44:42 +01:00
Dmitry Stogov
1fe8a1dec9
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Fixed possible crash on Zend/tests/bug71154.phpt
2015-12-21 15:58:58 +03:00
Dmitry Stogov
0402f05ba3
Fixed possible crash on Zend/tests/bug71154.phpt
2015-12-21 15:57:53 +03:00
Nikita Popov
679fa3e03d
Merge branch 'PHP-7.0'
2015-12-17 23:23:59 +01:00
Nikita Popov
a917840f38
Fixed iter leak on by-ref foreach over const/tmp array
...
FE_FREE does not unregister the iter for plain arrays. So always
wrap into a REF wrapper, even if not strictly necessary, in
RESET_RW. Alternatively we could use a flag to distinguish plain
positions and interators.
Also added a check for leaked iterators in shutdown_executor.
2015-12-17 23:21:48 +01:00
Dmitry Stogov
fe1c4e033f
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Fixed incorrect exception handling
2015-12-17 14:17:01 +03:00
Dmitry Stogov
9e44b6a61e
Fixed incorrect exception handling
2015-12-17 14:16:19 +03:00
Nikita Popov
56f1106162
Use FETCH_CLASS_EXCEPTION for instanceof
...
This does not collide with NO_AUTOLOAD -- missing classes will be
silenced, but invalid use of self etc will result in an exception
instead of a fatal error.
2015-12-14 17:50:20 +01:00
Nikita Popov
7078627d22
Fix leaks due to UNUSED CE fetch
2015-12-14 17:31:37 +01:00
Nikita Popov
0919178963
Add result op for ASSERT_CHECK to fix SSA
...
Otherwise one source of the phi node at the join point will be
borked.
I'm marking the ASSERT_CHECK result as unused in pass2, which is
a bit ugly.
2015-12-14 12:31:00 +01:00
Nikita Popov
e8864c39e8
Don't check non-CVs for UNDEF in BOOL(_NOT)
2015-12-14 00:32:40 +01:00
Nikita Popov
2589dd121e
Drop superfluous assignment
...
And fix a branch annotation.
2015-12-12 23:21:36 +01:00
Nikita Popov
8e5e3301a1
Make ZEND_CLONE return a TMP_VAR
...
As the return value can't be reference and it's unlikely to be
unused.
Also remove some unnecessary checks for ce==NULL. A ce is required
nowadays.
2015-12-10 22:16:25 +01:00
Nikita Popov
3d4a2d2002
Merge branch 'PHP-7.0'
...
Conflicts:
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
2015-12-10 18:24:29 +01:00
Nikita Popov
37f3425263
Fix Foo::${42} and similar
...
Fixes segfault on direct use, segfault on opcache evaluated use,
leak on temporary use.
Fixes analogeous segfault for ${42} on opcache eval as well.
2015-12-10 18:14:40 +01:00
Dmitry Stogov
a75c195000
Implemented the RFC Support Class Constant Visibility
.
...
Squashed commit of the following:
commit f11ca0e7a5
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Dec 8 12:38:42 2015 +0300
Fixed test expectation
commit 211f873f54
Author: Dmitry Stogov <dmitry@zend.com>
Date: Tue Dec 8 12:28:38 2015 +0300
Embed zend_class_constant.flags into zend_class_constants.value.u2.access_flags
commit 51deab84b2
Author: Dmitry Stogov <dmitry@zend.com>
Date: Mon Dec 7 11:18:55 2015 +0300
Fixed issues found by Nikita
commit 544dbd5b47
Author: Dmitry Stogov <dmitry@zend.com>
Date: Sat Dec 5 02:41:05 2015 +0300
Refactored immplementation of https://wiki.php.net/rfc/class_const_visibility
@reeze created an RFC here and I emailed internals here and didn't get any responses positive/negative.
2015-12-08 12:40:42 +03:00
Dmitry Stogov
868c3775c6
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Fixed bug #70997 (When using parentClass:: instead of parent::, static context changed)
2015-11-30 16:54:37 +03:00
Dmitry Stogov
25c5d185fc
Fixed bug #70997 (When using parentClass:: instead of parent::, static context changed)
2015-11-30 16:52:57 +03:00
Xinchen Hui
7d80ab2e12
Addtional fixes of #70918
2015-11-16 18:19:22 +08:00
Xinchen Hui
06fe956460
Fixed Bug #70918 (Segfault using static outside of class scope)
2015-11-14 18:41:55 -08:00
Dmitry Stogov
3a5fa926bf
Squashed commit of the following:
...
commit afe963e6cc289696e60c6c679796ba2197c52b3b
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Nov 13 15:32:29 2015 +0300
Added news entry
commit a126b891c97848dd7ef8f1abf716328c46e0f19c
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Nov 13 15:29:21 2015 +0300
VERIFY_RETURN_TYPE doesn't have to cleanup operand on exception, bacause now, live temporary variables are released by exception unwinder.
commit 0db475e98786e6bcaa8401ee3e0b33743b9a2f2b
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Nov 12 22:55:39 2015 +0300
Fixed copy/paste
commit 0ac73fe7174bec9de9a610319a98b259bea67f7f
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Nov 11 16:11:50 2015 +0300
Fixed bug #62210 (Exceptions can leak temporary variables)
2015-11-13 15:35:07 +03:00
Dmitry Stogov
948b7f5421
Changed ZEND_FREE.op2.num and ZEND_FE_FREE.op2.num back to use live_range_offset (try_catch_offset does't work)
2015-11-11 11:12:44 +03:00
Dmitry Stogov
71092b7c2b
Make FE_FETCH and following assignments to be a part of a loop.
2015-11-10 20:11:05 +03:00
Dmitry Stogov
86a96f2cf1
Changed meaning of "op2" for ZEND_FREE, ZEND_FE_FREE, ZEND_FAST_CALL, ZEND_FAST_RET.
...
Previously it was an instruction number.
Now it's an index in op_array->try_cacth_array[].
2015-11-10 19:13:54 +03:00
Dmitry Stogov
6fe457f323
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Fixed incorrect order of free/finally on exception
2015-11-10 10:11:46 +03:00
Dmitry Stogov
d66d1b97aa
Fixed incorrect order of free/finally on exception
2015-11-10 10:10:39 +03:00
Xinchen Hui
a4a767e6da
Merge branch 'PHP-7.0'
...
Conflicts:
Zend/zend_vm_execute.h
2015-11-03 17:56:05 -08:00
Xinchen Hui
2f2653aa77
Fixed bug #70805 (Segmentation faults whilst running Drupal 8 test suite)
2015-11-03 17:53:56 -08:00