Skip to content

Commit df7d304

Browse files
committed
Emit opcode for frameless functions at line number where the function call starts
1 parent 11accb5 commit df7d304

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Zend/zend_compile.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4616,6 +4616,7 @@ static const zend_frameless_function_info *find_frameless_function_info(zend_ast
46164616

46174617
static uint32_t zend_compile_frameless_icall_ex(znode *result, zend_ast_list *args, zend_function *fbc, const zend_frameless_function_info *frameless_function_info, uint32_t type)
46184618
{
4619+
int lineno = CG(zend_lineno);
46194620
uint32_t num_args = frameless_function_info->num_args;
46204621
uint32_t offset = find_frameless_function_offset(num_args, frameless_function_info->handler);
46214622
znode arg_zvs[3];
@@ -4634,6 +4635,7 @@ static uint32_t zend_compile_frameless_icall_ex(znode *result, zend_ast_list *ar
46344635
uint32_t opnum = get_next_op_number();
46354636
zend_op *opline = zend_emit_op_tmp(result, opcode, NULL, NULL);
46364637
opline->extended_value = offset;
4638+
opline->lineno = lineno;
46374639
if (num_args >= 1) {
46384640
SET_NODE(opline->op1, &arg_zvs[0]);
46394641
}
@@ -4695,6 +4697,8 @@ static void zend_compile_ns_call(znode *result, znode *name_node, zend_ast *args
46954697

46964698
/* Compile frameless call. */
46974699
if (frameless_function_info) {
4700+
CG(zend_lineno) = lineno;
4701+
46984702
uint32_t jmp_end_opnum = zend_emit_jump(0);
46994703
uint32_t jmp_fl_target = get_next_op_number();
47004704

0 commit comments

Comments
 (0)