Branch: Tag:

2022-06-10

2022-06-10 18:29:54 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Add struct call_state.

This struct is intended to contain state that is to be propagated
between arguments during typechecking of function calls.

3067:   {    struct pike_type *res;    INT32 flags = CALL_NOT_LAST_ARG; +  struct call_state cs;    struct svalue *sval = NULL;    if (args < 2) Pike_error("Bad number of arguments to __low_check_call().\n");    if (TYPEOF(Pike_sp[-args]) != PIKE_T_TYPE) {
3082:    flags = Pike_sp[2-args].u.integer ^ CALL_NOT_LAST_ARG;    }    if (args > 3) sval = Pike_sp + 3 - args; +  LOW_INIT_CALL_STATE(cs, 1);    if (!(res = low_new_check_call(Pike_sp[-args].u.type, -  Pike_sp[1-args].u.type, flags, sval))) { +  Pike_sp[1-args].u.type, +  flags, &cs, sval))) {    pop_n_elems(args);    push_undefined();    } else {    pop_n_elems(args);    push_type_value(res);    } -  +  FREE_CALL_STATE(cs);   }      /*! @decl type|zero get_return_type(type fun_type)