Máté Kocsis
ac0853eb26
Make type error messages more consistent
...
Closes GH-5092
2020-02-17 14:22:17 +01:00
Nikita Popov
72bd55902d
Improve generated names for anonymous classes
...
In order of preference, the generated name will be:
new class extends ParentClass {};
// -> ParentClass@anonymous
new class implements FirstInterface, SecondInterface {};
// -> FirstInterface@anonymous
new class {};
// -> class@anonymous
This is intended to display a more useful class name in error messages
and stack traces, and thus make debugging easier.
Closes GH-5153.
2020-02-17 12:21:33 +01:00
Nikita Popov
f8d795820e
Reindent phpt files
2020-02-03 22:52:20 +01:00
Nikita Popov
b33697d47e
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #79193
2020-01-30 14:56:31 +01:00
Nikita Popov
f70b552326
Fixed bug #79193
2020-01-30 14:55:58 +01:00
Tyson Andre
5f92a085cc
Convert ZEND_ECHO operand to string after sccp
...
And filter out echoes of the empty string (e.g. false/null)
Split out of #5097 (on GitHub)
Closes GH-5118
2020-01-27 20:21:24 -05:00
Xinchen Hui
31dd635eb3
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #79114 (Eval class during preload causes class to be only half available)
2020-01-20 12:25:10 +08:00
Xinchen Hui
9c2fd55d01
Fixed bug #79114 (Eval class during preload causes class to be only half available)
2020-01-20 12:24:49 +08:00
Máté Kocsis
99db00b1f2
Fix #78880 Another round
2020-01-19 18:28:43 +01:00
Máté Kocsis
afdaa91170
Fix #78880 : Final spelling fixes
2020-01-16 19:14:31 +01:00
Máté Kocsis
0b4778c377
Fix #78880 : Another bunch of spelling errors
2020-01-16 09:46:47 +01:00
Nikita Popov
9b6c0bdcd6
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Remove support for preloading on Windows
2020-01-06 22:42:31 +01:00
Nikita Popov
59c3ddab13
Remove support for preloading on Windows
...
Due to ASLR restrictions, preloading on Windows does not work with
any code that has preloading dependencies on internal classes.
This effectively makes it unusable for any non-trivial codebase.
Instead of pretending like preloading is going to work, only to
make people realize that it really doesn't once they get beyond
a dummy example, we disable support for preloading on Windows
entirely.
Closes GH-4999.
2020-01-06 22:41:55 +01:00
Nikita Popov
6c6d36bb94
Fix SSA construction for ADD_ARRAY_ELEMENT in RC_INFERENCE mode
...
This was broken in cc29cbe80c .
2019-12-30 13:29:32 +01:00
Nikita Popov
aadd5e69e0
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #78986
2019-12-18 11:41:11 +01:00
Nikita Popov
bd4fce4f6f
Fixed bug #78986
...
Don't assume that handlers live in the arena, they may also be in
SHM.
2019-12-18 11:40:58 +01:00
Dmitry Stogov
546392b346
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #78961 (erroneous optimization of re-assigned $GLOBALS)
2019-12-16 12:25:40 +03:00
Dmitry Stogov
6ef7e53c1b
Fixed bug #78961 (erroneous optimization of re-assigned $GLOBALS)
2019-12-16 12:24:47 +03:00
Nikita Popov
d56768817b
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #78950 : Preloading trait method with static variables
2019-12-12 11:52:51 +01:00
Nikita Popov
be89a5c7f1
Fixed bug #78950 : Preloading trait method with static variables
...
We need to make sure that trait methods with static variables
allocate a separate MAP slot for the static variables pointer,
rather than working in-place.
2019-12-12 11:52:43 +01:00
Nikita Popov
cf9362195b
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix handling of non-final loop var free in sccp
2019-12-12 09:40:54 +01:00
Nikita Popov
2d03b638dc
Fix handling of non-final loop var free in sccp
...
We only need to preserve the FE_FREE that marks the end of the
loop range. Skip FE_FREEs with the FREE_ON_RETURN flag.
2019-12-12 09:39:52 +01:00
Dmitry Stogov
ee45dbab37
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Addirional fix for bug #78918
2019-12-11 12:29:10 +03:00
Dmitry Stogov
3280209c03
Addirional fix for bug #78918
2019-12-11 12:21:49 +03:00
Dmitry Stogov
8fb3ef6e37
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #78937 (Preloading unlinkable anonymous class can segfault)
2019-12-11 00:47:15 +03:00
Dmitry Stogov
20ef51db22
Fixed bug #78937 (Preloading unlinkable anonymous class can segfault)
2019-12-11 00:46:30 +03:00
Nikita Popov
fa18c115be
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix release build failure
2019-12-10 13:53:19 +01:00
Nikita Popov
d6f86caa11
Fix release build failure
...
GCC complained about potentially uninitialized __orig_bailout,
even though the variable has an initializer. This warning was
quite persistent, I was only able to avoid it by using a separate
function.
Am I missing something?
2019-12-10 13:51:09 +01:00
Nikita Popov
5cdea8d5e8
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Add support for class_alias to preloading
Fixed bug #78935 : Check that all linked classes can be preloaded
2019-12-10 13:12:29 +01:00
Nikita Popov
baf3a9133b
Add support for class_alias to preloading
...
Related to bug #78918 .
2019-12-10 13:06:36 +01:00
Nikita Popov
3f86adb0ef
Fixed bug #78935 : Check that all linked classes can be preloaded
...
During preloading, check that all classes that have been included
as part of the preload script itself (rather than through opcache_compile_file)
can actually be preloaded, i.e. satisfy Windows restrictions, have
resolved initializers and resolved property types. When resolving
initializers and property types, also autoload additional classes.
Because of this, the resolution runs in a loop.
2019-12-10 13:05:48 +01:00
Nikita Popov
c124d202e2
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix DCE with FE_FETCH
2019-12-10 09:01:55 +01:00
Nikita Popov
7e028a41e2
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix DCE with FE_FETCH
2019-12-10 09:01:18 +01:00
Nikita Popov
87691e74e5
Fix DCE with FE_FETCH
...
For now, don't treat FE_FETCH op2 as no-val use. See GH-4982.
2019-12-10 09:00:09 +01:00
Dmitry Stogov
8bf663d3b2
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix $x = (bool)$x; for undefined with opcache
2019-11-18 11:29:38 +03:00
Dmitry Stogov
be6fb13873
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix $x = (bool)$x; for undefined with opcache
2019-11-18 11:27:43 +03:00
Dmitry Stogov
e72e3370c6
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix $x = (bool)$x; for undefined with opcache
2019-11-18 11:26:30 +03:00
Tyson Andre
a2c41c0ea6
Fix $x = (bool)$x; for undefined with opcache
...
And `$x = !$x`
Noticed while working on GH-4912
The included test would not emit undefined variable errors in php 8.0
with opcache enabled. The command used:
```
php -d zend_extension=opcache.so --no-php-ini -d error_reporting=E_ALL \
-d opcache.file_cache= -d opcache.enable_cli=1 test.php
```
2019-11-18 11:24:03 +03:00
Dmitry Stogov
d94c27dcca
Fixed JIT for TYPE_CHECK opcode (exception handling in case of undefined argument)
2019-11-12 10:42:29 +03:00
Fabien Villepinte
a555cc0b3d
Clean DONE tags from tests
...
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.
Closes GH-4872.
2019-11-07 21:31:47 +01:00
Nikita Popov
7d056fc6c0
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #78747
2019-10-25 12:53:24 +02:00
Nikita Popov
4d8541debb
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fixed bug #78747
2019-10-25 12:50:26 +02:00
Nikita Popov
74699533e5
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fixed bug #78747
2019-10-25 12:50:12 +02:00
Nikita Popov
5249993814
Fixed bug #78747
2019-10-25 12:47:18 +02:00
Nikita Popov
711e2a1216
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Check class linking in VERIFY_RETURN_TYPE optimization
Simplify travis setup scripts
2019-10-25 11:25:49 +02:00
Nikita Popov
f07565b0eb
Check class linking in VERIFY_RETURN_TYPE optimization
...
instanceof_function() requires linked classes. I'm not reusing
unlinked_instanceof() here, because it performs class loading,
which wouldn't be right here, I think.
2019-10-25 11:24:32 +02:00
Dmitry Stogov
2958fecb8b
Fixed incorrect JIT compilation
2019-10-14 21:32:10 +03:00
Dmitry Stogov
3f50922aee
Fixed incorrect JIT compilation
2019-10-14 16:45:58 +03:00
Dmitry Stogov
0cb977a691
Fixed edge cases introduced by 170ed1f5a7
2019-10-10 11:48:31 +03:00
Nikita Popov
2f92957fd3
Convert some notices to warnings
...
Part of https://wiki.php.net/rfc/engine_warnings .
2019-10-02 10:34:08 +02:00