Commit Graph

551 Commits

Author SHA1 Message Date
Dmitry Stogov
2b9b9afa7a Use better data structures (incomplete) 2014-02-17 17:59:18 +04:00
Dmitry Stogov
17bf59f895 Use better data structures (incomplete) 2014-02-14 17:48:45 +04:00
Dmitry Stogov
686a078258 Use better data structures (incomplete) 2014-02-14 14:55:48 +04:00
Dmitry Stogov
be82a07776 Use better data structures (incomplete) 2014-02-12 18:08:11 +04:00
Dmitry Stogov
4e66abad54 Use better data structures (incomplete) - refactored return_value handling 2014-02-12 14:29:51 +04:00
Dmitry Stogov
f4cfaf36e2 Use better data structures (incomplete) 2014-02-10 10:04:30 +04:00
Xinchen Hui
0f53e37494 Merge branch 'PHP-5.6' 2014-01-03 11:09:07 +08:00
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Kalle Sommer Nielsen
d14670ccdb Eliminate another TSRMLS_FETCH() in i_zend_is_true()
# Affected extensions have all been updated, ext/opcache and ext/zip
# both have macros for cross version compatibility
2013-12-18 07:25:05 +01:00
Dmitry Stogov
5a87b7ff39 Fixed bug #66252 (Problems in AST evaluation invalidating valid parent:: reference. Constant expessions have to be evaluated in context of defining class). 2013-12-10 14:19:17 +04:00
Dmitry Stogov
2cb0e1e4c1 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Added validation of class names in the autoload process

Conflicts:
	NEWS
2013-11-29 12:55:11 +04:00
Dmitry Stogov
967abd6153 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Added validation of class names in the autoload process
2013-11-29 12:54:22 +04:00
Dmitry Stogov
2d31eadbbf Added validation of class names in the autoload process 2013-11-29 12:53:02 +04:00
Dmitry Stogov
9647c61dc1 Constant expressions refactoring 2013-11-06 22:21:07 +04:00
Bob Weinand
b45043a1b7 converted several switches to ifs and made more opcache friendly 2013-11-01 16:16:58 +01:00
Bob Weinand
b56c1ca95e Fatal error about self referencing constants fixed 2013-10-31 19:05:29 +01:00
Bob Weinand
466c5dd1fe Fixed mem leaks, added tests and ternary operator 2013-10-31 18:21:37 +01:00
Bob Weinand
2361745806 Working commit for constant scalar expressions (with constants).
Tests will follow.
2013-10-31 08:57:12 +01:00
Nikita Popov
bdfa03d79d Save a TSRMLS_FETCH() for zval_ptr_dtor in executor
This gives me about 9% improvement on Zend/bench.php for a zts build.
2013-09-14 23:02:26 +02:00
Nikita Popov
96b1c2145c Provide more macros for handling of interned strings
* str_erealloc behaves like erealloc for normal strings, but will
   use emalloc+memcpy for interned strings.
 * str_estrndup behaves like estrndup for normal strings, but will
   not copy interned strings.
 * str_strndup behaves like zend_strndup for normal strings, but
   will not copy interned strings.
 * str_efree_rel behaves like efree_rel for normal strings, but
   will not free interned strings.
 * str_hash will return INTERNED_HASH for interned strings and
   compute it using zend_hash_func for normal strings.
2013-09-13 19:42:10 +02:00
Nikita Popov
0856714576 Always pass return_value_ptr to internal functions
Previous some places passed return_value_ptr only if the function
returned by reference. Now return_value_ptr is always set, even
for functions returning by-value.

This allows you to return zvals without copying their contents. For
this purpose two new macros RETVAL_ZVAL_FAST and RETURN_ZVAL_FAST
are added:

    RETVAL_ZVAL_FAST(zv); /* Analog to RETVAL_ZVAL(zv, 1, 0) */
    RETURN_ZVAL_FAST(zv); /* Analog to RETURN_ZVAL(zv, 1, 0) */

These macros behave similarly to the non-FAST versions with
copy=1 and dtor=0, with the difference that the FAST versions
will try return the zval without copying by utilizing return_value_ptr.
2013-08-31 13:16:41 +02:00
Stanislav Malyshev
c793a65690 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  non living code related typo fixes

Conflicts:
	Zend/zend_compile.c
2013-08-04 16:06:24 -07:00
Veres Lajos
8d86597d73 non living code related typo fixes 2013-08-04 16:05:36 -07:00
Xinchen Hui
e89537f2a3 Merge branch 'PHP-5.4' into PHP-5.5 2013-06-05 17:30:09 +08:00
Xinchen Hui
f597f5561e Merge branch 'PHP-5.3' into PHP-5.4 2013-06-05 17:26:10 +08:00
Xinchen Hui
3c87945c95 Fixed bug #64960 (Segfault in gc_zval_possible_root) 2013-06-05 17:25:00 +08:00
Dmitry Stogov
6e8aa09696 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #64529 (Ran out of opcode space)

Conflicts:
	NEWS
	Zend/zend_execute_API.c
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
2013-03-28 00:08:11 +04:00
Dmitry Stogov
85e5e60777 Fixed bug #64529 (Ran out of opcode space) 2013-03-28 00:03:40 +04:00
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Xinchen Hui
831fbcf385 Happy New Year 2013-01-01 16:23:31 +08:00
Dmitry Stogov
438cd86378 Removed unnecessary checks 2012-12-13 17:29:30 +04:00
Dmitry Stogov
ff1e1d7a8e Removed redundand checks from release build 2012-12-13 14:46:44 +04:00
Dmitry Stogov
7651d64556 Optimized access to temporary and compiled VM variables 2012-12-04 10:14:39 +04:00
Dmitry Stogov
70f83f35d0 . The VM stacks for passing function arguments and syntaticaly nested calls were merged into a single stack. The stack size needed for op_array execution is calculated at compile time and preallocated at once. As result all the stack push operatins don't require checks for stack overflow any more.
. Generators implementation was improved using the new VM stack. Now it's a bit more clear and faster.
2012-11-30 13:39:23 +04:00
Stanislav Malyshev
531e2533dd Use zend_execute_internal always to call internal functions 2012-10-05 08:14:20 +02:00
Stanislav Malyshev
bda93f5405 use zend_execute_internal 2012-10-04 22:43:13 -07:00
Nikita Popov
526db7db14 Replace code with zend_clean_and_cache_symbol_table() call
I replaced other instances of this code with the function call, but missed
this one.
2012-09-16 21:54:48 +02:00
Nikita Popov
c9709bfbd7 Remove asterix modifier (*) for generators
Generators are now automatically detected by the presence of a `yield`
expression in their body.

This removes the ZEND_SUSPEND_AND_RETURN_GENERATOR opcode. Instead
additional checks for ZEND_ACC_GENERATOR are added to the fcall_common
helper and zend_call_function.

This also adds a new function zend_generator_create_zval, which handles
the actual creation of the generator zval from an op array.

I feel like I should deglobalize the zend_create_execute_data_from_op_array
code a bit. It currently changes EG(current_execute_data) and
EG(opline_ptr) which is somewhat confusing (given the name).
2012-07-20 16:09:06 +02:00
Xinchen Hui
eac33b454c Typo when merging from trunk 2012-03-11 15:31:19 +00:00
Xinchen Hui
a38ffd5705 Fixed bug #61273 (call_user_func_array with more than 16333 arguments leaks / crashes) 2012-03-11 15:28:31 +00:00
Xinchen Hui
b7ae5e0d86 Fixed bug #61273 (call_user_func_array with more than 16333 arguments leaks / crashes) 2012-03-11 15:28:31 +00:00
Xinchen Hui
7536bf963d Fixed bug #61273 (call_user_func_array with more than 16333 arguments leaks / crashes) 2012-03-11 15:28:31 +00:00
Xinchen Hui
5f99d789b5 MFH: Fixed bug #60978 (exit code incorrect) 2012-03-02 03:25:41 +00:00
Xinchen Hui
27df8b6ff0 Revert -r319102 and -r322922 in 5.4 branch since they introduce #60978
Fixed #60978 in trunk without reverting previous fix
#see http://news.php.net/php.internals/57789
2012-02-08 03:03:05 +00:00
Xinchen Hui
ff63c09e6f Revert -r319102 and -r322922 in 5.4 branch since they introduce #60978
Fixed #60978 in trunk without reverting previous fix
#see http://news.php.net/php.internals/57789
2012-02-08 03:03:05 +00:00
Derick Rethans
33863b2cf8 - Reinstated correct return values after David's fix for #60218. 2012-01-29 15:25:40 +00:00
Derick Rethans
2c1285a573 - Reinstated correct return values after David's fix for #60218. 2012-01-29 15:25:40 +00:00
Dmitry Stogov
b515bfbdfb Improved traits implementation. Now to support __CLASS__ constant in traits php doesn't have to copy the complete compiled method, but can reuse the same code. The resolution of __CLASS__ constants in methods defined in traits are delayed till run-time. This approach also made possible to use __CLASS__ constant as default value for traits properties and method arguments. 2012-01-17 08:09:13 +00:00
Dmitry Stogov
032d140fd6 Improved traits implementation. Now to support __CLASS__ constant in traits php doesn't have to copy the complete compiled method, but can reuse the same code. The resolution of __CLASS__ constants in methods defined in traits are delayed till run-time. This approach also made possible to use __CLASS__ constant as default value for traits properties and method arguments. 2012-01-17 08:09:13 +00:00