1
0
mirror of https://github.com/php/php-src.git synced 2026-04-03 06:02:23 +02:00
Commit Graph

3105 Commits

Author SHA1 Message Date
Dmitry Stogov
0bf2bfcf8d Fixed tracing JIT for CALL VM 2020-05-27 17:05:06 +03:00
Dmitry Stogov
645ff9c8f6 Revert "Fixed tracing JIT for CALL VM"
This reverts commit 7f3a296f84.
2020-05-27 17:04:31 +03:00
Dmitry Stogov
7f3a296f84 Fixed tracing JIT for CALL VM 2020-05-27 15:59:29 +03:00
Dmitry Stogov
f91283fcd4 Fixed JIT for ext/opcache/tests/bool_not_cv.phpt with opcache.jit=1202 2020-05-27 10:57:33 +03:00
Dmitry Stogov
6e5247275a Fixed JIT for ext/opcache/tests/jit/cmp_004.phpt with opcache.jit=1201 2020-05-27 09:59:12 +03:00
Dmitry Stogov
d2f811438e Set proper jit_extension for inherited methods 2020-05-27 09:58:03 +03:00
Máté Kocsis
0de3ca4f98 Let's try to fix the JIT compiler warning 2020-05-26 20:56:29 +02:00
Máté Kocsis
fbe30592d6 Improve type error messages when an object is given
From now on, we always display the given object's type instead of just reporting "object".
Additionally, make the format of return type errors match the format of argument errors.

Closes GH-5625
2020-05-26 19:06:19 +02:00
Christoph M. Becker
38c85efe83 Fix picky builds
Due to `-Werror=maybe-uninitialized` a bogus warning may be thrown, so
we initialize the variable to work-around that.
2020-05-26 18:37:29 +02:00
Dmitry Stogov
15aa891c5e Fixed JIT for integer overflow checks 2020-05-26 17:59:15 +03:00
Dmitry Stogov
59e69eb1c9 Fixed JIT for (LONG_MIN % -1) 2020-05-26 14:49:29 +03:00
Dmitry Stogov
cf3b133a86 Fixed JIT for SEND_VAR $undefined_cv 2020-05-26 10:13:57 +03:00
Nikita Popov
ca358001b9 Revert "Fixed JIT for SEND_VAR $undefined_cv"
This reverts commit d60988257b.

This change causes segfaults in many tests.
2020-05-25 23:51:11 +02:00
Dmitry Stogov
0386cbb95c Fixed tracing JIT for RETRUN $undefined_cv 2020-05-25 22:19:13 +03:00
Máté Kocsis
b3718430de Annotate internal functions with the mixed type
Closes GH-5618
2020-05-25 17:30:57 +02:00
Dmitry Stogov
d60988257b Fixed JIT for SEND_VAR $undefined_cv 2020-05-25 18:24:50 +03:00
Dmitry Stogov
4aa8678306 ZEND_ACC_IMMUTABLE may be reset for closures 2020-05-25 17:45:13 +03:00
Dmitry Stogov
bfc56ed511 Keep trace number in EG(jit_trace_num) instead of EG(reserved)[zend_func_info_rid] 2020-05-25 17:05:26 +03:00
Dmitry Stogov
3376f19742 Check for ZEND_HANDLE_EXCEPTION opcode before accessing opline trace info. 2020-05-25 16:45:45 +03:00
Dmitry Stogov
201491e61b Replace warning code by side exit to VM 2020-05-25 15:14:27 +03:00
Dmitry Stogov
b35a9a4ce6 Reorder conditions to save one instruction in recursive return loop 2020-05-25 12:55:03 +03:00
Tyson Andre
f3efb9e3fb Fail in ./configure when no opcache shm backends exist
This can be seen when the `./configure` step fails to detect `HAVE_SHM_*`,
e.g. due to missing a necessary dependency to compile the test scripts.
(Run `./configure`, run `yum install libtool-ltdl-devel` for missing dependencies,
then run `make`, and php can end up built with 0 shared memory opcache caches)

Give a clearer error message than `unknown`
Searching for `opcache "Fatal Error Unable to allocate shared memory segment of"
"unknown: No such file or directory"` reveals issues such as
https://github.com/termux/termux-packages/issues/2234

Closes GH-5615
2020-05-24 17:49:52 -04:00
Dmitry Stogov
bb1a68b40c Use EX(run_time_cache) instead of RUN_TIME_CACHE(&EX(func)->op_array) 2020-05-21 18:35:32 +03:00
Dmitry Stogov
a9b2ff3dda simplification 2020-05-21 18:01:44 +03:00
Dmitry Stogov
2dfd6cd373 Allow counter settings to be "zero" to disable corresponding counter 2020-05-21 01:06:50 +03:00
Dmitry Stogov
d2446ca1d9 Missed label 2020-05-21 00:57:54 +03:00
Dmitry Stogov
b65d366bf8 Better condition 2020-05-20 23:05:48 +03:00
Dmitry Stogov
95248491af Prefer already cached version of the script 2020-05-20 23:04:34 +03:00
Tyson Andre
3e045d5f2b Fix grammar in the jit's README.md
For GH-5585
2020-05-20 10:01:34 -04:00
Tyson Andre
27b849ec9a [skip ci] Add a README for Opcache's JIT.
Mention information that would be useful for working on new features or bug
fixes for the JIT.

Closes GH-5585
2020-05-20 09:58:24 -04:00
Nikita Popov
0a74da385d Add support for replaying warnings in opcache
If opcache.record_warnings is enabled, opcache will record
compilation warnings and replay them when the file is included
again. The primary use case I have in mind for this is automated
testing of the opcache file cache.

This resolves bug #76535.
2020-05-20 11:20:21 +02:00
Nikita Popov
1b1d313275 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix static property indirections in file cache
  Don't require rc=1 for function static variables
2020-05-20 11:13:35 +02:00
Nikita Popov
db0cdcbb0a Fix static property indirections in file cache
If the class is already linked, we need to serialize and
unserialize INDIRECTed static properties. Normally these would
be set up when copying from cache.
2020-05-20 11:12:18 +02:00
Nikita Popov
057875d161 Disable JIT in file cache test
File cache and JIT are currently incomatible.
2020-05-20 09:50:12 +02:00
Dmitry Stogov
e35c163e33 Tracing JIT SHM data initilaizarion must be done at MINIT 2020-05-20 02:07:18 +03:00
Dmitry Stogov
d1a92ddc72 typo 2020-05-20 02:07:07 +03:00
Dmitry Stogov
928c796290 Make number of root and side traces configurable 2020-05-20 01:40:01 +03:00
Dmitry Stogov
e18f631abe Use light version of zend_array_destroy() to free arrays without refcounted elements and string indexes. 2020-05-20 00:12:24 +03:00
Dmitry Stogov
6faa08f41c Separate common code 2020-05-19 16:59:07 +03:00
Nikita Popov
74ef4bd7ed Fix opcache_get_configuration() test 2020-05-19 14:12:30 +02:00
Dmitry Stogov
8c19e611aa Make JIT parameters configurable through opcache.jit_... options 2020-05-19 13:35:02 +03:00
Nikita Popov
33b5c026aa Extract zend_foreach_op_array()
Move this functionality from zend_call_graph into zend_optimizer,
because we use this pattern in a number of places.
2020-05-19 11:15:54 +02:00
Dmitry Stogov
d377467d86 Keep ZEND_FUNC_INFO() for all run-time JIT triggers 2020-05-18 19:00:38 +03:00
Dmitry Stogov
5899b1611e Fixed JIT on load with -O4 2020-05-18 15:29:28 +03:00
Dmitry Stogov
eae6df494d Wrong condition 2020-05-18 15:04:39 +03:00
Dmitry Stogov
7a07deca0f Fixed JIT with non-HYBRID VM 2020-05-18 14:56:39 +03:00
Dmitry Stogov
99611573f0 Tracing JIT with -O1 doesn't need to do type inference and abstract stack maintaining 2020-05-18 14:39:49 +03:00
Dmitry Stogov
a463197d7a func_info should be empty 2020-05-18 14:30:55 +03:00
Dmitry Stogov
0695048e20 JIT refactoring to allow run-time changes of JIT options (triggers, optimization_level, debug flags, etc) 2020-05-18 10:23:06 +03:00
Máté Kocsis
1179686f62 Improve error messages for invalid property access
Closes GH-5446
Co-authored-by:  Nikita Popov <nikita.ppv@gmail.com>
2020-05-18 08:27:00 +02:00