summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Watkins <krakjoe@php.net>2019-02-21 22:40:02 +0100
committerJoe Watkins <krakjoe@php.net>2019-02-21 22:40:02 +0100
commit0bbbd0f9e7449a2f204f959d06e5266175a86be9 (patch)
tree973b7cce82c0e6d02684997c3bafcdf19ec0c4e6
parentdd9a7d91a5786da2c0f2ac47667944f17500e47e (diff)
downloadphp-git-0bbbd0f9e7449a2f204f959d06e5266175a86be9.tar.gz
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 46807ec5da23d399873d9a1fcf4b73b7a783d23b.
-rw-r--r--UPGRADING.INTERNALS6
-rw-r--r--Zend/zend_compile.c4
2 files changed, 2 insertions, 8 deletions
diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index fa02216f50..578637144b 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -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
@@ -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
========================
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index eee2347f49..1f6449fa94 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -3044,7 +3044,7 @@ 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;
@@ -3052,7 +3052,7 @@ ZEND_API zend_uchar zend_get_call_op(const zend_op *init_op, zend_function *fbc)
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;
}