Commit Graph

376 Commits

Author SHA1 Message Date
Dmitry Stogov
b1f53ca415 Use efree_size() instead of efree() where posible 2014-08-27 20:49:56 +04:00
Nikita Popov
28e7beea66 Fix zend_longo_str 2014-08-25 22:47:04 +02:00
Anatol Belski
af59e92b24 master renames phase 7 2014-08-25 21:51:49 +02:00
Anatol Belski
455741fce3 master renames phase 4 2014-08-25 20:57:25 +02:00
Anatol Belski
4d997f63d9 master renames phase 3 2014-08-25 20:22:49 +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
70de6180d5 fixes to %pd format usage 2014-08-24 02:35:34 +02:00
Anatol Belski
f2182ab845 some more pure naming replacements 2014-08-17 21:16:27 +02:00
Anatol Belski
864172d9a4 further fixes to ext/standard and zend 2014-08-16 17:31:40 +02:00
Anatol Belski
8ee2a4a9b5 first shot on merging the core fro the int64 branch 2014-08-16 11:16:11 +02:00
Dmitry Stogov
6463bc5b55 Fixed mode 2014-08-14 23:54:32 +04:00
Dmitry Stogov
c78a1734c2 Fixed compilation warnings 2014-08-14 23:53:27 +04:00
Dmitry Stogov
e430948581 Fixed reference handling 2014-08-14 15:07:39 +04:00
krakjoe
1d01e2334c fix incorrect cast of comparison function and signature of function 2014-08-11 06:47:09 +01:00
krakjoe
dc70139d85 update zend_make_printable_zval to take TSRM context 2014-08-11 06:09:46 +01:00
Dmitry Stogov
27f38798a1 Fast parameter parsing API
This API is experemental. It may be changed or removed.
It should be used only for really often used functions.
(Keep the original parsing code and wrap usage with #ifndef FAST_ZPP)
2014-07-11 16:32:20 +04:00
Dmitry Stogov
4e291fab81 Fixed usage after free() 2014-07-10 21:45:09 +04:00
Dmitry Stogov
9d6e45a0ee Changed zend_make_printable_zval() to return "use_copy" instead of additional reference argument.
Improved branch prediction.
2014-07-09 16:05:55 +04:00
Dmitry Stogov
9af4b18b81 Reverted 387c491559 (it broke ext/standard/tests/file/bug44607.phpt) 2014-06-27 00:40:52 +04:00
Xinchen Hui
387c491559 op2 is null terminated string 2014-06-26 22:13:24 +08:00
Dmitry Stogov
2d29f2d8d9 Comparison optimization 2014-06-09 17:00:22 +04:00
Dmitry Stogov
1b8916886b Speedup string equality check 2014-06-05 19:14:47 +04:00
Dmitry Stogov
0427ae08fb cleanup 2014-06-03 00:36:31 +04:00
Dmitry Stogov
e34a6e9211 Use new zend_hash API 2014-05-27 00:38:58 +04:00
Nikita Popov
4ee14c6f8d Fix ** operator with references 2014-05-26 18:17:55 +02:00
Nikita Popov
ec7b5e0b19 Fix incdec of ref object properties
This fixes a number of infinite loops in the Symfony testsuite. It
took an obscene amount of time to track this down :/
2014-05-26 18:00:15 +02:00
Dmitry Stogov
40256e0f9c Use specialized functions instead of macros 2014-05-26 17:16:16 +04:00
Xinchen Hui
60e01e5d64 Added folder mark and codes style 2014-05-24 21:35:36 +08:00
Dmitry Stogov
9eb89dddb1 Use optimized zend_array_dup() function. convert zend_hash_num_elements() and zend_hash_next_free_element() into macros. 2014-05-23 20:37:53 +04:00
Nikita Popov
1d8c499b51 Optimize int to string conversion
Probably platform depedentant, but for me snprintf is terribly
slow.

The code for the long printing is taken from the smart string
API.
2014-05-23 13:10:50 +02:00
Nikita Popov
6f0f8511f2 Assert that EMPTY_SWITCH_DEFAULT_CASE() cannot be reached in debug 2014-05-22 19:00:25 +02:00
Anatol Belski
f089d63ddd C89 compat 2014-05-13 14:04:53 +02:00
Xinchen Hui
88c550a799 Added vstrpprintf strpprintf to avoid duplicate string
(the function name maybe improvement)
2014-05-10 00:21:49 +08:00
Nikita Popov
9343f874cd Fix identical comparison of arrays with references
Also commit a test I forgot.
2014-05-09 15:46:43 +02:00
Nikita Popov
42d4adabbd Fix SXE->string cast for __toString in inheriting class
This issue was originally hacked around in zend_make_printable_zval.
I've now moved the overridden __toString() handling into the SXE
cast_object handler, so everything invoking that handler
(zend_make_printable_zval, convert_to_string, zval_get_string,
and various other more obscure usages) see the same behavior.
2014-05-03 11:29:08 +02:00
Nikita Popov
d820ea9f5e Avoid superflous allocations in convert_to_string
Taken from zval_get_string.
2014-05-01 09:08:30 +02:00
Dmitry Stogov
17d027ed47 Split IS_BOOL into IS_FALSE and IS_TRUE 2014-04-30 18:32:42 +04:00
Nikita Popov
5db9312ec8 Add dst parameter to convert_object_to_type macro
Avoids a ZVAL_DUP in the zval_get_* functions.

Also improve object-to-array cast a bit by initializing the array
with correct number of elements and not doing a alloc-init-free
cycle when convert_object_to_type succeeds.
2014-04-25 23:21:05 +02:00
Nikita Popov
778946b3b6 Use convert_scalar_to_array only for arrays 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
5864ce8a44 Fixed compilation warnings 2014-04-22 17:46:34 +04:00
Dmitry Stogov
fa588a5c82 Use shorter call chain 2014-04-22 02:34:34 +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
Nikita Popov
0d43a277b8 Use zval_get_string in a few more places 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
Nikita Popov
7a1a6092f6 Add functions for extracting long/double/string from zval
These function get the long / double / string value of a zval with
usual cast semantics, but without actually modifying the zval.

Didn't go on a killing spree for convert_to_* yet...
2014-04-15 20:32:47 +02:00