Commit Graph

7755 Commits

Author SHA1 Message Date
Anatol Belski
4d430ecb02 simplify the state free macros 2013-10-31 17:39:17 +01:00
Anatol Belski
abb962d54d compact the code to preserve the error info after state freeing 2013-10-30 20:46:08 +01:00
Anatol Belski
e17de5e9fd Merge branch 'bug50333' of github.com:weltling/php-src into bug50333 2013-10-29 17:15:40 +01:00
Anatol Belski
25dc4af392 enabled windows to use stack in both ts/nts mode, some more fixes 2013-10-24 08:48:09 -07:00
Anatol Belski
08f6a76b92 moved to do_alloca() usage where appropriate 2013-10-24 05:12:37 -07:00
Anatol Belski
2786a2a1ab fixed all the places where last error could be lost
whereby this commit should be applied to master anyway
2013-10-18 07:00:05 -07:00
Anatol Belski
515ef09b62 preserve the error code
otherwise it'd be cleared by a subsequent calls
2013-10-18 05:01:16 -07:00
ArunSK
6b90f23787 fixed typo and few grammar mistakes 2013-10-17 22:00:40 -04:00
Anatol Belski
cf6ab0e915 applied and fixed the original patch
initial work on the patch import done
2013-10-17 10:40:43 +02:00
Anatol Belski
e30b2aae5a initial move on renaming files and fixing includes 2013-10-17 09:43:52 +02:00
Nikita Popov
d51553e399 Merge branch 'PHP-5.5' 2013-10-16 18:39:13 +02:00
Nikita Popov
865f221627 Merge branch 'PHP-5.4' into PHP-5.5 2013-10-16 18:37:49 +02:00
bwoebi
4c0bb6d76e Fixed bug #65911 ($this not usable as static property)
In context of static accesses like classname::$this, the string
"$this" should not be handled like a $this variable, but as an
identifier for a static variable.
2013-10-16 18:33:14 +02:00
Nikita Popov
ff46b6f633 Merge branch 'PHP-5.5' 2013-10-04 13:15:45 +02:00
Nikita Popov
536260f2c5 Fix bug #65821: By-ref foreach on property access of string offset segfaults
This removes the now unnecessary ZEND_FETCH_ADD_LOCK on the
container of a property fetch of a by-reference foreach.
2013-10-04 13:13:46 +02:00
Nikita Popov
cbf0683c6f Merge branch 'PHP-5.5' 2013-09-29 20:19:40 +02:00
Nikita Popov
6b68f44e6b Fix bug #64979: Wrong behavior of static variables in closure generators 2013-09-29 20:18:12 +02:00
Nikita Popov
9529b8f5c4 Merge branch 'PHP-5.5' 2013-09-29 18:01:42 +02:00
Nikita Popov
1d1fb69c8b Merge branch 'PHP-5.4' into PHP-5.5 2013-09-29 18:01:18 +02:00
Nikita Popov
f0c926564c Fix bug #65322: compile time errors won't trigger auto loading
Also fixes duplicate bugs #54054 and #42098.

Furthermore this fixes incorrect error messages thrown from code
running inside an error handler when a compilation is in progress.
The error file and line are now correctly associated with the
file/line of the executor, rather than the compiler.
2013-09-29 17:58:25 +02:00
Nikita Popov
0ceea8a2e8 Don't track parameter number in separate znode
We already track it in the op array already.
2013-09-26 19:43:32 +02:00
Nikita Popov
0d7a638866 Implement variadic function syntax
As per RFC: https://wiki.php.net/rfc/variadics
2013-09-26 18:39:17 +02:00
Remi Collet
c760ff1615 Merge branch 'PHP-5.5'
* PHP-5.5:
  Make message and format arguments const char * to avoid build warning about invalid cast.
2013-09-23 13:23:00 +02:00
Remi Collet
f7eff9cd41 Make message and format arguments const char * to avoid
build warning about invalid cast.
2013-09-23 13:21:57 +02:00
Xinchen Hui
be581ec66d Exclude bison 3.0 by Mike 2013-09-17 16:54:27 +08: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
8748e146b9 Fix intl build 2013-09-14 01:37:09 +02:00
Nikita Popov
91a9569d85 Fix two warnings 2013-09-13 20:01:23 +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
d2950ac279 Make use of Z_*VAL and ZVAL_* in language scanner 2013-09-13 15:08:01 +02:00
Nikita Popov
00799319f9 Make consistent use of Z_*VAL macros in compiler 2013-09-13 15:07:47 +02:00
Nikita Popov
ef9e003b0c Small cleanup in class name resolution of compiler
* The fetch_type and check_ns_name parameters of
   zend_resolve_class_name were unused and are now removed.
 * ZEND_FETCH_CLASS_GLOBAL is no longer used (no code actually
   checking for it).
 * The checks for usage of "namespace" as class name were
   unnecessary as that situation can't occur anyways.
2013-09-13 12:18:39 +02:00
Xinchen Hui
825c1f239b Merge branch 'PHP-5.5' 2013-09-02 16:16:15 +08:00
Xinchen Hui
b2ee1b629e Merge branch 'PHP-5.4' into PHP-5.5 2013-09-02 16:16:07 +08:00
Xinchen Hui
6c48c6bc78 Typo.... 2013-09-02 16:15:52 +08:00
Xinchen Hui
f33bdf68b1 Merge branch 'PHP-5.5' 2013-09-02 16:03:10 +08:00
Xinchen Hui
dd1cbd140b Merge branch 'PHP-5.4' into PHP-5.5 2013-09-02 16:02:59 +08:00
Xinchen Hui
ed038d2ee3 Add a XFAIL test for #64896 2013-09-02 16:02:24 +08:00
Gustavo André dos Santos Lopes
d515455589 Implement phase 1 of rfc/incompat_ctx
Just changing the error level of the message from E_STRICT to
E_DEPRECATED. This comes one version later than the timeline
mentioned in the RFC.

Oddly, there were no tests for this ‘feature’. I added a simple
one.
2013-09-02 01:53:06 +02:00
Nikita Popov
47ee470992 Make use of direct returns in some places 2013-08-31 13:16:50 +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
Xinchen Hui
a607a08e09 Merge branch 'PHP-5.5' 2013-08-30 11:23:24 +08:00
Xinchen Hui
e4fe53e200 Merge branch 'PHP-5.4' into PHP-5.5 2013-08-30 11:20:46 +08:00
Xinchen Hui
7da6498342 Fixed bug #60598 (cli/apache sapi segfault on objects manipulation) 2013-08-30 11:20:24 +08:00
Dmitry Stogov
462f2167ae Merge branch 'PHP-5.5'
* PHP-5.5:
  Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien)
  Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien)

Conflicts:
	NEWS
2013-08-29 11:20:12 +04:00
Dmitry Stogov
0f3977bc0f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien)
  Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien)

Conflicts:
	NEWS
2013-08-29 11:19:02 +04:00
Dmitry Stogov
dfc6feb6e8 Fixed bug #61759 (class_alias() should accept classes with leading backslashes). (Julien) 2013-08-29 11:16:56 +04:00
Xinchen Hui
0ea00936be Merge branch 'PHP-5.5' 2013-08-29 14:02:53 +08:00
Xinchen Hui
e356d790cc Merge branch 'PHP-5.4' into PHP-5.5 2013-08-29 14:02:34 +08:00
Xinchen Hui
747daa5354 Avoid compiler warning 2013-08-29 14:02:15 +08:00