Commit Graph

944 Commits

Author SHA1 Message Date
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
Xinchen Hui
cb1db49d0a Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed info while setting opcache.file_cache_only
  Drop extra line
  Add CVE for #71105 (PHP 7.0.1)
2015-12-29 15:49:52 +08:00
Xinchen Hui
3f07a256f7 Fixed info while setting opcache.file_cache_only 2015-12-29 15:49:10 +08:00
Nikita Popov
d77b74a1f3 Use ZEND_HASH_FOREACH 2015-12-26 23:43:33 +01:00
Nikita Popov
33870c525a Don't reuse SSA var in UNSET_VAR
Instead use the SSA var that UNSET_VAR actually defines. Otherwise
we get issues trying to DCE unsets.
2015-12-26 23:33:58 +01:00
Dmitry Stogov
b3d0178915 Rearrange code to enable inner precedure inference 2015-12-24 19:05:27 +03:00
Dmitry Stogov
b4def0ee88 Added call-graph analyses 2015-12-24 14:30:41 +03:00
Dmitry Stogov
3d88a64e0c Add another DFA optimization pattern (ASSIGN -> QM_ASSING) 2015-12-24 11:06:02 +03:00
Dmitry Stogov
28a016a6dc Fixed SSA construction for CFG with unreachable BB 2015-12-23 03:52:38 +03:00
Dmitry Stogov
1e3ab15843 Fixed test on 32-bit systems 2015-12-23 03:52:01 +03:00
Dmitry Stogov
e82a73573b Remove live-range if the corresponding definition is deleted 2015-12-23 03:46:40 +03:00
Dmitry Stogov
dd3cb33ef0 Support for incompletely constructed SSA 2015-12-23 03:20:28 +03:00
Nikita Popov
fdfbeeb296 Always create ARRAY_ELEM ssa var for ELEM_REF 2015-12-22 23:08:26 +01:00
Dmitry Stogov
5c1c8f1dec Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed incorrect setting on 32-bit systems
2015-12-22 21:33:07 +03:00
Dmitry Stogov
f3bf95eb81 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed incorrect setting on 32-bit systems
2015-12-22 21:32:45 +03:00
Dmitry Stogov
a57a08e791 Fixed incorrect setting on 32-bit systems 2015-12-22 21:31:28 +03:00
Dmitry Stogov
a75c6d5fb2 Skip "useless" SSA variables for INIT_ARRAY, ADD_ARRAY_ELEMENT, FE_RESET_R 2015-12-22 17:35:08 +03:00
Dmitry Stogov
b4b6d58990 Add ability to prevent "useless" SSA variable creation for "refcounting inference". 2015-12-22 16:43:37 +03:00
Dmitry Stogov
83cd828469 Make RC1/RCN inference more accurate (it's probably not 100% correct anyway) 2015-12-22 15:35:17 +03:00
Dmitry Stogov
d952eb753c Get rid of MAY_BE_DEF 2015-12-21 19:46:55 +03:00
Dmitry Stogov
ae303cf82f Split MAY_BE_NULL from MAY_BE_UNDEF 2015-12-21 18:39:24 +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
Nikita Popov
420ff42bc0 Protect against overflows in pi constraints 2015-12-20 12:56:05 +01:00
Nikita Popov
0da1378a88 long -> zend_long in range inference 2015-12-20 00:06:12 +01:00
Nikita Popov
549d7d4876 Fix Pi constraint for -LONG_MIN adjustments
-LONG_MIN == LONG_MIN so bad things will happen.
Example of JIT miscompile:

    function test($n) {
	if ($n + PHP_INT_MIN == 0) {
	    $n2 = (int) ($n + PHP_INT_MAX);
	    var_dump($n2);
	}
    }
    test(PHP_INT_MAX + 1);
2015-12-20 00:06:12 +01:00
Nikita Popov
c9ea8fef96 Extrace find_adjusted_tmp_var() function
This code was duplicated for op1 and op2
2015-12-20 00:06:12 +01:00
Nikita Popov
fc68094497 Simplify bf/bt computation in pi placement
The meaning of the successors is well-defined, no need to check it.
2015-12-20 00:03:52 +01:00
Nikita Popov
d7424a5b04 Fix typo in pi placement 2015-12-20 00:03:52 +01:00
Nikita Popov
7cc3089d8f Clone cannot return reference 2015-12-18 17:37:13 +01:00
Nikita Popov
8ca21876e1 Fix zend_get_func_info() 2015-12-18 17:37:13 +01:00
Dmitry Stogov
8136e4572e Fixed dump format 2015-12-18 17:18:13 +03:00
Dmitry Stogov
f9b5345a98 Fixed compilation 2015-12-18 16:53:31 +03:00
Xinchen Hui
af871f61dc Merge branch 'PHP-7.0'
* PHP-7.0:
  Improved fix for #71127
2015-12-18 17:42:11 +08:00
Xinchen Hui
2f47e9872e Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Improved fix for #71127

Conflicts:
	ext/opcache/Optimizer/pass1_5.c
2015-12-18 17:41:42 +08:00
Xinchen Hui
40702799b5 Improved fix for #71127 2015-12-18 17:37:40 +08:00
Xinchen Hui
d8fc37693a Merge branch 'PHP-7.0' 2015-12-17 14:32:17 +08:00
Xinchen Hui
9374977d21 Merge branch 'PHP-5.6' into PHP-7.0
Conflicts:
	ext/opcache/Optimizer/pass1_5.c
2015-12-17 14:30:00 +08:00
Xinchen Hui
940c68b55d Fixed bug #71127 (Define in auto_prepend_file is overwrite) 2015-12-17 14:27:33 +08:00
Dmitry Stogov
74daa98974 Added simple DFA optimisation pattern (just to prove the concept) 2015-12-16 13:14:31 +03:00
Dmitry Stogov
9044f491cc Use do_alloca() instead of alloca() 2015-12-16 04:59:05 +03:00
Dmitry Stogov
e797871319 Fallbuck to simple dump format if CFG wasn't constructed 2015-12-16 04:57:51 +03:00
Dmitry Stogov
c88ffa9a56 Added e-SSA based DFA optimisation framework (incomplete) 2015-12-16 00:49:44 +03:00
Sebastian Bergmann
29a2c64339 Fugbix typo 2015-12-15 09:16:46 +01:00
Bob Weinand
6694ecdb9d Fix live_range updates on ZEND(_FE)_FREE opcodes in block_pass 2015-12-14 23:40:28 +01:00
Rasmus Lerdorf
a63f33b282 Support uwsgi sapi in opcache 2015-12-14 06:11:00 -08:00
Rasmus Lerdorf
56bf10f0bd Support uwsgi sapi in opcache 2015-12-14 06:10:26 -08:00
Rasmus Lerdorf
9a31d70845 Support uwsgi sapi in opcache 2015-12-14 06:09:17 -08:00
Nikita Popov
d5597fa01f Merge branch 'PHP-7.0' 2015-12-14 00:29:57 +01:00
Nikita Popov
7dc5bc5063 Do not swap operands in array addition
As we support constant array operands nowadays, the original check
didn't work anymore.
2015-12-14 00:29:05 +01:00
Anatol Belski
157d0372e0 backported 7c981192eb from 7.0
the way it doesn't hurt BC
2015-12-11 17:39:57 +01:00
Dmitry Stogov
1fdb63fbd9 ws fixes 2015-12-11 17:40:23 +03:00
Dmitry Stogov
21ba287c3c dos2unix 2015-12-11 17:29:42 +03:00
Dmitry Stogov
f243aaf985 Added e-SSA based DFA optimisation framework (incomplete) 2015-12-11 17:24:55 +03:00
Dmitry Stogov
061a90f8d1 Describe special meaning of IS_UNUSED oprerand 2015-12-11 02:31:28 +03:00
Dmitry Stogov
dc36810993 Use more compact description encoding schema to free some bits 2015-12-11 01:45:26 +03:00
Dmitry Stogov
cba1a8498c Improve Optimizer debugging facility (print the meaning of extended_value) 2015-12-11 00:47:02 +03: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
798d168d73 Make update_opN_const implementation symmetric
So the main structure is the same...
2015-12-10 18:18:10 +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
3b5c844757 Initialize bitset before processing the seconf BB (we skip the first one) 2015-12-10 11:29:53 +03:00
Dmitry Stogov
fd20e6cee6 Apply local optimizatons to extended bacic block (this allows some optimizarions across few following BBs). 2015-12-10 01:17:35 +03:00
Dmitry Stogov
7fd7734e58 Explain the disabled optimization pattern 2015-12-09 22:22:07 +03:00
Dmitry Stogov
4fd30c9565 Improve debugging of non-local variables 2015-12-09 17:21:57 +03:00
Dmitry Stogov
d2597ad20b Improved optimizer dubugging facility 2015-12-09 14:52:00 +03:00
Dmitry Stogov
78fb8118ec Merge branch 'PHP-7.0'
* PHP-7.0:
  More verbose error messages
2015-12-09 13:35:31 +03:00
Dmitry Stogov
4b16082e94 More verbose error messages 2015-12-09 13:34:45 +03:00
Dmitry Stogov
d6f3d4b50c Fixed formating 2015-12-09 13:27:31 +03:00
Dmitry Stogov
44c5fbbc07 Fixed other issues with empty block handling 2015-12-09 10:58:42 +03:00
Xinchen Hui
245a8c3cdf end is unsigned, this was broken if start == end == 0 2015-12-09 12:18:25 +08:00
Dmitry Stogov
404e003cf1 Delete empty live-ranges 2015-12-09 05:16:30 +03:00
Dmitry Stogov
2cc2396f84 Fixed compilation with enabled internal debuging 2015-12-08 18:12:02 +03:00
Bob Weinand
a11805a4d9 PHP_MD5_CTX is now always used due to fix for #71204 2015-12-08 15:23:14 +01:00
Bob Weinand
d7928aae0a PHP_MD5_CTX is now always used due to fix for #71204 2015-12-08 15:22:25 +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
Anatol Belski
4aec8bcfa9 Merge branch 'PHP-7.0'
* PHP-7.0:
  update NEWS
  Fixed bug #71024 Unable to use PHP 7.0 x64 side-by-side with PHP 5.6 x32 on the same server
2015-12-07 22:55:24 +01:00
Anatol Belski
7c981192eb Fixed bug #71024 Unable to use PHP 7.0 x64 side-by-side with PHP 5.6 x32 on the same server 2015-12-07 22:53:35 +01:00
Dmitry Stogov
3d8fdd5d6e Fixed potential memory leaks 2015-12-07 18:25:25 +03:00
Xinchen Hui
badce8c49a Merge branch 'PHP-7.0' 2015-12-01 10:35:48 +08:00
Xinchen Hui
ed4b887cf6 Fixed bug #70991 (zend_file_cache.c:710: error: array type has incomplete element type) 2015-12-01 10:35:32 +08:00
Xinchen Hui
cb5af748b1 Merge branch 'PHP-7.0' 2015-11-27 19:12:37 -08:00
Xinchen Hui
5af61aa1cc Space 2015-11-27 19:12:26 -08:00
Xinchen Hui
f9a56e00f6 Merge branch 'PHP-7.0' 2015-11-27 07:31:19 -08:00
Xinchen Hui
e9a8d7ff1d Fixed bug #70977, #70973 (Segmentation fault with opcache.huge_code_pages=1) 2015-11-27 07:30:37 -08:00
Dmitry Stogov
2e6cf2710a Fixed compilation warning 2015-11-26 11:27:24 +03:00
Xinchen Hui
07a05836de Merge branch 'PHP-7.0' 2015-11-25 20:20:51 +08:00
Xinchen Hui
9376e8213c ZEND_SPACESHIP supports 2015-11-25 20:20:05 +08:00
Xinchen Hui
1e9fcb49ac conflicts variable name 2015-11-20 19:03:18 -08:00
Dmitry Stogov
4d49736155 cleanup 2015-11-21 01:19:45 +03:00
Dmitry Stogov
02fad0414b Fixed wrong BB.flags initialization 2015-11-20 23:32:27 +03:00
Dmitry Stogov
b3393baa5d Refactored CFG based optimization using new CFG representation.
Squashed commit of the following:

commit 907533390678f58eac738040ef62a40788048bef
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Nov 20 21:25:28 2015 +0300

    cleanup

commit 82f7e6f5bb434f12e9fdf45f597be351527f383c
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Nov 20 21:22:01 2015 +0300

    Update build system

commit 8fd83d843fde3f486692de4e2c6b7d64d4192704
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Nov 20 20:50:32 2015 +0300

    Reachable blocks can't be empty

commit 5822a36269833930a35cb3547222357118b11310
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Nov 20 19:11:02 2015 +0300

    added missing constraints

commit 2d0c00b243479924de0260ae8d80d624c36994a3
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Nov 20 19:03:12 2015 +0300

    optimization

commit 29d1e5eb210c51b052cac4d6c232aaa2c724dbbb
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Nov 20 18:34:11 2015 +0300

    Added missing optimization patterns

commit 38dd3b3f2459f5193c742633213f41d78326ea28
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Nov 20 17:47:06 2015 +0300

    zend_optimize_block() refactoring

commit 3dc97bd1f6d433dff0617338382347b6d0c08f84
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Nov 20 14:30:32 2015 +0300

    We don't use CFG back-references anymore

commit 2242c9e0aa741d287146ad43179650796f199f2d
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Nov 20 14:16:03 2015 +0300

    Consistent naming

commit 64f2856716069390ed7703ac88905cebf5e04023
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Nov 20 13:29:32 2015 +0300

    Optimization and separate building of direct CFG from predecessrs calculation

commit 9389be4869b13ec45df5dbd443015d2ac539a347
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Nov 20 10:44:19 2015 +0300

    Use CFG without back references (incomplete, but works)

commit 3d3ecd4b883959cf7b86c33622183295f913924e
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Nov 20 00:50:09 2015 +0300

    Fixed iteration in reverse order

commit 52f7fde0c3dfa4b4591519828ebdb238c2377936
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Nov 19 18:35:09 2015 +0300

    Separate debugging code into zend_dump.c

commit 4193a039ea96bae41baf97c6e458f419e8dbf9c5
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Nov 19 17:22:04 2015 +0300

    Remove unused code

commit 4228fdc57d8d120e1dad4e4d44045fa1a6f06fe0
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Nov 19 17:21:20 2015 +0300

    Remove dead live-ranges only on assembling basic blocks

commit 9a4a7966edf19b92678876f85565700694205598
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Nov 19 15:26:29 2015 +0300

    New CFG representation (incomplete)
2015-11-20 22:06:36 +03:00
Dmitry Stogov
d6308afce9 Proper optmisation of "goto" into the middle of "try" block. 2015-11-19 11:19:06 +03:00
Dmitry Stogov
df63ec564e minor fixes 2015-11-18 23:03:20 +03:00
Dmitry Stogov
104a597113 Eliminate unreachable live ranges 2015-11-18 18:04:02 +03:00
Dmitry Stogov
66b953e022 Eliminate unreachable catch blocks 2015-11-18 15:34:28 +03:00
Dmitry Stogov
af47326b38 Extended Debug info with live-ranges and excepton-table. 2015-11-18 13:14:57 +03:00
Dmitry Stogov
a6cc322b4d Added internal debug log for block pass. 2015-11-18 02:47:39 +03:00
Dmitry Stogov
030fab6233 Two step optimization for JMPZNZ L,L; L: JMPZ L+1; L: JMPNZ L+1. 2015-11-18 02:45:58 +03:00
Dmitry Stogov
854e8ebb4f Move JMPZNZ L,L; L: JMPZ L+1; L: JMPNZ L+1 optimization patterns from zend_jmp_optimization() into zend_optimize_block() because the value of Tsource in zend_jmp_optimization() is inconsistent.
Fixed compilation warnings.
2015-11-17 21:07:01 +03:00
Dmitry Stogov
6cb3d90f0f Skip first basic block (we skiped it before) 2015-11-17 19:02:39 +03:00
Dmitry Stogov
7de190898d cleanup 2015-11-17 11:24:16 +03:00
Dmitry Stogov
8112e34210 cleanup 2015-11-17 09:59:49 +03:00
Dmitry Stogov
843c165735 Don't undo/redo "pass two" for jump targets in opcache optimizer. 2015-11-17 07:15:35 +03:00
Nikita Popov
e02aea5590 Remove no longer applicable optimization
PHP 7 generates CVs inside silenced blocks.
2015-11-14 11:23:31 +01: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
63c4414940 Initialize ctx->optimization_level 2015-11-12 02:46:41 +03:00
Dmitry Stogov
09aa68b294 Break dependency between opcache and optimizer. Remove copatibility macros. 2015-11-12 02:02:24 +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
baf97b1fcc We don't nees zend_op_array->brk_cont_array at run-time anymore.
Move zend_op_array->brk_cont_array into CG(context).brk_cont_array.
Use more compact zend_op_array->live_range instead of zend_op_array->brk_cont_array.
Semantic is kept unchanged.
2015-11-10 21:48:03 +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
Nikita Popov
83b1679b6f Merge branch 'PHP-7.0'
Conflicts:
	ext/opcache/Optimizer/zend_optimizer.c
2015-11-07 17:50:39 +01:00
Nikita Popov
bc3512c1d6 Fix various update_opN_const issues 2015-11-07 17:45:26 +01:00
Nikita Popov
9da456655c Refactor update_op2_const
Combines both switches into one, to avoid having to maintain the same
opcode list twice. This also makes most of the bugs fixed by the next
commit pretty obvious.

No functional change here.
2015-11-07 17:31:09 +01:00
Reeze Xia
568c81809a Merge branch 'PHP-7.0'
* PHP-7.0:
  C99 complain fix
  Update NEWS
  Fixed bug #70876 Segmentation fault when regenerating session id with strict mode
2015-11-07 22:17:10 +08:00
Reeze Xia
c524f43e4f C99 complain fix 2015-11-07 22:15:19 +08:00
Nikita Popov
603c172269 Merge branch 'PHP-7.0'
Conflicts:
	ext/opcache/Optimizer/zend_optimizer.c
2015-11-07 12:09:20 +01:00
Nikita Popov
99d818f1e9 Don't propagate into ops that error on non-string
To properly support this make update_opN_const fallible -- they
are not always called through replace_with_const.
2015-11-07 12:04:51 +01:00
Nikita Popov
00b37e718d Strip leading backslash in update_opN_const 2015-11-07 12:04:51 +01:00
Nikita Popov
632bee4abb Fix update_opX_const lowercasing
It was lowering in-place.
2015-11-07 12:04:51 +01:00
Xinchen Hui
5385478844 Merge branch 'PHP-7.0' 2015-11-04 19:01:31 +08:00
Xinchen Hui
fe0af271c6 Fixed bug #70843 (Segmentation fault on MacOSX with opcache.file_cache_only=1) 2015-11-04 18:59:30 +08:00
Xinchen Hui
1af0118ff8 Merge branch 'PHP-7.0' 2015-10-26 17:29:22 -07:00
Xinchen Hui
008d8b6789 Fixed bug #70656 (require() statement broken after opcache_reset() or a few hours of use) 2015-10-26 17:28:19 -07:00
Xinchen Hui
31553f07f2 Revert "Fixed bug #70656 (require() statement broken after opcache_reset() or a few hours of use)"
This reverts commit 3ef96c2cc6.
2015-10-26 17:26:30 -07:00
Xinchen Hui
0771b46099 Merge branch 'PHP-7.0' 2015-10-26 17:11:16 -07:00
Dmitry Stogov
3e89c883bb Changed ZEND_CLONE->extended_value meaning to relative offset (previously it was absolute opline number) 2015-10-30 14:53:53 +03:00
Dmitry Stogov
4d702c21d0 Merge branch 'PHP-7.0'
* PHP-7.0:
  Don't remap .text segment if huge pages are not available.
2015-10-29 08:45:22 +03:00
Julien Pauli
eb59dd7d81 Don't remap .text segment if huge pages are not available. 2015-10-29 08:44:19 +03:00
Dmitry Stogov
da8e6ec4a5 Fixed incorrect instruction cleanup 2015-10-28 23:10:33 +03:00
Dmitry Stogov
3b44e40277 fixed incorrect bitmask 2015-10-28 21:26:52 +03:00
Dmitry Stogov
eb7be5379d Speed up fetching of class entries for self:: parent:: and static::
This is generalized solution for Bob's idea of speed up self::method() calls without ZEND_FETCH_CLASS.

At first, it adds few new opcodes to separate class related behaviour:
	FETCH_STATIC_PROP_R
	FETCH_STATIC_PROP_W
	FETCH_STATIC_PROP_RW
	FETCH_STATIC_PROP_FUNC_ARG
	FETCH_STATIC_PROP_UNSET
	FETCH_STATIC_PROP_IS
	UNSET_STATIC_PROP
	ISSET_ISEMPTY_STATIC_PROP
	FETCH_CLASS_CONSTANT

At seconds, it enables IS_UNUSED operand to fetch (self, parent or static without separate FETCH_CLASS) for new opcodes and the following ones:
	INIT_STATIC_METHOD_CALL
	NEW
	END_INSTANCEOF

Finaly, opcache optimizer had to be fixed to support new opcodes.
2015-10-28 21:26:52 +03:00
Xinchen Hui
3ef96c2cc6 Fixed bug #70656 (require() statement broken after opcache_reset() or a few hours of use) 2015-10-26 17:09:42 -07:00
Anatol Belski
ccc95bf9df backport 262160e and 2d55e8c into 5.6 2015-10-20 20:05:44 +02:00
Xinchen Hui
d4df6641c8 Fixed bug #70724 (Undefined Symbols from opcache.so on Mac OS X 10.10) 2015-10-17 01:52:32 -07:00
Anatol Belski
ffb5d0aca3 Implemented file_cache_fallback mechanism
which is essential as an attempt to fix the "failed to reattach"
error on Windows. If file_cache is enabled, Opcache will
automaticaly switch to file_cache_only mode in the case a process
failed to map the shared segment at the required address. The
important small part of the SHM will still be mapped, which
allows information exchange between normal processes using SHM
and those using the fallback mechanism.

This is based on Dmitry's, Matt's and mine ideas. So many thanks for
support!
2015-10-09 23:47:59 +02:00
Anatol Belski
a549a3ac17 improve error message 2015-10-04 16:36:53 +02:00
Anatol Belski
c97198e181 fix incrementing on 32-bit 2015-10-04 12:19:16 +02:00
Xinchen Hui
2fb8bb1157 Fixed bug #70632 (Third one of segfault in gc_remove_from_buffer) 2015-10-03 20:33:24 -07:00
Xinchen Hui
4744eec753 Fixed bug #70631 (Another Segfault in gc_remove_from_buffer()) 2015-10-03 20:08:21 -07:00
Xinchen Hui
c147d90dbf Fixed bug #70601 (Segfault in gc_remove_from_buffer()) 2015-10-03 19:38:56 -07:00
Anatol Belski
4cb6342426 remove useless checks
Other platforms than listed in the checks are not supported since
PHP 5.5. We also won't need these checks for a while, so can simplify.
2015-10-03 10:57:32 +02:00
Anatol Belski
96fe3be7f2 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix win10 support
2015-10-03 10:46:10 +02:00
Anatol Belski
83bef0ef83 fix win10 support
dwMajorVersion == 10 there, and generally this check is obsolete
as we don't support dwMajorVersion < 6 since 5.5
2015-10-03 10:44:43 +02:00
Dmitry Stogov
a05fc48055 Extended zend_extension API to allow storing additional data associated with op_arrays in opcache SHM. (op_array->reserved[]) 2015-09-25 11:50:38 +03:00
Anatol Belski
67aff16d94 fix ident 2015-09-25 08:30:44 +02:00
Anatol Belski
0fd7acd11d don't keep locked mutex after errors 2015-09-24 16:34:44 +02:00
Anatol Belski
df832c966c avoid dangling pointers 2015-09-24 16:33:58 +02:00
Anatol Belski
3ef3d80f25 move accel_shared_globals assignment into locked block
this might fix crashes under high concurrency
2015-09-24 16:33:57 +02:00
Dmitry Stogov
2d55e8c186 Fix (revert) loop exit condition 2015-09-24 11:19:26 +03:00
Dmitry Stogov
262160e0e9 Attmpt to fix "Unable to reattach to base address" problem. (Matt Ficken) 2015-09-24 10:48:34 +03:00
Dmitry Stogov
233c42ad59 Enabled placing PHP code segment into huge pages 2015-09-15 02:04:09 +03:00
Dmitry Stogov
818e5ea5f7 Enable file based cache compilation by default 2015-09-15 01:58:32 +03:00
Dmitry Stogov
c104d329e1 Use shorter php.ini directive name "opcache.huge_code_pages" and disable it by default. 2015-09-15 01:54:04 +03:00
Dmitry Stogov
f2480582fb Removed useless include 2015-09-15 01:46:53 +03:00
Dmitry Stogov
5c28c21159 Use memcpy() instead of mmap() to keep modifyed code (e.g. gdb breakpoints) 2015-09-14 18:42:45 +03:00
Dmitry Stogov
669f0b39b1 Added an experemental ability to move PHP code pages (PHP TEXT segment) into HUGE pages.
PHP should be configured and built with --enable-huge-code-pages, OS should be configured to provide huge pages.
It's possible to enable/disable this future in php.ini through opcache.enable_huge_code_pages=0/1.
The feature was tested on Linux and provided 2% improvement on real-life apps, because of 2-3 times reduction in number of iTLB misses.
2015-09-14 13:34:17 +03:00
Bob Weinand
fe08b933e4 Add support for **= in opcache optimizer 2015-09-13 12:35:35 +02:00
Anatol Belski
b9155b851e add test for bug #70423 2015-09-07 17:31:49 +02:00
Anatol Belski
46792a9914 remove unnecessary check
as it's unrelated to the size pre calculation
2015-09-07 15:14:26 +02:00
Anatol Belski
eaf96698c7 Fix bug #70423 Warning Internal error: wrong size calculation 2015-09-07 15:02:33 +02:00
Dmitry Stogov
a2f8a7675b Prevent HashTable compaction below HT_MIN_SIZE (this may lead to hash collisions). 2015-09-02 13:03:31 +03:00
Dmitry Stogov
d8eee72a84 Fixed possible caching with invalid key value 2015-09-01 12:56:33 +03:00
Dmitry Stogov
89aa1b7392 Ensure proper data alignment 2015-08-31 13:56:42 +03:00
Xinchen Hui
5a37056efa unnecessary 1 byte allocted 2015-08-21 18:28:02 +08:00
Xinchen Hui
79cd9a18b5 Fixed bug #70237 (Empty while and do-while segmentation fault with opcode on CLI enabled). 2015-08-11 21:01:56 +08:00
Xinchen Hui
6e894f8b81 Merge branch 'PHP-5.6' 2015-08-11 21:44:04 +08:00
Dmitry Stogov
18fb424bef Fixed bug #70207 (Finally is broken with opcache) 2015-08-10 16:38:43 +03:00
Dmitry Stogov
90cb3bb7de Reduce memory usage by using bitsets instead of array of bytes. 2015-08-06 15:41:50 +03:00
Dmitry Stogov
6d681876ee Get rid of memcpy() in MAKE_NOP() 2015-08-06 15:40:40 +03:00
Bogdan Andone
68185bafbe opcache: Patch SSE based fast_memcpy() implementation
Use _mm_store_si128() instead of _mm_stream_si128(). This ensures that copied memory
is preserved in data cache, which is good as the interpretor will start to use this
data without the need to go back to memory. _mm_stream* is intended to be used for
stores where we want to avoid reading data into the cache and the cache pollution;
in our scenario it seems that preserving the data in cache has a positive impact.

Tests on WordPress 4.1 show ~1% performance increase with fast_memcpy() in place
versus standard memcpy() when running php-cgi -T10000 wordpress/index.php.

I also updated SW prefetching on target memory but its contribution is almost negligible.
The address to be prefetched will be used in a couple of cycles (at the next iteration)
while the data from memory will be available in >100 cycles.
2015-07-29 14:51:57 +03:00
Nikita Popov
a717acd21a Fix RECV_VARIADIC literal compacting wrt cache slot 2015-07-26 21:22:31 +02:00
Xinchen Hui
3e479ef424 Fixed bug #70111 (Segfault when a function uses both an explicit return type and an explicit cast) 2015-07-22 22:43:30 +08:00
Anatol Belski
a685953969 fix duplicated line 2015-07-17 20:30:21 +02:00
Anatol Belski
daba578dbe fix file cache path calculation at all the places
moved the corresponding code into a separte function while on that
2015-07-17 15:14:25 +02:00
Anatol Belski
4c87750c26 fix path handling for the file cache 2015-07-17 13:51:16 +02:00
Xinchen Hui
32a4507abc Fixed segfault if opcache is disabled and with file_cache 2015-07-15 10:38:23 +08:00
Xinchen Hui
453ec91dfe Fixed bug #70067 (Cross-compile failure in opcache when SIZEOF_ZEND_LONG < SIZEOF_SIZE_T) 2015-07-14 18:59:36 +08:00
Xinchen Hui
b8eff44b0e Fixed Bug #70058 Build fails when building for i386
(I don't have a m32 build env, so this is not tested)
2015-07-13 15:05:04 +08:00
Dmitry Stogov
ef1b588f6a Resolve GOTO at compile time and replace it with sequnce of FREE/FE_FREE and JMP. 2015-07-10 04:44:21 +03:00
Dmitry Stogov
549e8c4959 Squashed commit of the following:
commit 03cf871f1576f08b2348c141b209894a7bf17a86
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 10 02:45:31 2015 +0300

    Revert "Fixed bug #62210 (Exceptions can leak temporary variables. As a part of the fix serious refactoring was done. op_array->brk_cont_array was removed, and replaced with more general and speed efficient op_array->T_liveliness. ZEND_GOTO opcode is always replaced by ZEND_JMP at compile time). (Bob, Dmitry, Laruence)"

    This reverts commit 5ee8413259.

commit 285a68227ce3d380e821a24fa389aa5239bd3fe1
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 10 02:45:26 2015 +0300

    Revert "Tuned off dubugging of live ranges"

    This reverts commit 404dc93d35.

commit 93d9d11157301ee2ec99afb6f5744b126d17f637
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 10 02:45:17 2015 +0300

    Revert "Remove loop_var_stack"

    This reverts commit b3a4c05071.

commit ede68ebbc284aec79e3f719f2c8dbf9da6907752
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 10 02:45:12 2015 +0300

    Revert "ZEND_SEPARATE reuses temporaries"

    This reverts commit 1852f538b9.

commit 96d8995dc1f517fb01b481736273767509f76c47
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 10 02:45:10 2015 +0300

    Revert "Add assertion in liveliness computation"

    This reverts commit ed14019e8c.

commit 0649d7bfef152e6cc8e67b922534e9946c634d9c
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 10 02:45:07 2015 +0300

    Revert "Fixed invalid live-range detection"

    This reverts commit 54f367ee2a.

commit dfe8f3851f6b04595eb089323e3492115a59363e
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 10 02:45:04 2015 +0300

    Revert "Add test guaranteeing that loop vars are only freed after potential return type exceptions"

    This reverts commit f5db5a558d.

commit 52a94aad6f48a199358cc07f7e4f56bb73050504
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 10 02:45:01 2015 +0300

    Revert "Fixed exception habdling on "return" statement."

    This reverts commit 17c5315bdf.

commit 6e90ad7331901711e89c2ceb2bcab5023e5cee60
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 10 02:44:58 2015 +0300

    Revert "Fix too early terminated temporary range with break/cont/goto"

    This reverts commit cc876c04b4.

commit 7b766e44b1970e4031f75109c302c07ead2c05cb
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 10 02:44:55 2015 +0300

    Revert "Fixed exception catching on break/continue"

    This reverts commit 8c3f701eeb.
2015-07-10 03:31:52 +03:00
Dmitry Stogov
b77fa94cf9 Disable opcache.fast_shutdown if USE_ZEND_ALLOC=0 2015-07-09 12:19:51 +03:00
Xinchen Hui
249915f938 Add comment to explaining the new check 2015-07-08 17:44:54 +08:00
Xinchen Hui
c6037bd3af Fixed bug #70012 (Exception lost with nested finally block) 2015-07-08 17:15:09 +08:00
Dmitry Stogov
5ee8413259 Fixed bug #62210 (Exceptions can leak temporary variables. As a part of the fix serious refactoring was done. op_array->brk_cont_array was removed, and replaced with more general and speed efficient op_array->T_liveliness. ZEND_GOTO opcode is always replaced by ZEND_JMP at compile time). (Bob, Dmitry, Laruence)
Squashed commit of the following:

commit 38e22106d4
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 7 15:12:19 2015 +0300

    Added NEWS entry

commit 0a355935bf
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 7 15:06:32 2015 +0300

    Inline function, to eliminate repeatable checks

commit d937584f3a
Merge: 0341626 32677f5
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 7 14:35:49 2015 +0300

    Merge branch 'master' into temporary_cleaning

    * master:
      Fixed bug #70006 (cli - function with default arg = STDOUT crash output).
      Fix x86 build
      Fixed use after free on closure_call_leak_with_exception.phpt
      Fixed test

commit 0341626ea9
Merge: 74869fa dec35de
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 7 12:00:53 2015 +0300

    Merge branch 'temporary_cleaning' of https://github.com/laruence/php-src into temporary_cleaning

    * 'temporary_cleaning' of https://github.com/laruence/php-src:
      Fixed checkpoint get
      Fixed crash of invalid pointer derefer
      cleanup

commit 74869fa673
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 7 11:45:34 2015 +0300

    Fixed wrong GOTO resolution

commit dec35ded32
Author: Xinchen Hui <laruence@gmail.com>
Date:   Tue Jul 7 15:58:49 2015 +0800

    Fixed checkpoint get

commit b0f419540a
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 7 10:47:11 2015 +0300

    Fixed crash of invalid pointer derefer (laruence)

commit 7a428d98ca
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 7 10:35:47 2015 +0300

    Fixed identation

commit 9c3a4dce9c
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 7 10:33:52 2015 +0300

    Fixed invalid size

commit 653abc670b
Author: Xinchen Hui <laruence@gmail.com>
Date:   Tue Jul 7 11:29:14 2015 +0800

    Fixed crash of invalid pointer derefer

commit e04500ceda
Author: Xinchen Hui <laruence@gmail.com>
Date:   Tue Jul 7 11:28:26 2015 +0800

    cleanup

commit 34183e1687
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 7 04:49:46 2015 +0300

    op_array->T_liveliness compression

commit 2f6ad84579
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 7 04:44:44 2015 +0300

    White spaces

commit be83f115a3
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 7 04:42:26 2015 +0300

    Identation

commit 1f5084b990
Merge: 91b620d 1adf3df
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 7 04:41:54 2015 +0300

    Merge branch 'master' into temporary_cleaning

    * master:
      Throw TypeError for invalid callback
      Fix crash when exception occurs during nested rope
      Fix crash when exception is thrown during ROPE_END
      Small cleanup in ternary compilation
      move the define to the right place
      fix ext/ldap build
      Rectify information about invalid shift warning being now ArithmeticError

commit 91b620d684
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 7 04:32:04 2015 +0300

    Replace GOTO by FREE/FE_FREE and JMP at compile time

commit 7052e56979
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Jul 7 02:25:08 2015 +0300

    Use zend_regenerate_var_liveliness_info() to regenerate information after pass two.

commit ae72b0dc67
Merge: a81c4bb a919fe8
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 6 21:02:34 2015 +0300

    Merge branch 'master' into temporary_cleaning

    * master:
      Do not display EXT_TYPE_UNUSED in phpdbg opcodes
      Run debug build with opcache on travis

commit a81c4bb8c6
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 6 20:59:34 2015 +0300

    Improved algorithm. It's actually the same algorithm with second loop removed and simpler temporary data structures. The only difference may be in "re-defined" vatriable handling. Now live-range in that case started from the seconnd definition (this must be more safe).

commit 9a16810f7a
Merge: bbfbe47 001ecd3
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 6 17:57:45 2015 +0300

    Merge branch 'master' into temporary_cleaning

    * master:
      Simplify TMP var number decoding (without HashTable)

commit bbfbe470c8
Merge: 0bda4ab 436b01e
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 6 17:02:01 2015 +0300

    Merge branch 'master' into temporary_cleaning

    * master:
      Avoid dangerous optimization
      Fixed JMPZNZ instruction printing
      Attempt at falling back on ldap_find_control for Mac OS

commit 0bda4abea7
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 6 16:05:33 2015 +0300

    Fixed live-range construction for OP_DATA opcode
    Added comments about algorithm assumtions

commit 521ad9df98
Merge: 4398dab a09dcb0
Author: Bob Weinand <bobwei9@hotmail.com>
Date:   Mon Jul 6 14:54:15 2015 +0200

    Merge branch 'master' of https://github.com/php/php-src into temporary_cleaning

commit 4398dab82f
Author: Bob Weinand <bobwei9@hotmail.com>
Date:   Mon Jul 6 13:51:27 2015 +0200

    Add a few phpt tests related to temporary cleaning

commit 739656f83f
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 6 14:28:49 2015 +0300

    Fixed Zend/tests/foreach_004.phpt failure (FE_FETCH shouldn't be included into TMP vatriablr live range)

commit 3df462a2bc
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 6 13:41:02 2015 +0300

    Improve data layout (reduce the op_array structure size on 64-bit systems)

commit 883b73c56e
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Jul 6 13:28:45 2015 +0300

    Removed op_array->brk_cont_array

commit ae5e58b598
Author: Bob Weinand <bobwei9@hotmail.com>
Date:   Mon Jul 6 04:22:58 2015 +0200

    Fix bug with brk_cont variable free / free loop vars via temporary liveliness info

commit b4223ca627
Author: Bob Weinand <bobwei9@hotmail.com>
Date:   Mon Jul 6 04:07:07 2015 +0200

    Fix bugs / cleanup fixes

commit ea33189d22
Author: Xinchen Hui <laruence@gmail.com>
Date:   Sun Jul 5 20:58:38 2015 +0800

    Removed useless TsTop

commit 1dbb007e4a
Merge: 550bbf8 3a8af24
Author: Xinchen Hui <laruence@gmail.com>
Date:   Sat Jul 4 15:06:44 2015 +0800

    Merge branch 'temporary_cleaning' of https://github.com/dstogov/php-src into temporary_cleaning

commit 3a8af24529
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 3 16:15:36 2015 +0300

    More exceptions from regular liveliness analyses (with explanation in comments).
    Mark old "unexplained" exceptions with ???.

commit ba721efa2c
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 3 14:16:09 2015 +0300

    Print list of live temp variables (at least for internal debugging)

commit 8d1f88fe91
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 3 13:31:56 2015 +0300

    Use op_array->T_liveliness to free incomplete ropes and restore error_reporting level on exception

commit 80c1d0d779
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Jul 3 11:05:39 2015 +0300

    Don't keep empty T_liveliness

commit 501ae8aaac
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jul 2 22:31:48 2015 +0300

    Reverted changes to Zend/zend_arena.h.
    Reuse CG(arena) instead of creating a new one.

commit a4fce36907
Merge: 6ff7246 fd0fcce
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Jul 2 22:01:42 2015 +0300

    Merge branch 'temporary_cleaning' of github.com:bwoebi/php-src into temporary_cleaning

    * 'temporary_cleaning' of github.com:bwoebi/php-src:
      Fix remaining issues with compacted temporaries
      Fix regression from last commit (+1 ?!)
      Fix off-by-one (opcache may remove last ZEND_RETURN)
      Speed algorithm up, more fail safety when reusing temporaries
      Dumb bug in opcode.c (forgot to update Ts[i])
      Fix opcache support
      Exempt ROPE temporaries from freeing
      Hmm, we need temporary info for all the opcodes
      Add opcache support for cleaning in optimization step (Opcache seems to have a few unrelated issues which blow up together with that patch)
      Add proper temporary cleaning upon frame abortion
      Fix arena on small sizes (size < sizeof(zend_arena))

commit fd0fcce811
Author: Bob Weinand <bobwei9@hotmail.com>
Date:   Thu Jul 2 20:00:33 2015 +0200

    Fix remaining issues with compacted temporaries

commit 427dc58bbb
Author: Bob Weinand <bobwei9@hotmail.com>
Date:   Wed Jul 1 22:49:12 2015 +0200

    Fix regression from last commit (+1 ?!)

commit 1adcf56a6e
Author: Bob Weinand <bobwei9@hotmail.com>
Date:   Wed Jul 1 22:17:07 2015 +0200

    Fix off-by-one (opcache may remove last ZEND_RETURN)

commit 25b231b784
Author: Bob Weinand <bobwei9@hotmail.com>
Date:   Wed Jul 1 20:59:24 2015 +0200

    Speed algorithm up, more fail safety when reusing temporaries

commit 22d9d05350
Author: Bob Weinand <bobwei9@hotmail.com>
Date:   Wed Jul 1 16:48:46 2015 +0200

    Dumb bug in opcode.c (forgot to update Ts[i])

commit 6538269bfa
Author: Bob Weinand <bobwei9@hotmail.com>
Date:   Wed Jul 1 13:05:52 2015 +0200

    Fix opcache support

commit 333a7c4a88
Author: Bob Weinand <bobwei9@hotmail.com>
Date:   Sat Jun 27 22:40:21 2015 +0200

    Exempt ROPE temporaries from freeing

commit 02585f7708
Author: Bob Weinand <bobwei9@hotmail.com>
Date:   Fri Jun 26 16:20:55 2015 +0200

    Hmm, we need temporary info for all the opcodes

commit cbcaedbd78
Author: Bob Weinand <bobwei9@hotmail.com>
Date:   Fri Jun 26 01:04:09 2015 +0200

    Add opcache support for cleaning in optimization step
    (Opcache seems to have a few unrelated issues which blow up together with that patch)

commit fef649f406
Author: Bob Weinand <bobwei9@hotmail.com>
Date:   Fri Jun 26 01:02:27 2015 +0200

    Add proper temporary cleaning upon frame abortion

commit 1cec2e7271
Author: Bob Weinand <bobwei9@hotmail.com>
Date:   Thu Jun 25 23:33:21 2015 +0200

    Fix arena on small sizes (size < sizeof(zend_arena))
2015-07-07 15:41:12 +03:00
Dmitry Stogov
436b01e379 Avoid dangerous optimization 2015-07-06 16:52:38 +03:00
Dmitry Stogov
fa1abb5677 Fixed memory leak because of incorrect 'if ();' optimization 2015-07-02 02:00:34 +03:00
Dmitry Stogov
a0b55e6a37 Cleanup (updated comments about optimization of comparison with IS_NULL) 2015-07-01 16:31:20 +03:00
Dmitry Stogov
e2baf737ae Cleanup (we don't use is_ref=1/refcount=2 trick to trigger COW in PHP-7) 2015-07-01 16:15:45 +03:00
Dmitry Stogov
4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
Dmitry Stogov
dc588997e2 On Windows PHP may be restarted with different set of DSO extensions without SHM reset.
This may make optimisation for entities from DSO extensions inconsistent.
2015-06-29 18:01:01 +03:00
Dmitry Stogov
ee1e67fae6 On Windows PHP may be restarted with different set of DSO extensions without SHM reset.
This may make optimisation for entities from DSO extensions inconsistent.
2015-06-29 17:45:56 +03:00
Dmitry Stogov
4bd22cf1c1 Improved zend_string API (Francois Laupretre)
Squashed commit of the following:

commit d96eab8d79
Author: Francois Laupretre <francois@tekwire.net>
Date:   Fri Jun 26 01:23:31 2015 +0200

    Use the new 'ZSTR' macros in the rest of the code.

    Does not change anything to the generated code (thanks to compat macros) but cleaner.

commit b352643910
Author: Francois Laupretre <francois@tekwire.net>
Date:   Thu Jun 25 13:45:06 2015 +0200

    Improve zend_string API

    Add missing methods
2015-06-29 16:44:54 +03:00
Dmitry Stogov
625dba022c Don't evaluate invalid constant expressions. 2015-06-29 11:35:12 +03:00
Bob Weinand
4a4529adb0 Fix rope memory leaks upon exception 2015-06-28 15:42:15 +02:00
Anatol Belski
658d698a1c add test for bug #69838 2015-06-20 09:35:02 +02:00
Anatol Belski
f88aad418e Fix bug #69838 OPCACHE Warning Internal error: wrong size calculation
This chunk is pre calculated with aligned size, so should it use it
at run time.
2015-06-20 09:35:01 +02:00
Anatol Belski
269acaa363 Merge branch 'pull-request/1284'
* pull-request/1284:
  Rename interface macros
  Fix typo in UPGRADING
  Move definition of Throwable to zend_exceptions.h/c
  Check for zend_ce_throwable instead
  Fix some missed tests
  Add Throwable tests
  Fix previous exception type check
  Updated UPGRADING with RFC link
  Changed AssertionException to AssertionError
  Update exception error messages
  Throwable method signatures.
  Update exception names in tests after formatting changes.
  Merge exception formatting changes.
  Make zend_get_exception_base static.
  Fix a few missed tests.
  Fix handler double copy.
  Updated tests to reflect exception class changes.
  Remodel exceptions based on Throwable interface
2015-06-17 21:55:03 +02:00
Xinchen Hui
e011e6fdf4 Add a comment 2015-06-17 17:33:55 +08:00
Dmitry Stogov
a524a375d9 Improved class type hints checks, by caching resolved class entries in run-time cache. 2015-06-17 12:07:43 +03:00
Aaron Piotrowski
77cf6d81b4 Fix some missed tests 2015-06-15 08:20:30 -05:00
Bob Weinand
6e3e1e31e9 Add phpdbg to allowed cli-SAPIs in opcache 2015-06-15 12:31:46 +02:00