sfl->push_back(Struct_field(Typed_identifier("val.1",
orig_fntype->receiver()->type(),
loc)));
- Type* closure_type = Type::make_struct_type(sfl, loc);
- closure_type = Type::make_pointer_type(closure_type);
+ Struct_type* st = Type::make_struct_type(sfl, loc);
+ st->set_is_struct_incomparable();
+ Type* closure_type = Type::make_pointer_type(st);
Function_type* new_fntype = orig_fntype->copy_with_names();
loc)));
fields->push_back(Struct_field(Typed_identifier("val.1", val->type(), loc)));
Struct_type* st = Type::make_struct_type(fields, loc);
+ st->set_is_struct_incomparable();
Expression_list* vals = new Expression_list();
vals->push_back(Expression::make_func_code_reference(thunk, loc));
}
Struct_type* st = Type::make_struct_type(sfl, loc);
+ st->set_is_struct_incomparable();
this->call_temp_ = Statement::make_temporary(st, NULL, loc);
inserter->insert(this->call_temp_);
}
Expression* length_expr = Expression::make_integer_ul(s.length(), NULL, loc);
Type* byte_type = gogo->lookup_global("byte")->type_value();
- Type* array_type = Type::make_array_type(byte_type, length_expr);
+ Array_type* array_type = Type::make_array_type(byte_type, length_expr);
+ array_type->set_is_array_incomparable();
Expression_list* bytes = new Expression_list();
for (std::string::const_iterator p = s.begin(); p != s.end(); p++)
Type* vt = Type::make_pointer_type(Type::make_void_type());
sfl->push_back(Struct_field(Typed_identifier("fn.0", vt, loc)));
sfl->push_back(Struct_field(Typed_identifier("val.1", type, loc)));
- Type* closure_type = Type::make_struct_type(sfl, loc);
- closure_type = Type::make_pointer_type(closure_type);
+ Struct_type* st = Type::make_struct_type(sfl, loc);
+ st->set_is_struct_incomparable();
+ Type* closure_type = Type::make_pointer_type(st);
Function_type* new_fntype = orig_fntype->copy_with_names();
this->expr_->type(),
loc)));
Struct_type* st = Type::make_struct_type(fields, loc);
+ st->set_is_struct_incomparable();
Expression_list* vals = new Expression_list();
vals->push_back(Expression::make_func_code_reference(thunk, loc));
Type* int_type = Type::lookup_integer_type("int");
length = Expression::make_integer_ul(lenval, int_type, location);
Type* element_type = type->array_type()->element_type();
- this->valtype_ = Type::make_array_type(element_type, length);
+ Array_type* array_type = Type::make_array_type(element_type, length);
+ array_type->set_is_array_incomparable();
+ this->valtype_ = array_type;
}
// Traversal.
}
Expression* element_count = Expression::make_integer_ul(i, NULL, loc);
- Type* ctor_type =
+ Array_type* ctor_type =
Type::make_array_type(this->element_type_, element_count);
+ ctor_type->set_is_array_incomparable();
Expression* constructor =
new Fixed_array_construction_expression(ctor_type, NULL,
value_pairs, loc);
sfl->push_back(Struct_field(Typed_identifier(fname, mft, loc)));
}
- Pointer_type *pt = Type::make_pointer_type(Type::make_struct_type(sfl, loc));
+ Struct_type* st = Type::make_struct_type(sfl, loc);
+ st->set_is_struct_incomparable();
+ Pointer_type *pt = Type::make_pointer_type(st);
result_types[itype] = pt;
return pt;
}
p != interface_methods->end();
++p)
sfl->push_back(Struct_field(*p));
- this->method_table_type_ = Type::make_struct_type(sfl, this->location());
+ Struct_type* st = Type::make_struct_type(sfl, this->location());
+ st->set_is_struct_incomparable();
+ this->method_table_type_ = st;
return this->method_table_type_;
}
Expression* length = Expression::make_integer_ul(roots_len, NULL,
builtin_loc);
Array_type* root_array_type = Type::make_array_type(root_type, length);
+ root_array_type->set_is_array_incomparable();
Type* ptdt = Type::make_type_descriptor_ptr_type();
Struct_type* root_list_type =
Type::make_builtin_struct_type(2,
// we find them.
Location loc = this->type_->location();
Struct_field_list* sfl = new Struct_field_list;
- Type* struct_type = Type::make_struct_type(sfl, loc);
+ Struct_type* struct_type = Type::make_struct_type(sfl, loc);
+ struct_type->set_is_struct_incomparable();
Variable* var = new Variable(Type::make_pointer_type(struct_type),
NULL, false, false, false, loc);
var->set_is_used();
break;
case RFT_ARRAY2STRING:
- t = Type::make_array_type(Type::make_string_type(),
+ {
+ Array_type* at =
+ Type::make_array_type(Type::make_string_type(),
Expression::make_integer_ul(2, NULL,
bloc));
+ at->set_is_array_incomparable();
+ t = at;
+ }
break;
case RFT_ARRAY3STRING:
- t = Type::make_array_type(Type::make_string_type(),
+ {
+ Array_type* at =
+ Type::make_array_type(Type::make_string_type(),
Expression::make_integer_ul(3, NULL,
bloc));
+ at->set_is_array_incomparable();
+ t = at;
+ }
break;
case RFT_ARRAY4STRING:
- t = Type::make_array_type(Type::make_string_type(),
+ {
+ Array_type* at =
+ Type::make_array_type(Type::make_string_type(),
Expression::make_integer_ul(4, NULL,
bloc));
+ at->set_is_array_incomparable();
+ t = at;
+ }
break;
case RFT_ARRAY5STRING:
- t = Type::make_array_type(Type::make_string_type(),
+ {
+ Array_type* at =
+ Type::make_array_type(Type::make_string_type(),
Expression::make_integer_ul(5, NULL,
bloc));
+ at->set_is_array_incomparable();
+ t = at;
+ }
break;
}
Expression* len = Expression::make_integer_ul(vals->size(), NULL,
bloc);
Array_type* gc_symbol_type = Type::make_array_type(uintptr_t, len);
+ gc_symbol_type->set_is_array_incomparable();
return Expression::make_array_composite_literal(gc_symbol_type, vals, bloc);
}
}
Struct_type* st = Type::make_struct_type(sfl,
this->location());
+ st->set_is_struct_incomparable();
ins.first->second = st->get_backend(gogo);
}
bresult_struct = ins.first->second;
// The final type will be set in backend_zero_value.
Type* uint8_type = Type::lookup_integer_type("uint8");
Expression* size = Expression::make_integer_ul(0, NULL, bloc);
- Type* array_type = Type::make_array_type(uint8_type, size);
+ Array_type* array_type = Type::make_array_type(uint8_type, size);
+ array_type->set_is_array_incomparable();
Variable* var = new Variable(array_type, NULL, true, false, false, bloc);
Map_type::zero_value = Named_object::make_variable("go$zerovalue", NULL,
var);
Expression* pad_expr = Expression::make_integer_ul(pad, NULL,
this->location_);
- Type* pad_type = Type::make_array_type(uint8_type, pad_expr);
+ Array_type* pad_type = Type::make_array_type(uint8_type, pad_expr);
+ pad_type->set_is_array_incomparable();
ret = make_builtin_struct_type(5,
"topbits", topbits_type,