static const int RUNTIME_TYPE_KIND_STRUCT = 25;
static const int RUNTIME_TYPE_KIND_UNSAFE_POINTER = 26;
+static const int RUNTIME_TYPE_KIND_NO_POINTERS = (1 << 7);
+
// To build the complete list of methods for a named type we need to
// gather all methods from anonymous fields. Those methods may
// require an arbitrary set of indirections and field offsets. There
is_unexported_field_or_method(Gogo*, const Type*, const std::string&,
std::vector<const Named_type*>*);
- // This type was passed to the builtin function make. ARGS are the
- // arguments passed to make after the type; this may be NULL if
- // there were none. Issue any required errors.
- bool
- check_make_expression(Expression_list* args, source_location location)
- { return this->do_check_make_expression(args, location); }
-
// Convert the builtin named types.
static void
convert_builtin_named_types(Gogo*);
Btype*
get_backend(Gogo*);
- // Return a tree for a make expression applied to this type.
- tree
- make_expression_tree(Translate_context* context, Expression_list* args,
- source_location location)
- { return this->do_make_expression_tree(context, args, location); }
-
// Build a type descriptor entry for this type. Return a pointer to
// it. The location is the location which causes us to need the
// entry.
virtual unsigned int
do_hash_for_method(Gogo*) const;
- virtual bool
- do_check_make_expression(Expression_list* args, source_location);
-
virtual Btype*
do_get_backend(Gogo*) = 0;
- virtual tree
- do_make_expression_tree(Translate_context*, Expression_list*,
- source_location);
-
virtual Expression*
do_type_descriptor(Gogo*, Named_type* name) = 0;
virtual void
do_export(Export*) const;
- // Return whether an expression is an integer.
- static bool
- check_int_value(Expression*, const char*, source_location);
-
// Return whether a method expects a pointer as the receiver.
static bool
method_expects_pointer(const Named_object*);
unsigned int
do_hash_for_method(Gogo*) const;
- bool
- do_check_make_expression(Expression_list*, source_location);
-
Btype*
do_get_backend(Gogo*);
- tree
- do_make_expression_tree(Translate_context*, Expression_list*,
- source_location);
-
Expression*
do_type_descriptor(Gogo*, Named_type*);
unsigned int
do_hash_for_method(Gogo*) const;
- bool
- do_check_make_expression(Expression_list*, source_location);
-
Btype*
do_get_backend(Gogo*);
- tree
- do_make_expression_tree(Translate_context*, Expression_list*,
- source_location);
-
Expression*
do_type_descriptor(Gogo*, Named_type*);
unsigned int
do_hash_for_method(Gogo*) const;
- bool
- do_check_make_expression(Expression_list*, source_location);
-
Btype*
do_get_backend(Gogo*);
- tree
- do_make_expression_tree(Translate_context*, Expression_list*,
- source_location);
-
Expression*
do_type_descriptor(Gogo*, Named_type*);
unsigned int
do_hash_for_method(Gogo*) const;
- bool
- do_check_make_expression(Expression_list* args, source_location location)
- { return this->type_->check_make_expression(args, location); }
-
Btype*
do_get_backend(Gogo*);
- tree
- do_make_expression_tree(Translate_context* context, Expression_list* args,
- source_location location)
- { return this->type_->make_expression_tree(context, args, location); }
-
Expression*
do_type_descriptor(Gogo*, Named_type*);
do_hash_for_method(Gogo* gogo) const
{ return this->real_type()->hash_for_method(gogo); }
- bool
- do_check_make_expression(Expression_list* args, source_location location)
- { return this->base()->check_make_expression(args, location); }
-
Btype*
do_get_backend(Gogo* gogo);
- tree
- do_make_expression_tree(Translate_context* context, Expression_list* args,
- source_location location)
- { return this->base()->make_expression_tree(context, args, location); }
-
Expression*
do_type_descriptor(Gogo*, Named_type*);