Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/runtime/gc/gc-util.c
ViewVC logotype

Diff of /sml/trunk/src/runtime/gc/gc-util.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 106, Thu May 28 21:30:17 1998 UTC revision 223, Sat Apr 17 16:27:01 1999 UTC
# Line 197  Line 197 
197   */   */
198  void ScanWeakPtrs (heap_t *heap)  void ScanWeakPtrs (heap_t *heap)
199  {  {
200      ml_val_t    *p, *q, *obj, *obj_start, desc, fwdObj;      ml_val_t    *p, *q, *obj, desc, fwdObj;
201    
202  /* SayDebug ("ScanWeakPtrs:\n"); */  /* SayDebug ("ScanWeakPtrs:\n"); */
203      for (p = heap->weakList;  p != NIL(ml_val_t *);  p = q) {      for (p = heap->weakList;  p != NIL(ml_val_t *);  p = q) {
# Line 210  Line 210 
210            case OBJC_record:            case OBJC_record:
211            case OBJC_string:            case OBJC_string:
212            case OBJC_array:            case OBJC_array:
213  #ifdef POINTERS_INTO_OBJECTS              desc = obj[-1];
             for (obj_start = obj;  !isDESC(desc = obj_start[-1]);  obj_start--)  
                 continue;  
 #else  
             obj_start = obj;  
             desc = obj_start[-1];  
 #endif  
214              if (desc == DESC_forwarded) {              if (desc == DESC_forwarded) {
215                  p[0] = DESC_weak;                  p[0] = DESC_weak;
216                  p[1] = PTR_CtoML(FOLLOW_FWDOBJ(obj_start, obj));                  p[1] = PTR_CtoML(FOLLOW_FWDOBJ(obj));
217  /* SayDebug ("forwarded to %#x\n", FOLLOW_FWDOBJ(obj_start, obj)); */  /* SayDebug ("forwarded to %#x\n", FOLLOW_FWDOBJ(obj)); */
218              }              }
219              else {              else {
220                  p[0] = DESC_null_weak;                  p[0] = DESC_null_weak;
# Line 229  Line 223 
223              }              }
224              break;              break;
225            case OBJC_pair:            case OBJC_pair:
226  #ifdef POINTERS_INTO_OBJECTS              if (isDESC(desc = obj[0])) {
             obj_start = (ml_val_t *)((Addr_t)obj & ~(PAIR_SZB-1));  
 #else  
             obj_start = obj;  
 #endif  
             if (isDESC(desc = obj_start[0])) {  
227                  p[0] = DESC_weak;                  p[0] = DESC_weak;
228                  p[1] = PTR_CtoML(FOLLOW_FWDPAIR(desc, obj_start, obj));                  p[1] = PTR_CtoML(FOLLOW_FWDPAIR(desc, obj));
229  /* SayDebug ("(pair) forwarded to %#x\n", FOLLOW_FWDPAIR(desc, obj_start, obj)); */  /* SayDebug ("(pair) forwarded to %#x\n", FOLLOW_FWDPAIR(desc, obj)); */
230              }              }
231              else {              else {
232                  p[0] = DESC_null_weak;                  p[0] = DESC_null_weak;

Legend:
Removed from v.106  
changed lines
  Added in v.223

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0