This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: BUILT_IN usage in tree-nested.c


On Saturday 05 June 2004 18:34, Richard Kenner wrote:
>     Java initializes them in initialize_builtins in java/builtins.c.
>
> But as far as I can tell, it doesn't.  It only initializes *some* of
> them.  For example BUILT_IN_ADJUST_TRAMPOLINE is needed but its entry
> doesn't seem to be initialized in java/builtins.c.  What am I missing?

Why would Java need trampolines, isn't that only needed if
you have nested functions?

As Andrew said, f95-lang.c is where you probably can see
more of what you need to do.  Specifically, look at and
copy from f95-lang.c:gfc_init_builtin_functions (void):

static void
gfc_init_builtin_functions (void)
{
  tree mfunc_float[2];
  tree mfunc_double[2];
  tree ftype;
  tree tmp;

  /* Various Fortran specific stuff before this.  In particular, some
     math builtin defines.  */

  tmp = tree_cons (NULL_TREE, pvoid_type_node, void_list_node);
  tmp = tree_cons (NULL_TREE, pvoid_type_node, tmp);
  tmp = tree_cons (NULL_TREE, pvoid_type_node, tmp);
  ftype = build_function_type (void_type_node, tmp);
  gfc_define_builtin ("__builtin_init_trampoline", ftype,
                      BUILT_IN_INIT_TRAMPOLINE, "init_trampoline", false);

  tmp = tree_cons (NULL_TREE, pvoid_type_node, void_list_node);
  ftype = build_function_type (pvoid_type_node, tmp);
  gfc_define_builtin ("__builtin_adjust_trampoline", ftype,
                      BUILT_IN_ADJUST_TRAMPOLINE, "adjust_trampoline", true);

  /* More Fortran specific stuff following this.  */
}

Gr.
Steven



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]