Nikita Popov
f3c1726d25
Merge branch 'PHP-7.1' into PHP-7.2
2018-01-15 12:16:00 +01:00
Nikita Popov
2023346973
Fixed bug #75079
2018-01-15 12:15:40 +01:00
Xinchen Hui
7a7ec01a49
year++
2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7
year++
2018-01-02 12:53:31 +08:00
Nikita Popov
652d30acdc
Merge branch 'PHP-7.1' into PHP-7.2
2017-12-13 21:25:21 +01:00
Levi Morrison
580bae4a2c
Fix copy-and-paste bugs
2017-12-13 21:25:00 +01:00
Andrea Faulds
15efa985df
Merge branch 'PHP-7.1' into PHP-7.2
2017-09-29 21:38:52 +01:00
Andrea Faulds
4372293192
Merge branch 'PHP-7.0' into PHP-7.1
2017-09-29 21:38:30 +01:00
Andrea Faulds
abefb6dfe7
Fix bug #75290
2017-09-29 21:38:08 +01:00
Anatol Belski
bc5811f361
further sync for vim mode lines
2017-07-04 18:12:45 +02:00
Dmitry Stogov
db4561bfff
Introduced "zif_handler" type (zif = zend internal function).
2017-06-08 16:52:39 +03:00
Anatol Belski
c698299550
Interned strings unification for TS/NTS
...
Hereby, interned strings are supported in thread safe PHP. The patch
implements two types of interned strings
- interning per process, strings are not freed till process end
- interning per request, strings are freed at request end
There is no runtime interning.
With Opcache, all the permanent iterned strings are copied into SHM on
startup, additional copying into SHM might happen on demand.
2017-03-04 10:39:13 +01:00
Sammy Kaye Powers
dac6c639bb
Update copyright headers to 2017
2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9
Update copyright headers to 2017
2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce
Update copyright headers to 2017
2017-01-02 09:30:12 -06:00
Nikita Popov
9f92bb80e4
Merge branch 'PHP-7.1'
2016-09-30 22:10:32 +02:00
Nikita Popov
02ba9d71ab
Unwrap reference returns in cufa etc
2016-09-30 22:10:01 +02:00
Dmitry Stogov
97628da24a
Expose information about calls to "fake" closures (created through ReflectionFunction::getClosure), to allow extra specialization of RETRUN opcode handler.
2016-09-26 17:44:28 +03:00
Nikita Popov
dbe6a23194
Closure::fromCallable(): Getting non-static method statically
...
As this is new functionality, I'm going directly for a TypeError,
rather than a deprecation warning.
2016-07-05 15:52:03 +02:00
Nikita Popov
ceae9fb540
Closure::fromCallable(): Better LSB handling
...
The previous fix missed the "late" part of "late static binding" :)
2016-07-05 15:44:17 +02:00
Nikita Popov
e959a9b652
Closure::fromCallable(): Fix late static binding
2016-07-05 15:31:11 +02:00
Nikita Popov
e395b62c51
Closure::fromCallable(): Use fake closures
2016-07-05 15:13:51 +02:00
Nikita Popov
041476f4ae
Closure::fromCallable(): Fix stack corruption
...
So the tests work at least...
2016-07-05 14:54:35 +02:00
Xinchen Hui
11d0101516
Some cleanup:
...
1. use c89 comments
2. exception should not be swallowd
3. ZVAL_OBJ may have problem if obj is NULL in the feature(who knows)
2016-07-05 15:31:46 +08:00
Danack
fc92eeeadf
Added reflection test. Standardised filename for other tests.
2016-06-01 21:53:01 +01:00
Danack
4a7afdaa98
Typo.
2016-05-15 21:08:52 +01:00
Danack
63ca65daef
Add Closure::fromCallable().
...
Add the ability to create closures from callable as part of RFC: https://wiki.php.net/rfc/closurefromcallable
2016-05-15 17:39:47 +01:00
Dmitry Stogov
7b94b958cc
Intern some known (and offten used) strings.
2016-05-12 13:47:22 +03:00
Nikita Popov
3dd2df85b3
Drop unnecessary checks in get_closure
2016-04-16 20:23:23 +02:00
Nikita Popov
8c5861e6c6
Don't copy args in Closure::__invoke()
2016-04-16 14:47:27 +02:00
Nikita Popov
fea04a528b
Drop dead assignment
2016-04-16 14:34:32 +02:00
Nikita Popov
75af8150f5
Forbid binding methods to incompatible $this
...
This prohibits binding closures returned by
ReflectionMethod::getClosure() to a $this, which is not an
instance of the method scope. This restriction was already in
place for internal methods, now it is extended to user methods.
ML discussion: http://markmail.org/message/zepnhdyr3kij6di6
2016-04-08 00:38:44 +02:00
Nikita Popov
29bc5a0b0f
Merge branch 'PHP-7.0'
2016-03-30 18:32:29 +02:00
Nikita Popov
f95679885f
Fix __invoke comparison in closure_get_method
...
It compared against the wrong variable. Fixed this by getting rid
of lc_name entirely and use equals_literal_ci instead.
2016-03-30 18:32:00 +02:00
Xinchen Hui
563659822d
Merge branch 'PHP-7.0'
2016-01-02 17:56:54 +08:00
Xinchen Hui
97a9470d97
bump year which is missed in rev 49493a2
2016-01-02 17:56:11 +08:00
Nikita Popov
65e456f364
Introduce BIND_LEXICAL
...
This opcodes inserts a local CV into the closure static variable
table. This replaces the previous mechanism of having static
variables marked as LEXICAL, which perform a symtable lookup
during copying.
This means a) functions which contain closures no longer have to
rebuild their symtable (better performance) and b) we can now track
used variables in SSA.
2015-12-29 23:14:53 +01:00
Andrea Faulds
8907da99b8
Set called_scope in Closure::call (fixes bug #70987 )
2015-11-27 15:06:13 +00:00
Dmitry Stogov
23b372d358
Forbid "fake" closure rebinding
2015-10-12 20:34:08 +02:00
Nikita Popov
4b821f0fc6
Normalize rebinding failures
...
Move all rebinding checks into one function to make sure they stay
in sync. Normalize return value to be NULL for all rebinding
failures, instead of returning an improperly bound closure in some
cases.
2015-10-10 13:56:36 +02:00
Nikita Popov
d677b25b1c
Merge branch 'PHP-5.6' into PHP-7.0
2015-10-09 23:28:58 +02:00
Nikita Popov
e19423f3cb
Improve previous fix
...
Don't forbid null binding on plain functions.
2015-10-09 23:28:24 +02:00
Nikita Popov
f6ae19f158
Merge branch 'PHP-5.6' into PHP-7.0
2015-10-09 23:06:32 +02:00
Nikita Popov
bbae7ddf29
Fixed bug #70681
2015-10-09 23:01:23 +02:00
Dmitry Stogov
0847681b1a
Fixed bug #70630 (Closure::call/bind() crash with ReflectionFunction->getClosure())
2015-10-09 11:48:13 +03:00
Dmitry Stogov
93748bf9dd
Fixed infinity recurion if we create closure on top of other closure.
2015-10-09 02:37:51 +03:00
Dmitry Stogov
05bd331c6a
Fixed use after free
2015-10-09 01:09:22 +03:00
Dmitry Stogov
91fb3a7b27
Fixed bug #70674 (ReflectionFunction::getClosure() leaks memory when used for internal functions)
2015-10-09 00:45:02 +03:00
Dmitry Stogov
e0b3b3c752
Revert "Fixed bug #70630 (Closure::call/bind() crash with ReflectionFunction->getClosure())"
...
This reverts commit 517b553625
.
2015-10-06 23:59:36 +03:00
Dmitry Stogov
e193d35c1e
Revert "Improve 517b55362
(scope rebinding on method Closures)"
...
This reverts commit 881c502520
.
2015-10-06 23:48:15 +03:00