History log of /PHP_TRUNK/ext/opcache/Optimizer/block_pass.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c2c78dc 25-Feb-2015 Dmitry Stogov <dmitry@zend.com> Added specialized versions of DO_FCALL handler:
DO_ICALL - for internal functions
DO_UCALL - for user functions
DO_FCALL_BY_NAME - plain, most probably user, funcstions (not methods)
/php-src/ext/opcache/Optimizer/block_pass.c
97fe15d 12-Feb-2015 Dmitry Stogov <dmitry@zend.com> Fix "forech" statemt behaviour according to https://wiki.php.net/rfc/php7_foreach

Squashed commit of the following:

commit 1e41295097576dbce6c197ddb7507c07ccae3cbe
Author: Dmitry Stogov <dmitry@zend.com>
Date: Sat Jan 31 07:28:58 2015 +0300

Generalize HashTableIterator API to allows its usage without involvement of HashTable.nInternalPonter

commit 5406f21b11e563069d64045e599693b51c444b63
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 18:08:43 2015 +0300

Reduced alghorithms complexity

commit b37f1d58d2a141b6e1d980a461ccb588d4317d2e
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 18:08:30 2015 +0300

Fixed test name

commit fb2d079645829b12ed4e55a461034df6400bc430
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 18:08:05 2015 +0300

API cleanup

commit 08302c0d6d1cab279b9f2129df03a057baddf2ff
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 14:20:46 2015 +0300

Make array_splice() to preserve foreach hash position

commit cc4b7be41e2e2b9b0d7a3c8e98466b8886692e6e
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 12:24:31 2015 +0300

Make internal function, operation on array passed by reference, to preserve foreach hash position

commit 5aa9712b0a30303aadfe3bdd8ae1f072ca3e6ba1
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 09:49:35 2015 +0300

Implement consistent behavior for foreach by value over plain object

commit 4c5b385ff53ae9f0b52572e98c4db801f56603b0
Author: Dmitry Stogov <dmitry@zend.com>
Date: Fri Jan 30 07:56:37 2015 +0300

More careful iterators update.

commit 721fc9e80d2ee8f2cd79c8c3cdceffae2c72de92
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jan 29 21:43:28 2015 +0300

Added new test

commit 15a23b1218b3e38630d677751a975907daa2cd54
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jan 29 21:05:02 2015 +0300

Reimplement iteration magic with HashTableIterators (see https://wiki.php.net/rfc/php7_foreach#implementation_details)

commit 10a3260b1f16b6075fd8140f673dfef4d5efea91
Author: Dmitry Stogov <dmitry@zend.com>
Date: Thu Jan 29 21:04:44 2015 +0300

New test

commit eef80c583762d1e98d177cdbb27e3a8a6b0c4539
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jan 28 16:52:21 2015 +0300

Fixed foreach by reference iteration over constant array

commit 61e739187391661e2d541947bec25d7dcc4479f3
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jan 28 14:59:54 2015 +0300

Fixed temporary variable re-allocation pass

commit 92e90c09f085c22707ff4a59201f016f56e0ef8b
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jan 28 12:44:57 2015 +0300

Fixed operand destruction in case of exceptions in iterator

commit dd2a36a2074bbb0cb31de00b66dcf2812d6d753f
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jan 28 10:02:34 2015 +0300

Use GET_OP1_ZVAL_PTR_DEREF() (IS_TMP_VAR and IS_CONST can't be IS_REFERENCE)

commit 4638f7b91407c48710007af82a68da0007c820f2
Author: Dmitry Stogov <dmitry@zend.com>
Date: Wed Jan 28 07:43:28 2015 +0300

Change "foreach" statement behavior (this is just a PoC yet)

- "foreach by value" don't relay on internal array/object pointer and doesnt perform array duplication. It just locks it incrementing reference counter. If the original array is modified by some code, the copy on write is performed and "foreach" still work with the old copy.

- it makes no difference if array given to "foreach by value" is reference itself

- "foreach by reference" still use internal array/object pointer and should work similar to PHP-5. (This id not completely implemented)
/php-src/ext/opcache/Optimizer/block_pass.c
201f660 22-Jan-2015 Xinchen Hui <laruence@php.net> Merge branch 'PHP-5.6'
d0928b7 22-Jan-2015 Xinchen Hui <laruence@php.net> Merge branch 'PHP-5.5' into PHP-5.6
251745c 22-Jan-2015 Xinchen Hui <laruence@php.net> Fixed segfault while running with moodle
/php-src/ext/opcache/Optimizer/block_pass.c
22ac15e 19-Jan-2015 Dmitry Stogov <dmitry@zend.com> Improve optimization of CONCAT/ADD_STRING/ADD_CJAR sequences
/php-src/ext/opcache/Optimizer/block_pass.c
fc33f52 15-Jan-2015 Xinchen Hui <laruence@php.net> bump year
/php-src/ext/opcache/Optimizer/block_pass.c
b7a7b1a 03-Jan-2015 Stanislav Malyshev <stas@php.net> trailing whitespace removal
/php-src/ext/opcache/Optimizer/block_pass.c
aa5b3b0 09-Jan-2015 Xinchen Hui <laruence@php.net> Merge branch 'PHP-5.6'
0547edb 09-Jan-2015 Xinchen Hui <laruence@php.net> Fixed bug (try block removed while combined with xdebug)
/php-src/ext/opcache/Optimizer/block_pass.c
0f81564 05-Dec-2014 Nikita Popov <nikic@php.net> Drop ZEND_PRINT opcode in favor of ZEND_ECHO

The return value long(1) is an IS_CONST operand now.
/php-src/ext/opcache/Optimizer/block_pass.c
e112f6a 14-Dec-2014 Anatol Belski <ab@php.net> second shot on removing TSRMLS_*
/php-src/ext/opcache/Optimizer/block_pass.c
bdeb220 13-Dec-2014 Anatol Belski <ab@php.net> first shot remove TSRMLS_* things
/php-src/ext/opcache/Optimizer/block_pass.c
303d73e 26-Nov-2014 Dmitry Stogov <dmitry@zend.com> Reimplemented silence operator (@) handling on exceptions. Now each silence region is stored in op_array->brk_cont_array. On exception ZEND_HANDLE_EXCEPTION handler traverse this array and restore original EG(error_reporting) if exception occured inside a "silence" region.
/php-src/ext/opcache/Optimizer/block_pass.c
ab539e1 20-Oct-2014 Dmitry Stogov <dmitry@zend.com> Removed old irrelevant comment
/php-src/ext/opcache/Optimizer/block_pass.c
7c7b918 05-Oct-2014 Dmitry Stogov <dmitry@zend.com> Fixed list() behavior inconsistency (string handling is disabled for all cases, ArrayAccess objects handling is enabled for all cases, ZEND_FETCH_DIM_TMP_VAR opcode is renamed into ZEND_FETCH_LIST, ZEND_FETCH_ADD_LOCK flag is removed).
/php-src/ext/opcache/Optimizer/block_pass.c
67a11b6 29-Sep-2014 Nikita Popov <nikic@php.net> Drop unused INIT_STRING opcode

INIT_STRING has been implemented as an UNUSED op1 to ADD_* for
some time now.
/php-src/ext/opcache/Optimizer/block_pass.c
5bd34be 27-Sep-2014 Nikita Popov <nikic@php.net> Opcache compatibility for coalesce operator
/php-src/ext/opcache/Optimizer/block_pass.c
06103d6 23-Sep-2014 Dmitry Stogov <dmitry@zend.com> Use zval_ptr_dtor_nogc() to free IS_TMP_VAR operands.
Removed ZEND_SWITCH_FREE opcode (ZEND_FREE used instead).
/php-src/ext/opcache/Optimizer/block_pass.c
d244d3b 22-Sep-2014 Dmitry Stogov <dmitry@zend.com> Fixed typo
/php-src/ext/opcache/Optimizer/block_pass.c
3bc8a95 19-Sep-2014 Dmitry Stogov <dmitry@zend.com> Fixed useless or duplicated IS_INTERNED() checks
/php-src/ext/opcache/Optimizer/block_pass.c
82096dc 10-Sep-2014 Dmitry Stogov <dmitry@zend.com> Removed ZEND_QM_ASSIGN_VAR and ZEND_JMP_SET_VAR opcodes (in PHPNG they did exacly the same as ZEND_QM_ASSIGN and ZEND_JMP_SET)
/php-src/ext/opcache/Optimizer/block_pass.c
234af84 28-Aug-2014 Dmitry Stogov <dmitry@zend.com> Refactored optimizer (compile different opimizer passes separately, instead of including *.c file)
/php-src/ext/opcache/Optimizer/block_pass.c
ee552b6 27-Aug-2014 Dmitry Stogov <dmitry@zend.com> Reorder fields for better nenory consumtion and data locality on 64-bit systems
/php-src/ext/opcache/Optimizer/block_pass.c
6f9f0bf 25-Aug-2014 Anatol Belski <ab@php.net> master renames phase 2
/php-src/ext/opcache/Optimizer/block_pass.c
c3e3c98 25-Aug-2014 Anatol Belski <ab@php.net> master renames phase 1
/php-src/ext/opcache/Optimizer/block_pass.c
63d3f0b 19-Aug-2014 Anatol Belski <ab@php.net> basic macro replacements, all at once
/php-src/ext/opcache/Optimizer/block_pass.c
101c055 15-Aug-2014 Xinchen Hui <laruence@php.net> Add copyright header
/php-src/ext/opcache/Optimizer/block_pass.c
e2522b4 15-Aug-2014 Xinchen Hui <laruence@php.net> Remove old version PHP supports
/php-src/ext/opcache/Optimizer/block_pass.c
b7715c7 30-Jun-2014 Dmitry Stogov <dmitry@zend.com> Refactored parameter passing mechanism.

In PHP-5.6 and below each argument passed to user function was copies on VM stack twice.
Now we always have ZEND_INIT_FCALL (or simular) opcode that pushes "call frame" on top of VM stack.
"Call frame" is actually the same zend_execute_data structure.
All the following ZEND_SEND instructions push arguments on top of the stack in a way that they directly comes into corresponding CV variables of the called frame. Extra arguments are copied at the end of stack frame (after all CV and TMP variables) on function enterance.

There are two minor incompatibilities:
1) It's not allowed to decalre functions redefining arguments e.g. "function foo($a,$a) {}".
2) func_get_arg() and func_get args() return the current value of argument and not the original value that was sent.
/php-src/ext/opcache/Optimizer/block_pass.c
87b6672 20-Jun-2014 Dmitry Stogov <dmitry@zend.com> Code cleanup
/php-src/ext/opcache/Optimizer/block_pass.c
a4f3819 18-Jun-2014 Dmitry Stogov <dmitry@zend.com> Use arena allocator for optimizer temporary data structures
/php-src/ext/opcache/Optimizer/block_pass.c
eb5c613 17-May-2014 Xinchen Hui <laruence@gmail.com> Fixed Zend Hash API usage (although it's in comments)
/php-src/ext/opcache/Optimizer/block_pass.c
feeebc2 17-May-2014 Dmitry Stogov <dmitry@zend.com> Fixed new hash API usage
/php-src/ext/opcache/Optimizer/block_pass.c
17d027e 30-Apr-2014 Dmitry Stogov <dmitry@zend.com> Split IS_BOOL into IS_FALSE and IS_TRUE
/php-src/ext/opcache/Optimizer/block_pass.c
afe66d8 21-Apr-2014 Dmitry Stogov <dmitry@zend.com> Cleanup
/php-src/ext/opcache/Optimizer/block_pass.c
3434d3f 17-Apr-2014 Dmitry Stogov <dmitry@zend.com> Optimize CASE(TRUE, X) into BOOL(X) (this pattern affects wordpress)
/php-src/ext/opcache/Optimizer/block_pass.c
c92dd8e 17-Apr-2014 Dmitry Stogov <dmitry@zend.com> Fixed ZEND_CAST related optimizations (now it returns IS_VAR instead of IS_TMP_VAR)
/php-src/ext/opcache/Optimizer/block_pass.c
76cc99f 03-Apr-2014 Dmitry Stogov <dmitry@zend.com> Refactored ZVAL flags usage to simplify various checks (e.g. Z_REFCOUNTED(), candidate for GC, etc)
/php-src/ext/opcache/Optimizer/block_pass.c
fd4d11e 31-Mar-2014 Dmitry Stogov <dmitry@zend.com> fixes
/php-src/ext/opcache/Optimizer/block_pass.c
7465be4 31-Mar-2014 Dmitry Stogov <dmitry@zend.com> Optimizer related fixes (incomplete)
/php-src/ext/opcache/Optimizer/block_pass.c
5324f22 28-Mar-2014 Dmitry Stogov <dmitry@zend.com> ext/opcache refactoring (incomplete)
/php-src/ext/opcache/Optimizer/block_pass.c
3458dac 13-Jan-2014 Dmitry Stogov <dmitry@zend.com> Merge branch 'PHP-5.6'

* PHP-5.6:
Fixed bug #66471 (Keep backward compatibility)
ca55024 13-Jan-2014 Dmitry Stogov <dmitry@zend.com> Fixed bug #66471 (Keep backward compatibility)
/php-src/ext/opcache/Optimizer/block_pass.c
aab2e8e 12-Jan-2014 Dmitry Stogov <dmitry@zend.com> Merge branch 'PHP-5.6'

* PHP-5.6:
Fixed bug #66474 (Optimizer bug in constant string to boolean conversion)
d09d64c 12-Jan-2014 Dmitry Stogov <dmitry@zend.com> Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
Fixed bug #66474 (Optimizer bug in constant string to boolean conversion)

Conflicts:
NEWS
fcd7569 12-Jan-2014 Dmitry Stogov <dmitry@zend.com> Fixed bug #66474 (Optimizer bug in constant string to boolean conversion)
/php-src/ext/opcache/Optimizer/block_pass.c
b11b3d2 18-Dec-2013 Bob Weinand <bobwei9@hotmail.com> Fixed ZTS build. Needed to bump API version number.
/php-src/ext/opcache/Optimizer/block_pass.c
d14670c 18-Dec-2013 Kalle Sommer Nielsen <kalle@php.net> Eliminate another TSRMLS_FETCH() in i_zend_is_true()

# Affected extensions have all been updated, ext/opcache and ext/zip
# both have macros for cross version compatibility
/php-src/ext/opcache/Optimizer/block_pass.c
e713259 26-Nov-2013 Dmitry Stogov <dmitry@zend.com> Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
Fixed bug #66176 (Invalid constant substitution)
Fixed bug #66176 (Invalid constant substitution)
d79dd9c 26-Nov-2013 Dmitry Stogov <dmitry@zend.com> Fixed bug #66176 (Invalid constant substitution)
/php-src/ext/opcache/Optimizer/block_pass.c
27524b5 26-Nov-2013 Dmitry Stogov <dmitry@zend.com> Fixed bug #66176 (Invalid constant substitution)
/php-src/ext/opcache/Optimizer/block_pass.c
0999d85 26-Nov-2013 Dmitry Stogov <dmitry@zend.com> Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
Fixed bug #66176 (Invalid constant substitution)

Conflicts:
NEWS
d85ac7f 26-Nov-2013 Dmitry Stogov <dmitry@zend.com> Fixed bug #66176 (Invalid constant substitution)
/php-src/ext/opcache/Optimizer/block_pass.c
0d7a638 26-Sep-2013 Nikita Popov <nikic@php.net> Implement variadic function syntax

As per RFC: https://wiki.php.net/rfc/variadics
/php-src/ext/opcache/Optimizer/block_pass.c
46f18cc 16-Sep-2013 Xinchen Hui <laruence@php.net> Fixed bug #65665 (Exception not properly caught when opcache enabled)
/php-src/ext/opcache/Optimizer/block_pass.c
1c67a99 26-Aug-2013 Dmitry Stogov <dmitry@zend.com> Fixed compilation warning
/php-src/ext/opcache/Optimizer/block_pass.c
cb17c99 30-Jul-2013 Dmitry Stogov <dmitry@zend.com> Improved implementation of NOP removal pass from O(n^2) to O(n) (hnw)
/php-src/ext/opcache/Optimizer/block_pass.c
4b83f4a 29-Apr-2013 Dmitry Stogov <dmitry@zend.com> Avoid possible conditional jump depended on uninitialised value
/php-src/ext/opcache/Optimizer/block_pass.c
e270396 10-Apr-2013 Dmitry Stogov <dmitry@zend.com> Fixed support for PHP-5.3
/php-src/ext/opcache/Optimizer/block_pass.c
7845f49 10-Apr-2013 Dmitry Stogov <dmitry@zend.com> Numeric string constants used as array indeces have to be converted to long at compile time
/php-src/ext/opcache/Optimizer/block_pass.c
2b28f29 09-Apr-2013 Dmitry Stogov <dmitry@zend.com> Fixed CFG construction bugs
/php-src/ext/opcache/Optimizer/block_pass.c
23b44e7 01-Apr-2013 Dmitry Stogov <dmitry@zend.com> Fixed ZTS build
/php-src/ext/opcache/Optimizer/block_pass.c
74f158f 01-Apr-2013 Dmitry Stogov <dmitry@zend.com> Fixed issue #79 (Optimization Problem/Bug)
/php-src/ext/opcache/Optimizer/block_pass.c
987dee9 24-Mar-2013 Dmitry Stogov <dmitry@zend.com> Fixed PHP-5.2 ZTS compatibility
/php-src/ext/opcache/Optimizer/block_pass.c
e00b04a 16-Mar-2013 Dmitry Stogov <dmitry@zend.com> Fixed memory leaks
/php-src/ext/opcache/Optimizer/block_pass.c
34d3202 15-Mar-2013 Dmitry Stogov <dmitry@zend.com> Merge Zend Optimizer+

git-subtree-dir: ext/opcache
git-subtree-mainline: b1dbfb73571b051fef055dc371e05163cf73eb8b
git-subtree-split: 8d35170c5fe9b9c0c864b7a6c4dc6b0149809569