Dmitry Stogov
2d3ea98624
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed type inference (it's safe to ignore reference counting narrowing)
2021-11-29 23:39:37 +03:00
Dmitry Stogov
8cdead1568
Merge branch 'PHP-8.1'
...
* PHP-8.1:
JIT: Fix exception handling when next array element is already occupied
2021-11-29 21:57:38 +03:00
Dmitry Stogov
23c5a6fd16
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
JIT: Fix exception handling when next array element is already occupied
2021-11-29 21:57:29 +03:00
Dmitry Stogov
ee38e3ac37
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Disable type narrowing optimization when we contruct SSA for JIT
2021-11-29 15:54:53 +03:00
Dmitry Stogov
c6e895aec2
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Disable type narrowing optimization when we contruct SSA for JIT
2021-11-29 15:53:16 +03:00
Nikita Popov
902d64390e
Deprecate implicit dynamic properties
...
Writing to a proprety that hasn't been declared is deprecated,
unless the class uses the #[AllowDynamicProperties] attribute or
defines __get()/__set().
RFC: https://wiki.php.net/rfc/deprecate_dynamic_properties
2021-11-26 14:10:11 +01:00
Dmitry Stogov
7dcf853235
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fixed incorrect narrowing to double
2021-11-25 15:16:03 +03:00
Dmitry Stogov
b1a1ed380f
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed incorrect narrowing to double
2021-11-25 15:15:01 +03:00
Dmitry Stogov
35786e321b
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fixed incorrect refcountion inference for BW_NOT
2021-11-25 13:53:35 +03:00
Dmitry Stogov
ecc4d1326b
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed incorrect refcountion inference for BW_NOT
2021-11-25 13:53:26 +03:00
Dmitry Stogov
b976e75def
Merge branch 'PHP-8.1'
...
* PHP-8.1:
JIT: Fixed reference-counting inference
2021-11-15 10:40:51 +03:00
Dmitry Stogov
fb582f4230
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
JIT: Fixed reference-counting inference
2021-11-15 10:40:35 +03:00
Dmitry Stogov
b7f19f2674
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fixed incorrect reference counter inference
2021-11-08 20:55:09 +03:00
Dmitry Stogov
9bd490dc33
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed incorrect reference counter inference
2021-11-08 20:54:45 +03:00
Dmitry Stogov
e465218e35
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fixed type inference for FETCH_DIM_W without use
2021-11-03 19:45:42 +03:00
Dmitry Stogov
22a171a0b5
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed type inference for FETCH_DIM_W without use
2021-11-03 19:45:30 +03:00
Dmitry Stogov
bcef615959
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fixed incorrect assumption about reference counting
2021-11-01 20:29:27 +03:00
Dmitry Stogov
d4a7e4d1ff
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed incorrect assumption about reference counting
2021-11-01 20:28:33 +03:00
Nikita Popov
b4f2b24430
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Handle FETCH_DIM_R after FETCH_DIM_FUNC_ARG in inference
2021-11-01 14:27:22 +01:00
Nikita Popov
a89546d8b3
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Handle FETCH_DIM_R after FETCH_DIM_FUNC_ARG in inference
2021-11-01 14:27:14 +01:00
Nikita Popov
b41adb16cd
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix range inference hang
2021-11-01 12:32:15 +01:00
Nikita Popov
3d38960979
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix range inference hang
2021-11-01 12:32:04 +01:00
Nikita Popov
b743cd72d0
Fix inference if FETCH_DIM_W user optimized away
...
In this case the user may be a FREE.
Also add the test file that I forgot in
3ce472d1a6
.
2021-10-21 09:58:07 +02:00
Dmitry Stogov
176c319109
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fixed type inference for COPY_TMP
2021-10-11 16:56:49 +03:00
Dmitry Stogov
1208fe932a
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed type inference for COPY_TMP
2021-10-11 16:56:40 +03:00
Dmitry Stogov
f440894d9f
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fixed type inference (ASSIGN_OP with typed reference may cause type conversion)
2021-10-11 10:50:15 +03:00
Dmitry Stogov
04064187c2
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed type inference (ASSIGN_OP with typed reference may cause type conversion)
2021-10-11 10:50:06 +03:00
Nikita Popov
aa2f8311c6
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix array cast type inference wrt packed arrays
2021-10-06 10:51:30 +02:00
Nikita Popov
3661c1932c
Fix array cast type inference wrt packed arrays
...
Use KEY_LONG instead of PACKED if it's possible for the array to
be empty. It won't be packed in that case.
Fixes oss-fuzz #39650 .
2021-10-06 10:50:44 +02:00
Nikita Popov
5bf088f6eb
Move TYPE_CHECK handling from sccp to inference
...
The handling of TYPE_CHECK makes for an awkward special case,
because it is determined outside the usual SCCP framework. Instead
move the logic into type inference (to infer a more specific
may_be_true or may_be_false if possible). This will get picked up
by SCCP through the existing logic to make use of type and range
information.
However, this also requires us to make use of type info in
feasible edge marking, otherwise we would regress existing
optimization power.
2021-10-01 15:56:22 +02:00
Nikita Popov
e7a0c5b8c8
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix inference for INIT_ARRAY with illegal offset type
2021-09-29 11:09:22 +02:00
Nikita Popov
944d653b3d
Fix inference for INIT_ARRAY with illegal offset type
...
Extract assign_dim_array_result_type() helper that can be reused
for INIT_ARRAY and implements all this logic correctly.
Fixes oss-fuzz 5156868775870464.
2021-09-29 11:09:04 +02:00
Nikita Popov
8b7874b262
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix ASSIGN_DIM result inference with typed refs
Remove outdated code in ASSIGN_DIM type inference
2021-09-28 14:14:41 +02:00
Nikita Popov
69eb6e04a7
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix ASSIGN_DIM result inference with typed refs
Remove outdated code in ASSIGN_DIM type inference
2021-09-28 14:14:29 +02:00
Nikita Popov
25c264245b
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix type inference and SCCP with typed references
2021-09-28 12:59:33 +02:00
Nikita Popov
2b71df71a1
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix type inference and SCCP with typed references
2021-09-28 12:59:24 +02:00
Nikita Popov
aa285a015f
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix ASSIGN_STATIC_PROP_REF type inference
2021-09-22 15:55:57 +02:00
Nikita Popov
2dc8c7b3a7
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix ASSIGN_STATIC_PROP_REF type inference
2021-09-22 15:55:42 +02:00
Dmitry Stogov
dd73e5a0b6
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fixed type inference
2021-09-22 15:32:24 +03:00
Dmitry Stogov
cffba945e5
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fixed type inference
2021-09-22 15:32:16 +03:00
Nikita Popov
e05f36651b
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Don't unconditionally add array value type for undef
2021-09-21 14:54:42 +02:00
Nikita Popov
37337507ec
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Don't unconditionally add array value type for undef
2021-09-21 14:54:34 +02:00
George Peter Banyard
44bc955619
Check against FAILURE instead of different then SUCCESS
2021-09-21 11:35:53 +01:00
George Peter Banyard
25deb7d254
Voidify zend_mark_cv_references()
...
It always returned SUCCESS
2021-09-21 11:35:53 +01:00
George Peter Banyard
85634c9c1c
Voidify zend_infer_ranges()
...
It always returned SUCCESS
2021-09-21 11:35:53 +01:00
George Peter Banyard
6c928f3529
Voidify zend_ssa_find_false_dependencies()
...
It always returned SUCCESS
2021-09-21 11:35:53 +01:00
George Peter Banyard
ad3544b08c
Voidify zend_ssa_find_sccs()
...
It always returned SUCCESS
2021-09-21 11:35:53 +01:00
George Peter Banyard
53d5420d49
Use more appropriate types in Optimizer
...
Mainly using zend_result and bool instead of int
2021-09-21 11:35:53 +01:00
Nikita Popov
a6615b3419
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix FETCH_OBJ_IS type inference
2021-09-17 17:06:00 +02:00
Nikita Popov
bda1ee9511
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix FETCH_OBJ_IS type inference
2021-09-17 17:05:42 +02:00