[m-rev.] for review: fix agc forwarding pointers, et al

Simon Taylor stayl at cs.mu.OZ.AU
Thu Jun 6 17:30:47 AEST 2002


On 06-Jun-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 06-Jun-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > (The compiler still doesn't bootstrap, however,
> > so obviously there is at least one bug still remaining ;-)
> 
> Well, I just found one of them: my new code was losing the
> tags in deep_copy().
> Hopefully this was the last bug ;-)
> 
> Actually there are also still a few unimplemented features,
> in particular resizing the heap if/when it gets full.
> 
> --- mercury_deep_copy_body.h.old	Thu Jun  6 16:44:49 2002
> +++ mercury_deep_copy_body.h	Thu Jun  6 16:44:52 2002
> @@ -195,7 +197,7 @@
>  #define MR_handle_sectag_remote_or_none(have_sectag)                        \
>          do {                                                                \
>                  data_value = (MR_Word *) MR_body(data, ptag);               \
> -                RETURN_IF_OUT_OF_RANGE(data_value, 0, MR_Word);             \
> +                RETURN_IF_OUT_OF_RANGE(data, data_value, 0, MR_Word);       \
>                  {                                                           \
>                      const MR_DuFunctorDesc  *functor_desc;                  \
>                      const MR_DuExistInfo    *exist_info;                    \

I'd suggest s/data/tagged_data/ and s/data_value/untagged_data/
to avoid this kind of problem in future.

> @@ -402,7 +404,7 @@
>              assert(MR_tag(data) == 0);
>              data_value = (MR_Word *) MR_body(data, MR_mktag(0));
>  
> -            RETURN_IF_OUT_OF_RANGE(data_value, CLOSURE_FORWARDING_PTR_OFFSET,
> +            RETURN_IF_OUT_OF_RANGE(data, data_value, CLOSURE_FORWARDING_PTR_OFFSET,
>                      MR_Word);

Line wrapping.

Otherwise, this change looks fine.

Simon.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list