From: Dmitry Stogov Date: Mon, 16 Nov 2020 11:51:39 +0000 (+0300) Subject: Fixed incorrect FETCH_THIS optimization X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=edf5c1901f81160e8c3ac9827c0b4adc230f1b1a;p=php Fixed incorrect FETCH_THIS optimization --- diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 31ab4fab06..9acb47b3fe 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -5332,7 +5332,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par goto done; case ZEND_FETCH_THIS: delayed_fetch_this = 0; - if (ssa_op->result_def >= 0) { + if (ssa_op->result_def >= 0 && opline->result_type != IS_CV) { if (zend_jit_may_delay_fetch_this(ssa, ssa_opcodes, ssa_op->result_def)) { ssa->var_info[ssa_op->result_def].delayed_fetch_this = 1; delayed_fetch_this = 1;