Changeset 3671

Show
Ignore:
Timestamp:
2005年04月09日 10時14分44秒 (4 years ago)
Author:
miyoshi
Message:

* lisp.h (struct Lisp_Cons): New member `gcmarkbit'. This is a
hack for portable dumper.
(XCAR): Sync up with Emacs CVS HEAD.
(XCDR): Ditto.
(SYMBOL_NAME): Ditto.

* alloc.c (CONS_MARKED_P): Refer to `gcmarkbit'. This is a hack
for portable dumper.
(CONS_MARK): Ditto.
(CONS_UNMARK): Ditto.
(Fcons): Initialize the allocated memory to clean up `gcmarkbit'.
(mark_object): Sync up with Emacs CVS HEAD.
(pdump_hash_value): Cast `obj' as 'unsigned long' not to be
negative.
(pdump_map_file): Don't use `VALMASK'.

* fileio.c (Fdo_auto_save): Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.2/src/alloc.c

    r3670 r3671  
    26172617 
    26182618#define CONS_MARKED_P(fptr) \ 
    2619   (XMARKBIT ((fptr)->car)
     2619  ((fptr)->gcmarkbit
    26202620 
    26212621#define CONS_MARK(fptr) \ 
    2622   (XMARK ((fptr)->car)
     2622  ((fptr)->gcmarkbit = 1
    26232623 
    26242624#define CONS_UNMARK(fptr) \ 
    2625   (XUNMARK ((fptr)->car)
     2625  ((fptr)->gcmarkbit = 0
    26262626 
    26272627/* Current cons_block.  */ 
     
    26882688          new = (struct cons_block *) lisp_align_malloc (sizeof *new, 
    26892689                                                         MEM_TYPE_CONS); 
     2690          bzero ((char *) new, sizeof (*new)); 
    26902691          new->next = cons_block; 
    26912692          cons_block = new; 
     
    51425143 
    51435144#endif /* not GC_CHECK_MARKED_OBJECTS */ 
    5144  
    5145   switch (SWITCH_ENUM_CAST (XGCTYPE (obj))) 
    5146     { 
    5147     case Lisp_Int: 
    5148     case Lisp_Misc: 
    5149     case Lisp_Float: 
    5150     case Lisp_Vectorlike: 
    5151     case Lisp_Symbol: 
    5152     case Lisp_String: 
    5153       break; 
    5154        
    5155     case Lisp_Cons: 
    5156       XUNMARK (obj); 
    5157       break; 
    5158     default: 
    5159       XUNMARK (obj); 
    5160       break; 
    5161     } 
    51625145 
    51635146  switch (SWITCH_ENUM_CAST (XGCTYPE (obj))) 
     
    62796262pdump_hash_value (Lisp_Object obj) 
    62806263{ 
    6281   return ((long) obj >> 3) % PDUMP_HASH_SIZE; 
     6264  return ((unsigned long) obj >> 3) % PDUMP_HASH_SIZE; 
    62826265} 
    62836266 
     
    75247507#endif /* WINDOWSNT */ 
    75257508 
    7526   if (ret == NULL || (long) ret == -1 || (unsigned long)ret & ~VALMASK
    7527     { 
    7528       if ((unsigned long)ret & ~VALMASK
     7509  if (ret == NULL || (long) ret == -1 || XTYPE ((unsigned long) ret)
     7510    { 
     7511      if (XTYPE ((unsigned long) ret)
    75297512        { 
    75307513#ifdef WINDOWSNT 
     
    75447527#endif 
    75457528      pdump_current_load_scheme = PDUMP_MALLOC; 
    7546       if ((unsigned long)ret & ~VALMASK
     7529      if (XTYPE ((unsigned long) ret)
    75477530        { 
    75487531          fprintf (stderr, "emacs: malloc returned high address\n"); 
  • branches/2.2/src/fileio.c

    r3652 r3671  
    56495649             Also reset auto_saving to 0.  */ 
    56505650          lispstream = Fcons (Qnil, Qnil); 
    5651           XSETFASTINT (XCAR (lispstream), (EMACS_UINT)stream >> 16); 
    5652           XSETFASTINT (XCDR (lispstream), (EMACS_UINT)stream & 0xffff); 
     5651          XSETCARFASTINT (lispstream, (EMACS_UINT)stream >> 16); 
     5652          XSETCDRFASTINT (lispstream, (EMACS_UINT)stream & 0xffff); 
    56535653        } 
    56545654      else 
  • branches/2.2/src/lisp.h

    r3668 r3671  
    617617struct Lisp_Cons 
    618618  { 
     619#ifdef MEADOW 
     620    /* Hack for portable dumper. This sholud be removed! */ 
     621    unsigned gcmarkbit : 1; 
     622    int spacer : 15; 
     623#endif 
     624 
    619625    /* Please do not use the names of these elements in code other 
    620626       than the core lisp implementation.  Use XCAR and XCDR below.  */ 
     
    642648 
    643649/* Use these from normal code.  */ 
    644 #define XCAR(c) XCAR_AS_LVALUE(c
    645 #define XCDR(c) XCDR_AS_LVALUE(c
     650#define XCAR(c) LISP_MAKE_RVALUE(XCAR_AS_LVALUE(c)
     651#define XCDR(c) LISP_MAKE_RVALUE(XCDR_AS_LVALUE(c)
    646652 
    647653/* Use these to set the fields of a cons cell. 
     
    915921/* Value is name of symbol.  */ 
    916922 
    917 #define SYMBOL_NAME(sym)                       
    918      (XSYMBOL (sym)->xname) 
     923#define SYMBOL_NAME(sym) 
     924     LISP_MAKE_RVALUE (XSYMBOL (sym)->xname) 
    919925 
    920926/* Value is non-zero if SYM is an interned symbol.  */