Changeset 3665

Show
Ignore:
Timestamp:
04/02/05 21:02:46 (4 years ago)
Author:
miyoshi
Message:

* print.c (print_preprocess): Ditto.
(print_object): Ditto.

* alloc.c: Sync up with Emacs CVS HEAD. The codes related with
`Lisp_symbol' are merged.

* bytecode.c (Fbyte_code): Ditto.

* data.c (Fkeywordp): Ditto.
(Fmakunbound): Ditto.
(set_internal): Ditto.

* eval.c (Fdefvaralias): Ditto.
(specbind): Ditto.

* lisp.h (struct Lisp_Symbol): Ditto.

* lread.c (Fintern): Ditto.
(Funintern): Ditto.
(init_obarray): Ditto.

* regex.c (regex_compile): Temporarily invalidate the process of
whitespace.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.2/src/ChangeLog.Meadow

    r3664 r3665  
     12005-04-02  MIYOSHI Masanori  <miyoshi@meadowy.org> 
     2 
     3        * print.c (print_preprocess): Ditto. 
     4        (print_object): Ditto. 
     5 
     6        * alloc.c: Sync up with Emacs CVS HEAD.  The codes related with 
     7        `Lisp_symbol' are merged. 
     8         
     9        * bytecode.c (Fbyte_code): Ditto. 
     10 
     11        * data.c (Fkeywordp): Ditto. 
     12        (Fmakunbound): Ditto. 
     13        (set_internal): Ditto. 
     14 
     15        * eval.c (Fdefvaralias): Ditto. 
     16        (specbind): Ditto. 
     17 
     18        * lisp.h (struct Lisp_Symbol): Ditto. 
     19 
     20        * lread.c (Fintern): Ditto. 
     21        (Funintern): Ditto. 
     22        (init_obarray): Ditto. 
     23 
     24        * regex.c (regex_compile): Temporarily invalidate the process of 
     25        whitespace. 
     26 
    1272005-04-02  MIYOSHI Masanori  <miyoshi@meadowy.org> 
    228 
  • branches/2.2/src/alloc.c

    r3664 r3665  
    31593159  p = XSYMBOL (val); 
    31603160  p->xname = name; 
    3161   p->obarray = Qnil; 
    31623161  p->plist = Qnil; 
    31633162  p->value = Qunbound; 
     
    65926591        pdump_add_object (ptr->function); 
    65936592        pdump_add_object (ptr->plist); 
    6594         pdump_add_object (ptr->obarray); 
    65956593        pdump_add_object (ptr->xname); 
    65966594        if (ptr->next) 
     
    68866884      new.function = pdump_forward_object (ptr->function); 
    68876885      new.plist = pdump_forward_object (ptr->plist); 
    6888       new.obarray = pdump_forward_object (ptr->obarray); 
    68896886      new.xname = pdump_forward_object (ptr->xname); 
    68906887      if (ptr->next) 
     
    77407737      PDUMP_RELOCATE (ptr->function, offset); 
    77417738      PDUMP_RELOCATE (ptr->plist, offset); 
    7742       PDUMP_RELOCATE (ptr->obarray, offset); 
    77437739      PDUMP_RELOCATE (ptr->xname, offset); 
    77447740      if (ptr->next) 
  • branches/2.2/src/bytecode.c

    r3602 r3665  
    624624                && !EQ (val, Qunbound) 
    625625                && !XSYMBOL (sym)->indirect_variable 
    626                 && !MISCP (XSYMBOL (sym)->value) 
    627                 /* I think this should either be checked in the byte 
    628                    compiler, or there should be a flag indicating that 
    629                    a symbol might be constant in Lisp_Symbol, instead 
    630                    of checking this here over and over again. --gerd.  */ 
    631                 && !EQ (sym, Qnil) 
    632                 && !EQ (sym, Qt) 
    633                 && !(SREF (SYMBOL_NAME (sym), 0) == ':' 
    634                      && EQ (XSYMBOL (sym)->obarray, initial_obarray) 
    635                      && !EQ (val, sym))) 
     626                && !XSYMBOL (sym)->constant 
     627                && !MISCP (XSYMBOL (sym)->value)) 
    636628              XSYMBOL (sym)->value = val; 
    637629            else 
  • branches/2.2/src/data.c

    r3617 r3665  
    315315  if (SYMBOLP (object) 
    316316      && SREF (SYMBOL_NAME (object), 0) == ':' 
    317       && EQ (XSYMBOL (object)->obarray, initial_obarray)) 
     317      && SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P (object)) 
    318318    return Qt; 
    319319  return Qnil; 
     
    637637{ 
    638638  CHECK_SYMBOL (symbol); 
    639   if (NILP (symbol) || EQ (symbol, Qt) 
    640       || (SREF (SYMBOL_NAME (symbol), 0) == ':' 
    641           && EQ (XSYMBOL (symbol)->obarray, initial_obarray))) 
     639  if (XSYMBOL (symbol)->constant) 
    642640    return Fsignal (Qsetting_constant, Fcons (symbol, Qnil)); 
    643641  Fset (symbol, Qunbound); 
     
    12051203 
    12061204  CHECK_SYMBOL (symbol); 
    1207   if (NILP (symbol) || EQ (symbol, Qt) 
    1208       || (SDATA (SYMBOL_NAME (symbol))[0] == ':' 
    1209           && EQ (XSYMBOL (symbol)->obarray, initial_obarray) 
    1210           && !EQ (newval, symbol))) 
     1205  if (SYMBOL_CONSTANT_P (symbol) 
     1206      && (NILP (Fkeywordp (symbol)) 
     1207          || !EQ (newval, SYMBOL_VALUE (symbol)))) 
    12111208    return Fsignal (Qsetting_constant, Fcons (symbol, Qnil)); 
    12121209 
  • branches/2.2/src/eval.c

    r3644 r3665  
    745745  CHECK_SYMBOL (aliased); 
    746746 
    747 #if 0 
    748747  if (SYMBOL_CONSTANT_P (symbol)) 
    749748    error ("Cannot make a constant an alias"); 
    750 #endif 
    751749 
    752750  sym = XSYMBOL (symbol); 
    753751  sym->indirect_variable = 1; 
    754752  sym->value = aliased; 
    755 #if 0 
    756753  sym->constant = SYMBOL_CONSTANT_P (aliased); 
    757 #endif 
    758754  LOADHIST_ATTACH (symbol); 
    759755  if (!NILP (docstring)) 
     
    30553051     trivial value.  Make that as fast as we can.  */ 
    30563052  valcontents = SYMBOL_VALUE (symbol); 
    3057   if (!MISCP (valcontents) 
    3058       && !EQ (symbol, Qnil) 
    3059       && !EQ (symbol, Qt) 
    3060       && !(SREF (SYMBOL_NAME (symbol), 0) == ':' 
    3061            && EQ (XSYMBOL (symbol)->obarray, initial_obarray) 
    3062            && !EQ (value, symbol))) 
     3053  if (!MISCP (valcontents) && !SYMBOL_CONSTANT_P (symbol)) 
    30633054    { 
    30643055      specpdl_ptr->symbol = symbol; 
  • branches/2.2/src/lisp.h

    r3654 r3665  
    943943  /* The symbol's property list.  */ 
    944944  Lisp_Object plist; 
    945   Lisp_Object obarray; 
     945 
    946946  /* Next symbol in obarray bucket, if the symbol is interned.  */ 
    947947  struct Lisp_Symbol *next; 
  • branches/2.2/src/lread.c

    r3617 r3665  
    31463146    string = Fpurecopy (string); 
    31473147  sym = Fmake_symbol (string); 
    3148   XSYMBOL (sym)->obarray = obarray; 
     3148 
     3149  if (EQ (obarray, initial_obarray)) 
     3150    XSYMBOL (sym)->interned = SYMBOL_INTERNED_IN_INITIAL_OBARRAY; 
     3151  else 
     3152    XSYMBOL (sym)->interned = SYMBOL_INTERNED; 
    31493153 
    31503154  if ((SREF (string, 0) == ':') 
    31513155      && EQ (obarray, initial_obarray)) 
    3152     XSYMBOL (sym)->value = sym; 
     3156    { 
     3157      XSYMBOL (sym)->constant = 1; 
     3158      XSYMBOL (sym)->value = sym; 
     3159    } 
    31533160 
    31543161  ptr = &XVECTOR (obarray)->contents[XINT (tem)]; 
     
    32223229    return Qnil; 
    32233230 
    3224   XSYMBOL (tem)->obarray = Qnil; 
     3231  XSYMBOL (tem)->interned = SYMBOL_UNINTERNED; 
     3232  XSYMBOL (tem)->constant = 0; 
    32253233  XSYMBOL (tem)->indirect_variable = 0; 
    32263234 
     
    33913399  staticpro (&initial_obarray); 
    33923400  /* Intern nil in the obarray */ 
    3393   XSYMBOL (Qnil)->obarray = Vobarray; 
     3401  XSYMBOL (Qnil)->interned = SYMBOL_INTERNED_IN_INITIAL_OBARRAY; 
     3402  XSYMBOL (Qnil)->constant = 1; 
     3403 
    33943404  /* These locals are to kludge around a pyramid compiler bug. */ 
    33953405  hash = hash_string ("nil", 3); 
     
    34123422  XSYMBOL (Qnil)->plist = Qnil; 
    34133423  XSYMBOL (Qt)->value = Qt; 
     3424  XSYMBOL (Qt)->constant = 1; 
    34143425 
    34153426  /* Qt is correct even if CANNOT_DUMP.  loadup.el will set to nil at end.  */ 
  • branches/2.2/src/print.c

    r3661 r3665  
    13071307      || COMPILEDP (obj) || CHAR_TABLE_P (obj) 
    13081308      || (! NILP (Vprint_gensym) 
    1309           && SYMBOLP (obj) && NILP (XSYMBOL (obj)->obarray))) 
     1309          && SYMBOLP (obj) 
     1310          && !SYMBOL_INTERNED_P (obj))) 
    13101311    { 
    13111312      /* In case print-circle is nil and print-gensym is t, 
     
    13451346             always print the gensym with a number.  This is a special for 
    13461347             the lisp function byte-compile-output-docform.  */ 
    1347           if (! NILP (Vprint_continuous_numbering) && SYMBOLP (obj) 
    1348               && NILP (XSYMBOL (obj)->obarray)) 
     1348          if (!NILP (Vprint_continuous_numbering) 
     1349              && SYMBOLP (obj) 
     1350              && !SYMBOL_INTERNED_P (obj)) 
    13491351            PRINT_NUMBER_STATUS (Vprint_number_table, print_number_index) = Qt; 
    13501352          print_number_index++; 
     
    14081410      || COMPILEDP (obj) || CHAR_TABLE_P (obj) 
    14091411      || (! NILP (Vprint_gensym) 
    1410           && SYMBOLP (obj) && NILP (XSYMBOL (obj)->obarray))) 
     1412          && SYMBOLP (obj) 
     1413          && !SYMBOL_INTERNED_P (obj))) 
    14111414    { 
    14121415      if (NILP (Vprint_circle) && NILP (Vprint_gensym)) 
     
    16331636          confusing = 0; 
    16341637 
    1635         if (! NILP (Vprint_gensym) && NILP (XSYMBOL (obj)->obarray)) 
     1638        if (! NILP (Vprint_gensym) && !SYMBOL_INTERNED_P (obj)) 
    16361639          { 
    16371640            PRINTCHAR ('#'); 
     
    22512254  /* prin1_to_string_buffer initialized in init_buffer_once in buffer.c */ 
    22522255  staticpro_nopdump (&Vprin1_to_string_buffer); 
    2253  
    22542256  defsubr (&Sprin1); 
    22552257  defsubr (&Sprin1_to_string); 
  • branches/2.2/src/regex.c

    r3663 r3665  
    25242524          /* If this is the end of an included regexp, 
    25252525             pop back to the main regexp and try again.  */ 
     2526#if 0 
    25262527          if (in_subpattern) 
    25272528            { 
     
    25322533              continue; 
    25332534            } 
     2535#endif 
    25342536          /* If this is the end of the main regexp, we are done.  */ 
    25352537          break;