Skip to content

Remove unused PHP 8.1 BC layer in JIT #9937

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions ext/opcache/jit/zend_jit_disasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,9 +697,6 @@ static int zend_jit_disasm_init(void)
REGISTER_HELPER(zend_jit_post_inc_obj_helper);
REGISTER_HELPER(zend_jit_post_dec_obj_helper);
REGISTER_HELPER(zend_jit_rope_end);
#if (PHP_VERSION_ID <= 80100) && (SIZEOF_SIZE_T == 4)
REGISTER_HELPER(zval_jit_update_constant_ex);
#endif
REGISTER_HELPER(zend_jit_free_trampoline_helper);
REGISTER_HELPER(zend_jit_exception_in_interrupt_handler_helper);
#undef REGISTER_HELPER
Expand Down
29 changes: 0 additions & 29 deletions ext/opcache/jit/zend_jit_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -3012,35 +3012,6 @@ static void ZEND_FASTCALL zend_jit_post_dec_obj_helper(zend_object *zobj, zend_s
}
}

#if (PHP_VERSION_ID <= 80100) && (SIZEOF_SIZE_T == 4)
static zend_result ZEND_FASTCALL zval_jit_update_constant_ex(zval *p, zend_class_entry *scope)
{
if (Z_TYPE_P(p) == IS_CONSTANT_AST) {
zend_ast *ast = Z_ASTVAL_P(p);

if (ast->kind == ZEND_AST_CONSTANT) {
zend_string *name = zend_ast_get_constant_name(ast);
zval *zv = zend_get_constant_ex(name, scope, ast->attr);
if (UNEXPECTED(zv == NULL)) {
return FAILURE;
}

zval_ptr_dtor_nogc(p);
ZVAL_COPY_OR_DUP(p, zv);
} else {
zval tmp;

if (UNEXPECTED(zend_ast_evaluate(&tmp, ast, scope) != SUCCESS)) {
return FAILURE;
}
zval_ptr_dtor_nogc(p);
ZVAL_COPY_VALUE(p, &tmp);
}
}
return SUCCESS;
}
#endif

static void ZEND_FASTCALL zend_jit_free_trampoline_helper(zend_function *func)
{
ZEND_ASSERT(func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE);
Expand Down
4 changes: 0 additions & 4 deletions ext/opcache/jit/zend_jit_x86.dasc
Original file line number Diff line number Diff line change
Expand Up @@ -12766,11 +12766,7 @@ static int zend_jit_recv_init(dasm_State **Dst, const zend_op *opline, const zen
| .if X64
| EXT_CALL zval_update_constant_ex, r0
| .else
||#if (PHP_VERSION_ID < 80100) && (SIZEOF_SIZE_T == 4)
| EXT_CALL zval_jit_update_constant_ex, r0
||#else
| EXT_CALL zval_update_constant_ex, r0
||#endif
| .endif
| test al, al
| jnz >1
Expand Down