[m-rev.] trivial diff: fix agc runtime bitrot

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Nov 1 16:29:56 AEDT 2006


Estimated hours taken: 0.1
Branches: main

runtime/mercury_accurate_gc.c:
 	Fix some bitrot in accurate gc runtime.

Julien.

Index: mercury_accurate_gc.c
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_accurate_gc.c,v
retrieving revision 1.41
diff -u -r1.41 mercury_accurate_gc.c
--- mercury_accurate_gc.c	17 Mar 2006 03:25:54 -0000	1.41
+++ mercury_accurate_gc.c	1 Nov 2006 05:15:17 -0000
@@ -393,7 +393,8 @@
          ** the succip slot of that frame without checking what kind
          ** of frame it is.
          */
-        assert(location == -1); /* succip is saved in succip_slot */
+        assert(location.MR_long_lval == -1);
+            /* succip is saved in succip_slot */
          saved_success_location = MR_succip_slot_addr(curfr_at_signal);
          saved_success = *saved_success_location;
      }
@@ -486,7 +487,7 @@
      ** The new heap pointer starts at the bottom of the new heap.
      */
      swap_heaps();
-    MR_virtual_hp = new_heap->MR_zone_min;
+    MR_virtual_hp_word = (MR_Word) new_heap->MR_zone_min;

      label = MR_lookup_internal_by_addr(success_ip);
      label_layout = label->i_layout;
@@ -505,7 +506,7 @@
          ** easier to reset it than debug the problem at the moment
          */
          fprintf(stderr, "MR_virtual_hp: %lx\n", (long) MR_virtual_hp);
-        MR_virtual_hp = new_heap->MR_zone_min;
+        MR_virtual_hp_word = (MR_Word) new_heap->MR_zone_min;
          fprintf(stderr, "MR_virtual_hp: %lx\n", (long) MR_virtual_hp);
      }

@@ -552,7 +553,7 @@
              stack_pointer, current_frame, max_frame);

          /* XXX restore this, it appears to get clobbered */
-        MR_virtual_hp = new_hp;
+        MR_virtual_hp_word = (MR_Word) new_hp;
      }

      notify_gc_end(old_heap, new_heap, old_hp);

--------------------------------------------------------------------------
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