}
// Return the type of a type descriptor. We should really tie this to
-// runtime.Type rather than copying it. This must match commonType in
-// libgo/go/runtime/type.go.
+// runtime.Type rather than copying it. This must match the struct "_type"
+// declared in libgo/go/runtime/type.go.
Type*
Type::make_type_descriptor_type()
// Forward declaration for the type descriptor type.
Named_object* named_type_descriptor_type =
- Named_object::make_type_declaration("commonType", NULL, bloc);
+ Named_object::make_type_declaration("_type", NULL, bloc);
Type* ft = Type::make_forward_declaration(named_type_descriptor_type);
Type* pointer_type_descriptor_type = Type::make_pointer_type(ft);
"ptrToThis",
pointer_type_descriptor_type);
- Named_type* named = Type::make_builtin_named_type("commonType",
+ Named_type* named = Type::make_builtin_named_type("_type",
type_descriptor_type);
named_type_descriptor_type->set_type_value(named);
vals->reserve(4);
Struct_field_list::const_iterator p = fields->begin();
- go_assert(p->is_field_name("commonType"));
+ go_assert(p->is_field_name("_type"));
vals->push_back(this->type_descriptor_constructor(gogo,
RUNTIME_TYPE_KIND_FUNC,
name, NULL, true));
vals->reserve(2);
Struct_field_list::const_iterator p = fields->begin();
- go_assert(p->is_field_name("commonType"));
+ go_assert(p->is_field_name("_type"));
vals->push_back(this->type_descriptor_constructor(gogo,
RUNTIME_TYPE_KIND_PTR,
name, methods, false));
go_assert(methods == NULL || name == NULL);
Struct_field_list::const_iterator ps = fields->begin();
- go_assert(ps->is_field_name("commonType"));
+ go_assert(ps->is_field_name("_type"));
vals->push_back(this->type_descriptor_constructor(gogo,
RUNTIME_TYPE_KIND_STRUCT,
name, methods, true));
vals->reserve(3);
Struct_field_list::const_iterator p = fields->begin();
- go_assert(p->is_field_name("commonType"));
+ go_assert(p->is_field_name("_type"));
vals->push_back(this->type_descriptor_constructor(gogo,
RUNTIME_TYPE_KIND_ARRAY,
name, NULL, true));
vals->reserve(2);
Struct_field_list::const_iterator p = fields->begin();
- go_assert(p->is_field_name("commonType"));
+ go_assert(p->is_field_name("_type"));
vals->push_back(this->type_descriptor_constructor(gogo,
RUNTIME_TYPE_KIND_SLICE,
name, NULL, true));
vals->reserve(12);
Struct_field_list::const_iterator p = fields->begin();
- go_assert(p->is_field_name("commonType"));
+ go_assert(p->is_field_name("_type"));
vals->push_back(this->type_descriptor_constructor(gogo,
RUNTIME_TYPE_KIND_MAP,
name, NULL, true));
vals->reserve(3);
Struct_field_list::const_iterator p = fields->begin();
- go_assert(p->is_field_name("commonType"));
+ go_assert(p->is_field_name("_type"));
vals->push_back(this->type_descriptor_constructor(gogo,
RUNTIME_TYPE_KIND_CHAN,
name, NULL, true));
ivals->reserve(2);
Struct_field_list::const_iterator pif = ifields->begin();
- go_assert(pif->is_field_name("commonType"));
+ go_assert(pif->is_field_name("_type"));
const int rt = RUNTIME_TYPE_KIND_INTERFACE;
ivals->push_back(this->type_descriptor_constructor(gogo, rt, name, NULL,
true));