Skip to content

Commit 0bbbd0f

Browse files
committed
Revert "zend_get_call_op ignoring compiler flags zend_get_call_op will ignore ZEND_COMPILE_IGNORE_USER_FUNCTIONS and ZEND_COMPILE_IGNORE_USER_FUNCTIONS, breaking the intention of these flags"
This reverts commit 46807ec.
1 parent dd9a7d9 commit 0bbbd0f

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

UPGRADING.INTERNALS

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ PHP 7.4 INTERNALS UPGRADE NOTES
1717
n. Assignments to references
1818
o. ZEND_COMPILE_EXTENDED_INFO split
1919
p. ZEND_EXT_FCALL_BEGIN can access arguments
20-
q. ZEND_COMPILE_IGNORE_USER_FUNCTIONS and ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS
2120

2221
2. Build system changes
2322
a. Abstract
@@ -179,11 +178,6 @@ PHP 7.4 INTERNALS UPGRADE NOTES
179178
p. ZEND_EXT_BEGIN_FCALL is emitted after arguments are sent, this means
180179
that handlers may access arguments.
181180

182-
q. ZEND_COMPILE_IGNORE_USER_FUNCTIONS and ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS
183-
are respected by zend_get_call_op such that when set, the only possible
184-
call opcodes are ZEND_DO_FCALL and ZEND_DO_FCALL_BY_NAME, previously they
185-
were ignored by zend_get_call_op.
186-
187181
========================
188182
2. Build system changes
189183
========================

Zend/zend_compile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3044,15 +3044,15 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc) /* {{{ */
30443044
ZEND_API zend_uchar zend_get_call_op(const zend_op *init_op, zend_function *fbc) /* {{{ */
30453045
{
30463046
if (fbc) {
3047-
if (fbc->type == ZEND_INTERNAL_FUNCTION && !(CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS)) {
3047+
if (fbc->type == ZEND_INTERNAL_FUNCTION) {
30483048
if (init_op->opcode == ZEND_INIT_FCALL && !zend_execute_internal) {
30493049
if (!(fbc->common.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_DEPRECATED|ZEND_ACC_HAS_TYPE_HINTS|ZEND_ACC_RETURN_REFERENCE))) {
30503050
return ZEND_DO_ICALL;
30513051
} else {
30523052
return ZEND_DO_FCALL_BY_NAME;
30533053
}
30543054
}
3055-
} else if (!(CG(compiler_options) & ZEND_COMPILE_IGNORE_USER_FUNCTIONS)){
3055+
} else {
30563056
if (zend_execute_ex == execute_ex && !(fbc->common.fn_flags & ZEND_ACC_ABSTRACT)) {
30573057
return ZEND_DO_UCALL;
30583058
}

0 commit comments

Comments
 (0)