Changeset 3665
- Timestamp:
- 04/02/05 21:02:46 (4 years ago)
- Files:
-
- branches/2.2/src/ChangeLog.Meadow (modified) (1 diff)
- branches/2.2/src/alloc.c (modified) (4 diffs)
- branches/2.2/src/bytecode.c (modified) (1 diff)
- branches/2.2/src/data.c (modified) (3 diffs)
- branches/2.2/src/eval.c (modified) (2 diffs)
- branches/2.2/src/lisp.h (modified) (1 diff)
- branches/2.2/src/lread.c (modified) (4 diffs)
- branches/2.2/src/print.c (modified) (5 diffs)
- branches/2.2/src/regex.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/2.2/src/ChangeLog.Meadow
r3664 r3665 1 2005-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 1 27 2005-04-02 MIYOSHI Masanori <miyoshi@meadowy.org> 2 28 branches/2.2/src/alloc.c
r3664 r3665 3159 3159 p = XSYMBOL (val); 3160 3160 p->xname = name; 3161 p->obarray = Qnil;3162 3161 p->plist = Qnil; 3163 3162 p->value = Qunbound; … … 6592 6591 pdump_add_object (ptr->function); 6593 6592 pdump_add_object (ptr->plist); 6594 pdump_add_object (ptr->obarray);6595 6593 pdump_add_object (ptr->xname); 6596 6594 if (ptr->next) … … 6886 6884 new.function = pdump_forward_object (ptr->function); 6887 6885 new.plist = pdump_forward_object (ptr->plist); 6888 new.obarray = pdump_forward_object (ptr->obarray);6889 6886 new.xname = pdump_forward_object (ptr->xname); 6890 6887 if (ptr->next) … … 7740 7737 PDUMP_RELOCATE (ptr->function, offset); 7741 7738 PDUMP_RELOCATE (ptr->plist, offset); 7742 PDUMP_RELOCATE (ptr->obarray, offset);7743 7739 PDUMP_RELOCATE (ptr->xname, offset); 7744 7740 if (ptr->next) branches/2.2/src/bytecode.c
r3602 r3665 624 624 && !EQ (val, Qunbound) 625 625 && !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)) 636 628 XSYMBOL (sym)->value = val; 637 629 else branches/2.2/src/data.c
r3617 r3665 315 315 if (SYMBOLP (object) 316 316 && SREF (SYMBOL_NAME (object), 0) == ':' 317 && EQ (XSYMBOL (object)->obarray, initial_obarray))317 && SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P (object)) 318 318 return Qt; 319 319 return Qnil; … … 637 637 { 638 638 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) 642 640 return Fsignal (Qsetting_constant, Fcons (symbol, Qnil)); 643 641 Fset (symbol, Qunbound); … … 1205 1203 1206 1204 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)))) 1211 1208 return Fsignal (Qsetting_constant, Fcons (symbol, Qnil)); 1212 1209 branches/2.2/src/eval.c
r3644 r3665 745 745 CHECK_SYMBOL (aliased); 746 746 747 #if 0748 747 if (SYMBOL_CONSTANT_P (symbol)) 749 748 error ("Cannot make a constant an alias"); 750 #endif751 749 752 750 sym = XSYMBOL (symbol); 753 751 sym->indirect_variable = 1; 754 752 sym->value = aliased; 755 #if 0756 753 sym->constant = SYMBOL_CONSTANT_P (aliased); 757 #endif758 754 LOADHIST_ATTACH (symbol); 759 755 if (!NILP (docstring)) … … 3055 3051 trivial value. Make that as fast as we can. */ 3056 3052 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)) 3063 3054 { 3064 3055 specpdl_ptr->symbol = symbol; branches/2.2/src/lisp.h
r3654 r3665 943 943 /* The symbol's property list. */ 944 944 Lisp_Object plist; 945 Lisp_Object obarray; 945 946 946 /* Next symbol in obarray bucket, if the symbol is interned. */ 947 947 struct Lisp_Symbol *next; branches/2.2/src/lread.c
r3617 r3665 3146 3146 string = Fpurecopy (string); 3147 3147 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; 3149 3153 3150 3154 if ((SREF (string, 0) == ':') 3151 3155 && EQ (obarray, initial_obarray)) 3152 XSYMBOL (sym)->value = sym; 3156 { 3157 XSYMBOL (sym)->constant = 1; 3158 XSYMBOL (sym)->value = sym; 3159 } 3153 3160 3154 3161 ptr = &XVECTOR (obarray)->contents[XINT (tem)]; … … 3222 3229 return Qnil; 3223 3230 3224 XSYMBOL (tem)->obarray = Qnil; 3231 XSYMBOL (tem)->interned = SYMBOL_UNINTERNED; 3232 XSYMBOL (tem)->constant = 0; 3225 3233 XSYMBOL (tem)->indirect_variable = 0; 3226 3234 … … 3391 3399 staticpro (&initial_obarray); 3392 3400 /* 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 3394 3404 /* These locals are to kludge around a pyramid compiler bug. */ 3395 3405 hash = hash_string ("nil", 3); … … 3412 3422 XSYMBOL (Qnil)->plist = Qnil; 3413 3423 XSYMBOL (Qt)->value = Qt; 3424 XSYMBOL (Qt)->constant = 1; 3414 3425 3415 3426 /* Qt is correct even if CANNOT_DUMP. loadup.el will set to nil at end. */ branches/2.2/src/print.c
r3661 r3665 1307 1307 || COMPILEDP (obj) || CHAR_TABLE_P (obj) 1308 1308 || (! NILP (Vprint_gensym) 1309 && SYMBOLP (obj) && NILP (XSYMBOL (obj)->obarray))) 1309 && SYMBOLP (obj) 1310 && !SYMBOL_INTERNED_P (obj))) 1310 1311 { 1311 1312 /* In case print-circle is nil and print-gensym is t, … … 1345 1346 always print the gensym with a number. This is a special for 1346 1347 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)) 1349 1351 PRINT_NUMBER_STATUS (Vprint_number_table, print_number_index) = Qt; 1350 1352 print_number_index++; … … 1408 1410 || COMPILEDP (obj) || CHAR_TABLE_P (obj) 1409 1411 || (! NILP (Vprint_gensym) 1410 && SYMBOLP (obj) && NILP (XSYMBOL (obj)->obarray))) 1412 && SYMBOLP (obj) 1413 && !SYMBOL_INTERNED_P (obj))) 1411 1414 { 1412 1415 if (NILP (Vprint_circle) && NILP (Vprint_gensym)) … … 1633 1636 confusing = 0; 1634 1637 1635 if (! NILP (Vprint_gensym) && NILP (XSYMBOL (obj)->obarray))1638 if (! NILP (Vprint_gensym) && !SYMBOL_INTERNED_P (obj)) 1636 1639 { 1637 1640 PRINTCHAR ('#'); … … 2251 2254 /* prin1_to_string_buffer initialized in init_buffer_once in buffer.c */ 2252 2255 staticpro_nopdump (&Vprin1_to_string_buffer); 2253 2254 2256 defsubr (&Sprin1); 2255 2257 defsubr (&Sprin1_to_string); branches/2.2/src/regex.c
r3663 r3665 2524 2524 /* If this is the end of an included regexp, 2525 2525 pop back to the main regexp and try again. */ 2526 #if 0 2526 2527 if (in_subpattern) 2527 2528 { … … 2532 2533 continue; 2533 2534 } 2535 #endif 2534 2536 /* If this is the end of the main regexp, we are done. */ 2535 2537 break;
