[m-rev.] for review: java rtti improvements

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Apr 29 20:46:40 AEST 2009


On Wed, 29 Apr 2009, Peter Wang wrote:

> Branches: main
>
> RTTI improvements for Java backend.  io.write/3 work for some simple types

s/work/works/

> (builtin types and non-existential d.u. types).
>
> compiler/mlds_to_java.m:
>        Fix problem with cyclic RTTI definitions.  Initialisers could refer to
>        other RTTI structures which weren't yet allocated, leading to fields
>        being null.  The fix is to allocate all top-level RTTI objects first
>        and initialise in a second phase.
>
> java/runtime/DuExistInfo.java:
> java/runtime/DuExistLocn.java:
> java/runtime/DuFunctorDesc.java:
> java/runtime/EnumFunctorDesc.java:
> java/runtime/ForeignEnumFunctorDesc.java:
> java/runtime/TypeClassConstraint.java:
> java/runtime/TypeClassDeclStruct.java:
> java/runtime/TypeClassId.java:
> java/runtime/TypeCtorInfo_Struct.java:
> java/runtime/TypeInfo_Struct.java:
>        Separate constructors into constructors for the initial allocation,
>        and an `init' method to fill in the fields.
>
> java/runtime/MethodPtr.java:
>        Use variadic method support to simplify semidet_call_* and
>        result_call_* in rtti_implementation.m.

You will also need to update README.Java w.r.t the version of Java
required.

> library/builtin.m:
>        Make Java definitions of builtin.unify/2 and builtin.compare/3 call
>        rtti_implementation.generic_unify and generic_compare.
>
> library/private_builtin.m:
>        Add missing MR_TYPECTOR_REP_FOREIGN_ENUM{,_USEREQ} constants
>        for C# and Java.
>
> library/rtti_implementation.m:
>        Fix and add missing Java versions of many foreign_procs.
>
>        Add more attributes to foreign_procs.
>
>        Clean up the code a bit (fewer casts and ^ field access functions).

That looks fine.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list