1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 00:48:25 +02:00
Commit Graph

31 Commits

Author SHA1 Message Date
Sammy Kaye Powers 478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Nikita Popov bb3d0c0e17 Fcall optimization: Avoid FETCH_DIM_R with UNUSED op2 2016-11-10 21:36:46 +01:00
Lior Kaplan 2eb1f38d24 Happy new year (Update copyright to 2016) 2016-01-01 20:03:16 +02:00
Xinchen Hui ec00a4de4e Merge branch 'PHP-5.6' 2015-03-04 14:49:03 +08:00
Xinchen Hui a29b64fc10 Fixed bug #69159 (Opcache causes problem when passing a variable variable to a function) 2015-03-04 14:48:41 +08:00
Dmitry Stogov c2c78dc963 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)
2015-02-25 10:37:21 +03:00
Dmitry Stogov dcb96c2e03 Split INIT_FCALL_BY_NAME inti INIT_FCALL_BY_NAME(CONST+STRING) and INIT_DYNAMIC_CALL(CONST-STRING|TMPVAR|CV) 2015-02-24 22:29:47 +03:00
Xinchen Hui fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Stanislav Malyshev b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Anatol Belski bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Dmitry Stogov 9ea35a37b9 Make ZEND_INIT_FCALL keep predcalculted size of necessary stack space in opline->op1.num to avoid its recalculation on each execution. 2014-12-12 09:01:42 +03:00
Dmitry Stogov e20a727430 SEND_VAR_NO_REF optimization 2014-11-18 14:37:36 +03:00
Dmitry Stogov 234af84c04 Refactored optimizer (compile different opimizer passes separately, instead of including *.c file) 2014-08-28 17:23:12 +04:00
Dmitry Stogov 614bc31635 Fixed incorrect ZEND_INIT_FCALL_BY_NAME -> ZEND_INIT_FCALL conversion 2014-08-27 01:39:39 +04:00
Nikita Popov 904a83a137 Merge remote-tracking branch 'php-src/master' into ast
Conflicts:
	ext/opcache/Optimizer/optimize_func_calls.c
2014-08-16 22:31:13 +02:00
Nikita Popov f72d6f97ec ZEND_INIT_FCALL_BY_NAME can have non-string literal 2014-08-15 22:55:15 +02:00
Xinchen Hui 101c055396 Add copyright header 2014-08-15 16:47:54 +08:00
Xinchen Hui e2522b4f1d Remove old version PHP supports 2014-08-15 16:40:07 +08:00
Dmitry Stogov de306e7088 Implement call_user_func() and call_user_func_array() using special opcodes.
In some rare cases it leads to insignificant changes in error messages.
2014-07-11 00:32:18 +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 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 5324f22f59 ext/opcache refactoring (incomplete) 2014-03-28 23:34:49 +04:00
Dmitry Stogov 77bc5b8bae We don't know PHP_5_6_X_API_NO yet 2014-01-15 11:09:38 +04:00
Nikita Popov a5ee337156 Fixed arguments unpacking segfault with opcache 2014-01-14 22:34:08 +08:00
Xinchen Hui 676e737f5b Fix other typos & add test script 2013-04-19 11:21:44 +08:00
Xinchen Hui 580d6fe94d Fix typo 2013-04-19 10:55:11 +08:00
Felipe Pena 1192cfa58c - Fixed ZTS build 2013-04-18 19:27:02 -03: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