Máté Kocsis
36935e42ea
Improve undefined variable error messages
...
Closes GH-5312
2020-03-31 13:02:32 +02:00
Dmitry Stogov
44390beb42
cleanup
2020-03-30 14:27:01 +03:00
Dmitry Stogov
4c9ee6a8ca
Initialize variable numbers
2020-03-30 12:50:19 +03:00
Dmitry Stogov
150df5b17c
Removed useless variable
2020-03-27 12:24:15 +03:00
George Peter Banyard
3e6667d338
Fix -Wtype-limits warning by using correct type declaration in JIT trace
...
Namely int as that is the type of 'definition'
Closes GH-5299
2020-03-26 00:01:59 +01:00
Dmitry Stogov
51a305d2a4
Separate zend_jit_var_supports_reg() and cleanup
2020-03-25 23:09:32 +03:00
Dmitry Stogov
40fa6284eb
Fixed incorrect "TSSA start" headers
2020-03-25 23:07:21 +03:00
Dmitry Stogov
0684b9fcdc
Always print numeric opline numbers
2020-03-25 14:26:42 +03:00
Dmitry Stogov
ce8202f996
Rename "var" to "stack". This is an abstract stack that holds TSSA variable numbers.
2020-03-25 10:49:01 +03:00
Dmitry Stogov
af3142daaf
Make SSA dump format controlled by opcache.jit_debug more readable (always print opcode number).
...
This doesn't affect dumps controlled by opcache.opt_debug_level.
2020-03-24 22:44:11 +03:00
Nikita Popov
e88c7bf5c7
Fix signed integer overflow UB in dasm
...
Should hopefully fix the ubsan and community builds.
2020-03-23 11:12:42 +01:00
Nikita Popov
6766b5f9bc
Fix pointer UB in dynasm
...
Looks like newer GCC versions started warning about this.
2020-03-23 11:03:56 +01:00
Tyson Andre
26b9780d02
Fix compilation error on mac with -Wshift-negative-value
...
Fix for mac OS build error seen in ccc49ead68
when shifting -1 (max argument count?)
```
ext/opcache/jit/zend_jit_trace.c:1668:2:
error: shifting a negative signed value is undefined
[-Werror,-Wshift-negative-value]
TRACE_FRAME_INIT(frame, op_array, 0, -1);
```
Closes GH-5284.
2020-03-23 09:24:26 +01:00
Dmitry Stogov
4b8171e087
Add tracing JIT guards for INTI_FCALL_BY_NAME and INIT_NS_FCALL_BY_NAME
2020-03-20 16:59:02 +03:00
Dmitry Stogov
3715475381
JIT for INIT_NS_FCALL_BY_NAME
2020-03-20 15:36:40 +03:00
Dmitry Stogov
166bc64caf
CAST to the same type mat be JIT-ed as QM_ASSIGN
2020-03-20 13:31:55 +03:00
Dmitry Stogov
517c30b05f
JIT for FETCH_THIS
2020-03-20 12:33:41 +03:00
Dmitry Stogov
ccc49ead68
Change jit_trace_stack_frame layout
2020-03-20 10:54:45 +03:00
Dmitry Stogov
9232af91fd
JIT for STRLEN
2020-03-20 01:23:36 +03:00
Dmitry Stogov
3958d5bdc5
JIT for ECHO and variable string operands
2020-03-20 01:01:33 +03:00
Dmitry Stogov
282265bccd
JIT for SEND_FUNC_ARG
2020-03-19 23:59:11 +03:00
Dmitry Stogov
8e879b9f44
JIT for ZEND_CHECK_FUNC_ARG
2020-03-18 23:56:03 +03:00
Dmitry Stogov
c2f1c36e30
Eliminate run-time check
2020-03-18 21:19:31 +03:00
Dmitry Stogov
12cdab2d76
Improved JIT for BIND_GLOBAL
2020-03-18 17:20:40 +03:00
Nikita Popov
70ef2f3817
Use different scratch register in read_obj
...
We already use r0 to hold the zval.
2020-03-18 11:44:34 +01:00
Nikita Popov
69937870da
Explicitly pass scratch register to SAVE_VALID_OPLINE
2020-03-18 11:44:25 +01:00
Dmitry Stogov
f767807986
Result of ASSIGN may be different from the assigned value when LHS is a typed reference
2020-03-18 01:40:41 +03:00
Dmitry Stogov
a8e8c40ad4
Use zend_fetch_arg_info_type()
2020-03-17 18:10:27 +03:00
Dmitry Stogov
29bef78e9f
Use _const_op_type() for converting constant into type info
2020-03-17 17:55:34 +03:00
Dmitry Stogov
4b89d96489
Improved JIT for ZEND_ASSIGN
2020-03-17 15:45:54 +03:00
Nikita Popov
b1a082da25
Fix typos
2020-03-17 12:59:37 +01:00
Dmitry Stogov
902e19ddf3
Store informaton about class
2020-03-17 00:25:47 +03:00
Dmitry Stogov
7069b55ba4
Fixed recording classes of object references
2020-03-16 23:08:07 +03:00
Nikita Popov
6a0b59d085
Slightly deduplicate code
...
This code is the same in both branches, extract it.
2020-03-16 17:07:27 +01:00
Nikita Popov
eb7e1df228
Remove "safe" argument from ZVAL_PTR_DTOR
...
This is no longer used
2020-03-16 17:07:27 +01:00
Nikita Popov
cfd79841f4
Fix typos
2020-03-16 17:07:27 +01:00
Nikita Popov
3723985058
Merge EX variants of INFO macros
2020-03-16 13:02:16 +01:00
Nikita Popov
d35ce5d661
Merge EX variants of RANGE macros
...
Only need to create the ssa_op variable in range inference...
2020-03-16 12:36:03 +01:00
Nikita Popov
44b3971b85
Merge zend_may_throw(_ex)
...
Explicitly pass ssa_op in the places that don't do so yet.
2020-03-16 12:24:40 +01:00
Nikita Popov
5c65562ce4
Remove unnecessary cast
2020-03-16 12:24:40 +01:00
Dmitry Stogov
4bf2d09ede
Tracing JIT (it doesn't support register allocation yet)
...
Use opcache.jit=1255 to swith it on (the third digit 5 really matters)
Use opcache.jit_debug=0xff001 to see how it works and what code it generates
2020-03-13 22:11:07 +03:00
Nikita Popov
191451da90
Fix bug #79358 : JIT miscompile in composer
2020-03-09 12:55:14 +01:00
Nikita Popov
941a3b6ccd
Remove unnecessary uses of CHECK_SILENT
...
If no error is passed, it is always silent.
2020-03-06 16:36:45 +01:00
Nikita Popov
33ef3d64da
Use separate typedef for bucket comparison function
...
Avoid performing the same casting dance inside each sort compare
function.
2020-03-04 12:46:06 +01:00
Nikita Popov
819a872cfa
Avoid more null arithmetic
2020-02-27 14:48:43 +01:00
Nikita Popov
1949a26aac
Remove more null arithmetic UB
...
Introduce an EX_NUM_TO_VAR macro to mirror EX_VAR_TO_NUM and
replace usages of the ZEND_CALL_VAR_NUM(NULL) pattern.
2020-02-27 12:54:48 +01:00
Nikita Popov
43443857b7
Add static return type
...
RFC: https://wiki.php.net/rfc/static_return_type
The "static" type is represented as MAY_BE_STATIC, rather than
a class type like "self" and "parent", as it has special
resolution semantics, and cannot be cached in the runtime cache.
Closes GH-5062.
2020-02-17 11:51:09 +01:00
Nikita Popov
f3d8ac1d95
Fix JIT trait type errors
...
We need to load EX->func here rather than use a hardcoded op_array,
as it may be copied with adjusted scope for traits.
2020-02-13 15:16:23 +01:00
Dmitry Stogov
b79af3d4df
Removed unused macro
2020-02-11 17:30:49 +03:00
Dmitry Stogov
a9e35b843c
Save delayed call frame
2020-02-10 13:43:32 +03:00