#
8ffbd465 |
| 04-May-2020 |
Nikita Popov |
Perform isupper check using sse2 as well Rather than just vectorizing the lowering, also vectorize the check for uppercase characters, using the same method.
|
#
d2c6bf20 |
| 28-Apr-2020 |
Xinchen Hui |
Folder mark
|
#
11491b63 |
| 28-Apr-2020 |
Xinchen Hui |
Also zend_str_tolower_dup_ex
|
#
58005d7b |
| 27-Apr-2020 |
Xinchen Hui |
Remove unnecessary register qualifier
|
#
6a500cb2 |
| 27-Apr-2020 |
Xinchen Hui |
SSE2 str_tolower
|
#
5430a466 |
| 02-Apr-2020 |
Nikita Popov |
Avoid control flow warning
|
#
cdaf3503 |
| 01-Apr-2020 |
Nikita Popov |
Improve "unsupported operands" error By mentioning the operand types. We can do that now, as the original operand types now remain available. Closes GH-5330.
|
#
9c0afc85 |
| 01-Apr-2020 |
Nikita Popov |
Remove op_func from TRY_BINARY_OP1 macro And move the operator overloading helpers into zend_operators.c, there's no reason for them to be in the header.
|
#
f182309e |
| 31-Mar-2020 |
Nikita Popov |
Refactor operator implementations Instead of looping, use straight-line code with the following layout: 1. Try to apply the base operation on the dereferenced operands. 2. T
Refactor operator implementations Instead of looping, use straight-line code with the following layout: 1. Try to apply the base operation on the dereferenced operands. 2. Try overloaded object operations. 3. Try to convert operands to number, else error out. 4. Apply the base operation on the converted operands. This makes the code easier to reason about and fixes some edge-case bugs: 1. We should only try invoking operator overloading once prior to type conversion. Previously it was invoked both before and after type conversion. 2. We should not modify any values if an exception is thrown. Previously we sometimes modified the LHS of a compound assignment operator. 3. If conversion of the first operand fails, we no longer try to convert the second operand. I think the previous behavior here was fine as well, but this still seems a more typical. This will also make some followup changes I have in mind simpler.
show more ...
|
#
944b10e3 |
| 31-Mar-2020 |
Nikita Popov |
Remove unused argument form convert_object_to_type()
|
#
0509a1e0 |
| 31-Mar-2020 |
Nikita Popov |
Clean up silent/noisy flag in convert_to_number
|
#
8fd7f02e |
| 31-Mar-2020 |
Nikita Popov |
Make cast_object handler required Avoid subtle differences in behavior depending on whether the handler is absent or returns FAILURE. If you previously set cast_object to NULL,
Make cast_object handler required Avoid subtle differences in behavior depending on whether the handler is absent or returns FAILURE. If you previously set cast_object to NULL, create a handler that always returns FAILURE instead.
show more ...
|
#
bef4b2e4 |
| 31-Mar-2020 |
Nikita Popov |
Report object cast failures internally Make cast_object return FAILURE for casts to int/float, rather than throwing a notice and returning SUCCESS. Instead move the emission of the n
Report object cast failures internally Make cast_object return FAILURE for casts to int/float, rather than throwing a notice and returning SUCCESS. Instead move the emission of the notice to the code invoking cast_object. This will allow us to customize the behavior per call-site. This change is written to be NFC, and the code in zend_std_compare_objects() should illustrate the current behavior doesn't make a lot of sense.
show more ...
|
#
26327bcd |
| 29-Oct-2019 |
Nikita Popov |
Throw "Unsupported operand types" error when using ** on arrays
|
#
c858d17f |
| 25-Oct-2019 |
Nikita Popov |
Optimize instanceof_function Split out the simple equality check into an inline function -- this is one of the common cases. Replace instanceof_function_ex with zend_class_imple
Optimize instanceof_function Split out the simple equality check into an inline function -- this is one of the common cases. Replace instanceof_function_ex with zend_class_implements_interface. There are a few more places where it may be used.
show more ...
|
#
184ba0c9 |
| 24-Oct-2019 |
Nikita Popov |
Remove recursive check from instanceof_interface Parent interfaces are copied into the interface list during inheritance, so there's no need to perform a recursive check. Only e
Remove recursive check from instanceof_interface Parent interfaces are copied into the interface list during inheritance, so there's no need to perform a recursive check. Only exception are instanceof checks performed during inheritance itself. However, we already have unlinked_instanceof for this purpose, it just needs to be taught to handle this case. Closes GH-4857.
show more ...
|
#
c63a0e00 |
| 24-Oct-2019 |
Nikita Popov |
Optimize instanceof_class/interface instanceof_class does not need to check for a NULL pointer in the first iteration -- passing NULL to this function is illegal. instanceof_int
Optimize instanceof_class/interface instanceof_class does not need to check for a NULL pointer in the first iteration -- passing NULL to this function is illegal. instanceof_interface does not need to use instanceof_class(), it only has to check whether the CEs match exactly. There is no way for an interface to appear inside "parent", it will always be in "interfaces" only.
show more ...
|
#
435f2691 |
| 24-Oct-2019 |
Nikita Popov |
Clean up and clarify instanceof_function_ex() The instanceof_interface_only() function was dead code (always returned zero). Clarify that the last parameter indicates whether th
Clean up and clarify instanceof_function_ex() The instanceof_interface_only() function was dead code (always returned zero). Clarify that the last parameter indicates whether the passed CE is interface or class and rewrite the code in terms of assertions.
show more ...
|
#
21148679 |
| 08-Oct-2019 |
Nikita Popov |
Handle "non well formed" exception during ZPP Previously if the "non well formed" notice was converted into an exception we'd still end up executing the function. Also drop the
Handle "non well formed" exception during ZPP Previously if the "non well formed" notice was converted into an exception we'd still end up executing the function. Also drop the now unnecessary EG(exception) checks in the engine. Additionally remote a bogus exception in zend_is_callable: It should only be writing to error, but not directly throwing.
show more ...
|
#
b02b8129 |
| 07-Oct-2019 |
Dmitry Stogov |
Comparison cleanup: - introduce zend_compare() that returns -1,0,1 dirctly (without intermediate zval) - remove compare_objects() object handler, and keep only compare() handler
|
#
2f92957f |
| 01-Oct-2019 |
Nikita Popov |
Convert some notices to warnings Part of https://wiki.php.net/rfc/engine_warnings.
|
#
ab938d7b |
| 26-Sep-2019 |
Nikita Popov |
Fix memory leak with ** on array operands
|
#
638c2176 |
| 23-Jun-2019 |
Peter Kokot |
Remove HAVE_STRCOLL check The strcoll function is defined in the C89 standard and should be on today's systems always available via the <string.h> header. https://port70.net/~ns
Remove HAVE_STRCOLL check The strcoll function is defined in the C89 standard and should be on today's systems always available via the <string.h> header. https://port70.net/~nsz/c/c89/c89-draft.html#4.11.4.3 - Remove also SKIPIF strcoll check in test
show more ...
|
#
a59e0cfc |
| 20-Jun-2019 |
Nikita Popov |
Disable float division by zero sanitizer for div_function We intentionally divide by zero here and want to get IEEE-754 semantics.
|
#
ed2a2423 |
| 19-Jun-2019 |
Nikita Popov |
Fix signed shift UB
|