Dmitry Stogov
e9f9e9f863
Perform early guard type check for result of FETCH_CONSTANT
2020-12-09 22:24:03 +03:00
Dmitry Stogov
64dc79f906
Trampoline cleanup
2020-11-16 12:05:45 +03:00
Dmitry Stogov
de359c00b4
Stop on fake frame
2020-11-11 14:54:54 +03:00
Dmitry Stogov
11c4821ba9
[Observer+JIT] Save opline before calling begin/end handlers
2020-11-11 13:50:53 +03:00
Nikita Popov
0571f09424
Rename opcache.jit_max_loops_unroll to opcache.jit_max_loop_unrolls
2020-11-02 12:25:21 +01:00
Dmitry Stogov
aecb05f5e7
Give preference to ENTER->RECURSIVE_CALL trace over ENTER->RETURN
2020-09-30 12:21:15 +03:00
Dmitry Stogov
b44cf93774
Allow tracing JIT cooperate with function JIT.
2020-09-29 16:33:32 +03:00
Dmitry Stogov
2a71cb3ce1
Improved trace selection rules
2020-09-28 17:04:34 +03:00
Dmitry Stogov
5783e611a2
Improve trace selection (avoid blacklisting of trace that may be linked).
2020-09-23 23:50:44 +03:00
Dmitry Stogov
3c4fb70f2b
Replace ZEND_JIT_TRACE_STOP_RETURN_HALT and ZEND_JIT_TRACE_STOP_HALT by separate ZEND_JIT_TRACE_HALT flag.
2020-09-23 15:44:04 +03:00
Dmitry Stogov
f5bbb0480e
Tracing JIT for INIT_DYNAMIC_CALL (closure only)
2020-09-15 15:57:57 +03:00
Dmitry Stogov
6b521a98d4
Fixed support for deprecated constants (Zend/tests/const_deprecation.phpt failure)
2020-09-03 10:49:58 +03:00
Dmitry Stogov
91edb90767
JIT for FETCH_CONSTANT
2020-09-03 00:51:43 +03:00
Dmitry Stogov
91d7e872e0
Fixed nested init fcall guards.
2020-09-01 12:24:11 +03:00
Dmitry Stogov
e86b5c872d
Record information about packed arrays
2020-08-25 19:39:42 +03:00
Nikita Popov
d92229d8c7
Implement named parameters
...
From an engine perspective, named parameters mainly add three
concepts:
* The SEND_* opcodes now accept a CONST op2, which is the
argument name. For now, it is looked up by linear scan and
runtime cached.
* This may leave UNDEF arguments on the stack. To avoid having
to deal with them in other places, a CHECK_UNDEF_ARGS opcode
is used to either replace them with defaults, or error.
* For variadic functions, EX(extra_named_params) are collected
and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS.
RFC: https://wiki.php.net/rfc/named_params
Closes GH-5357.
2020-07-31 15:53:36 +02:00
Dmitry Stogov
fd56fd2279
Always record ZEND_JIT_TRACE_START and ZEND_JIT_TRACE_END
2020-07-28 03:23:28 +03:00
Dmitry Stogov
96a1b409df
Don't record "fake" closures
2020-07-23 15:18:28 +03:00
Dmitry Stogov
7686118212
Fix type recording and side exit information for FE_FETCH_* instructions
2020-07-21 15:39:13 +03:00
Dmitry Stogov
be0d912674
Avoid recording of uninitialized variable
2020-07-21 14:11:19 +03:00
Dmitry Stogov
774bc760af
Fixed VM interrupt handling
2020-07-20 23:14:23 +03:00
Dmitry Stogov
2b7035e824
Fixed tracing JIT for VM without global register variables
2020-07-20 20:59:31 +03:00
Máté Kocsis
d30cd7d7e7
Review the usage of apostrophes in error messages
...
Closes GH-5590
2020-07-10 21:05:28 +02:00
Dmitry Stogov
8d15a2bc8e
Restore registers
2020-07-10 12:51:19 +03:00
Dmitry Stogov
9d14bdb377
Bad function detection
2020-07-09 17:24:35 +03:00
Dmitry Stogov
24a8065f8b
Tracing JIT support for include() and generators
2020-06-29 21:40:49 +03:00
Dmitry Stogov
1ca2fd2b16
Don't record "fake" closures
2020-06-29 20:37:50 +03:00
Dmitry Stogov
1434983ad1
Cheaper exception checks
2020-06-25 13:23:43 +03:00
Dmitry Stogov
e9f295ac84
Tracing JIT support for megamorphic calls
2020-06-09 23:33:22 +03:00
Christoph M. Becker
5a04796f76
Fix MSVC level 1 (severe) warnings
...
We fix (hopefully) all instances of:
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4005 >
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4024 >
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4028 >
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4047 >
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4087 >
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4090 >
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4273 >
* <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4312 >
`zend_llist_add_element()` and `zend_llist_prepend_element()` now
explicitly expect a *const* pointer.
We use the macro `ZEND_VOIDP()` instead of a `(void*)` cast to suppress
C4090; this should prevent accidential removal of the cast by
clarifying the intention, and makes it easier to remove the casts if
the issue[1] will be resolved sometime.
[1] <https://developercommunity.visualstudio.com/content/problem/390711/c-compiler-incorrect-propagation-of-const-qualifie.html >
2020-06-05 11:17:05 +02:00
Nikita Popov
ec3ee1f173
Fix Windows build
2020-05-29 12:58:31 +02:00
Dmitry Stogov
dc7a0fb236
Allow tracing JIT generate code when function exits from VM (e.g. for magic __get/__set)
2020-05-29 13:25:59 +03:00
Dmitry Stogov
de7a0df0a2
Fixed use-after-free in tracing JIT when recording closures and top-level op_arrays.
2020-05-29 00:45:28 +03:00
Dmitry Stogov
c16dbed0c4
Avoid recording of uninitialized types.
...
VM doesn't set Z_TYPE() for IS_VAR when passes class_entry reference.
2020-05-28 14:39:41 +03:00
Dmitry Stogov
efbe96166d
Split "opcache.jit_max_recursion_unroll" into "opcache.jit_max_recursive_calls" and "opcache.jit_max_recursive_returns".
...
It's possible to disable recording of "recursive return loops" setting opcache.jit_max_recursive_returns to 0.
2020-05-28 12:28:05 +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
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
8c19e611aa
Make JIT parameters configurable through opcache.jit_... options
2020-05-19 13:35:02 +03:00
Dmitry Stogov
d377467d86
Keep ZEND_FUNC_INFO() for all run-time JIT triggers
2020-05-18 19:00:38 +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
93640db4d5
Improve error message for deprecated methods
2020-05-14 17:23:31 +02:00
Dmitry Stogov
98d8bcc13a
Better trace_buffer packing
2020-05-13 15:45:42 +03:00
Dmitry Stogov
dcedc31979
Use proper "cost"
2020-05-08 00:56:03 +03:00
Dmitry Stogov
9af2f0fa78
More accurate tracing JIT for RETURN with unknown return address
2020-05-07 22:01:59 +03:00
Dmitry Stogov
b63eff17ff
Initial support for IS_INDIRECT. Avoid type guards for IS_INDIRECT.
2020-05-06 22:27:38 +03:00
Tyson Andre
54febdbc7d
Fix other typos in param name/code comments
...
Closes GH-5502
2020-05-01 12:23:16 +02:00
Dmitry Stogov
65934d31d1
Improved tracing JIT for nested calls
2020-04-29 18:24:18 +03:00
Dmitry Stogov
faa57abe71
white space fixes
2020-04-29 13:29:01 +03:00
Dmitry Stogov
4006c0008e
Save CPU regesters on side exit for deoptimization
2020-04-06 23:48:20 +03:00
Dmitry Stogov
7069b55ba4
Fixed recording classes of object references
2020-03-16 23:08:07 +03:00