Mercurial > emacs
view etc/images/lock-ok.xpm @ 107984:bef5d1738c0b
Make variable forwarding explicit rather the using special values.
Basically, this makes the structure of buffer-local values and object
forwarding explicit in the type of Lisp_Symbols rather than use
special Lisp_Objects for that. This tends to lead to slightly more
verbose code, but is more C-like, simpler, and makes it easier to make
sure we handled all cases, among other things by letting the compiler
help us check it.
* lisp.h (enum Lisp_Misc_Type, union Lisp_Misc):
Removing forwarding objects.
(enum Lisp_Fwd_Type, enum symbol_redirect, union Lisp_Fwd): New types.
(struct Lisp_Symbol): Make the various forms of variable-forwarding
explicit rather than hiding them inside Lisp_Object "values".
(XFWDTYPE): New macro.
(XINTFWD, XBOOLFWD, XOBJFWD, XKBOARD_OBJFWD): Redefine.
(XBUFFER_LOCAL_VALUE): Remove.
(SYMBOL_VAL, SYMBOL_ALIAS, SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL)
(SET_SYMBOL_ALIAS, SET_SYMBOL_BLV, SET_SYMBOL_FWD): New macros.
(SYMBOL_VALUE, SET_SYMBOL_VALUE): Remove.
(struct Lisp_Intfwd, struct Lisp_Boolfwd, struct Lisp_Objfwd)
(struct Lisp_Buffer_Objfwd, struct Lisp_Kboard_Objfwd):
Remove the Lisp_Misc_* header.
(struct Lisp_Buffer_Local_Value): Redefine.
(BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): New macros.
(struct Lisp_Misc_Any): Add filler to get the right size.
(struct Lisp_Free): Use struct Lisp_Misc_Any rather than struct
Lisp_Intfwd.
(DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
(DEFVAR_KBOARD): Allocate a forwarding object.
* data.c (do_blv_forwarding, store_blv_forwarding): New macros.
(let_shadows_global_binding_p): New function.
(union Lisp_Val_Fwd): New type.
(make_blv): New function.
(swap_in_symval_forwarding, indirect_variable, do_symval_forwarding)
(store_symval_forwarding, swap_in_global_binding, Fboundp)
(swap_in_symval_forwarding, find_symbol_value, Fset)
(let_shadows_buffer_binding_p, set_internal, default_value)
(Fset_default, Fmake_variable_buffer_local, Fmake_local_variable)
(Fkill_local_variable, Fmake_variable_frame_local)
(Flocal_variable_p, Flocal_variable_if_set_p)
(Fvariable_binding_locus):
* xdisp.c (select_frame_for_redisplay):
* lread.c (Fintern, Funintern, init_obarray, defvar_int)
(defvar_bool, defvar_lisp_nopro, defvar_lisp, defvar_kboard):
* frame.c (store_frame_param):
* eval.c (Fdefvaralias, Fuser_variable_p, specbind, unbind_to):
* bytecode.c (Fbyte_code) <varref, varset>: Adapt to the new symbol
value structure.
* buffer.c (PER_BUFFER_SYMBOL): Move from buffer.h.
(clone_per_buffer_values): Only adjust markers into the current buffer.
(reset_buffer_local_variables): PER_BUFFER_IDX is never -2.
(Fbuffer_local_value, set_buffer_internal_1)
(swap_out_buffer_local_variables):
Adapt to the new symbol value structure.
(DEFVAR_PER_BUFFER): Allocate a Lisp_Buffer_Objfwd object.
(defvar_per_buffer): Take a new arg for the fwd object.
(buffer_lisp_local_variables): Return a proper alist (different fix
for bug#4138).
* alloc.c (Fmake_symbol): Use SET_SYMBOL_VAL.
(Fgarbage_collect): Don't handle buffer_defaults specially.
(mark_object): Handle new symbol value structure rather than the old
special Lisp_Misc_* objects.
(gc_sweep) <symbols>: Free also the buffer-local-value objects.
* term.c (set_tty_color_mode):
* bidi.c (bidi_initialize): Don't access the ->value field directly.
* buffer.h (PER_BUFFER_VAR_OFFSET): Don't bother with
a buffer_local_flags.
* print.c (print_object): Get rid of impossible forwarding objects.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 19 Apr 2010 21:50:52 -0400 |
parents | ed7704221f2b |
children |
line wrap: on
line source
/* XPM */ static char * stock_lock_ok_xpm[] = { "24 24 188 2", " c None", ". c #000000", "+ c #212121", "@ c #9E9E9E", "# c #E6E6E6", "$ c #E7E7E7", "% c #C8C8C8", "& c #A0A0A0", "* c #131313", "= c #5F5F5F", "- c #EDEDED", "; c #D6D6D6", "> c #D5D5D5", ", c #DDDDDD", "' c #D8D8D8", ") c #A1A1A1", "! c #3C3C3C", "~ c #353535", "{ c #EFEFEF", "] c #CFCFCF", "^ c #4C4C4C", "/ c #141414", "( c #6A6A6A", "_ c #D0D0D0", ": c #B2B2B2", "< c #454545", "[ c #E2E2E2", "} c #292929", "| c #0F0F0F", "1 c #949494", "2 c #E9E9E9", "3 c #C3C3C3", "4 c #1C1C1C", "5 c #E1E1E1", "6 c #272727", "7 c #DEDEDE", "8 c #B6B6B6", "9 c #B7B6B6", "0 c #150902", "a c #2E2419", "b c #251D15", "c c #616160", "d c #5E5A56", "e c #29211A", "f c #15100C", "g c #2F251B", "h c #1D1710", "i c #4A392B", "j c #656361", "k c #565352", "l c #392B1D", "m c #322110", "n c #0C0500", "o c #EFDBBF", "p c #EDD9C0", "q c #E9D5BE", "r c #E7D2B9", "s c #E5D0B3", "t c #DCC09D", "u c #D9BE99", "v c #DABE99", "w c #D7BB95", "x c #D5B68E", "y c #D2AF85", "z c #CFA77C", "A c #9A5E1B", "B c #F0DABF", "C c #E4C6A0", "D c #D6AF80", "E c #D3AC7B", "F c #D0A570", "G c #C99F68", "H c #C69B64", "I c #C69C64", "J c #C89D66", "K c #C79C65", "L c #C39860", "M c #C09256", "N c #BC8645", "O c #B67C36", "P c #985E1A", "Q c #EED8BC", "R c #E3C39C", "S c #D3AA7B", "T c #CFA670", "U c #CA9F68", "V c #C89E66", "W c #C89F68", "X c #C49961", "Y c #C09358", "Z c #BC8746", "` c #B77D39", " . c #EED8BB", ".. c #E2C29B", "+. c #D6AE7F", "@. c #CA9E6D", "#. c #C69861", "$. c #BF925A", "%. c #BB8E56", "&. c #BD8E56", "*. c #5C7354", "=. c #EFDABE", "-. c #E4C49D", ";. c #D7B080", ">. c #DAB685", ",. c #D4B07C", "'. c #D0A971", "). c #CEA46B", "!. c #CDA46D", "~. c #FFFFFF", "{. c #DBE0D9", "]. c #52684B", "^. c #4E6346", "/. c #52674A", "(. c #EFD8BB", "_. c #E0C199", ":. c #D3AA7A", "<. c #C89B67", "[. c #C3965F", "}. c #BC8E56", "|. c #BA8B52", "1. c #BA8C54", "2. c #F6F6F6", "3. c #F7F7F7", "4. c #F8F8F8", "5. c #E6E9E5", "6. c #6B8064", "7. c #4B5F45", "8. c #44553D", "9. c #E3C29C", "0. c #D9B484", "a. c #D4AE77", "b. c #CFA770", "c. c #CCA46B", "d. c #CBA36B", "e. c #B6BEB3", "f. c #4E6047", "g. c #788274", "h. c #CBD2C9", "i. c #6A8063", "j. c #384834", "k. c #EDD6B8", "l. c #E1BD94", "m. c #D1A874", "n. c #BD9058", "o. c #B7874E", "p. c #B48349", "q. c #B5844C", "r. c #8F9C8A", "s. c #53684B", "t. c #475841", "u. c #657C5E", "v. c #4A5D44", "w. c #626E5D", "x. c #EED8BA", "y. c #E0C099", "z. c #D8B37F", "A. c #D2AD76", "B. c #CEA66F", "C. c #CCA46D", "D. c #FAFAFA", "E. c #6A7E63", "F. c #63715E", "G. c #E3E3E3", "H. c #EED5B7", "I. c #DFC096", "J. c #D2A776", "K. c #CEA46E", "L. c #C89D65", "M. c #C49960", "N. c #C1955C", "O. c #C2955C", "P. c #FBFBFB", "Q. c #FCFCFC", "R. c #80937A", "S. c #6D796A", "T. c #FEFEFE", "U. c #E5E5E5", "V. c #AC8C65", "W. c #CFA772", "X. c #C49256", "Y. c #C08D51", "Z. c #BA8849", "`. c #B78342", " + c #B48240", ".+ c #B68241", "++ c #EAEAEA", "@+ c #E4E4E4", " ", " ", " . . . . . ", " . + @ # $ % & * ", " . = - # ; > , ' ) ! . ", " ~ { ] ^ . . / ( _ : < ", " . [ ' } . | ( % 1 . ", " * 2 3 . 4 5 @ . ", " 6 7 8 . . $ 9 . ", " 0 a b c d e f g b h b i j k l m n ", " . o p q r s t u u v u w x y z A . ", " . B C D E F G H I J K L M N O P . ", " . Q R D S T U I V W V X Y Z ` A . ", " . ...+.@.#.$.%.&.. . . . . . . . . *. ", " . =.-.;.>.,.'.).!.. ~.~.~.~.~.~.{.].^./.", " . (._.:.<.[.}.|.1.. ~.2.3.3.4.5.6.7.8. ", " . Q 9.+.0.a.b.c.d.. ~.e.f.g.h.i.7.j. ", " . k.l.m.#.n.o.p.q.. ~.r.s.t.u.v.w.. ", " . x.y.S z.A.B.c.C.. ~.D.E.s./.F.G.. ", " . H.I.J.K.L.M.N.O.. ~.P.Q.R.S.T.U.. ", " . V.W.X.Y.Z.`. +.+. ++G.G.@+U.U.3 . ", " . . . . . . . . . . . . . . . . . ", " ", " "};