Dmitry Stogov
b1f53ca415
Use efree_size() instead of efree() where posible
2014-08-27 20:49:56 +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
Nikita Popov
d2a3bf9daf
Fix compiler warnings
2014-08-25 23:08:01 +02:00
Nikita Popov
6db293d5e0
Merge remote-tracking branch 'php-src/master' into ast
...
Conflicts:
Zend/zend_compile.c
Zend/zend_compile.h
Zend/zend_globals.h
Zend/zend_language_parser.y
Zend/zend_language_scanner.c
Zend/zend_language_scanner.l
Zend/zend_types.h
2014-08-25 21:52:18 +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
97c5172ac7
Merge remote-tracking branch 'php/master'
...
Conflicts:
ext/date/lib/parse_date.c
2014-08-19 08:27:43 +02:00
Nikita Popov
ced6d3068a
Merge branch 'master' into ast
2014-08-18 18:16:11 +02:00
Nikita Popov
26a9dc3e04
Fix bug #67858 : Leak when $php_errormsg already set
2014-08-18 18:14:19 +02: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
71675a4bf8
Merge remote-tracking branch 'php-src/phpng' into ast
...
Conflicts:
Zend/zend_ast.c
Zend/zend_compile.c
Zend/zend_language_parser.y
Incomplete merge!
2014-08-16 21:55:08 +02:00
Anatol Belski
5bb25776a0
further fixes on core
2014-08-16 15:34:04 +02:00
Anatol Belski
8ee2a4a9b5
first shot on merging the core fro the int64 branch
2014-08-16 11:16:11 +02:00
Xinchen Hui
d7f12b9b9c
Fixed initializing
2014-08-15 13:52:52 +08:00
Keyur Govande
5e338836ff
Fix typo from commit 32314f6b6
2014-08-14 01:14:11 +00:00
Keyur Govande
32314f6b67
Fix destruction order in zend_shutdown (bug #65463 , #66036 )
...
If Apache or a similar SAPI receives a signal during PHP processing
it calls zend_shutdown() without calling shutdown_executor().
#65463 : If a module like Gearman or Memcached is loaded,
in the unfixed version it is unloaded by zend_destroy_modules() before the
CG(CLASS_TABLE) is destructed. When CG(CLASS_TABLE) is destructed,
any pointers to methods (specifically around destruction) in the unloaded
module's .so are now dangling and the process segfaults.
#66036 : Any subclasses of an internal class like ArrayObject need
to be destructed in order: subclass first and then the internal class. In the
unfixed version zend_shutdown() clears the CG(CLASS_TABLE) from the head
of the list onwards, so internal classes are destructed first and user-defined
classes last. Internal classes are alloc/deallocated with malloc/free while
user-defined classes with emalloc/efree. If there's shared data between them
then efree() could be called instead of free() leading to a seg-fault.
2014-08-14 00:55:14 +00:00
Dmitry Stogov
c201ba8fff
execute_data->return_value should be initialized when call internal constructors
2014-07-31 10:51:49 +04:00
Nikita Popov
55f53e29a0
zend_get_class_fetch_type works on zend_string
2014-07-28 15:39:43 +02:00
Nikita Popov
edd9fcab1e
Fix leaks
...
Must find a good way to handle constant expressions...
2014-07-26 18:08:31 +02: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
21acbd5b75
Avoid useless check
2014-07-07 21:33:53 +04:00
Dmitry Stogov
5aa91be509
Simplify call-frame handling
2014-07-07 15:50:44 +04:00
Dmitry Stogov
6bf24f4dd0
Removed EG(active_symbol_table) and use corresponding value from EG(current_execute_data)
2014-07-04 18:03:45 +04:00
Dmitry Stogov
c4d99ec982
Removed EG(called_scope) and use corresponding value from EG(current_execute_data)
2014-07-03 02:34:43 +04:00
Dmitry Stogov
0a77dcd4b9
Removed EG(in_execution). If EG(currentent_execute_data) is not NULL we are executing something.
2014-07-03 01:02:25 +04:00
Dmitry Stogov
63c057e331
Removed EG(opline_ptr) and use corresponding value from EG(current_execute_data)
2014-07-02 23:29:53 +04:00
Dmitry Stogov
4b09dd69e6
Removed EG(active_op_array) and use corresponding value from EG(current_execute_data)
2014-07-02 22:03:21 +04:00
Dmitry Stogov
412ad4b254
Uinified call frame handling for user and internal functions.
...
Now EG(current_execute_data) always point to the call frame of the currently executed function.
2014-07-02 22:01:25 +04:00
Dmitry Stogov
d6bd21eab2
Use fast comparison for (func->type == ZEND_USER_FUNCTION || func->type == ZEND_EVAL_CODE)
2014-06-27 13:02:49 +04:00
Dmitry Stogov
032f33591a
Keep extra args in the same VM stack segment (after all CV and TMP vars)
2014-06-27 12:25:36 +04:00
Dmitry Stogov
c69781393c
Refactoring: merge call_frame and end_execute_data into single data structure. Keep only single copy of each argument on VM stack (previously ZE kept two copies of each arguments for user functions)
2014-06-26 23:51:14 +04:00
Dmitry Stogov
43477bc7a2
Refactoring: use call_frames instead of call_slots
2014-06-24 02:17:16 +04:00
Dmitry Stogov
bbc508dea5
Fixed string deallocation and code cleanup
2014-06-23 17:01:59 +04:00
Dmitry Stogov
bd10db271c
Use new zend_hash iteration API
2014-06-16 21:11:52 +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
Xinchen Hui
ebe6854dbc
Merge branch 'PHP-5.5' into PHP-5.6
...
Conflicts:
Zend/zend_execute_API.c
2014-06-10 21:58:16 +08:00
Xinchen Hui
e8699d75da
Remove unused included file
2014-06-10 21:56:30 +08:00
Xinchen Hui
3c69140a90
Remove unused codes
2014-06-10 21:53:46 +08:00
Dmitry Stogov
9a9bb8877e
Improved ZTS support
2014-06-09 21:29:20 +04:00
Nikita Popov
411a8757ad
Initialize GC_TYPE_INFO for EG(symbol_table)
2014-05-29 00:15:50 +02:00
Dmitry Stogov
40256e0f9c
Use specialized functions instead of macros
2014-05-26 17:16:16 +04:00
Xinchen Hui
b5f90e5103
Save some unnecessary zval copying
2014-05-26 17:25:57 +08:00
Xinchen Hui
bd4b9837e9
Improve call_user_function performance
...
params are all zval * now, and retval will be initialized in
zend_call_function.
maybe we can make call_user_function as a macro proxy to
call_user_function_ex later.
2014-05-26 17:16:22 +08:00
Xinchen Hui
0175d994c0
Fixed apply_func_arg_t, and it's better not using cast (compiler friendly)
2014-05-25 19:56:51 +08:00
Xinchen Hui
00e69ba164
typo
2014-05-24 21:45:07 +08:00
Xinchen Hui
b87cff66b8
fci->retval is always set
2014-05-24 21:37:15 +08:00
Dmitry Stogov
0c6a6f0fba
Re-applyed Bob's patch with minor fixes
2014-05-07 15:03:56 +04:00
Dmitry Stogov
4ecc527976
Reverted Bob's patch (it breaks many tests when run with opcache and needs to be fixed first).
2014-05-07 03:26:13 +04:00
Bob Weinand
f3c1881f1d
Re-added fix for bug #66015 and adapted for phpng branch
2014-05-06 14:59:03 +02:00
Dmitry Stogov
1fa4dcac87
Added comment with problem description and two soltions
2014-05-06 04:35:29 +04:00