Skip to content

Commit e25fce6

Browse files
committed
Merge branch 'PHP-8.0'
* PHP-8.0: Fixed JIT on first function execution (opcache.jit=1215) with CALL VM
2 parents c945c39 + e96b984 commit e25fce6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/opcache/jit/zend_jit.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ static const void *zend_jit_func_trace_counter_handler = NULL;
116116
static const void *zend_jit_ret_trace_counter_handler = NULL;
117117
static const void *zend_jit_loop_trace_counter_handler = NULL;
118118

119-
static void ZEND_FASTCALL zend_runtime_jit(void);
119+
static int ZEND_FASTCALL zend_runtime_jit(void);
120120

121121
static int zend_jit_trace_op_len(const zend_op *opline);
122122
static int zend_jit_trace_may_exit(const zend_op_array *op_array, const zend_op *opline);
@@ -3632,7 +3632,7 @@ static int zend_real_jit_func(zend_op_array *op_array, zend_script *script, cons
36323632
}
36333633

36343634
/* Run-time JIT handler */
3635-
static void ZEND_FASTCALL zend_runtime_jit(void)
3635+
static int ZEND_FASTCALL zend_runtime_jit(void)
36363636
{
36373637
zend_execute_data *execute_data = EG(current_execute_data);
36383638
zend_op_array *op_array = &EX(func)->op_array;
@@ -3664,6 +3664,7 @@ static void ZEND_FASTCALL zend_runtime_jit(void)
36643664
zend_shared_alloc_unlock();
36653665

36663666
/* JIT-ed code is going to be called by VM */
3667+
return 0;
36673668
}
36683669

36693670
void zend_jit_check_funcs(HashTable *function_table, bool is_method) {

0 commit comments

Comments
 (0)