History log of /PHP-8.4/ext/zend_test/tests/observer_frameless.phpt (Results 1 – 3 of 3)
Revision Date Author Comments
# 6a2c5318 15-Jun-2024 Bob Weinand

Optimize observers (#13649)

Inline the lookup whether a function is observed at all.
This strategy is also used for FRAMELESS calls. If the frameless call is observed, we instead allocat

Optimize observers (#13649)

Inline the lookup whether a function is observed at all.
This strategy is also used for FRAMELESS calls. If the frameless call is observed, we instead allocate a call frame and push the arguments, to call the the function afterwards.
Doing so is still a performance benefit as opposed to executing individual INIT_FCALL+SEND_VAL ops. Thus, even if the frameless call turns out to be observed, the call overhead is slightly lower than before.
If the internal function is not observed at all, the unavoidable overhead is fetching the FLF zend_function pointer and the run-time cache needs to be inspected.

As part of this work, it turned out to be most viable to put the result operand on the ZEND_OP_DATA instead of ZEND_FRAMELESS_ICALL_3, allowing seamless interoperability with the DO_ICALL opcode.
This is a bit unusual in comparison to all other ZEND_OP_DATA usages, but seems to not pose problems overall.

There is also a small issue resolved: trampolines would always use the ZEND_CALL_TRAMPOLINE_SPEC_OBSERVER function due to zend_observer_fcall_op_array_extension being set to -1 too late.

show more ...


# 33a523f6 02-Apr-2024 Bob Weinand

Add missing show_output to test after merge of e7462bff19228162a21ccc6dd248b0dbffc15517

Signed-off-by: Bob Weinand <bobwei9@hotmail.com>


# 631bc816 06-Feb-2024 Ilija Tovilo

Implement stackless internal function calls

Co-authored-by: Dmitry Stogov <dmitry@zend.com>

Closes GH-12461