示例#1
0
Type* cond_specializeType(Term* caller)
{
    Value choices;
    Type* leftType = caller->input(1) != NULL ? caller->input(1)->type : NULL;
    Type* rightType = caller->input(2) != NULL ? caller->input(2)->type : NULL;
    set_type_list(&choices, leftType, rightType);
    return find_common_type(&choices);
}
示例#2
0
Type* find_common_type(Type* type1, Type* type2, Type* type3)
{
    List list;
    set_type_list(&list, type1, type2, type3);
    return find_common_type(&list);
}
示例#3
0
 Type* specializeType(Term* caller)
 {
     List choices;
     set_type_list(&choices, caller->input(1)->type, caller->input(2)->type);
     return find_common_type(&choices);
 }