Commit Graph

8483 Commits

Author SHA1 Message Date
Nikita Popov
dd419d24ca Replace more convert_to_* calls 2014-04-25 23:21:05 +02:00
Nikita Popov
93f9518a58 Align zval_get_long/double with zval_get_string 2014-04-25 23:21:04 +02:00
Dmitry Stogov
f9927a6c97 Merge mainstream 'master' branch into refactoring
During merge I had to revert:
	Nikita's patch for php_splice() (it probably needs to be applyed again)
	Bob Weinand's patches related to constant expression handling (we need to review them carefully)
	I also reverted all our attempts to support sapi/phpdbg (we didn't test it anyway)

Conflicts:
	Zend/zend.h
	Zend/zend_API.c
	Zend/zend_ast.c
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_constants.c
	Zend/zend_exceptions.c
	Zend/zend_execute.c
	Zend/zend_execute.h
	Zend/zend_execute_API.c
	Zend/zend_hash.c
	Zend/zend_highlight.c
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_variables.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/date/php_date.c
	ext/dom/documenttype.c
	ext/hash/hash.c
	ext/iconv/iconv.c
	ext/mbstring/tests/zend_multibyte-10.phpt
	ext/mbstring/tests/zend_multibyte-11.phpt
	ext/mbstring/tests/zend_multibyte-12.phpt
	ext/mysql/php_mysql.c
	ext/mysqli/mysqli.c
	ext/mysqlnd/mysqlnd_reverse_api.c
	ext/mysqlnd/php_mysqlnd.c
	ext/opcache/ZendAccelerator.c
	ext/opcache/zend_accelerator_util_funcs.c
	ext/opcache/zend_persist.c
	ext/opcache/zend_persist_calc.c
	ext/pcre/php_pcre.c
	ext/pdo/pdo_dbh.c
	ext/pdo/pdo_stmt.c
	ext/pdo_pgsql/pgsql_driver.c
	ext/pgsql/pgsql.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
	ext/standard/array.c
	ext/standard/basic_functions.c
	ext/standard/html.c
	ext/standard/mail.c
	ext/standard/php_array.h
	ext/standard/proc_open.c
	ext/standard/streamsfuncs.c
	ext/standard/user_filters.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	main/php_variables.c
	sapi/phpdbg/phpdbg.c
	sapi/phpdbg/phpdbg_bp.c
	sapi/phpdbg/phpdbg_frame.c
	sapi/phpdbg/phpdbg_help.c
	sapi/phpdbg/phpdbg_list.c
	sapi/phpdbg/phpdbg_print.c
	sapi/phpdbg/phpdbg_prompt.c
2014-04-26 00:32:51 +04:00
Dmitry Stogov
4e7cbf3f58 Use appropriate macros 2014-04-25 11:54:10 +04:00
Dmitry Stogov
42a33085c8 Avoid useless allocations 2014-04-25 11:29:18 +04:00
Dmitry Stogov
df7ca608ce Optimized constant lookup 2014-04-25 00:56:15 +04:00
Dmitry Stogov
b1ff152782 Reimplement strtr() 2014-04-24 19:14:29 +04:00
Dmitry Stogov
65e2ed6e50 Redesigned zend_execute_data layout now EX(object), EX(scope) and EX(called_scope) arr properties of the current function execution co
ntext. They are set during zend_execute_data initialization and never changed.
2014-04-24 15:53:20 +04:00
Nikita Popov
c98d373eb6 Fix strict array comparison
Fixes Symfony test failures
2014-04-23 20:34:45 +02:00
Nikita Popov
08ae88157b Allocate zend_strings with correct size
For me (32bit) sizeof(zend_string) is 20, which means that the
char[1] array at the end is padded with three bytes. Thus allocating
based on sizeof(zend_string)-1 overallocates by those 3 padding bytes.

This commit fixes the allocation size, by using XtOffsetOf.
2014-04-23 19:34:51 +02:00
Dmitry Stogov
7e424f5a95 Use symbolic names instead of magic constants + optimization 2014-04-23 02:47:41 +04:00
Nikita Popov
9c70603f4a Initialize hash as unpacked if it contains string keys 2014-04-22 21:33:49 +02:00
Nikita Popov
4912bec514 Fix zts 2014-04-22 19:39:13 +02:00
Nikita Popov
3d3a55cbcb Pass expected array size hint in INIT_ARRAY
To avoid unnecessary rehashes
2014-04-22 18:57:03 +02:00
Dmitry Stogov
7584ae3200 Fixed compilaation warnings 2014-04-22 18:52:59 +04:00
Dmitry Stogov
5864ce8a44 Fixed compilation warnings 2014-04-22 17:46:34 +04:00
Dmitry Stogov
e295518bf3 Fixed typo 2014-04-22 13:11:07 +04:00
Dmitry Stogov
32e6e89887 Optimized ZEND_SEND_REF 2014-04-22 13:10:53 +04:00
Dmitry Stogov
5d479ef693 ZEND_SEND_* optimization 2014-04-22 12:33:00 +04:00
Dmitry Stogov
022fee2166 Cache knowledge about missing property_info 2014-04-22 10:11:41 +04:00
Dmitry Stogov
fa588a5c82 Use shorter call chain 2014-04-22 02:34:34 +04:00
Dmitry Stogov
1f181c0f4c Chiper __autoload() function caching 2014-04-22 01:41:40 +04:00
Dmitry Stogov
a821009a6e Avoid string duplication 2014-04-22 01:41:09 +04:00
Dmitry Stogov
ff6dc3e1f2 zend_isset_isempty_dim_prop_obj_handler() split into separate handlers. (Actually, it shared near nothing) 2014-04-22 00:32:29 +04:00
Dmitry Stogov
9610977d10 Reverted chunk committed by mistake 2014-04-21 23:32:36 +04:00
Dmitry Stogov
b9d45cc0a9 Handle references in "slow path" 2014-04-21 23:30:19 +04:00
Dmitry Stogov
4ed452c1b5 Convert zval_get_string() into "fast path" macro and "slow path" function 2014-04-21 22:36:01 +04:00
Dmitry Stogov
8ad8254a16 Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2 2014-04-21 21:39:15 +04:00
Dmitry Stogov
4533269839 Fast path for pre/post inc/dec 2014-04-21 21:38:44 +04:00
Nikita Popov
0d43a277b8 Use zval_get_string in a few more places 2014-04-21 17:55:58 +02:00
Nikita Popov
bda96e3c58 Use zval_get_string in print_zval and propagate TSRMLS 2014-04-21 17:55:58 +02:00
Nikita Popov
5c8697184f Bring zval_get_string implement in line with make_printable_zval
As make_printable_zval is the "main" string cast, match that one.
2014-04-21 17:55:58 +02:00
Dmitry Stogov
72c287bd23 Combine HashTable.flags and HashTable.nApplyCount into single 32-bit word 2014-04-21 18:25:34 +04:00
Dmitry Stogov
afe66d89a1 Cleanup 2014-04-21 16:34:40 +04:00
Dmitry Stogov
acd77dec81 Use alloca() for temporary allocation 2014-04-21 15:18:19 +04:00
Dmitry Stogov
fd24614cd9 Inline simple function 2014-04-21 15:18:05 +04:00
Dmitry Stogov
3c42593735 Removed duplicate code 2014-04-21 15:17:48 +04:00
Dmitry Stogov
f71da39210 Use ZEND_HASH_FOEACH_* instead of zend_hash_apply_* 2014-04-21 13:55:25 +04:00
Dmitry Stogov
e9f4d822b0 Avoid useles copy ctor 2014-04-21 13:19:52 +04:00
Dmitry Stogov
54d9ad53f4 More ZEND_HASH_FOREACH_* related changes 2014-04-19 00:08:14 +04:00
Dmitry Stogov
7652a977a8 Use ZEND_FETCH_FOREACH_* macros to iterate over HashTables instead of zend_hash_move_forward() and family. 2014-04-18 19:18:11 +04:00
Anatol Belski
f5f1abdc29 Merge branch 'PHP-5.6'
* PHP-5.6:
  refixed the test related to bug #67072
  Improved the fix for bug #67072, thanks Nikita
2014-04-18 15:17:39 +02:00
Anatol Belski
cfd20c90a5 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  refixed the test related to bug #67072
  Improved the fix for bug #67072, thanks Nikita
2014-04-18 15:17:12 +02:00
Anatol Belski
d963cf94a5 refixed the test related to bug #67072 2014-04-18 15:16:09 +02:00
Dmitry Stogov
ea2e1bb1eb Optimized zend_leave_helper() 2014-04-18 13:46:36 +04:00
Stanislav Malyshev
3405d799f8 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed test case for 5328d42
2014-04-17 17:37:05 -07:00
Stanislav Malyshev
ce4c78dd07 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed test case for 5328d42
2014-04-17 17:36:26 -07:00
Tjerk Meesters
5e988a888a Fixed test case for 5328d42 2014-04-17 17:36:03 -07:00
Dmitry Stogov
e7b3b1132a Fixed support for references 2014-04-17 17:21:59 +04:00
Dmitry Stogov
5c02e0fc5f Cache op_array->run_time_cache in zend_execute_data for faster access 2014-04-17 16:36:04 +04:00