Niels Dossche
fa5e29f7d0
Remove always-false if check
...
prop_info is NULL in this branch.
2024-07-02 02:51:18 -07:00
Niels Dossche
00691f4322
Remove always-true if check
2024-07-02 02:51:18 -07:00
Niels Dossche
00b36ce44a
Remove always-false opcode check
...
opcode cannot be ZEND_POST_INC because of the if check above.
2024-07-02 02:51:18 -07:00
Niels Dossche
7407e760f1
Remove duplicated code
...
The exact same code already exists above this.
2024-07-02 02:51:18 -07:00
Niels Dossche
985e5ffdb0
Remove doubled variable name from assignment
2024-07-02 02:51:18 -07:00
Benjamin Eberlei
72c874691b
RFC: Add #[\Deprecated] Attribute ( #11293 )
...
see https://wiki.php.net/rfc/deprecated_attribute
Co-authored-by: Tim Düsterhus <tim@tideways-gmbh.com >
Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com >
2024-07-02 09:44:25 +02:00
Peter Kokot
8291e81c00
Remove unused ZEND_JIT_IR ( #14760 )
...
Symbol was added when PHP-8.3 JIT engine was used with the IR JIT and is
now unused and redundant.
2024-07-02 08:19:45 +02:00
Peter Kokot
bee84c0468
Autotools: Quote PHP_SUBST arguments in extensions ( #14748 )
2024-07-02 06:56:18 +02:00
Peter Kokot
212b2834e9
Autotools: Sync indentation style in build system files ( #14725 )
2024-06-29 23:25:17 +02:00
Peter Kokot
c44834d8ad
Trim trailing whitespace ( #14721 )
2024-06-29 18:41:45 +02:00
Peter Kokot
3d6bd16239
Sync missing hash and pcre dependencies for opcache on Windows ( #14682 )
...
- ext/hash is required only on Windows
- ext/pcre is required
2024-06-27 18:23:01 +02:00
Peter Kokot
cf3b9fca8f
Sync #if/ifdef/defined (-Wundef) ( #14623 )
...
These are either define (to value 1) or undefined:
- __GNUC__
- DBA_CDB_BUILTIN
- DBA_GDBM
- HAVE_FORK
- HAVE_PUTENV
- HAVE_SETENV
- HAVE_SYS_SELECT_H
- HAVE_SYS_SOCKET_H
- HAVE_SYS_WAIT_H
- HAVE_UNSETENV
- RFC3678_API
- ZEND_ENABLE_ZVAL_LONG64
- ZTS
Follow-up of GH-5526
2024-06-24 19:37:07 +02:00
Peter Kokot
5d359cd4e5
Remove unused PHP-8.3 generated JIT files ( #14622 )
...
This remove unused PHP-8.3 generated JIT files and adds PHP-8.3
generated JIT files back to .gitignore to have smoother workflow
when switching PHP branches this can be ignored for a branch
or two.
2024-06-21 17:33:57 +02:00
Peter Kokot
11914de72c
Sync ext/dom and unistd.h include style ( #14597 )
2024-06-19 22:25:20 +02:00
Jakub Zelenka
b5c6d57c05
Merge branch 'PHP-8.3'
2024-06-19 00:06:10 +01:00
Dmitry Stogov
1f48715798
Merge branch 'PHP-8.3'
...
* PHP-8.3:
Fix GH-14475: PHP 8.3.7 with JIT encounters infinite loop on specific paths (#14558 )
2024-06-17 09:38:17 +03:00
Dmitry Stogov
e842ddfe4f
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix GH-14475: PHP 8.3.7 with JIT encounters infinite loop on specific paths (#14558 )
2024-06-17 09:38:02 +03:00
Dmitry Stogov
350af549a0
Fix GH-14475: PHP 8.3.7 with JIT encounters infinite loop on specific paths ( #14558 )
2024-06-17 09:37:44 +03:00
Bob Weinand
6a2c5318f9
Optimize observers ( #13649 )
...
Inline the lookup whether a function is observed at all.
This strategy is also used for FRAMELESS calls. If the frameless call is observed, we instead allocate a call frame and push the arguments, to call the the function afterwards.
Doing so is still a performance benefit as opposed to executing individual INIT_FCALL+SEND_VAL ops. Thus, even if the frameless call turns out to be observed, the call overhead is slightly lower than before.
If the internal function is not observed at all, the unavoidable overhead is fetching the FLF zend_function pointer and the run-time cache needs to be inspected.
As part of this work, it turned out to be most viable to put the result operand on the ZEND_OP_DATA instead of ZEND_FRAMELESS_ICALL_3, allowing seamless interoperability with the DO_ICALL opcode.
This is a bit unusual in comparison to all other ZEND_OP_DATA usages, but seems to not pose problems overall.
There is also a small issue resolved: trampolines would always use the ZEND_CALL_TRAMPOLINE_SPEC_OBSERVER function due to zend_observer_fcall_op_array_extension being set to -1 too late.
2024-06-15 14:42:27 +02:00
Niels Dossche
a4674654ab
opcache: change uses of sprintf into snprintf
2024-06-14 08:12:03 -07:00
Peter Kokot
5d3fab9334
Sync #if/ifdef/defined ( #14520 )
...
These are either undefined or defined (to value 1):
- __DragonFly__
- __FreeBSD__
- HAS_MCAST_EXT
- HAVE_GETCWD
- HAVE_GETWD
- HAVE_GLIBC_ICONV
- HAVE_JIT
- HAVE_LCHOWN
- HAVE_NL_LANGINFO
- HAVE_RL_CALLBACK_READ_CHAR
- HAVE_RL_ON_NEW_LINE
- HAVE_SQL_EXTENDED_FETCH
- HAVE_UTIME
Follow up of GH-5526 (-Wundef)
2024-06-11 22:47:05 +02:00
Gina Peter Banyard
7130a174bb
ext/opcache/jit: Fix -Wundef warning for HAVE_CAPSTONE
...
All other times this symbol is references #ifdef is used
2024-06-10 14:19:59 +01:00
Dmitry Stogov
6c9d443a21
Update IR
...
IR commit: 5be6dd81f19f85bc06085617e7231f8699d7f9b0
2024-06-10 11:49:08 +03:00
Peter Kokot
84a0da1574
Sync #if/ifdef/defined ( #14508 )
...
This syncs CPP macro conditions:
- _WIN32
- _WIN64
- HAVE_ALLOCA_H
- HAVE_ALPHASORT
- HAVE_ARPA_INET_H
- HAVE_CONFIG_H
- HAVE_DIRENT_H
- HAVE_DLFCN_H
- HAVE_GETTIMEOFDAY
- HAVE_LIBDL
- HAVE_POLL_H
- HAVE_PWD_H
- HAVE_SCANDIR
- HAVE_SYS_FILE_H
- HAVE_SYS_PARAM_H
- HAVE_SYS_SOCKET_H
- HAVE_SYS_TIME_H
- HAVE_SYS_TYPES_H
- HAVE_SYS_WAIT_H
- HAVE_UNISTD_H
- PHP_WIN32
- ZEND_WIN32
These are either undefined or defined to 1 in Autotools and Windows.
Follow up of GH-5526 (-Wundef).
2024-06-09 14:23:41 +02:00
Peter Kokot
743d1fd2a2
Sync -Wno-implicit-fallthrough
...
This is a sync of the https://github.com/php/php-src/pull/6252 after few
years:
- ext/date: pending recheck in GH-14187
- ext/hash: warning happens only on 32-bit build in
ext/hash/sha3/generic32lc/KeccakP-1600-inplace32BI.c
- ext/opcache: IR JIT doesn't seem to have this issue
- ext/pcre remains disabled due to pcre2lib/sljit/sljitNativeARM_64.c
(should be rechecked and fixed upstream)
2024-06-08 20:04:21 +02:00
Niels Dossche
89c4e4c4cb
Fix GH-11188: Error when building TSRM in ARM64 (for IR JIT) ( #14459 )
...
This is GH-11236 for IR JIT.
2024-06-04 19:47:07 +02:00
Niels Dossche
3e8752169c
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix GH-11188: Error when building TSRM in ARM64
2024-06-03 21:11:20 +02:00
nielsdos
644d3628e3
Fix GH-11188: Error when building TSRM in ARM64
...
Although the issue mentioned FreeBSD, this is a broader problem:
the current ARM64 code to load the TLS offset assumes a setup with
the non-default TLS model. This problem can also apply on some
configurations on other platforms.
Closes GH-11236.
2024-06-03 20:28:55 +02:00
Dmitry Stogov
802612bb54
Update IR
...
IR commit: 97555e12b525b825ab3b2f12bfdfd5cb6c00b2b4
2024-06-03 12:20:07 +03:00
Peter Kokot
ca55603d8a
Wrap ext/opcache AC_RUN_IFELSE checks in AC_CACHE_CHECK ( #14436 )
...
Cache variables php_cv_shm_ipc and php_cv_shm_mmap_anon enable manual
overriding of checks when cross-compiling.
2024-06-02 19:51:47 +02:00
Arnaud Le Blanc
cc6d9523d9
Merge branch 'PHP-8.3'
...
* PHP-8.3:
Fix TLS access in JIT on FreeBSD/amd64
2024-05-28 15:45:45 +02:00
Arnaud Le Blanc
5e895dda15
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix TLS access in JIT on FreeBSD/amd64
2024-05-28 15:43:59 +02:00
Arnaud Le Blanc
79862f24da
Fix TLS access in JIT on FreeBSD/amd64
...
DTV elements are 8 bytes in size a per ABI [1], and the index is offset by 1
on FreeBSD [2]
[1] http://people.redhat.com/drepper/tls.pdf
[2] bf56e8b9c8/libexec/rtld-elf/rtld.c (L5260)
Closes GH-13928
2024-05-28 15:42:57 +02:00
Dmitry Stogov
5109cf1010
Merge branch 'PHP-8.3'
...
* PHP-8.3:
Fix incorrect conditions
2024-05-28 08:38:00 +03:00
Dmitry Stogov
034bd85ad1
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix incorrect conditions
2024-05-28 08:37:48 +03:00
Dmitry Stogov
48ae025c33
Fix incorrect conditions
2024-05-28 08:37:20 +03:00
Dmitry Stogov
58c281a6cf
JIT: Add CPU registers support for ASSIGN_OBJ and ASSIGN_OBJ_OP ( #14303 )
...
* JIT: Add CPU registers support for ASSIGN_OBJ and ASSIGN_OBJ_OP
* Fix tests failures
* Fix tests failures
* Add missing GUARD
2024-05-23 19:25:06 +03:00
Ilija Tovilo
706e9ed058
Merge branch 'PHP-8.3'
...
* PHP-8.3:
Skip JIT test if php is compiled without jit
2024-05-23 16:35:58 +02:00
Ilija Tovilo
69a800151b
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Skip JIT test if php is compiled without jit
2024-05-23 16:35:51 +02:00
Ilija Tovilo
04c9749e35
Skip JIT test if php is compiled without jit
2024-05-23 16:35:29 +02:00
Dmitry Stogov
93c20de2f0
Update IR
...
IR commit: e87914bda3939072bf1e470e923599d73063d9f1
2024-05-23 09:40:35 +03:00
Dmitry Stogov
ace18f4919
JIT: Avoid IS_UNDEF check for ZEND_FETCH_DIM/OBJ_IS with a result type guard ( #14298 )
2024-05-22 17:33:40 +03:00
Ilija Tovilo
92b9543ca9
Merge branch 'PHP-8.3'
...
* PHP-8.3:
Fix enabling of JIT at runtime
2024-05-22 14:33:33 +02:00
Ilija Tovilo
706e79761e
Merge branch 'PHP-8.2' into PHP-8.3
...
* PHP-8.2:
Fix enabling of JIT at runtime
2024-05-22 14:33:25 +02:00
Ilija Tovilo
9506ca6001
Fix enabling of JIT at runtime
...
Fixes GH-14267
Closes GH-14294
2024-05-22 14:32:43 +02:00
Cristian Rodríguez
8e62e2b829
Mark multple functions as static ( #13864 )
...
* Mark many functions as static
Multiple functions are missing the static qualifier.
* remove unused struct sigactions
struct sigaction act, old_term, old_quit, old_int;
all unused.
* optimizer: minXOR and maxXOR are unused
2024-05-22 13:11:46 +02:00
Dmitry Stogov
896517e24f
JIT: Fix missing register store
...
Fixes master_COMMUNITY_asan "nightly" failure introduced by 13d5c812e0
2024-05-21 14:11:26 +03:00
Dmitry Stogov
13d5c812e0
JIT: Add CPU registers support for FETCH_OBJ_R ( #14253 )
2024-05-19 22:18:30 +03:00
Ilija Tovilo
600d591cae
Omit FETCH_THIS in closures
...
Non-static closures are guaranteed to have $this. The existing comment
highlights this, but fails to handle it correctly.
Closes GH-14181
2024-05-16 12:28:11 +02:00
Dmitry Stogov
5e7baaaad1
JIT: Remove old restriction. FETCH_DIM_R supports regs for indexes.
...
This affects only function JIT.
2024-05-16 12:02:03 +03:00