Java: Local function pointer aliases for method metadata
Richard Henderson
rth@redhat.com
Thu Aug 19 05:45:00 GMT 2004
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~
More information about the Java-patches
mailing list