@@ -4241,6 +4241,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
4241
4241
bool op1_indirect ;
4242
4242
zend_class_entry * op1_ce = NULL ;
4243
4243
zend_class_entry * op2_ce = NULL ;
4244
+ bool gen_handler ;
4244
4245
4245
4246
opline = p -> opline ;
4246
4247
if (op1_type & (IS_TRACE_REFERENCE |IS_TRACE_INDIRECT )) {
@@ -4284,6 +4285,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
4284
4285
}
4285
4286
4286
4287
if (JIT_G (opt_level ) >= ZEND_JIT_LEVEL_INLINE ) {
4288
+ gen_handler = 0 ;
4287
4289
switch (opline -> opcode ) {
4288
4290
case ZEND_PRE_INC :
4289
4291
case ZEND_PRE_DEC :
@@ -6145,6 +6147,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
6145
6147
}
6146
6148
6147
6149
if (opline -> opcode != ZEND_NOP && opline -> opcode != ZEND_JMP ) {
6150
+ gen_handler = 1 ;
6148
6151
op1_info = OP1_INFO ();
6149
6152
op2_info = OP2_INFO ();
6150
6153
if (op1_info & MAY_BE_GUARD ) {
@@ -6233,7 +6236,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
6233
6236
}
6234
6237
} else {
6235
6238
SET_STACK_TYPE (stack , EX_VAR_TO_NUM (opline -> result .var ), type ,
6236
- (type == IS_UNKNOWN || !ra || !ra [ssa_op -> result_def ]));
6239
+ (gen_handler || type == IS_UNKNOWN || !ra || !ra [ssa_op -> result_def ]));
6237
6240
if (ssa -> var_info [ssa_op -> result_def ].type & MAY_BE_INDIRECT ) {
6238
6241
RESET_STACK_MEM_TYPE (stack , EX_VAR_TO_NUM (opline -> result .var ));
6239
6242
}
@@ -6288,7 +6291,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
6288
6291
type = STACK_TYPE (stack , EX_VAR_TO_NUM (opline -> op1 .var ));
6289
6292
}
6290
6293
SET_STACK_TYPE (stack , EX_VAR_TO_NUM (opline -> op1 .var ), type ,
6291
- (type == IS_UNKNOWN || !ra ||
6294
+ (gen_handler || type == IS_UNKNOWN || !ra ||
6292
6295
(!ra [ssa_op -> op1_def ] &&
6293
6296
(opline -> opcode == ZEND_ASSIGN || !ssa -> vars [ssa_op -> op1_def ].no_val ))));
6294
6297
if (type != IS_UNKNOWN ) {
@@ -6335,7 +6338,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
6335
6338
type = STACK_TYPE (stack , EX_VAR_TO_NUM (opline -> op2 .var ));
6336
6339
}
6337
6340
SET_STACK_TYPE (stack , EX_VAR_TO_NUM (opline -> op2 .var ), type ,
6338
- (type == IS_UNKNOWN || !ra ||
6341
+ (gen_handler || type == IS_UNKNOWN || !ra ||
6339
6342
(!ra [ssa_op -> op2_def ] && !ssa -> vars [ssa_op -> op2_def ].no_val )));
6340
6343
if (type != IS_UNKNOWN ) {
6341
6344
ssa -> var_info [ssa_op -> op2_def ].type &= ~MAY_BE_GUARD ;
@@ -6388,7 +6391,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
6388
6391
type = STACK_TYPE (stack , EX_VAR_TO_NUM (opline -> op1 .var ));
6389
6392
}
6390
6393
SET_STACK_TYPE (stack , EX_VAR_TO_NUM (opline -> op1 .var ), type ,
6391
- (type == IS_UNKNOWN || !ra || !ra [ssa_op -> op1_def ]));
6394
+ (gen_handler || type == IS_UNKNOWN || !ra || !ra [ssa_op -> op1_def ]));
6392
6395
if (type != IS_UNKNOWN ) {
6393
6396
ssa -> var_info [ssa_op -> op1_def ].type &= ~MAY_BE_GUARD ;
6394
6397
if (ra && ra [ssa_op -> op1_def ]) {
@@ -6419,7 +6422,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
6419
6422
type = concrete_type (ssa -> var_info [ssa_op -> result_def ].type );
6420
6423
}
6421
6424
SET_STACK_TYPE (stack , EX_VAR_TO_NUM (opline -> result .var ), type ,
6422
- (!ra || !ra [ssa_op -> result_def ]));
6425
+ (gen_handler || !ra || !ra [ssa_op -> result_def ]));
6423
6426
if (ra && ra [ssa_op -> result_def ]) {
6424
6427
SET_STACK_REG_EX (stack , EX_VAR_TO_NUM (opline -> result .var ), ra [ssa_op -> result_def ]-> reg ,
6425
6428
ra [ssa_op -> result_def ]-> flags & ZREG_STORE );
@@ -6441,7 +6444,7 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
6441
6444
type = concrete_type (ssa -> var_info [ssa_op -> op1_def ].type );
6442
6445
}
6443
6446
SET_STACK_TYPE (stack , EX_VAR_TO_NUM (opline -> op1 .var ), type ,
6444
- (!ra || !ra [ssa_op -> op1_def ]));
6447
+ (gen_handler || !ra || !ra [ssa_op -> op1_def ]));
6445
6448
if (ra && ra [ssa_op -> op1_def ]) {
6446
6449
SET_STACK_REG_EX (stack , EX_VAR_TO_NUM (opline -> op1 .var ), ra [ssa_op -> op1_def ]-> reg ,
6447
6450
ra [ssa_op -> op1_def ]-> flags & ZREG_STORE );
0 commit comments