New C++ ABI: patches.
Jeff Sturm
jsturm@detroit.appnet.com
Sun Jan 7 20:36:00 GMT 2001
On Sun, 7 Jan 2001, Alexandre Petit-Bianco wrote:
> This is a first trial at the new C++ ABI, in three patches.
Great! Just a few questions:
> + // required by prims.cc:init_prim_class(), and the prototype of
> + // method to perform a lightweight initialization of a Class object.
> + Class (void) {}
> + Class (const Class& x) : Object () {
> + _Jv_VTable *avtable = x.vtable;
> +
> + name = x.name;
> + accflags = x.accflags;
> + method_count = x.method_count;
> + size_in_bytes = x.size_in_bytes;
> + vtable = x.vtable;
> + vtable = JV_PRIMITIVE_VTABLE;
Is the first vtable assignment bogus?
> -inline jboolean
> +jboolean
> java::lang::Class::isAssignableFrom (jclass klass)
> {
> // Arguments may not have been initialized, given ".class" syntax.
Why not inline? (You didn't mention isAssignableFrom in the
ChangeLog.)
> Index: jvgenmain.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/java/jvgenmain.c,v
> retrieving revision 1.18
> diff -u -p -r1.18 jvgenmain.c
> --- jvgenmain.c 2000年12月08日 03:00:26 1.18
> +++ jvgenmain.c 2001年01月07日 15:24:14
[...]
> @@ -156,11 +154,11 @@ main (int argc, const char **argv)
> fprintf (stream, " 0\n};\n\n");
>> #ifndef NO_DOLLAR_IN_LABEL
> - fprintf (stream, "extern int class __attribute__ ((alias (\"_%s$%s\")));\n",
> - mangled_classname, class_mangling_suffix);
> + fprintf (stream, "extern int class __attribute__ ((alias (\"%s\")));\n",
> + mangled_classname);
> #else
> - fprintf (stream, "extern int class __attribute__ ((alias (\"_%s.%s\")));\n",
> - mangled_classname, class_mangling_suffix);
> + fprintf (stream, "extern int class __attribute__ ((alias (\"%s\")));\n",
> + mangled_classname);
> #endif
Looks like this #ifndef block should just go away? (I never liked that
NO_DOLLAR_IN_LABEL business anyway... it seemed necessary to compile for
BSD.)
Jeff
More information about the Java
mailing list