Skip to content

Commit 6e5b989

Browse files
authored
Remove unused PHP 8.1 BC layer in JIT (#9937)
1 parent a836bae commit 6e5b989

File tree

3 files changed

+0
-36
lines changed

3 files changed

+0
-36
lines changed

ext/opcache/jit/zend_jit_disasm.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -697,9 +697,6 @@ static int zend_jit_disasm_init(void)
697697
REGISTER_HELPER(zend_jit_post_inc_obj_helper);
698698
REGISTER_HELPER(zend_jit_post_dec_obj_helper);
699699
REGISTER_HELPER(zend_jit_rope_end);
700-
#if (PHP_VERSION_ID <= 80100) && (SIZEOF_SIZE_T == 4)
701-
REGISTER_HELPER(zval_jit_update_constant_ex);
702-
#endif
703700
REGISTER_HELPER(zend_jit_free_trampoline_helper);
704701
REGISTER_HELPER(zend_jit_exception_in_interrupt_handler_helper);
705702
#undef REGISTER_HELPER

ext/opcache/jit/zend_jit_helpers.c

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3012,35 +3012,6 @@ static void ZEND_FASTCALL zend_jit_post_dec_obj_helper(zend_object *zobj, zend_s
30123012
}
30133013
}
30143014

3015-
#if (PHP_VERSION_ID <= 80100) && (SIZEOF_SIZE_T == 4)
3016-
static zend_result ZEND_FASTCALL zval_jit_update_constant_ex(zval *p, zend_class_entry *scope)
3017-
{
3018-
if (Z_TYPE_P(p) == IS_CONSTANT_AST) {
3019-
zend_ast *ast = Z_ASTVAL_P(p);
3020-
3021-
if (ast->kind == ZEND_AST_CONSTANT) {
3022-
zend_string *name = zend_ast_get_constant_name(ast);
3023-
zval *zv = zend_get_constant_ex(name, scope, ast->attr);
3024-
if (UNEXPECTED(zv == NULL)) {
3025-
return FAILURE;
3026-
}
3027-
3028-
zval_ptr_dtor_nogc(p);
3029-
ZVAL_COPY_OR_DUP(p, zv);
3030-
} else {
3031-
zval tmp;
3032-
3033-
if (UNEXPECTED(zend_ast_evaluate(&tmp, ast, scope) != SUCCESS)) {
3034-
return FAILURE;
3035-
}
3036-
zval_ptr_dtor_nogc(p);
3037-
ZVAL_COPY_VALUE(p, &tmp);
3038-
}
3039-
}
3040-
return SUCCESS;
3041-
}
3042-
#endif
3043-
30443015
static void ZEND_FASTCALL zend_jit_free_trampoline_helper(zend_function *func)
30453016
{
30463017
ZEND_ASSERT(func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE);

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12766,11 +12766,7 @@ static int zend_jit_recv_init(dasm_State **Dst, const zend_op *opline, const zen
1276612766
| .if X64
1276712767
| EXT_CALL zval_update_constant_ex, r0
1276812768
| .else
12769-
||#if (PHP_VERSION_ID < 80100) && (SIZEOF_SIZE_T == 4)
12770-
| EXT_CALL zval_jit_update_constant_ex, r0
12771-
||#else
1277212769
| EXT_CALL zval_update_constant_ex, r0
12773-
||#endif
1277412770
| .endif
1277512771
| test al, al
1277612772
| jnz >1

0 commit comments

Comments
 (0)