Skip to content

Commit 0ef2a22

Browse files
committed
Fix JIT support for static properties of self and parent
1 parent b63e161 commit 0ef2a22

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ext/opcache/jit/zend_jit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2396,8 +2396,8 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
23962396
if (!(opline->op1_type == IS_CONST
23972397
&& (opline->op2_type == IS_CONST
23982398
|| (opline->op2_type == IS_UNUSED
2399-
&& (opline->op2.num == ZEND_FETCH_CLASS_SELF
2400-
|| opline->op2.num == ZEND_FETCH_CLASS_PARENT))))) {
2399+
&& ((opline->op2.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF
2400+
|| (opline->op2.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT))))) {
24012401
break;
24022402
}
24032403
if (!zend_jit_fetch_static_prop(&ctx, opline, op_array)) {

ext/opcache/jit/zend_jit_trace.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6086,8 +6086,8 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
60866086
if (!(opline->op1_type == IS_CONST
60876087
&& (opline->op2_type == IS_CONST
60886088
|| (opline->op2_type == IS_UNUSED
6089-
&& (opline->op2.num == ZEND_FETCH_CLASS_SELF
6090-
|| opline->op2.num == ZEND_FETCH_CLASS_PARENT))))) {
6089+
&& ((opline->op2.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_SELF
6090+
|| (opline->op2.num & ZEND_FETCH_CLASS_MASK) == ZEND_FETCH_CLASS_PARENT))))) {
60916091
break;
60926092
}
60936093
if (!zend_jit_fetch_static_prop(&ctx, opline, op_array)) {

0 commit comments

Comments
 (0)