Branch: Tag:

2022-07-09

2022-07-09 09:49:04 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler [Typechecker]: Update some more calls of new_get_return_type().

1780:    break;    } else {    /* Attempt to get the return type for the function. */ -  struct pike_type *a, *b; +  struct pike_type *a, *b = NULL;    struct call_state cs;    a = get_type_of_svalue(Pike_sp-1);    /* Note: check_splice_call() below eats a reference from a.
1791:    INIT_CALL_STATE(cs);    a = check_splice_call(NULL, a, &cs, mixed_type_string, NULL,    CALL_INHIBIT_WARNINGS); -  FREE_CALL_STATE(cs); +     if (a) { -  b = new_get_return_type(a, 0); +  b = new_get_return_type(a, &cs, 0);    free_type(a); -  +  } +  FREE_CALL_STATE(cs);    if (b) {    push_finished_type(b);    free_type(b);    break;    }    } -  } +     /* FALLTHRU */       default:
3904:    f = debug_malloc_pass(new_check_call(efun_string, f, n, &cs, 0));    n->token = opcode;    if (f) { -  struct pike_type *ret = new_get_return_type(f, 0); +  struct pike_type *ret = new_get_return_type(f, &cs, 0);    free_type(f);    f = ret;    }
4144:    }       if ((n->type = new_get_return_type(dmalloc_touch(struct pike_type *, f), -  0))) { +  &cs, 0))) {    /* Type/argument-check OK. */    debug_malloc_touch(n->type);   
4431:    sscanf_type = new_check_call(sscanf_name, sscanf_type, args, &cs, 0);    free_node(args);    if (sscanf_type) { -  if (!(n->type = new_get_return_type(sscanf_type, 0))) { +  if (!(n->type = new_get_return_type(sscanf_type, &cs, 0))) {    struct pike_type *expected;    if ((expected = get_first_arg_type(sscanf_type, CALL_NOT_LAST_ARG))) {    yytype_report(REPORT_ERROR,