Mike Pall
58040f257c
DynASM/x86: Add missing escape in pattern.
2021-07-28 17:13:08 +03:00
Dmitry Stogov
e1f211f7bb
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fixed typo
2021-07-22 16:15:44 +03:00
Dmitry Stogov
8fbeebec34
Fixed typo
2021-07-22 16:14:26 +03:00
Dmitry Stogov
9c2b87c3cf
JIT: avoid $this check in closures called from methods
2021-07-22 16:05:43 +03:00
Dmitry Stogov
053c56f52e
Fixed bug #81226 (Integer overflow behavior is different with JIT enabled)
2021-07-21 19:28:43 +03:00
Nikita Popov
a3f5b11994
Sync JIT overloaded assign/inc/dec overloaded property
...
We should only release the read_property return value if
retval is used, same as in zend_execute.c. This fixes a test
failure under PROFITABILITY_CHECKS=0.
2021-07-21 10:45:02 +02:00
Nikita Popov
a190c7fdb7
Sync JIT zend_check_string_offset()
...
Return after zend_jit_illegal_string_offset() to avoid a redundant
warning during conversion.
This fixes some tests under PROFITABILITY_CHECKS=0.
2021-07-21 10:32:45 +02:00
Levi Morrison
ae8647d9d3
Remove leading underscore for _zend_hash_find_known_hash ( #7260 )
...
Convert zend_hash_find_ex(..., 1) to zend_hash_find_known_hash(...)
Convert zend_hash_find_ex(..., 0) to zend_hash_find(...)
Also add serializable changes to UPGRADING.INTERNALS summary
2021-07-20 17:07:17 -06:00
Dmitry Stogov
4cf7a25856
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fixed Bug #81255 (Memory leak in PHPUnit with functional JIT)
2021-07-20 22:17:41 +03:00
Dmitry Stogov
02acc5ad3b
Fixed Bug #81255 (Memory leak in PHPUnit with functional JIT)
2021-07-20 22:14:32 +03:00
Nikita Popov
6780aaa532
Implement readonly properties
...
Add support for readonly properties, for which only a single
initializing assignment from the declaring scope is allowed.
RFC: https://wiki.php.net/rfc/readonly_properties_v2
Closes GH-7089.
2021-07-20 12:05:46 +02:00
Christoph M. Becker
0ce1cd1370
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix #81206 : Multiple PHP processes crash with JIT enabled
2021-07-19 23:52:51 +02:00
Christoph M. Becker
ef77d3c89f
Fix #81206 : Multiple PHP processes crash with JIT enabled
...
We need to avoid resetting the JIT for all SAPIs, but we need to
initialize the JIT handlers even when only reattaching on Windows.
Closes GH-7208.
2021-07-19 23:45:37 +02:00
Kamil Tekiela
052af90b86
Deprecate autovivification on false
...
Deprecate automatically converting "false" into an empty array
on write operands. Autovivification continues to be supported
for "null" values, as well as undefined/uninitialized values.
RFC: https://wiki.php.net/rfc/autovivification_false
Closes GH-7131.
Co-authored-by: Tyson Andre <tysonandre775@hotmail.com >
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com >
2021-07-19 14:49:37 +02:00
Dmitry Stogov
28f6a2ba6e
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Avoid ASAN integer overflow warnings
2021-07-19 14:55:07 +03:00
Dmitry Stogov
15abbea5e7
Avoid ASAN integer overflow warnings
2021-07-19 14:53:23 +03:00
Dmitry Stogov
de1a1d5a36
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fixed incorrec immediate encoding when using LEA optimization
2021-07-19 14:53:09 +03:00
Hao Sun
c5d93aeee9
Fixed incorrec immediate encoding when using LEA optimization
2021-07-19 14:51:08 +03:00
Dmitry Stogov
66328742ea
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fixed bug #81249 (Intermittent property assignment failure with JIT enabled)
2021-07-19 12:14:55 +03:00
Dmitry Stogov
c0e4932816
Fixed bug #81249 (Intermittent property assignment failure with JIT enabled)
2021-07-19 12:11:09 +03:00
Dmitry Stogov
3621ce60e4
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fixed bug #81225 (Wrong result with pow operator with JIT enabled)
2021-07-19 10:43:08 +03:00
Dmitry Stogov
9cd437138e
Fixed bug #81225 (Wrong result with pow operator with JIT enabled)
2021-07-19 10:39:52 +03:00
Nikita Popov
6776e0557e
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Add exception check to zend_jit_fetch_obj_w_slow()
2021-07-14 16:58:16 +02:00
Nikita Popov
6fd880890c
Add exception check to zend_jit_fetch_obj_w_slow()
...
This ports 247105ae1a to the JIT
implementation. The issue doesn't trigger on the original test
case with JIT, but I ran into a case that does trigger with JIT
once we have typed properties.
2021-07-14 16:56:12 +02:00
Joe Watkins
d0b09a7be4
Add first-class callables
...
Support acquiring a Closure to a callable using the syntax
func(...), $obj->method(...), etc. This is essentially a
shortcut for Closure::fromCallable().
RFC: https://wiki.php.net/rfc/first_class_callable_syntax
Closes GH-7019.
Co-Authored-By: Nikita Popov <nikita.ppv@gmail.com >
2021-07-14 14:37:25 +02:00
Nikita Popov
d550c8488a
Fix unbalanced NEW call_level in JIT
...
For NEW followed by DO_FCALL, we handle both together and skip
over the DO_FCALL, which means that the call_level for it will
not be decremented. Do so explicitly instead.
2021-07-13 17:59:22 +02:00
George Peter Banyard
069a9fa5e4
Pure Intersection types ( #6799 )
...
Implement pure intersection types RFC
RFC: https://wiki.php.net/rfc/pure-intersection-types
Co-authored-by: Nikita Popov <nikic@php.net >
Co-authored-by: Ilija Tovilo <ilutov@php.net >
2021-07-05 14:11:03 +02:00
Dmitry Stogov
4743c7a16f
JIT/ARM64: Fixed incorrect trace linking.
2021-07-01 23:17:31 +03:00
Dmitry Stogov
ff983131e7
JIT/ARM64: Fixed possible incorrect exception catching in function JIT.
2021-06-30 18:18:30 +03:00
Dmitry Stogov
ef0d916d8f
Merge branch 'PHP-8.0'
...
* PHP-8.0:
JIT/x86: Fixed possible incorrect exception catching in function JIT.
2021-06-30 18:17:23 +03:00
Dmitry Stogov
99c0efc77a
JIT/x86: Fixed possible incorrect exception catching in function JIT.
2021-06-30 18:16:38 +03:00
Patrick Allaert
aff365871a
Fixed some spaces used instead of tabs
2021-06-29 11:30:26 +02:00
Ganesh Kandu
6157fcc010
Fix typedef redefinition warnings.
...
Closes GH-7197.
2021-06-28 10:11:43 +02:00
Nikita Popov
0e932f7cea
Don't directly include zend_jit_gdb.c
...
Compile the file separately and only include a header. There doesn't
seem to be a good reason to directly include the C file here, and
this ensures that there are no symbol clashes (see GH-7197).
2021-06-28 10:08:45 +02:00
Dmitry Stogov
973ae8d3e2
Move the whole "cold" path into the "cold" function.
2021-06-23 14:55:58 +03:00
Hao Sun
3e164dee99
JIT/AArch64: Support shifted immediate ( #7165 )
...
* JIT/AArch64: Support shifted immediate
As pointed out by MikePall in [1], shifted immediate value is supported.
See [2]. For example, `add x0, x1, #4096` would be encoded by DynASM
into `add x0, x1, #1 , lsl #12` directly.
In this patch, a helper is added to check whether an immediate value is
in the two allowed ranges: (1) 0 to 4095, and (2) LSL #12 on all the
values from the first range.
Note that this helper works for add/adds/sub/subs/cmp/cmn instructions.
[1] https://github.com/LuaJIT/LuaJIT/pull/718
[2]
https://github.com/LuaJIT/LuaJIT/blob/v2.1/dynasm/dasm_arm64.lua#L342
Change-Id: I4870048b9b8e6c429b73a4803af2a3b2d5ec0fbb
* Deprecatd CMP_IMM/ADD_SUB_IMM and add test cases
Macros CMP_IMM and ADD_SUB_IMM are deprecated and instead we use
this helper to guard the immediate encoding.
Add two 64-bit only test cases, since 64-bit integers are used
and tested inside.
Change-Id: I0b42d4617b40372e2f4ce5b6ad31a4ddb7d89e49
2021-06-23 17:18:03 +08:00
Dmitry Stogov
d72c320ff6
JIT/ARM64: Fixed possible incorrect register allocation
2021-06-17 18:43:15 +03:00
Dmitry Stogov
c02d7c4de8
Merge branch 'PHP-8.0'
...
* PHP-8.0:
JIT/x86: Fixed possible incorrect register allocation
2021-06-17 18:42:57 +03:00
Dmitry Stogov
ced8e88438
JIT/x86: Fixed possible incorrect register allocation
2021-06-17 18:42:11 +03:00
Dmitry Stogov
82bcc9b497
JIT/ARM64: Fixed "may be used uninitialized" compilation warning
2021-06-17 15:08:14 +03:00
Dmitry Stogov
6442cbfbc4
Merge branch 'PHP-8.0'
...
* PHP-8.0:
JIT: Fixed failures of tracing JIT with CALL VM
2021-06-17 14:26:36 +03:00
Dmitry Stogov
1082669e24
JIT: Fixed failures of tracing JIT with CALL VM
...
This fixes:
- tests/lang/bug28800.phpt
- Zend/tests/settype_resource.phpt
- Zend/tests/type_declarations/scalar_return_basic_64bit.phpt
2021-06-17 14:21:40 +03:00
Dmitry Stogov
3a78259525
JIT: Avoid too aggressive loop unrolling
...
This fixes tests/func/010.phpt failure with tracing JIT on ARM64.
2021-06-16 16:44:27 +03:00
sy-records
9333a22fa4
Fix typo
2021-06-10 10:24:41 +02:00
Dmitry Stogov
539948924c
Typo
2021-06-09 17:50:16 +03:00
Dmitry Stogov
cd90655ebc
JIT/ARM64: Remove redundand x86 specific optimization for recursive calls
...
On ARM64 we always load "func" into REG0
2021-06-09 16:55:51 +03:00
Dmitry Stogov
af319b072a
JIT/ARM64: Improve JIT for MOD instruction.
...
Eliminate x86 specific register constrints (idiv imlicitly used
%eax and %rdx). On ARM64 we use reserved TMP registers.
2021-06-09 15:17:51 +03:00
Dmitry Stogov
62e0b83204
JIT/x86: Reuse code when MOD is going to be converted to AND.
2021-06-09 15:15:06 +03:00
Dmitry Stogov
3fa0c99a1b
JIT/AArch64: Use only reserved TMP registers for EG(vm_interrupt) checks.
...
This removes limitation of REG0 usage for register-allocation.
2021-06-09 12:43:13 +03:00
Dmitry Stogov
029d06992e
JIT/AArch64: Use only reserved TMP registers for EG(jit_trace_num) assignment.
...
This eliminates a need for checking CPU registers used at the entry to a
side trace.
2021-06-09 12:02:11 +03:00