Skip to content

Commit

Permalink
Revert "zend_get_call_op ignoring compiler flags zend_get_call_op wil…
Browse files Browse the repository at this point in the history
…l ignore ZEND_COMPILE_IGNORE_USER_FUNCTIONS and ZEND_COMPILE_IGNORE_USER_FUNCTIONS, breaking the intention of these flags"

This reverts commit 46807ec.
  • Loading branch information
krakjoe committed Feb 21, 2019
1 parent dd9a7d9 commit 0bbbd0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions UPGRADING.INTERNALS
Expand Up @@ -17,7 +17,6 @@ PHP 7.4 INTERNALS UPGRADE NOTES
n. Assignments to references
o. ZEND_COMPILE_EXTENDED_INFO split
p. ZEND_EXT_FCALL_BEGIN can access arguments
q. ZEND_COMPILE_IGNORE_USER_FUNCTIONS and ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS

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

q. ZEND_COMPILE_IGNORE_USER_FUNCTIONS and ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS
are respected by zend_get_call_op such that when set, the only possible
call opcodes are ZEND_DO_FCALL and ZEND_DO_FCALL_BY_NAME, previously they
were ignored by zend_get_call_op.

========================
2. Build system changes
========================
Expand Down
4 changes: 2 additions & 2 deletions Zend/zend_compile.c
Expand Up @@ -3044,15 +3044,15 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc) /* {{{ */
ZEND_API zend_uchar zend_get_call_op(const zend_op *init_op, zend_function *fbc) /* {{{ */
{
if (fbc) {
if (fbc->type == ZEND_INTERNAL_FUNCTION && !(CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS)) {
if (fbc->type == ZEND_INTERNAL_FUNCTION) {
if (init_op->opcode == ZEND_INIT_FCALL && !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 (!(CG(compiler_options) & ZEND_COMPILE_IGNORE_USER_FUNCTIONS)){
} else {
if (zend_execute_ex == execute_ex && !(fbc->common.fn_flags & ZEND_ACC_ABSTRACT)) {
return ZEND_DO_UCALL;
}
Expand Down

0 comments on commit 0bbbd0f

Please sign in to comment.