From c790c5b2e722c271e50e2aa89b5faacd6e0bf619 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:52:30 +0100 Subject: [PATCH] Generate inline frameless icall handlers only if the optimization level is set to inline --- ext/opcache/jit/zend_jit.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 3c0bb0ee555..83837bb3454 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -2547,6 +2547,23 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op goto jit_failure; } goto done; + case ZEND_FRAMELESS_ICALL_0: + jit_frameless_icall0(jit, opline); + goto done; + case ZEND_FRAMELESS_ICALL_1: + op1_info = OP1_INFO(); + jit_frameless_icall1(jit, opline, op1_info); + goto done; + case ZEND_FRAMELESS_ICALL_2: + op1_info = OP1_INFO(); + op2_info = OP2_INFO(); + jit_frameless_icall2(jit, opline, op1_info, op2_info); + goto done; + case ZEND_FRAMELESS_ICALL_3: + op1_info = OP1_INFO(); + op2_info = OP2_INFO(); + jit_frameless_icall3(jit, opline, op1_info, op2_info, OP1_DATA_INFO()); + goto done; default: break; } @@ -2693,23 +2710,6 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op call_level--; } break; - case ZEND_FRAMELESS_ICALL_0: - jit_frameless_icall0(jit, opline); - goto done; - case ZEND_FRAMELESS_ICALL_1: - op1_info = OP1_INFO(); - jit_frameless_icall1(jit, opline, op1_info); - goto done; - case ZEND_FRAMELESS_ICALL_2: - op1_info = OP1_INFO(); - op2_info = OP2_INFO(); - jit_frameless_icall2(jit, opline, op1_info, op2_info); - goto done; - case ZEND_FRAMELESS_ICALL_3: - op1_info = OP1_INFO(); - op2_info = OP2_INFO(); - jit_frameless_icall3(jit, opline, op1_info, op2_info, OP1_DATA_INFO()); - goto done; default: if (!zend_jit_handler(&ctx, opline, zend_may_throw(opline, ssa_op, op_array, ssa))) {