@@ -2924,6 +2924,7 @@ static int zend_real_jit_func(zend_op_array *op_array, zend_script *script, cons
2924
2924
{
2925
2925
zend_ssa ssa ;
2926
2926
void * checkpoint ;
2927
+ zend_func_info * func_info ;
2927
2928
2928
2929
if (* dasm_ptr == dasm_end ) {
2929
2930
return FAILURE ;
@@ -2938,6 +2939,18 @@ static int zend_real_jit_func(zend_op_array *op_array, zend_script *script, cons
2938
2939
goto jit_failure ;
2939
2940
}
2940
2941
2942
+ if (zend_jit_level >= ZEND_JIT_LEVEL_OPT_FUNCS ) {
2943
+ if (zend_jit_collect_calls (op_array , script ) != SUCCESS ) {
2944
+ ZEND_SET_FUNC_INFO (op_array , NULL );
2945
+ goto jit_failure ;
2946
+ }
2947
+ func_info = ZEND_FUNC_INFO (op_array );
2948
+ func_info -> call_map = zend_build_call_map (& CG (arena ), func_info , op_array );
2949
+ if (op_array -> fn_flags & ZEND_ACC_HAS_RETURN_TYPE ) {
2950
+ zend_init_func_return_info (op_array , script , & func_info -> return_info );
2951
+ }
2952
+ }
2953
+
2941
2954
if (zend_jit_op_array_analyze2 (op_array , script , & ssa ) != SUCCESS ) {
2942
2955
goto jit_failure ;
2943
2956
}
@@ -2946,13 +2959,6 @@ static int zend_real_jit_func(zend_op_array *op_array, zend_script *script, cons
2946
2959
zend_dump_op_array (op_array , ZEND_DUMP_HIDE_UNREACHABLE |ZEND_DUMP_RC_INFERENCE |ZEND_DUMP_SSA , "JIT" , & ssa );
2947
2960
}
2948
2961
2949
- if (zend_jit_level >= ZEND_JIT_LEVEL_OPT_FUNCS ) {
2950
- if (zend_jit_collect_calls (op_array , script ) != SUCCESS ) {
2951
- ZEND_SET_FUNC_INFO (op_array , NULL );
2952
- goto jit_failure ;
2953
- }
2954
- }
2955
-
2956
2962
if (zend_jit (op_array , & ssa , rt_opline ) != SUCCESS ) {
2957
2963
goto jit_failure ;
2958
2964
}
0 commit comments