pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.c:6108:    /* Both sides are inverted. Pop both inversions. */    arg_type = arg_type->car;    fun_type = fun_type->car;    goto loop;    } else {    /* Move the inversion to the argument type. */    type_stack_mark();    push_finished_type(arg_type);    push_type(T_NOT);    arg_type = pop_unfinished_type(); -  res = lower_new_check_call(fun_type->car, arg_type, flags, sval CHECK_CALL_ARGS); +  res = lower_new_check_call(fun_type->car, arg_type, +  flags ^ CALL_INVERTED_TYPES, +  sval CHECK_CALL_ARGS);    free_type(arg_type);    if (res) {    /* Move the inversion back to the function type. */    if (res->type == T_NOT) {    tmp = res->car;    free_type(res);    res = tmp;    } else {    type_stack_mark();    if ((res->type == T_MANY) &&
pike.git/src/pike_types.c:6239: Inside #if defined(PIKE_DEBUG)
   fprintf(stderr, ".\n");    }   #endif /* PIKE_DEBUG */    /* No need to perform advanced checking in the trivial case... */    if (arg_type != (tmp2 = fun_type->car)) {    if ((flags & CALL_7_6) && (arg_type == void_type_string)) {    /* Compat with Pike 7.6 and earlier. */    arg_type = zero_type_string;    }    -  if (!low_pike_types_le(arg_type, tmp2, 0, 0) && +  if (!((flags & CALL_INVERTED_TYPES)? +  low_pike_types_le(tmp2, arg_type, 0, 0): +  low_pike_types_le(arg_type, tmp2, 0, 0)) &&    ((flags & CALL_STRICT) ||    !low_match_types(arg_type, tmp2, NO_SHORTCUTS))) {    /* No match. */   #ifdef PIKE_DEBUG    if (l_flag>2) {    fprintf(stderr, "%*sNo match.\n", indent*2+2, "");    }   #endif /* PIKE_DEBUG */    res = NULL;    if (tmp) free_type(tmp);
pike.git/src/pike_types.c:6559:    if (!(tmp = new_get_return_type(fun_type->cdr, flags))) {    free_type(res);    res = NULL;    break;    }    res = and_pike_types(tmp2 = res, tmp);    free_type(tmp);    free_type(tmp2);    break;    case T_NOT: -  /* Doesn't match. */ +  if (!(res = new_get_return_type(fun_type->car, flags))) { +  copy_pike_type(res, mixed_type_string); +  } else if (res->type == T_INT) { +  tmp = res; +  copy_pike_type(res, tmp->car); +  free_type(tmp); +  } else { +  type_stack_mark(); +  push_finished_type(res); +  push_type(T_NOT); +  free_type(res); +  res = pop_unfinished_type(); +  }    break;    case PIKE_T_TYPE:    /* Casting requires an argument... */    res = NULL;    break;    case PIKE_T_PROGRAM:    tmp = low_object_lfun_type(fun_type->car, LFUN_CREATE);    if (!tmp) {    /* No create(). */    add_ref(fun_type->car);