Mercurial > emacs
comparison src/alloc.c @ 10009:82f3daf76995
(Fpurecopy): Use type test macros.
(mark_object): Use the new pseudovector convention.
| author | Karl Heuer <kwzh@gnu.org> |
|---|---|
| date | Fri, 18 Nov 1994 06:49:09 +0000 |
| parents | 2c57cb7eba5f |
| children | c017d1157655 |
comparison
equal
deleted
inserted
replaced
| 10008:b83150a8020d | 10009:82f3daf76995 |
|---|---|
| 1520 ptr->size ++; | 1520 ptr->size ++; |
| 1521 } | 1521 } |
| 1522 } | 1522 } |
| 1523 break; | 1523 break; |
| 1524 | 1524 |
| 1525 case Lisp_Vector: | 1525 case Lisp_Vectorlike: |
| 1526 case Lisp_Window: | 1526 case Lisp_Window: |
| 1527 case Lisp_Process: | 1527 case Lisp_Process: |
| 1528 case Lisp_Window_Configuration: | |
| 1529 { | 1528 { |
| 1530 register struct Lisp_Vector *ptr = XVECTOR (obj); | 1529 register struct Lisp_Vector *ptr = XVECTOR (obj); |
| 1531 register EMACS_INT size = ptr->size; | 1530 register EMACS_INT size = ptr->size; |
| 1532 /* The reason we use ptr1 is to avoid an apparent hardware bug | 1531 /* The reason we use ptr1 is to avoid an apparent hardware bug |
| 1533 that happens occasionally on the FSF's HP 300s. | 1532 that happens occasionally on the FSF's HP 300s. |
| 1536 perhaps in the moveml instruction. | 1535 perhaps in the moveml instruction. |
| 1537 Yes, this is a crock, but we have to do it. */ | 1536 Yes, this is a crock, but we have to do it. */ |
| 1538 struct Lisp_Vector *volatile ptr1 = ptr; | 1537 struct Lisp_Vector *volatile ptr1 = ptr; |
| 1539 register int i; | 1538 register int i; |
| 1540 | 1539 |
| 1541 if (size & ARRAY_MARK_FLAG) break; /* Already marked */ | 1540 if (size & ARRAY_MARK_FLAG) break; /* Already marked */ |
| 1542 ptr->size |= ARRAY_MARK_FLAG; /* Else mark it */ | 1541 ptr->size |= ARRAY_MARK_FLAG; /* Else mark it */ |
| 1543 for (i = 0; i < size; i++) /* and then mark its elements */ | 1542 if (size & PSEUDOVECTOR_FLAG) |
| 1543 size &= PSEUDOVECTOR_SIZE_MASK; | |
| 1544 for (i = 0; i < size; i++) /* and then mark its elements */ | |
| 1544 mark_object (&ptr1->contents[i]); | 1545 mark_object (&ptr1->contents[i]); |
| 1545 } | 1546 } |
| 1546 break; | 1547 break; |
| 1547 | 1548 |
| 1548 case Lisp_Compiled: | 1549 case Lisp_Compiled: |
