]> code.delx.au - gnu-emacs/blob - src/ChangeLog
Try and be more careful about propagation of lexical environment.
[gnu-emacs] / src / ChangeLog
1 2010-12-14 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 Try and be more careful about propagation of lexical environment.
4 * eval.c (apply_lambda, funcall_lambda): Remove lexenv arg.
5 (Feval): Always eval in the empty environment.
6 (eval_sub): New function. Use it for all calls to Feval that should
7 evaluate in the lexical environment of the caller.
8 Pass `closure's as is to apply_lambda.
9 (Ffuncall): Pass `closure's as is to funcall_lambda.
10 (funcall_lambda): Extract lexenv for `closure's, when applicable.
11 Also use lexical scoping for the &rest argument, if applicable.
12 * lisp.h (eval_sub): Declare.
13 * lread.c (readevalloop): Remove `evalfun' argument.
14 * print.c (Fwith_output_to_temp_buffer):
15 * data.c (Fsetq_default): Use eval_sub.
16
17 2010-12-13 Stefan Monnier <monnier@iro.umontreal.ca>
18
19 Make the effect of (defvar foo) local.
20 * eval.c (apply_lambda): Make static. Remove eval_flag arg.
21 (Fsetq): Don't check declared_special.
22 (Fdefun, Fdefmacro): Use Ffunction.
23 (Fdefvar): Don't set declared_special for (defvar foo).
24 (FletX): Check locally-special vars. Only do specbind once.
25 (Flet): Check locally-special vars.
26 (Feval): Don't check declared_special.
27 (funcall_lambda): Check locally-special vars.
28 * lisp.h (apply_lambda): Remove extern declaration.
29 * lread.c (readevalloop): CSE.
30
31 2010-07-23 Andreas Schwab <schwab@linux-m68k.org>
32
33 * eval.c (funcall_funvec): Replace bcopy by memcpy.
34
35 2010-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
36
37 * eval.c (Fspecial_variable_p): Rename from `specialp'.
38
39 2010-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
40
41 * bytecode.c (exec_byte_code):
42 * eval.c (Ffunctionp): Fix up int/Lisp_Object confusions.
43
44 2008-04-23 Miles Bader <miles@gnu.org>
45
46 * eval.c (Ffunctionp): Return nil for special forms.
47 (Qunevalled): New variable.
48 (syms_of_eval): Initialize it.
49
50 2007-10-18 Miles Bader <miles@gnu.org>
51
52 * eval.c (FletX): Test the type of VARLIST rather than just !NILP.
53 (Flet): Use XCAR instead of Fcar.
54
55 2007-10-16 Miles Bader <miles@gnu.org>
56
57 * alloc.c (make_funvec, Fpurecopy): Set the pseudo-vector type.
58
59 2006-02-10 Miles Bader <miles@gnu.org>
60
61 * eval.c (Ffunctionp): Supply new 2nd arg to Findirect_function.
62
63 2005-03-04 Miles Bader <miles@gnu.org>
64
65 * eval.c (FletX): Update Vinterpreter_lexical_environment for each
66 variable we bind, instead of all at once like `let'.
67
68 2004-08-09 Miles Bader <miles@gnu.org>
69
70 Changes from merging the funvec patch:
71
72 * eval.c (Feval, Ffuncall): Don't special-case vectors.
73 (funcall_lambda): Use FUNVEC_SIZE.
74 (Fcurry): Remove function.
75
76 Merge funvec patch.
77
78 2004-04-10 Miles Bader <miles@gnu.org>
79
80 * eval.c (Fspecialp): New function.
81 (syms_of_eval): Initialize it.
82
83 2004-04-03 Miles Bader <miles@gnu.org>
84
85 * eval.c (Feval): If a variable isn't bound lexically, fall back
86 to looking it up dynamically even if it isn't declared special.
87
88 2002-08-26 Miles Bader <miles@gnu.org>
89
90 * bytecode.c (Fbyte_code): Fsub1 can GC, so protect it.
91
92 2002-06-12 Miles Bader <miles@gnu.org>
93
94 Lexical binding changes to the byte-code interpreter:
95
96 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, Bvec_ref, Bvec_set)
97 (BdiscardN): New constants.
98 (exec_byte_code): Rename from `Fbyte_code'.
99 Implement above new bytecodes.
100 Add ARGS-TEMPLATE, NARGS and ARGS parameters, and optionally use
101 them push initial args on the stack.
102 (Fbyte_code): New function, just call `exec_byte_code'.
103 Add additional optional arguments for `exec_byte_code'.
104 (Qand_optional, Qand_rest): New extern declarations.
105 * eval.c (Fcurry, Ffunctionp): New functions.
106 (syms_of_eval): Initialize them.
107 (funcall_lambda): Call `exec_byte_code' instead of Fbyte_code.
108 If a compiled-function object has a `push-args' slot, call the
109 byte-code interpreter without binding any arguments.
110 (Ffuncall): Add support for curried functions.
111 * lisp.h (Fbyte_code): Declare max-args as MANY.
112 (exec_byte_code): New declaration.
113
114 Lexical binding changes to the lisp interpreter:
115
116 * lisp.h (struct Lisp_Symbol): Add `declared_special' field.
117 (apply_lambda): Add new 3rd arg to decl.
118 * alloc.c (Fmake_symbol): Initialize `declared_special' field.
119 * eval.c (Vinterpreter_lexical_environment): New variable.
120 (syms_of_eval): Initialize it.
121 (Fsetq): Modify SYM's lexical binding if appropriate.
122 (Ffunction): Return a closure if within a lexical environment.
123 (Flet, FletX): Lexically bind non-defvar'd variables if inside a
124 lexical environment.
125 (Feval): Return lexical binding of variables, if they have one.
126 Pass current lexical environment to embedded lambdas. Handle closures.
127 (Ffuncall): Pass nil lexical environment to lambdas. Handle closures.
128 (funcall_lambda): Add new LEXENV argument, and lexically bind
129 arguments if it's non-nil. Bind `interpreter-lexenv' if it changed.
130 (apply_lambda): Add new LEXENV argument and pass it to funcall_lambda.
131 (Fdefvaralias, Fdefvar, Fdefconst): Mark the variable as special.
132 (Qinternal_interpreter_environment, Qclosure): New constants.
133 (syms_of_eval): Initialize them.
134 (Fdefun, Fdefmacro): Use a closure if lexical binding is active.
135 * lread.c (defvar_bool, defvar_lisp_nopro, defvar_per_buffer)
136 (defvar_kboard, defvar_int): Mark the variable as special.
137 (Vlexical_binding, Qlexical_binding): New variables.
138 (syms_of_lread): Initialize them.
139 (Fload): Bind `lexically-bound' to nil unless specified otherwise
140 in the file header.
141 (lisp_file_lexically_bound_p): New function.
142 (Qinternal_interpreter_environment): New variable.
143 * doc.c (Qclosure): New extern declaration.
144 (Fdocumentation, store_function_docstring): Handle interpreted
145 closures.
146
147 ;; arch-tag: 7cf884aa-6b48-40cb-bfca-265a1e99b3c5