1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 21:11:02 +02:00
Commit Graph

3204 Commits

Author SHA1 Message Date
Christoph M. Becker
815a2be2ed Improve "VirtualProtect() failed" error messages
When `mprotect()` fails, the error message contains `errno` and the
respective `strerror()`; we add basically the same info on Windows.
2020-06-30 13:23:41 +02:00
Fabien Villepinte
0c6d06ecfa Replace EXPECTF when possible
Closes GH-5779
2020-06-29 21:31:44 +02:00
Dmitry Stogov
24a8065f8b Tracing JIT support for include() and generators 2020-06-29 21:40:49 +03:00
Dmitry Stogov
1ca2fd2b16 Don't record "fake" closures 2020-06-29 20:37:50 +03:00
Nikita Popov
75a04eac97 Make exit() unwind properly
exit() is now internally implemented by throwing an exception,
performing a normal stack unwind and a clean shutdown. This ensures
that no persistent resource leaks occur.

The exception is internal, cannot be caught and does not result in
the execution of finally blocks. This may be relaxed in the future.

Closes GH-5768.
2020-06-29 15:50:12 +02:00
Xinchen Hui
d005a8e92b Fixed bug #79743 (Fatal error when assigning to array property with JIT enabled)
simple typo
2020-06-29 17:47:21 +08:00
Nikita Popov
315ea609da Remove restriction on method call inlining
In PHP 8, we are guaranteed that $this exists, so we no longer have
to forbid this case.
2020-06-29 09:54:31 +02:00
Nikita Popov
bc62acf874 Merge branch 'PHP-7.4'
* PHP-7.4:
  Don't inline static call to instance method
2020-06-29 09:53:09 +02:00
Nikita Popov
fabcd9f14e Don't inline static call to instance method
Fixes the failure in bug79740.phpt with opcache.
2020-06-29 09:52:37 +02:00
Nikita Popov
1314ccbf8c Cache __unserialize() instead of unserialize()
We should use these cache slots for the new object serialization
mechanism rather than the old one.
2020-06-26 10:54:40 +02:00
Dmitry Stogov
9617c2a2f6 Use cheaper zend_hash_find_ex() to handle IS_CONST index 2020-06-26 11:18:04 +03:00
Dmitry Stogov
7e940823d5 Fixed incorrect type guard 2020-06-25 21:59:48 +03:00
Dmitry Stogov
4e7cac810f Move exception check to cold path. 2020-06-25 20:11:23 +03:00
Dmitry Stogov
037bfabd75 Optimization for +/- int(0) 2020-06-25 19:09:54 +03:00
Dmitry Stogov
50af4de0fe Improve tracing JIT for FETCH_THIS + FETCH_OBJ_* 2020-06-25 17:33:53 +03:00
Dmitry Stogov
94b637de5b Avoid $this check 2020-06-25 14:08:21 +03:00
Dmitry Stogov
1434983ad1 Cheaper exception checks 2020-06-25 13:23:43 +03:00
Nikita Popov
d071ab1928 Fix verify arg jit for references 2020-06-24 10:47:37 +02:00
Nikita Popov
c9b9f525a9 Include stub hash in generated arginfo files
The hash is used to check whether the arginfo file needs to be
regenerated. PHP-Parser will only be downloaded if this is actually
necessary.

This ensures that release artifacts will never try to regenerate
stubs and thus fetch PHP-Parser, as long as you do not modify any
files.

Closes GH-5739.
2020-06-24 09:55:19 +02:00
Dmitry Stogov
8b12ea04ee Improved JIT for RECV and RECV_INIT instructions 2020-06-23 23:21:56 +03:00
Dmitry Stogov
da1c672424 Replace exceptional code by side exit to VM 2020-06-23 18:31:42 +03:00
Dmitry Stogov
e2a8b3e120 Cleanup and better register usage 2020-06-23 17:51:02 +03:00
Dmitry Stogov
6ac16882d4 Reduce amount of "cold" code generated for FETCH_OBJ_* instructions 2020-06-23 17:16:44 +03:00
Dmitry Stogov
bdac60d2c0 Improve JIT for SEPARATE_ARRAY 2020-06-23 13:46:56 +03:00
Dmitry Stogov
c973f19744 Improve spill code 2020-06-23 12:27:14 +03:00
Dmitry Stogov
5681eaf5e5 Avoid register spilling 2020-06-23 11:40:36 +03:00
Dmitry Stogov
ea2b0d3c8b Fixed JIT failures on Windows 2020-06-22 14:57:04 +03:00
Vladyslav Startsev
2c97b401c6 make bcpowmod stricter by not returning false, instead throw exception
Closes GH-5747
2020-06-22 09:31:55 +02:00
David Carlier
ec80b781db Haiku opcache jit build update 2020-06-22 09:28:58 +03:00
Christoph M. Becker
6bc375f40a Mark failing tests as XFAIL for now
These test fail on Window since some recent changes to JIT; we mark
them as XFAIL until the issues are resolved.
2020-06-20 11:07:57 +02:00
David Carlier
bb61346580 Fix Haiku build
getrusage supports only two fields. The network api sits in the network lib.

Closes GH-5732.
2020-06-19 17:21:55 +02:00
Dmitry Stogov
b4b5734d80 JIT for FETCH_OBJ_W 2020-06-19 14:36:38 +03:00
Dmitry Stogov
6fa126e966 MAY_BE_INDIRECT inference 2020-06-18 18:54:32 +03:00
Dmitry Stogov
8cbb0ffcb1 Use guards for ZEND_FETCH_OBJ_R/IS to eliminate repeatable checks 2020-06-18 11:10:47 +03:00
Máté Kocsis
b516566b84 Convert CURL resources to objects
Closes GH-5402

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2020-06-17 16:11:57 +02:00
Dmitry Stogov
18347758d7 Improved JIT for SEPARATE_ARRAY 2020-06-17 14:45:25 +03:00
Dmitry Stogov
3830855a65 Tracing JIT support for PHP references in ASSIGN instruction 2020-06-17 12:24:51 +03:00
Dmitry Stogov
93aaf68088 cleanup 2020-06-17 10:32:53 +03:00
Christoph M. Becker
92c4b06513 Use ZEND_UNREACHABLE() instead of ZEND_ASSERT(0)
Instead of marking unreachable code with `ZEND_ASSERT(0)`, we introduce
`ZEND_UNREACHABLE()`, so that MSVC which does not consider `assert(0)`
to mark unreachable code does no longer trigger C4715[1] warnings in
debug builds.  This may be useful for other compilers as well.

[1] <https://docs.microsoft.com/de-de/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4715?view=vs-2019>
2020-06-16 18:39:09 +02:00
Dmitry Stogov
9ff3230c20 Merge exit points 2020-06-16 19:20:08 +03:00
Dmitry Stogov
626ccc45e4 Eliminate a dead check 2020-06-16 19:05:35 +03:00
Dmitry Stogov
8425214c1d Tracing JIT support for PHP references in array related instructions 2020-06-16 17:59:04 +03:00
Dmitry Stogov
77d0587fdb Use "lea" to add/sub register with constant 2020-06-16 14:04:05 +03:00
Dmitry Stogov
a459799910 Improved JIT for ZVAL_COPY_DEREF 2020-06-16 13:24:28 +03:00
David Carlier
727ae51a0c Fix JIT build on solaris/illumos
thr_self to detect the proper thread identifier but all
related typedef'd types conflict with the vtune part.
2020-06-16 11:18:50 +02:00
Nikita Popov
8b822afb0c Fix printf type 2020-06-16 10:57:29 +02:00
Dmitry Stogov
bdd8406372 Added JIT debug flag to dump the size of generated code (opcache.jit_debug=0x200) 2020-06-16 11:27:34 +03:00
Dmitry Stogov
a92022f878 Fixed JIT 2020-06-15 15:35:02 +03:00
Dmitry Stogov
bb3d4456ee Change GC_COLLECTABLE flag into GC_NOT_COLLECTABLE to simplify GC_MAY_LEAK() check 2020-06-15 14:26:22 +03:00
Dmitry Stogov
18f2ef094a FETCH_FIM_R/IS JIT improvement 2020-06-15 12:15:56 +03:00