OSDN Git Service

Change builtin make to runtime call at lowering time.
[pf3gnuchains/gcc-fork.git] / gcc / go / gofrontend / types.h
index 2ee80a4..9947a2c 100644 (file)
@@ -78,6 +78,8 @@ static const int RUNTIME_TYPE_KIND_STRING = 24;
 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
@@ -811,13 +813,6 @@ class Type
   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*);
@@ -826,12 +821,6 @@ class Type
   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.
@@ -878,16 +867,9 @@ class Type
   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;
 
@@ -901,10 +883,6 @@ class Type
   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*);
@@ -2083,16 +2061,9 @@ class Array_type : public 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*);
 
@@ -2180,16 +2151,9 @@ class Map_type : public 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*);
 
@@ -2269,16 +2233,9 @@ class Channel_type : public 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*);
 
@@ -2611,18 +2568,9 @@ class Named_type : public 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*);
 
@@ -2751,18 +2699,9 @@ class Forward_declaration_type : public 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*);