|
|
|
@ -3132,26 +3132,30 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc) /* {{{ */ |
|
|
|
} |
|
|
|
/* }}} */ |
|
|
|
|
|
|
|
ZEND_API zend_uchar zend_get_call_op(zend_uchar init_op, zend_function *fbc) /* {{{ */ |
|
|
|
ZEND_API zend_uchar zend_get_call_op(const zend_op *init_op, zend_function *fbc) /* {{{ */ |
|
|
|
{ |
|
|
|
if (fbc) { |
|
|
|
if (fbc && init_op->opcode == ZEND_INIT_FCALL) { |
|
|
|
if (fbc->type == ZEND_INTERNAL_FUNCTION) { |
|
|
|
if (!zend_execute_internal && |
|
|
|
!fbc->common.scope && |
|
|
|
!(fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED|ZEND_ACC_HAS_TYPE_HINTS|ZEND_ACC_RETURN_REFERENCE))) { |
|
|
|
return ZEND_DO_ICALL; |
|
|
|
if (!zend_execute_internal) { |
|
|
|
if (!(fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED|ZEND_ACC_HAS_TYPE_HINTS|ZEND_ACC_RETURN_REFERENCE))) { |
|
|
|
return ZEND_DO_ICALL; |
|
|
|
} else { |
|
|
|
return ZEND_DO_FCALL_BY_NAME; |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (zend_execute_ex == execute_ex && |
|
|
|
!fbc->common.scope && |
|
|
|
!(fbc->common.fn_flags & ZEND_ACC_GENERATOR)) { |
|
|
|
return ZEND_DO_UCALL; |
|
|
|
if (zend_execute_ex == execute_ex) { |
|
|
|
if (!(fbc->common.fn_flags & ZEND_ACC_GENERATOR)) { |
|
|
|
return ZEND_DO_UCALL; |
|
|
|
} else { |
|
|
|
return ZEND_DO_FCALL_BY_NAME; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (zend_execute_ex == execute_ex && |
|
|
|
!zend_execute_internal && |
|
|
|
(init_op == ZEND_INIT_FCALL_BY_NAME || |
|
|
|
init_op == ZEND_INIT_NS_FCALL_BY_NAME)) { |
|
|
|
(init_op->opcode == ZEND_INIT_FCALL_BY_NAME || |
|
|
|
init_op->opcode == ZEND_INIT_NS_FCALL_BY_NAME)) { |
|
|
|
return ZEND_DO_FCALL_BY_NAME; |
|
|
|
} |
|
|
|
return ZEND_DO_FCALL; |
|
|
|
@ -3177,7 +3181,7 @@ void zend_compile_call_common(znode *result, zend_ast *args_ast, zend_function * |
|
|
|
} |
|
|
|
|
|
|
|
call_flags = (opline->opcode == ZEND_NEW ? ZEND_CALL_CTOR : 0); |
|
|
|
opline = zend_emit_op(result, zend_get_call_op(opline->opcode, fbc), NULL, NULL); |
|
|
|
opline = zend_emit_op(result, zend_get_call_op(opline, fbc), NULL, NULL); |
|
|
|
opline->op1.num = call_flags; |
|
|
|
|
|
|
|
zend_do_extended_fcall_end(); |
|
|
|
|