Nikita Popov
7a306c0813
Fix skipif section in test
...
This was migrated to --EXTENSIONS--.
2021-04-06 09:58:49 +02:00
twosee
fc64a7bef4
Ignore some opcodes in JIT check
...
Some user opcode handler actually gets called when JIT is used, so do not disable JIT even if these user opcode handlers were registered, just ignore them.
ZEND_EXIT can help Swoole to detect exit/die operation and exit from the current coroutine and record exit_status correctly.
ZEND_*_SILENCE can help Swoole to switch EG(error_reporting) to keep the right behavior when using the error control operator.
So we ignore ZEND_EXIT, ZEND_BEGIN_SILENCE, ZEND_END_SILENCE in JIT check here.
Closes GH-6640.
2021-04-06 11:58:20 +08:00
Dmitry Stogov
22019a1edd
Fixed unintended string duplication
2021-04-05 17:55:42 +03:00
George Peter Banyard
705e93a22f
Fix necessary extensions list for OPcache test
2021-04-05 06:34:13 +01:00
Max Semenik
e9f783fcdd
Migrate skip checks to --EXTENSIONS--, p3
...
For rationale, see #6787
Extensions migrated in part 3:
* ftp
* gmp
* iconv
* opcache
* shmop
2021-04-03 15:23:25 +02:00
Dmitry Stogov
33f938bad0
Fixed macros
2021-04-02 19:22:30 +03:00
Mike Pall
83b01a920e
DynASM: Fix global label references
...
ARM64 patch contributed by Hao Sun and Nick Gasson.
2021-03-31 23:55:36 +03:00
Mike Pall
0b4f83f68f
DynASM/ARM64: Add VREG support.
...
Contributed by Hao Sun and Nick Gasson.
2021-03-31 23:54:22 +03:00
Dmitry Stogov
b428c51aea
Merge upstream DynAsm changes from LuaJIT
2021-03-31 23:51:19 +03:00
Dmitry Stogov
a6dd92f820
Remove reference to $GLOBALS. We don't create an actual variable for $GLOBALS any more .
2021-03-31 12:28:23 +03:00
Dmitry Stogov
8c001d5ba3
We don't create an actual variable for $GLOBALS any more.
2021-03-30 15:12:10 +03:00
Dmitry Stogov
849ae12e7a
Simplify auto-globals checks
2021-03-30 13:56:29 +03:00
Dmitry Stogov
7b2b9b4079
Improved JIT for TYPE_CHECK opcode
2021-03-25 23:48:08 +03:00
Dmitry Stogov
22fc522483
Improve JIT for IS_IDENTICAL
2021-03-25 17:27:03 +03:00
Dmitry Stogov
3e996622c7
Replace function with macro
2021-03-24 10:36:47 +03:00
Dmitry Stogov
7adaec1ce8
Move system independent code out from x86 specific header
2021-03-23 17:12:15 +03:00
Dmitry Stogov
c290de157c
Move x86 dependent code out from platform independed parts.
2021-03-23 16:39:51 +03:00
Dmitry Stogov
617276d807
Use capstone disassembler, if available.
2021-03-23 12:39:42 +03:00
Nikita Popov
6a5d60085d
Support VERIFY_RETURN_TYPE elision with unused operand
...
This handles the degenerate case where SCCP replaced the value in
the RETURN opcode with a constant, but the VERIFY_RETURN is still
there. We can still apply the same optimization, just don't need
to adjust the use list in this case.
The result is still sub-optimal in that a dead QM_ASSIGN is left
behind.
2021-03-22 14:54:29 +01:00
Dmitry Stogov
8ed8cf86a9
Use zend_string* instead of char*
2021-03-22 14:56:16 +03:00
Dmitry Stogov
6690547a58
Use zend_hash_lookup()
2021-03-19 23:34:38 +03:00
Nikita Popov
2d0e2733c8
Support prototypes in call graph
...
Even if we don't know the exact method being called, include it
in the call graph with the is_prototype flag. In particular, we
can still make use of return types from prototype methods, as
PHP 8 makes LSP violations a hard error.
Most other places are adjusted to skip calls with !is_prototype.
Maybe some of them would be fine, but ignoring them is conservative.
2021-03-19 10:49:15 +01:00
Nikita Popov
dcac654fd5
Allow inferring narrowed return type
...
Even if an explicit return type is given, we might still infer
a more narrow one based on return statements. We shouldn't
pessimize this just because a type has been declared.
2021-03-18 17:11:56 +01:00
Nikita Popov
2f73cbb1b1
Update one more use of NO_AUTOLOAD
2021-03-18 16:25:22 +01:00
Nikita Popov
8690efd1f8
Update opt test
...
And fix a type in the fetch class flags dumping while here.
2021-03-18 15:25:40 +01:00
Dmitry Stogov
eb8f5e4347
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fixed bug #80861 (erronous array key overflow in 2D array with JIT)
2021-03-17 23:00:22 +03:00
Dmitry Stogov
7e494d9225
Fixed bug #80861 (erronous array key overflow in 2D array with JIT)
2021-03-17 22:59:59 +03:00
Ilija Tovilo
269c8dac1d
Implement enums
...
RFC: https://wiki.php.net/rfc/enumerations
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com >
Closes GH-6489.
2021-03-17 19:08:03 +01:00
Dmitry Stogov
8f0ca7c16c
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fixed bug #80839 (PHP problem with JIT)
2021-03-17 16:55:42 +03:00
Dmitry Stogov
faf1567212
Fixed bug #80839 (PHP problem with JIT)
2021-03-17 16:55:09 +03:00
Nikita Popov
709e45d89b
Avoid unnecessary static_variables persistence
...
static_variables should be treated the same way as all other
op_array components nowadays (only static_variables_ptr is
special). There's no need to persist/serialize it is separately
per shared op_array.
2021-03-17 12:20:58 +01:00
Nikita Popov
4cff8c10a9
Simplify attribute persistence
...
For an inherited op_array, directly fetch the xlat entry, as we
do for everything else.
2021-03-17 11:52:45 +01:00
Dmitry Stogov
c732ab400a
Change Zend Stream API to use zend_string* instead of char*.
...
This allows to eliminate re-calculation of string lenght and hash value.
See the detailed list of changes in UPGRADING.INTERNALS.
2021-03-16 20:31:36 +03:00
Nikita Popov
82622d7583
Fix refcount inference for typed properties
...
We were not adding RC1/RCN if the MAY_BE_OBJECT came from a class
type and there was no other refcounted type in the union.
2021-03-16 11:17:18 +01:00
Nikita Popov
3b9ea4d289
Merge branch 'PHP-8.0'
...
* PHP-8.0:
ext/opcache: fix configure output while checking mmap MAP_ANON support
2021-03-15 10:53:08 +01:00
Michael Heimpold
eaf9421df6
ext/opcache: fix configure output while checking mmap MAP_ANON support
...
It seems that f3efb9e3fb introduced a "typo" which may result
in the following confusing message:
checking for mmap() using MAP_ANON shared memory support... no=yes
Let's fix this.
Signed-off-by: Michael Heimpold <mhei@heimpold.de >
Closes GH-6758.
2021-03-15 10:52:57 +01:00
Dmitry Stogov
65859fe17e
Inheritance cache optimization
2021-03-11 13:42:35 +03:00
Dmitry Stogov
d02197853e
Fixed assertion (ext/opcache/zend_persist.c:327: zend_accel_get_type_map_ptr: Assertion `ret > 2' failed)
2021-03-10 17:39:26 +03:00
Dmitry Stogov
d336ccaa08
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fixed bug #80814 (threaded mod_php won't load on FreeBSD: No space available for static Thread Local Storage)
2021-03-10 16:04:33 +03:00
Dmitry Stogov
3b377b51a2
Fixed bug #80814 (threaded mod_php won't load on FreeBSD: No space available for static Thread Local Storage)
2021-03-10 16:03:47 +03:00
Nikita Popov
8a134c9a26
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Add supports for FreeBSD's PROT_MAX to let mprotect knows X flag can be applied in addition.
2021-03-05 16:44:25 +01:00
David Carlier
ae23852e41
Add supports for FreeBSD's PROT_MAX to let mprotect knows X flag can be applied in addition.
...
Closes GH-6738.
2021-03-05 16:44:08 +01:00
Christoph M. Becker
9f7c6a824a
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Print error code if CreateMutex() fails
2021-03-05 15:09:26 +01:00
Christoph M. Becker
1c16749eaa
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Print error code if CreateMutex() fails
2021-03-05 15:08:24 +01:00
Christoph M. Becker
e0e167e581
Print error code if CreateMutex() fails
...
This issue came up recently in a bug report[1]; without the error code,
users can barely guess why the function failed.
[1] <https://bugs.php.net/80812 >
Closes GH-6745.
2021-03-05 15:06:18 +01:00
Nikita Popov
97de8cfc71
Fix dynamic func def persist with preloading
...
If we find an existing serialization of the op_array, of course
we also need to actually make use of it...
2021-03-04 16:15:05 +01:00
Dmitry Stogov
4b59071844
Switch to new ZPP
2021-03-04 02:11:21 +03:00
Dmitry Stogov
c28751c69c
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fixed bug #80802 : (zend_jit_fetch_indirect_var assert failure with tracing JIT)
2021-03-02 00:01:01 +03:00
Dmitry Stogov
957cb13a49
Fixed bug #80802 : (zend_jit_fetch_indirect_var assert failure with tracing JIT)
2021-03-01 23:57:20 +03:00
Nikita Popov
e857936518
Fixed bug #80805
...
Handle missing result_var in binary_op_result_type.
(cherry picked from commit 8446e28275 )
2021-03-01 15:13:15 +01:00