@@ -2600,8 +2600,7 @@ static void zend_emit_jmp_null(znode *obj_node, uint32_t bp_type)
26002600 zend_stack_push (& CG (short_circuiting_opnums ), & jmp_null_opnum );
26012601}
26022602
2603- static inline bool zend_is_variable (const zend_ast * ast );
2604- static inline bool zend_is_call (const zend_ast * ast );
2603+ static inline bool zend_is_variable_or_call (const zend_ast * ast );
26052604
26062605static void zend_compile_memoized_expr (znode * result , zend_ast * expr , uint32_t type ) /* {{{ */
26072606{
@@ -2611,8 +2610,8 @@ static void zend_compile_memoized_expr(znode *result, zend_ast *expr, uint32_t t
26112610
26122611 /* Go through normal compilation */
26132612 CG (memoize_mode ) = ZEND_MEMOIZE_NONE ;
2614- if (zend_is_variable ( expr ) || zend_is_call (expr )) {
2615- zend_compile_var (result , expr , type , false);
2613+ if (zend_is_variable_or_call (expr )) {
2614+ zend_compile_var (result , expr , type , /* by_ref */ false);
26162615 } else {
26172616 zend_compile_expr (result , expr );
26182617 }
@@ -3852,7 +3851,7 @@ static uint32_t zend_compile_args(
38523851 if (zend_is_call (arg ) || is_globals_fetch (arg )) {
38533852 uint32_t type = is_globals_fetch (arg ) || (fbc && !ARG_SHOULD_BE_SENT_BY_REF (fbc , arg_num ))
38543853 ? BP_VAR_R : BP_VAR_FUNC_ARG ;
3855- zend_compile_var (& arg_node , arg , type , false);
3854+ zend_compile_var (& arg_node , arg , type , /* by_ref */ false);
38563855 if (arg_node .op_type & (IS_CONST |IS_TMP_VAR )) {
38573856 /* Function call was converted into builtin instruction */
38583857 if (!fbc || ARG_MUST_BE_SENT_BY_REF (fbc , arg_num )) {
@@ -4053,15 +4052,14 @@ static bool zend_compile_call_common(znode *result, zend_ast *args_ast, const ze
40534052 false
40544053 );
40554054 opline = zend_emit_op (result , call_op , NULL , NULL );
4056-
40574055 if (type == BP_VAR_R || type == BP_VAR_IS ) {
40584056 if (init_opcode != ZEND_NEW && opline -> result_type == IS_VAR ) {
40594057 opline -> result_type = IS_TMP_VAR ;
40604058 result -> op_type = IS_TMP_VAR ;
40614059 }
40624060 }
40634061 if (may_have_extra_named_args ) {
4064- opline -> extended_value | = ZEND_FCALL_MAY_HAVE_EXTRA_NAMED_PARAMS ;
4062+ opline -> extended_value = ZEND_FCALL_MAY_HAVE_EXTRA_NAMED_PARAMS ;
40654063 }
40664064 opline -> lineno = lineno ;
40674065 zend_do_extended_fcall_end ();
@@ -4404,11 +4402,11 @@ static zend_result zend_compile_func_cufa(znode *result, zend_ast_list *args, ze
44044402 zend_emit_op (NULL , ZEND_SEND_ARRAY , & arg_node , NULL );
44054403 zend_emit_op (NULL , ZEND_CHECK_UNDEF_ARGS , NULL , NULL );
44064404 opline = zend_emit_op (result , ZEND_DO_FCALL , NULL , NULL );
4407- opline -> extended_value |= ZEND_FCALL_MAY_HAVE_EXTRA_NAMED_PARAMS ;
44084405 if (type == BP_VAR_R || type == BP_VAR_IS ) {
44094406 opline -> result_type = IS_TMP_VAR ;
44104407 result -> op_type = IS_TMP_VAR ;
44114408 }
4409+ opline -> extended_value = ZEND_FCALL_MAY_HAVE_EXTRA_NAMED_PARAMS ;
44124410
44134411 return SUCCESS ;
44144412}
@@ -5870,8 +5868,7 @@ static void zend_compile_return(const zend_ast *ast) /* {{{ */
58705868 if (!expr_ast ) {
58715869 expr_node .op_type = IS_CONST ;
58725870 ZVAL_NULL (& expr_node .u .constant );
5873- // FIXME: Shouldn't apply to nullsafe calls and pipes.
5874- } else if (by_ref && (zend_is_variable (expr_ast ) || zend_is_call (expr_ast ))) {
5871+ } else if (by_ref && zend_is_variable_or_call (expr_ast )) {
58755872 zend_assert_not_short_circuited (expr_ast );
58765873 zend_compile_var (& expr_node , expr_ast , BP_VAR_W , true);
58775874 } else {
@@ -6710,7 +6707,7 @@ static void zend_compile_pipe(znode *result, zend_ast *ast, uint32_t type)
67106707
67116708 zend_do_extended_stmt (& operand_result );
67126709
6713- zend_compile_var (result , fcall_ast , type , false);
6710+ zend_compile_var (result , fcall_ast , type , /* by_ref */ false);
67146711}
67156712
67166713static void zend_compile_match (znode * result , zend_ast * ast )
@@ -10907,7 +10904,7 @@ static void zend_compile_yield(znode *result, zend_ast *ast) /* {{{ */
1090710904 }
1090810905
1090910906 if (value_ast ) {
10910- if (returns_by_ref && ( zend_is_variable ( value_ast ) || zend_is_call ( value_ast ) )) {
10907+ if (returns_by_ref && zend_is_variable_or_call ( value_ast )) {
1091110908 zend_assert_not_short_circuited (value_ast );
1091210909 zend_compile_var (& value_node , value_ast , BP_VAR_W , true);
1091310910 } else {
@@ -11966,7 +11963,7 @@ static void zend_compile_stmt(zend_ast *ast) /* {{{ */
1196611963 break ;
1196711964 case ZEND_AST_ASSIGN : {
1196811965 znode result ;
11969- zend_compile_assign (& result , ast , true);
11966+ zend_compile_assign (& result , ast , /* stmt */ true);
1197011967 zend_do_free (& result );
1197111968 return ;
1197211969 }
@@ -12019,7 +12016,7 @@ static void zend_compile_expr_inner(znode *result, zend_ast *ast) /* {{{ */
1201912016 zend_compile_var (result , ast , BP_VAR_R , false);
1202012017 return ;
1202112018 case ZEND_AST_ASSIGN :
12022- zend_compile_assign (result , ast , false);
12019+ zend_compile_assign (result , ast , /* stmt */ false);
1202312020 return ;
1202412021 case ZEND_AST_ASSIGN_REF :
1202512022 zend_compile_assign_ref (result , ast , BP_VAR_R );
0 commit comments