Skip to content

Commit

Permalink
Fix JIT
Browse files Browse the repository at this point in the history
  • Loading branch information
iluuu1994 committed May 9, 2024
1 parent 26d0eb1 commit e7830f3
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 20 deletions.
35 changes: 25 additions & 10 deletions ext/opcache/jit/zend_jit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1724,8 +1724,11 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
on_this = 0;
if (opline->op1_type == IS_UNUSED) {
op1_info = MAY_BE_OBJECT|MAY_BE_RC1|MAY_BE_RCN;
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
/* scope is NULL for closures. */
if (op_array->scope) {
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
}
op1_addr = 0;
on_this = 1;
} else {
Expand Down Expand Up @@ -1772,8 +1775,11 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
on_this = 0;
if (opline->op1_type == IS_UNUSED) {
op1_info = MAY_BE_OBJECT|MAY_BE_RC1|MAY_BE_RCN;
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
/* scope is NULL for closures. */
if (op_array->scope) {
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
}
op1_addr = 0;
on_this = 1;
} else {
Expand Down Expand Up @@ -1813,8 +1819,11 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
on_this = 0;
if (opline->op1_type == IS_UNUSED) {
op1_info = MAY_BE_OBJECT|MAY_BE_RC1|MAY_BE_RCN;
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
/* scope is NULL for closures. */
if (op_array->scope) {
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
}
op1_addr = 0;
on_this = 1;
} else {
Expand Down Expand Up @@ -2283,8 +2292,11 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
if (opline->op1_type == IS_UNUSED) {
op1_info = MAY_BE_OBJECT|MAY_BE_RC1|MAY_BE_RCN;
op1_addr = 0;
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
/* scope is NULL for closures. */
if (op_array->scope) {
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
}
on_this = 1;
} else {
op1_info = OP1_INFO();
Expand Down Expand Up @@ -2434,8 +2446,11 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op
if (opline->op1_type == IS_UNUSED) {
op1_info = MAY_BE_OBJECT|MAY_BE_RC1|MAY_BE_RCN;
op1_addr = 0;
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
/* scope is NULL for closures. */
if (op_array->scope) {
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
}
on_this = 1;
} else {
op1_info = OP1_INFO();
Expand Down
35 changes: 25 additions & 10 deletions ext/opcache/jit/zend_jit_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -4652,8 +4652,11 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
op1_indirect = 0;
if (opline->op1_type == IS_UNUSED) {
op1_info = MAY_BE_OBJECT|MAY_BE_RC1|MAY_BE_RCN;
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
/* scope is NULL for closures. */
if (op_array->scope) {
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
}
op1_addr = 0;
on_this = 1;
} else {
Expand Down Expand Up @@ -4743,8 +4746,11 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
op1_indirect = 0;
if (opline->op1_type == IS_UNUSED) {
op1_info = MAY_BE_OBJECT|MAY_BE_RC1|MAY_BE_RCN;
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
/* scope is NULL for closures. */
if (op_array->scope) {
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
}
op1_addr = 0;
on_this = 1;
} else {
Expand Down Expand Up @@ -4823,8 +4829,11 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
op1_indirect = 0;
if (opline->op1_type == IS_UNUSED) {
op1_info = MAY_BE_OBJECT|MAY_BE_RC1|MAY_BE_RCN;
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
/* scope is NULL for closures. */
if (op_array->scope) {
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
}
op1_addr = 0;
on_this = 1;
} else {
Expand Down Expand Up @@ -5873,8 +5882,11 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
op1_indirect = 0;
if (opline->op1_type == IS_UNUSED) {
op1_info = MAY_BE_OBJECT|MAY_BE_RC1|MAY_BE_RCN;
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
/* scope is NULL for closures. */
if (op_array->scope) {
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
}
op1_addr = 0;
on_this = 1;
} else {
Expand Down Expand Up @@ -6152,8 +6164,11 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
ce_is_instanceof = 0;
if (opline->op1_type == IS_UNUSED) {
op1_info = MAY_BE_OBJECT|MAY_BE_RC1|MAY_BE_RCN;
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
/* scope is NULL for closures. */
if (op_array->scope) {
ce = op_array->scope;
ce_is_instanceof = (ce->ce_flags & ZEND_ACC_FINAL) != 0;
}
op1_addr = 0;
on_this = 1;
} else {
Expand Down

0 comments on commit e7830f3

Please sign in to comment.