Commit Graph

53 Commits

Author SHA1 Message Date
Dmitry Stogov
7c7b9184b1 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). 2014-10-05 13:02:58 +04:00
Nikita Popov
5bd34be604 Opcache compatibility for coalesce operator 2014-09-28 12:31:52 +02:00
Dmitry Stogov
bd76544e15 Fixed optimizer bug 2014-09-26 01:37:33 +04:00
Dmitry Stogov
58a41cf795 Make QM_ASSIGN, JMP_SET and CAST return IS_TMP_VAR. 2014-09-24 01:57:40 +04:00
Dmitry Stogov
82096dc151 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) 2014-09-11 12:29:54 +04:00
Dmitry Stogov
234af84c04 Refactored optimizer (compile different opimizer passes separately, instead of including *.c file) 2014-08-28 17:23:12 +04:00
Nikita Popov
59848e3fbb Remove ZEND_ACC_INTERACTIVE and CG(interactive)
As far as I can discern these are leftovers of the interactive
shell implementation that was used before PHP 5.4. Now the readline
ext makes use of normal eval calls for this.

So, dropping these until there is evidence to the contrary, as they
currently wouldn't work anyway.
2014-08-25 23:46:43 +02:00
Anatol Belski
6f9f0bf205 master renames phase 2 2014-08-25 19:28:33 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
476bdbf85b ported opcache 2014-08-20 00:23:37 +02:00
Anatol Belski
63d3f0b844 basic macro replacements, all at once 2014-08-19 08:07:31 +02:00
Xinchen Hui
e2522b4f1d Remove old version PHP supports 2014-08-15 16:40:07 +08:00
Dmitry Stogov
ce1af1e47b Fixed bug #67725 (now we create immutable arrays only in SHM) 2014-08-05 15:38:43 +04:00
Dmitry Stogov
af7cb16907 Implemented builtin instruction for strlen() 2014-07-14 15:43:11 +04:00
Dmitry Stogov
b36aaea6ed ZEND_SEND_VAR and ZEND_SEND_VAL specialization 2014-07-08 02:13:53 +04:00
Dmitry Stogov
b7715c7e8a 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.
2014-06-30 15:43:45 +04:00
Dmitry Stogov
a4f38192ec Use arena allocator for optimizer temporary data structures 2014-06-18 17:09:37 +04:00
Dmitry Stogov
14e6ee7f42 Use absolute addresses as branch targets for NEW, FE_RESET and FE_FETCH 2014-06-11 11:39:42 +04:00
Dmitry Stogov
3f6f0d5a70 Simplified and optimized ZEND_HANDLE_NUMERIC() 2014-06-03 13:10:42 +04:00
Dmitry Stogov
b3b616cf7e Introduced immutable arrays. They don't need to be copyed and may be used directly from SHM. 2014-05-29 18:21:56 +04:00
Dmitry Stogov
9dd66e4d53 Merge branch 'master' into phpng
* master:
  Fixed issue #183 (TMP_VAR is not only used once)
  Fix broken Junit output with --disable-cgi
  Added folder mark
  Further test fixes for the fdb2709 breakage.
  Fix broken test caused by fdb2709.
  Added tests for ZipArchive::addGlob() and ZipArchive::addPattern()
  Fix run-tests.php with Valgrind >= 3.10.0.
  Add microseconds to the serialised form of DateTime objects.
  Improved test for bug #62479
  fix typo in ODBC code
  gcov: tentative fix for broken coverage data after fix for opcache coverage slightly hackish, but works. The idea is that we want to give priority to .gcda files in .libs dirs vs the files in the upper level dir
  5.5.14 now
  Fix bug #67060: use default mode of 660

Conflicts:
	ext/date/php_date.c
2014-05-26 10:52:43 +04:00
Dmitry Stogov
24a86dbb6f Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed issue #183 (TMP_VAR is not only used once)
2014-05-26 10:12:10 +04:00
Dmitry Stogov
19be8b676c Fixed issue #183 (TMP_VAR is not only used once) 2014-05-26 10:10:59 +04:00
Dmitry Stogov
bc99c0debb Fixed hack. now we may store numbers not as pointers. 2014-05-15 14:00:49 +04:00
Dmitry Stogov
6a911e833f Optimized JMPZNZ to avoid multiplication at runtime (may be it makes sense to use relative addresses everywere it'll lead to Position Independent Code) 2014-04-30 11:23:19 +04:00
Dmitry Stogov
afe66d89a1 Cleanup 2014-04-21 16:34:40 +04:00
Dmitry Stogov
e96073b1e4 Moved zend_literal->cache_slot right into zval.
It should be accessed using Z_CACHE_SLOT() macro.
zend_literal structure is removed.
API functions that accepted pointer to zend_literal now accept pointer to zval or cache_slot directly.
Calls of such functiond that now accept cache_slot need to be changed to pass -1 instead of NULL.
2014-04-17 15:40:45 +04:00
Dmitry Stogov
76cc99fe60 Refactored ZVAL flags usage to simplify various checks (e.g. Z_REFCOUNTED(), candidate for GC, etc) 2014-04-03 15:26:23 +04:00
Dmitry Stogov
2a612e91c2 Fixed optimizer 2014-04-01 11:04:12 +04:00
Dmitry Stogov
7465be4fbd Optimizer related fixes (incomplete) 2014-03-31 18:13:16 +04:00
Dmitry Stogov
5324f22f59 ext/opcache refactoring (incomplete) 2014-03-28 23:34:49 +04:00
Dmitry Stogov
f4cfaf36e2 Use better data structures (incomplete) 2014-02-10 10:04:30 +04:00
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Xinchen Hui
47c9027772 Bump year 2014-01-03 11:06:16 +08:00
Xinchen Hui
a88543a106 Fixed bug #66298 (ext/opcache/Optimizer/zend_optimizer.c has dos-style ^M as lineend) 2013-12-30 10:51:47 +08:00
Xinchen Hui
04c8ce259f Fixed bug #66298 (ext/opcache/Optimizer/zend_optimizer.c has dos-style ^M as lineend)
Use git blame -w to ingore the space changes
2013-12-30 10:50:46 +08:00
Dmitry Stogov
f000624864 Added an optimization of class constants and constant calls to some internal functions 2013-11-26 21:37:31 +04:00
Dmitry Stogov
e7132597a6 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #66176 (Invalid constant substitution)
  Fixed bug #66176 (Invalid constant substitution)
2013-11-26 21:01:01 +04:00
Dmitry Stogov
27524b52b5 Fixed bug #66176 (Invalid constant substitution) 2013-11-26 19:55:49 +04:00
Dmitry Stogov
0999d85049 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #66176 (Invalid constant substitution)

Conflicts:
	NEWS
2013-11-26 17:48:11 +04:00
Dmitry Stogov
d85ac7fb3f Fixed bug #66176 (Invalid constant substitution) 2013-11-26 17:47:02 +04:00
Dmitry Stogov
a2aa6a3440 Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed bug #65845 (Error when Zend Opcache Optimizer is fully enabled).

Conflicts:
	NEWS
2013-10-10 15:33:17 +04:00
Dmitry Stogov
ef8cf76815 Fixed bug #65845 (Error when Zend Opcache Optimizer is fully enabled). 2013-10-10 15:32:30 +04:00
Dmitry Stogov
2bc886abed Merge branch 'PHP-5.5'
* PHP-5.5:
  Replce ZEND_FETCH_* instructions with IS_CV if possible

Conflicts:
	ext/opcache/Optimizer/zend_optimizer.c
2013-08-09 17:52:22 +04:00
Dmitry Stogov
b27f6826d4 Replce ZEND_FETCH_* instructions with IS_CV if possible 2013-08-09 17:47:47 +04:00
Dmitry Stogov
60a59d27b4 Disable FCALL optimization pass for PHP older than 5.4 2013-04-18 22:22:48 +04:00
Dmitry Stogov
edfeab8bf2 Added an optimization pass to convert FCALL_BY_NAME into DO_FCALL. 2013-04-18 22:12:31 +04:00
Dmitry Stogov
2bfb523f45 Merge identical constants (and related cache_slots) in op_array->literals table. 2013-04-18 10:48:16 +04:00
Dmitry Stogov
36d343c0c4 Merge branch 'PHP-5.5' into PHP-5.5-opcache
* PHP-5.5:
  Initialize literals hash_value and cache_slot
  Added curl config test for windows
  updated lib versions
  updated lib versions
  fixed EOL
  updated lib versions
  allow lcov 1.10
  allow lcov 1.10

Conflicts:
	ext/opcache/Optimizer/zend_optimizer.c
2013-04-17 21:32:08 +04:00
Dmitry Stogov
5a897009a8 Initialize literals hash_value and cache_slot 2013-04-17 21:19:56 +04:00