Dmitry Stogov
6bf4041398
Backport fix for HASH/PACKED array inference through MAY_BE_ARRAY_EMPTY flag ( #12591 )
...
* Fixed HASH/PACKED array inference through MAY_BE_ARRAY_EMPTY flag
This fixes GH-12527
* typo
2023-11-03 10:54:57 +03:00
Nikita Popov
701e10c3b9
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Don't set ce for by-ref return type
2022-04-15 23:56:04 +02:00
Nikita Popov
b0ab5d0fb0
Don't set ce for by-ref return type
...
For the case where we upgrade a prototype to a possible by-ref
return from an inheriting method.
2022-04-15 23:55:48 +02:00
Christoph M. Becker
3be34c3b95
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix GH-8074: Wrong type inference of range() result
2022-02-22 10:21:07 +01:00
Christoph M. Becker
7ea3b19331
Merge branch 'PHP-8.0' into PHP-8.1
...
* PHP-8.0:
Fix GH-8074: Wrong type inference of range() result
2022-02-22 10:20:13 +01:00
Nikita Popov
9ecec661ce
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Preserve key/value type invariant in range() type inference
2021-10-11 12:42:06 +02:00
Nikita Popov
f0cf999223
Preserve key/value type invariant in range() type inference
...
Don't set PACKED key type if no value type is set.
Fixes oss-fuzz 6718410667458560.
2021-10-11 12:41:46 +02:00
Dmitry Stogov
c84c07e2db
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fixed type inference that may cause JIT failure
2021-10-06 14:58:47 +03:00
Dmitry Stogov
0b5d62e39c
Fixed type inference that may cause JIT failure
...
PHP allows to override a method that returns non-reference with a method
that returns a reference. This mean that we cannot use prototypes to
predict return types of a child functions.
2021-10-06 14:55:34 +03:00
Nikita Popov
2067388fe6
Merge branch 'PHP-8.1'
...
* PHP-8.1:
Fix range() return type inference for undef operand
2021-09-21 17:04:12 +02:00
Nikita Popov
a846547ed4
Fix range() return type inference for undef operand
...
This results in a long range.
2021-09-21 17:03:18 +02: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
9b170a41a7
Mark private function as static
2021-08-31 14:54:02 +02:00
Máté Kocsis
c19e4b9997
Generate optimizer func info from stubs for ext/standard - part 3 ( #7426 )
2021-08-30 15:56:47 +02:00
Máté Kocsis
8e6e9838b0
Add support for generating MAY_BE_ARRAY_OF_REF func info flag ( #7416 )
2021-08-30 13:50:34 +02:00
Máté Kocsis
b49d340f74
Generate optimizer func info from stubs for ext/standard - part 2 ( #7414 )
2021-08-27 16:54:04 +02:00
Máté Kocsis
3f0b586338
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix a few func info
2021-08-27 16:48:06 +02:00
Nikita Popov
51a504c8be
Avoid string copy in get_cfg_var()
...
basic_functions.c already has a macro for returning an ini
value to userland, so make use of it for get_cfg_var() as well,
after generalizing it to not write to return_value in particular.
2021-08-27 15:34:46 +02:00
Máté Kocsis
1ce81b6bcd
Generate optimizer func info from stubs for ext/standard - part 1 ( #7413 )
2021-08-27 13:11:57 +02:00
Máté Kocsis
8712fb5fe8
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix func info for str_replace() and str_ireplace()
2021-08-27 12:56:14 +02:00
Nikita Popov
7157a2a9ee
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Remove incorrect refcount info for addcslashes()
2021-08-27 12:13:57 +02:00
Máté Kocsis
fdc6082902
Generate optimizer func info from stubs for various extensions ( #7409 )
...
ext/hash, ext/iconv, ext/mbstring, ext/xml, ext/zlib
2021-08-26 19:52:11 +02:00
Máté Kocsis
68946bdd90
Generate optimizer func info from stubs for ext/gd and ext/pgsql ( #7408 )
2021-08-26 17:38:08 +02:00
Máté Kocsis
17ccabc6b6
Generate optimizer func info from stubs for ext/curl, ext/mysqli, ext/pcre ( #7407 )
2021-08-26 17:11:45 +02:00
Nikita Popov
6e1bedea5b
Merge branch 'PHP-8.0'
...
* PHP-8.0:
imagecolorsforindex() cannot return false
2021-08-26 16:37:05 +02:00
Máté Kocsis
9cd6c57ad1
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Sync ext/mysqli optimizer func info entries with the stubs
2021-08-26 12:14:21 +02:00
Máté Kocsis
765aec8623
Generate optimizer func info from stubs for ext/sodium ( #7404 )
2021-08-26 10:44:38 +02:00
Máté Kocsis
2d248c80b9
Generate optimizer func info from stubs for ext/date ( #7403 )
2021-08-25 21:29:46 +02:00
Máté Kocsis
50f31829b1
Generate optimizer func info from stubs for a few extensions - part 2 ( #7401 )
...
ext/bcmath, ext/fileinfo, ext/filter, ext/gettext, ext/session
2021-08-25 15:29:46 +02:00
Máté Kocsis
bdfe0ab505
Generate Zend, ext/spl and ext/json optimizer func info from stubs
...
Closes GH-7397
2021-08-25 10:37:27 +02:00
Máté Kocsis
b1822899fc
Add support for generating optimizer function info from stubs ( #7367 )
2021-08-24 16:35:33 +02:00
Máté Kocsis
58fcded8ec
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix a few optimizer func info
2021-08-24 15:21:27 +02:00
Nikita Popov
8c67abb67f
Drop gz aliases from func info
...
Func info does not need to include function aliases, we'll look
up based on the primary function name.
2021-08-23 10:41:41 +02:00
Nikita Popov
6e20f0f3a2
Returned interned string from fgetc()
...
Make use of single-character interned strings.
2021-08-16 11:15:23 +02:00
Nikita Popov
a4c2fb1462
Fix func info for constant()/get_defined_constants()
...
As pointed out on GH-7367, these have not been adjusted for
object constant support.
Now the only thing the type info specifies is that array of ref
is not possible.
2021-08-16 10:57:46 +02:00
Nikita Popov
7b85d3bbdd
Add support for verifying optimizer func info
...
This is guarded by -DZEND_VERIFY_FUNC_INFO=1. Enable this on the
variation job.
Closes GH-6924.
2021-07-21 12:24:30 +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
Nikita Popov
b420d09f4d
Fix type info for pg_socket()
...
This was mistakenly changed to MAY_BE_OBJECT when pgsql was
migrated to use objects. However, this particular function
still returns a (stream) resource.
2021-07-20 14:44:57 +02:00
Nikita Popov
c14c82e22f
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix bug #81272 : Fix func info for functions returning EMPTY_ARRAY
2021-07-20 14:41:43 +02:00
Ben Morss
81f6d36c90
Add avif support to ext/gd
...
This backports avif support from upstream libgd into bundled libgd
and exposes the functionality through new imagecreatefromavif()
and imageavif() functions.
Closes GH-7026.
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2021-06-10 12:32:30 +02:00
Máté Kocsis
6af5b369d7
Merge branch 'PHP-8.0'
...
* mysqli_get_client_info() cannot return null
2021-05-26 17:49:39 +02:00
Nikita Popov
b55793e45b
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Update func info for mysqli_connect
2021-05-26 14:36:52 +02:00
Máté Kocsis
532c60cb92
Add support for tentative return types of internal methods
...
RFC: https://wiki.php.net/rfc/internal_method_return_types
Closses GH-6971
2021-05-14 15:55:25 +02:00
Máté Kocsis
32aff25ceb
Convert resources to objects in ext/pgsql
...
Closes GH-6791
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2021-05-11 00:09:30 +02:00
KsaR
01b3fc03c3
Update http->https in license ( #6945 )
...
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
Nikita Popov
88ce1c71b5
Look up func info using function name rather than lcname of call
...
As we already have the called zend_function here, let's use the
name directly, rather than using the lcname of the call. This means
that aliases would be handled correctly automatically.
2021-04-28 12:13:05 +02:00
Nikita Popov
97c6d6605e
Remove FR/FX macros
...
Functions returning by-reference are generally a lost cause, we
won't be able to provide useful information for them.
2021-04-28 12:13:01 +02:00
Nikita Popov
d0610898f6
Remove UNKNOWN_INFO func info entries
...
There's no need to explicitly list that we don't know anything
about a function -- that's the default state.
2021-04-28 11:45:34 +02:00
Nikita Popov
bfa8b49196
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Remove incorrect func info for array_reduce() and pos()
2021-04-28 11:41:59 +02:00
Nikita Popov
08afe9891c
Merge branch 'PHP-8.0'
...
* PHP-8.0:
filter_var_array() may return array_of_ref
2021-04-28 11:28:06 +02:00