pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:3598:       if (f != -1) {    struct identifier *id = ID_FROM_INT(p, f);    ret = id->type;    add_ref(ret);    return ret;    }    ref_push_string(lfun_strings[lfun]);    yytype_report(REPORT_WARNING, NULL, 0, NULL,    NULL, 0, t, -  1, "Expected object implementing lfun %s."); +  1, "Expected object implementing lfun::%s().");    }    break;    }    case T_PROGRAM:    t = t->car;    goto loop;       case T_FUNCTION:    case T_MANY:    t = t->cdr;
pike.git/src/pike_types.cmod:3628:       case T_MIXED:    case T_ZERO:    case T_VOID:    break;       default:    ref_push_string(lfun_strings[lfun]);    yytype_report(REPORT_WARNING, NULL, 0, NULL,    NULL, 0, t, -  1, "Expected object implementing lfun %s."); +  1, "Expected object implementing lfun::%s().");    break;    }      #if 0    /* FIXME: This does not work, as lfun_types contains narrow types    * (zero for arguments, etc), while we here want the wide type    * (mixed for arguments, etc).    */    s = low_mapping_string_lookup(lfun_types, lfun_strings[lfun]);   
pike.git/src/pike_types.cmod:3852:    a_markers[m] = t;    }    return res;    }    else    return low_match_types(mixed_type_string, b, flags);    }       case PIKE_T_OPERATOR:    { -  struct pike_type *t = apply_type_operator(a->type, a->car, a->cdr); +  struct pike_type *t = a->car; +  if ((t->type >= '0') && (t->type <= '9')) { +  t = a_markers[t->type - '0']; +  if (!t) t = zero_type_string; +  } +  t = apply_type_operator(a->type, t, a->cdr);    ret = low_match_types(t, b, flags);    free_type(t);    return ret;    }    }       switch(b->type & 0xff)    {    case T_AND:    ret = low_match_types(a, b->car, flags);
pike.git/src/pike_types.cmod:3952:    b_markers[m] = t;    }    return res;    }    else    return low_match_types(a, mixed_type_string, flags);    }       case PIKE_T_OPERATOR:    { -  struct pike_type *t = apply_type_operator(b->type, b->car, b->cdr); +  struct pike_type *t = b->car; +  if ((t->type >= '0') && (t->type <= '9')) { +  t = b_markers[t->type - '0']; +  if (!t) t = zero_type_string; +  } +  t = apply_type_operator(b->type, t, b->cdr);    ret = low_match_types(a, t, flags);    free_type(t);    return ret;    }    }       /* 'mixed' matches anything */       if((a->type == T_ZERO || a->type == T_MIXED) &&    !(flags & (A_EXACT|B_EXACT)) &&
pike.git/src/pike_types.cmod:4478:    b = b_markers[m];    } else {    b = mixed_type_string;    }    }    goto recurse;    }       case PIKE_T_OPERATOR:    { -  struct pike_type *t = apply_type_operator(b->type, b->car, b->cdr); +  struct pike_type *t = b->car; +  if ((t->type >= '0') && (t->type <= '9')) { +  t = ((flags & LE_A_B_SWAPPED)?a_markers:b_markers)[t->type - '0']; +  if (!t) t = zero_type_string; +  } +  t = apply_type_operator(b->type, t, b->cdr);    ret = low_pike_types_le(a, t, array_cnt, flags);    free_type(t);    return ret;    }    }      #ifdef TYPE_GROUPING    if (a->type != T_OR) {    flags &= ~LE_A_GROUPED;    }
pike.git/src/pike_types.cmod:4699:    a = a_markers[m];    } else {    a = mixed_type_string;    }    }    goto recurse;    }       case PIKE_T_OPERATOR:    { -  struct pike_type *t = apply_type_operator(a->type, a->car, a->cdr); +  struct pike_type *t = a->car; +  if ((t->type >= '0') && (t->type <= '9')) { +  t = ((flags & LE_A_B_SWAPPED)?b_markers:a_markers)[t->type - '0']; +  if (!t) t = zero_type_string; +  } +  t = apply_type_operator(a->type, t, a->cdr);    ret = low_pike_types_le(t, b, array_cnt, flags);    free_type(t);    return ret;    }    }       if ((array_cnt < 0) && (b->type == T_ARRAY)) {    while (b->type == T_ARRAY) {    b = b->cdr;    if (!++array_cnt) break;