Skip to content

Commit 74c0ede

Browse files
committed
Remove unnecessary abstract function check in zend_get_call_op()
Abstract functions are now handled in the INIT stage, they do not affect DO opcodes anymore. Also add a check for another precondition, namely that the function is not a trampoline.
1 parent df4c276 commit 74c0ede

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Zend/zend_compile.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3589,16 +3589,17 @@ static uint32_t zend_compile_args(
35893589
ZEND_API zend_uchar zend_get_call_op(const zend_op *init_op, zend_function *fbc) /* {{{ */
35903590
{
35913591
if (fbc) {
3592+
ZEND_ASSERT(!(fbc->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE));
35923593
if (fbc->type == ZEND_INTERNAL_FUNCTION && !(CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS)) {
35933594
if (init_op->opcode == ZEND_INIT_FCALL && !zend_execute_internal) {
3594-
if (!(fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED))) {
3595+
if (!(fbc->common.fn_flags & ZEND_ACC_DEPRECATED)) {
35953596
return ZEND_DO_ICALL;
35963597
} else {
35973598
return ZEND_DO_FCALL_BY_NAME;
35983599
}
35993600
}
36003601
} else if (!(CG(compiler_options) & ZEND_COMPILE_IGNORE_USER_FUNCTIONS)){
3601-
if (zend_execute_ex == execute_ex && !(fbc->common.fn_flags & ZEND_ACC_ABSTRACT)) {
3602+
if (zend_execute_ex == execute_ex) {
36023603
return ZEND_DO_UCALL;
36033604
}
36043605
}

0 commit comments

Comments
 (0)