This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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: Java: Local function pointer aliases for method metadata


On Tue, Aug 17, 2004 at 09:34:48PM -0400, Bryce McKinlay wrote:
> +  const char *alias_id = "LALIAS_";
> +  int name_len;
> +  
> +  /* Make the alias name by prepending alias_id.  */
> +  name_len = IDENTIFIER_LENGTH (DECL_ASSEMBLER_NAME (method));
> +  ptr = buf = alloca (strlen (alias_id) + name_len + 1);
> +  strcpy (ptr, alias_id);
> +  ptr += strlen (alias_id);
> +  strcpy (ptr, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (method)));
> +  ptr += name_len;
> +  *ptr = '\0';

You want to use ASM_GENERATE_INTERNAL_LABEL so that the symbol
is of a form that is interpreted by the assembler as a temporary.
This way the symbol isn't retained in the .o file, or copied to
the executable.

This isn't actively wrong, but you can save a bit o space.



r~


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