From d9da166649c2cd0b7811fef1d82f4fef8285578e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 16 Nov 2017 22:12:45 +0100 Subject: [PATCH] Minor fetch type adjustment cleanup No need to call adjust_fetch_type on FETCH_THIS, just to special case it in adjust_fetch_type... --- Zend/zend_compile.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 85d5abb965..3a130de7e6 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1934,10 +1934,6 @@ ZEND_API size_t zend_dirname(char *path, size_t len) static void zend_adjust_for_fetch_type(zend_op *opline, uint32_t type) /* {{{ */ { zend_uchar factor = (opline->opcode == ZEND_FETCH_STATIC_PROP_R) ? 1 : 3; - - if (opline->opcode == ZEND_FETCH_THIS) { - return; - } switch (type & BP_VAR_MASK) { case BP_VAR_R: @@ -2631,11 +2627,8 @@ static zend_bool is_this_fetch(zend_ast *ast) /* {{{ */ static void zend_compile_simple_var(znode *result, zend_ast *ast, uint32_t type, int delayed) /* {{{ */ { - zend_op *opline; - if (is_this_fetch(ast)) { - opline = zend_emit_op(result, ZEND_FETCH_THIS, NULL, NULL); - zend_adjust_for_fetch_type(opline, type); + zend_emit_op(result, ZEND_FETCH_THIS, NULL, NULL); } else if (zend_try_compile_cv(result, ast) == FAILURE) { zend_op *opline = zend_compile_simple_var_no_cv(result, ast, type, delayed); zend_adjust_for_fetch_type(opline, type); -- 2.40.0