Skip to content

Commit 5859689

Browse files
committed
Get rid of ZEND_FAST_CALL_UNBOUND
1 parent a16aa4c commit 5859689

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

Zend/zend_compile.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3477,7 +3477,6 @@ static int zend_handle_loops_and_finally_ex(zend_long depth) /* {{{ */
34773477
SET_UNUSED(opline->op1);
34783478
SET_UNUSED(opline->op2);
34793479
opline->op1.num = loop_var->u.try_catch_offset;
3480-
opline->extended_value = ZEND_FAST_CALL_UNBOUND;
34813480
} else if (loop_var->opcode == ZEND_RETURN) {
34823481
/* Stack separator */
34833482
break;
@@ -4126,7 +4125,7 @@ void zend_compile_try(zend_ast *ast) /* {{{ */
41264125
zend_stack_del_top(&CG(loop_var_stack));
41274126

41284127
opline = zend_emit_op(NULL, ZEND_FAST_CALL, NULL, NULL);
4129-
opline->op1.opline_num = opnum_jmp + 1;
4128+
opline->op1.num = try_catch_offset;
41304129
opline->result_type = IS_TMP_VAR;
41314130
opline->result.var = CG(context).fast_call_var;
41324131

Zend/zend_compile.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,6 @@ static zend_always_inline int zend_check_arg_send_type(const zend_function *zf,
946946
#define ZEND_FAST_RET_TO_FINALLY 2
947947

948948
#define ZEND_FAST_CALL_FROM_FINALLY 1
949-
#define ZEND_FAST_CALL_UNBOUND 2
950949

951950
#define ZEND_ARRAY_ELEMENT_REF (1<<0)
952951
#define ZEND_ARRAY_NOT_PACKED (1<<1)

Zend/zend_opcode.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -523,10 +523,8 @@ static void zend_resolve_fast_call(zend_op_array *op_array, uint32_t op_num)
523523
if (finally_op_num) {
524524
/* Must be ZEND_FAST_CALL */
525525
ZEND_ASSERT(op_array->opcodes[finally_op_num - 2].opcode == ZEND_FAST_CALL);
526-
if (op_array->opcodes[op_num].extended_value == 0) {
527-
op_array->opcodes[op_num].extended_value = ZEND_FAST_CALL_FROM_FINALLY;
528-
op_array->opcodes[op_num].op2.opline_num = finally_op_num - 2;
529-
}
526+
op_array->opcodes[op_num].extended_value = ZEND_FAST_CALL_FROM_FINALLY;
527+
op_array->opcodes[op_num].op2.opline_num = finally_op_num - 2;
530528
}
531529
}
532530

@@ -603,10 +601,7 @@ ZEND_API int pass_two(zend_op_array *op_array)
603601
while (opline < end) {
604602
switch (opline->opcode) {
605603
case ZEND_FAST_CALL:
606-
if (opline->extended_value == ZEND_FAST_CALL_UNBOUND) {
607-
opline->op1.opline_num = op_array->try_catch_array[opline->op1.num].finally_op;
608-
opline->extended_value = 0;
609-
}
604+
opline->op1.opline_num = op_array->try_catch_array[opline->op1.num].finally_op;
610605
zend_resolve_fast_call(op_array, opline - op_array->opcodes);
611606
ZEND_PASS_TWO_UPDATE_JMP_TARGET(op_array, opline, opline->op1);
612607
break;

0 commit comments

Comments
 (0)