[m-rev.] For review: Fix dummy type handling in the IL backend

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Oct 24 17:39:19 AEST 2006


On Wed, 27 Sep 2006, Jonathan Morgan wrote:

> With the below patch mercury-0.13 handles the IL backend correctly (as
> well as it ever did).  I cannot test the patch on main, as
> foreign_export does not yet work properly with the IL backend, but it
> should work without change.
>
> Jon
> ================================================================
> Branches: release, main
>
> Previously in the IL backend dummy variables were assigned to
> private_builtin.dummy_var, which did not work when values were
> assigned to it using the high-level data representation, as their type
> was not the low-level object[].  This change changes the
> representation of dummy variables from object[] (the low-level
> representation) to object (suitable for high-level data), and causes
> the IL backend to detect assignments to dummy_var and cast them to
> type object before assigning to them.
>
> compiler/mlds_to_il.m:
>   Detect when an object is constructed and assigned to
> private_builtin.dummy_var, and cast to il_generic_type (object) before
> assigning the constructed object.
>
> library/private_builtin.m:
>   Change dummy_var's type from object[] to object.
>

Committed on both branches (with a minor change to variable numbering).

Thanks for that Jon.

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