@@ -4230,6 +4230,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
4230
4230
bool op1_indirect ;
4231
4231
zend_class_entry * op1_ce = NULL ;
4232
4232
zend_class_entry * op2_ce = NULL ;
4233
+ bool gen_handler ;
4233
4234
4234
4235
opline = p -> opline ;
4235
4236
if (op1_type & (IS_TRACE_REFERENCE |IS_TRACE_INDIRECT )) {
@@ -4273,6 +4274,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
4273
4274
}
4274
4275
4275
4276
if (JIT_G (opt_level ) >= ZEND_JIT_LEVEL_INLINE ) {
4277
+ gen_handler = 0 ;
4276
4278
switch (opline -> opcode ) {
4277
4279
case ZEND_PRE_INC :
4278
4280
case ZEND_PRE_DEC :
@@ -6141,6 +6143,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
6141
6143
}
6142
6144
6143
6145
if (opline -> opcode != ZEND_NOP && opline -> opcode != ZEND_JMP ) {
6146
+ gen_handler = 1 ;
6144
6147
op1_info = OP1_INFO ();
6145
6148
op2_info = OP2_INFO ();
6146
6149
if (op1_info & MAY_BE_GUARD ) {
@@ -6229,7 +6232,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
6229
6232
}
6230
6233
} else {
6231
6234
SET_STACK_TYPE (stack , EX_VAR_TO_NUM (opline -> result .var ), type ,
6232
- (type == IS_UNKNOWN || !ra || !ra [ssa_op -> result_def ]));
6235
+ (gen_handler || type == IS_UNKNOWN || !ra || !ra [ssa_op -> result_def ]));
6233
6236
if (ssa -> var_info [ssa_op -> result_def ].type & MAY_BE_INDIRECT ) {
6234
6237
RESET_STACK_MEM_TYPE (stack , EX_VAR_TO_NUM (opline -> result .var ));
6235
6238
}
@@ -6284,7 +6287,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
6284
6287
type = STACK_TYPE (stack , EX_VAR_TO_NUM (opline -> op1 .var ));
6285
6288
}
6286
6289
SET_STACK_TYPE (stack , EX_VAR_TO_NUM (opline -> op1 .var ), type ,
6287
- (type == IS_UNKNOWN || !ra ||
6290
+ (gen_handler || type == IS_UNKNOWN || !ra ||
6288
6291
(!ra [ssa_op -> op1_def ] &&
6289
6292
(opline -> opcode == ZEND_ASSIGN || !ssa -> vars [ssa_op -> op1_def ].no_val ))));
6290
6293
if (type != IS_UNKNOWN ) {
@@ -6331,7 +6334,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
6331
6334
type = STACK_TYPE (stack , EX_VAR_TO_NUM (opline -> op2 .var ));
6332
6335
}
6333
6336
SET_STACK_TYPE (stack , EX_VAR_TO_NUM (opline -> op2 .var ), type ,
6334
- (type == IS_UNKNOWN || !ra ||
6337
+ (gen_handler || type == IS_UNKNOWN || !ra ||
6335
6338
(!ra [ssa_op -> op2_def ] && !ssa -> vars [ssa_op -> op2_def ].no_val )));
6336
6339
if (type != IS_UNKNOWN ) {
6337
6340
ssa -> var_info [ssa_op -> op2_def ].type &= ~MAY_BE_GUARD ;
@@ -6384,7 +6387,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
6384
6387
type = STACK_TYPE (stack , EX_VAR_TO_NUM (opline -> op1 .var ));
6385
6388
}
6386
6389
SET_STACK_TYPE (stack , EX_VAR_TO_NUM (opline -> op1 .var ), type ,
6387
- (type == IS_UNKNOWN || !ra || !ra [ssa_op -> op1_def ]));
6390
+ (gen_handler || type == IS_UNKNOWN || !ra || !ra [ssa_op -> op1_def ]));
6388
6391
if (type != IS_UNKNOWN ) {
6389
6392
ssa -> var_info [ssa_op -> op1_def ].type &= ~MAY_BE_GUARD ;
6390
6393
if (ra && ra [ssa_op -> op1_def ]) {
@@ -6415,7 +6418,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
6415
6418
type = concrete_type (ssa -> var_info [ssa_op -> result_def ].type );
6416
6419
}
6417
6420
SET_STACK_TYPE (stack , EX_VAR_TO_NUM (opline -> result .var ), type ,
6418
- (!ra || !ra [ssa_op -> result_def ]));
6421
+ (gen_handler || !ra || !ra [ssa_op -> result_def ]));
6419
6422
if (ra && ra [ssa_op -> result_def ]) {
6420
6423
SET_STACK_REG_EX (stack , EX_VAR_TO_NUM (opline -> result .var ), ra [ssa_op -> result_def ]-> reg ,
6421
6424
ra [ssa_op -> result_def ]-> flags & ZREG_STORE );
@@ -6437,7 +6440,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
6437
6440
type = concrete_type (ssa -> var_info [ssa_op -> op1_def ].type );
6438
6441
}
6439
6442
SET_STACK_TYPE (stack , EX_VAR_TO_NUM (opline -> op1 .var ), type ,
6440
- (!ra || !ra [ssa_op -> op1_def ]));
6443
+ (gen_handler || !ra || !ra [ssa_op -> op1_def ]));
6441
6444
if (ra && ra [ssa_op -> op1_def ]) {
6442
6445
SET_STACK_REG_EX (stack , EX_VAR_TO_NUM (opline -> op1 .var ), ra [ssa_op -> op1_def ]-> reg ,
6443
6446
ra [ssa_op -> op1_def ]-> flags & ZREG_STORE );
0 commit comments