ChangeLog 10.1 KB
Newer Older
1 2 3 4 5
2011-03-16  Stefan Monnier  <monnier@iro.umontreal.ca>

	* image.c (parse_image_spec): Use Ffunctionp.
	* lisp.h: Declare Ffunctionp.

6 7 8 9 10 11 12
2011-03-13  Stefan Monnier  <monnier@iro.umontreal.ca>

	* eval.c (Ffunction): Use simpler format for closures.
	(Fcommandp, funcall_lambda):
	* doc.c (Fdocumentation, store_function_docstring):
	* data.c (Finteractive_form): Adjust to new closure format.

13 14 15 16 17 18
2011-03-11  Stefan Monnier  <monnier@iro.umontreal.ca>

	* eval.c (Fprog1, Fprog2): Simplify and use XCDR/XCAR.
	(Fdefvar): Remove redundant SYMBOLP check.
	(Ffunctionp): Don't signal an error for undefined aliases.

19 20 21 22 23 24
2011-03-06  Stefan Monnier  <monnier@iro.umontreal.ca>

	* bytecode.c (exec_byte_code): Remove old lexical binding slot handling
	and replace it with the a integer args-desc handling.
	* eval.c (funcall_lambda): Adjust arglist test accordingly.

25 26 27 28 29 30
2011-03-01  Stefan Monnier  <monnier@iro.umontreal.ca>

	* callint.c (quotify_arg): Simplify the logic.
	(Fcall_interactively): Use lexical binding when evaluating the
	interactive spec of a lexically bound function.

Stefan Monnier's avatar
Stefan Monnier committed
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
2011-02-25  Stefan Monnier  <monnier@iro.umontreal.ca>

	* eval.c (Qcurry): Remove.
	(funcall_funvec): Remove.
	(funcall_lambda): Move new byte-code handling to reduce impact.
	Treat all args as lexical in the case of lexbind.
	(Fcurry): Remove.
	* data.c (Qfunction_vector): Remove.
	(Ffunvecp): Remove.
	* lread.c (read1): Revert to calling make_byte_code here.
	(read_vector): Don't call make_byte_code any more.
	* lisp.h (enum pvec_type): Rename back to PVEC_COMPILED.
	(XSETCOMPILED): Rename back from XSETFUNVEC.
	(FUNVEC_SIZE): Remove.
	(FUNVEC_COMPILED_TAG_P, FUNVEC_COMPILED_P): Remove.
	(COMPILEDP): Rename back from FUNVECP.
	* fns.c (Felt): Remove unexplained FUNVEC check.
	* doc.c (Fdocumentation): Don't handle funvec.
	* alloc.c (make_funvec, Ffunvec): Remove.

51 52 53 54 55 56 57
2011-02-21  Stefan Monnier  <monnier@iro.umontreal.ca>

	* bytecode.c (exec_byte_code): Change stack_ref and stack_set to use
	offsets relative to top rather than to bottom.

	* alloc.c (Fgarbage_collect): Don't mark the byte-stack redundantly.

58 59 60 61 62 63 64
2011-02-19  Stefan Monnier  <monnier@iro.umontreal.ca>

	* window.c (Fsave_window_excursion): Remove.  Moved to Lisp.
	(syms_of_window): Don't defsubr it.
	* window.h (Fsave_window_excursion): Don't declare it.
	* bytecode.c (exec_byte_code): Inline Fsave_window_excursion.

65 66 67 68 69 70 71 72 73 74
2011-02-17  Stefan Monnier  <monnier@iro.umontreal.ca>

	* eval.c (Vinternal_interpreter_environment): Remove.
	(syms_of_eval): Do declare Vinternal_interpreter_environment as
	a global lisp var, but unintern it to hide it.
	(Fcommandp):
	* data.c (Finteractive_form): Understand `closure's.

	* bytecode.c (exec_byte_code): Fix handling of &rest.

75 76 77 78 79
2011-02-12  Stefan Monnier  <monnier@iro.umontreal.ca>

	* bytecode.c (Bvec_ref, Bvec_set): Remove.
	(exec_byte_code): Don't handle them.

80 81 82 83
2010-12-27  Stefan Monnier  <monnier@iro.umontreal.ca>

	* eval.c (Fdefvar): Record specialness before computing initial value.

84 85 86 87 88
2010-12-15  Stefan Monnier  <monnier@iro.umontreal.ca>

	* eval.c (Feval): Add `lexical' argument.  Adjust callers.
	(Ffuncall, eval_sub): Avoid goto.

89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
2010-12-14  Stefan Monnier  <monnier@iro.umontreal.ca>

	Try and be more careful about propagation of lexical environment.
	* eval.c (apply_lambda, funcall_lambda): Remove lexenv arg.
	(Feval): Always eval in the empty environment.
	(eval_sub): New function.  Use it for all calls to Feval that should
	evaluate in the lexical environment of the caller.
	Pass `closure's as is to apply_lambda.
	(Ffuncall): Pass `closure's as is to funcall_lambda.
	(funcall_lambda): Extract lexenv for `closure's, when applicable.
	Also use lexical scoping for the &rest argument, if applicable.
	* lisp.h (eval_sub): Declare.
	* lread.c (readevalloop): Remove `evalfun' argument.
	* print.c (Fwith_output_to_temp_buffer):
	* data.c (Fsetq_default): Use eval_sub.

105 106 107 108 109 110 111 112 113 114 115 116 117 118
2010-12-13  Stefan Monnier  <monnier@iro.umontreal.ca>

	Make the effect of (defvar foo) local.
	* eval.c (apply_lambda): Make static.  Remove eval_flag arg.
	(Fsetq): Don't check declared_special.
	(Fdefun, Fdefmacro): Use Ffunction.
	(Fdefvar): Don't set declared_special for (defvar foo).
	(FletX): Check locally-special vars.  Only do specbind once.
	(Flet): Check locally-special vars.
	(Feval): Don't check declared_special.
	(funcall_lambda): Check locally-special vars.
	* lisp.h (apply_lambda): Remove extern declaration.
	* lread.c (readevalloop): CSE.

119 120 121 122
2010-07-23  Andreas Schwab  <schwab@linux-m68k.org>

	* eval.c (funcall_funvec): Replace bcopy by memcpy.

123 124 125 126
2010-06-18  Stefan Monnier  <monnier@iro.umontreal.ca>

	* eval.c (Fspecial_variable_p): Rename from `specialp'.

127 128 129 130 131
2010-06-15  Stefan Monnier  <monnier@iro.umontreal.ca>

	* bytecode.c (exec_byte_code):
	* eval.c (Ffunctionp): Fix up int/Lisp_Object confusions.

Stefan Monnier's avatar
Stefan Monnier committed
132
2008-04-23  Miles Bader  <miles@gnu.org>
Eli Zaretskii's avatar
Eli Zaretskii committed
133

Stefan Monnier's avatar
Stefan Monnier committed
134 135
	* eval.c (Ffunctionp): Return nil for special forms.
	(Qunevalled): New variable.
136 137
	(syms_of_eval): Initialize it.

Stefan Monnier's avatar
Stefan Monnier committed
138
2007-10-18  Miles Bader  <miles@gnu.org>
139

Stefan Monnier's avatar
Stefan Monnier committed
140 141
	* eval.c (FletX): Test the type of VARLIST rather than just !NILP.
	(Flet): Use XCAR instead of Fcar.
142

Stefan Monnier's avatar
Stefan Monnier committed
143
2007-10-16  Miles Bader  <miles@gnu.org>
144

Stefan Monnier's avatar
Stefan Monnier committed
145
	* alloc.c (make_funvec, Fpurecopy): Set the pseudo-vector type.
146

Stefan Monnier's avatar
Stefan Monnier committed
147
2006-02-10  Miles Bader  <miles@gnu.org>
148

Stefan Monnier's avatar
Stefan Monnier committed
149
	* eval.c (Ffunctionp): Supply new 2nd arg to Findirect_function.
150

Stefan Monnier's avatar
Stefan Monnier committed
151
2005-03-04  Miles Bader  <miles@gnu.org>
152

Stefan Monnier's avatar
Stefan Monnier committed
153 154
	* eval.c (FletX): Update Vinterpreter_lexical_environment for each
	variable we bind, instead of all at once like `let'.
155

Stefan Monnier's avatar
Stefan Monnier committed
156
2004-08-09  Miles Bader  <miles@gnu.org>
157

Stefan Monnier's avatar
Stefan Monnier committed
158
	Changes from merging the funvec patch:
159

Stefan Monnier's avatar
Stefan Monnier committed
160 161 162
	* eval.c (Feval, Ffuncall): Don't special-case vectors.
	(funcall_lambda): Use FUNVEC_SIZE.
	(Fcurry): Remove function.
163

Stefan Monnier's avatar
Stefan Monnier committed
164
	Merge funvec patch.
165

Stefan Monnier's avatar
Stefan Monnier committed
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
2004-05-20  Miles Bader  <miles@gnu.org>

	* lisp.h: Declare make_funvec and Ffunvec.
	(enum pvec_type): Rename `PVEC_COMPILED' to `PVEC_FUNVEC'.
	(XSETFUNVEC): Rename from `XSETCOMPILED'.
	(FUNVEC_SIZE, FUNVEC_COMPILED_TAG_P, FUNVEC_COMPILED_P): New macros.
	(COMPILEDP): Define in terms of funvec macros.
	(FUNVECP, GC_FUNVECP): Rename from `COMPILEDP' & `GC_COMPILEDP'.
	(FUNCTIONP): Use FUNVECP instead of COMPILEDP.
	* alloc.c (make_funvec, funvec): New functions.
	(Fmake_byte_code): Make sure the first element is a list.

	* eval.c (Qcurry): New variable.
	(funcall_funvec, Fcurry): New functions.
	(syms_of_eval): Initialize them.
	(funcall_lambda): Handle non-bytecode funvec objects by calling
	funcall_funvec.
	(Ffuncall, Feval): Use FUNVECP insetad of COMPILEDP.
	* lread.c (read1): Return result of read_vector for `#[' syntax
	directly; read_vector now does any extra work required.
	(read_vector): Handle both funvec and byte-code objects, converting the
	type as necessary.  `bytecodeflag' argument is now called
	`read_funvec'.
	* data.c (Ffunvecp): New function.
	* doc.c (Fdocumentation): Return nil for unknown funvecs.
	* fns.c (mapcar1, Felt, concat): Allow funvecs.

	* eval.c (Ffunctionp): Use `funvec' operators instead of `compiled'
	operators.
	* alloc.c (Fmake_byte_code, Fpurecopy, mark_object): Likewise.
	* keyboard.c (Fcommand_execute): Likewise.
	* image.c (parse_image_spec): Likewise.
	* fns.c (Flength, concat, internal_equal): Likewise.
	* data.c (Faref, Ftype_of): Likewise.
	* print.c (print_preprocess, print_object): Likewise.

Stefan Monnier's avatar
Stefan Monnier committed
202
2004-04-10  Miles Bader  <miles@gnu.org>
203

Stefan Monnier's avatar
Stefan Monnier committed
204 205
	* eval.c (Fspecialp): New function.
	(syms_of_eval): Initialize it.
206

Stefan Monnier's avatar
Stefan Monnier committed
207
2004-04-03  Miles Bader  <miles@gnu.org>
208

Stefan Monnier's avatar
Stefan Monnier committed
209 210
	* eval.c (Feval): If a variable isn't bound lexically, fall back
	to looking it up dynamically even if it isn't declared special.
211

Stefan Monnier's avatar
Stefan Monnier committed
212
2002-08-26  Miles Bader  <miles@gnu.org>
213

Stefan Monnier's avatar
Stefan Monnier committed
214
	* bytecode.c (Fbyte_code): Fsub1 can GC, so protect it.
215

Stefan Monnier's avatar
Stefan Monnier committed
216
2002-06-12  Miles Bader  <miles@gnu.org>
217

Stefan Monnier's avatar
Stefan Monnier committed
218
	Lexical binding changes to the byte-code interpreter:
219

Stefan Monnier's avatar
Stefan Monnier committed
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
	* bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, Bvec_ref, Bvec_set)
	(BdiscardN): New constants.
	(exec_byte_code): Rename from `Fbyte_code'.
	Implement above new bytecodes.
	Add ARGS-TEMPLATE, NARGS and ARGS parameters, and optionally use
	them push initial args on the stack.
	(Fbyte_code): New function, just call `exec_byte_code'.
	Add additional optional arguments for `exec_byte_code'.
	(Qand_optional, Qand_rest): New extern declarations.
	* eval.c (Fcurry, Ffunctionp): New functions.
	(syms_of_eval): Initialize them.
	(funcall_lambda): Call `exec_byte_code' instead of Fbyte_code.
	If a compiled-function object has a `push-args' slot, call the
	byte-code interpreter without binding any arguments.
	(Ffuncall): Add support for curried functions.
	* lisp.h (Fbyte_code): Declare max-args as MANY.
	(exec_byte_code): New declaration.
237

Stefan Monnier's avatar
Stefan Monnier committed
238
	Lexical binding changes to the lisp interpreter:
239

Stefan Monnier's avatar
Stefan Monnier committed
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
	* lisp.h (struct Lisp_Symbol): Add `declared_special' field.
	(apply_lambda): Add new 3rd arg to decl.
	* alloc.c (Fmake_symbol): Initialize `declared_special' field.
	* eval.c (Vinterpreter_lexical_environment): New variable.
	(syms_of_eval): Initialize it.
	(Fsetq): Modify SYM's lexical binding if appropriate.
	(Ffunction): Return a closure if within a lexical environment.
	(Flet, FletX): Lexically bind non-defvar'd variables if inside a
	lexical environment.
	(Feval): Return lexical binding of variables, if they have one.
	Pass current lexical environment to embedded lambdas.  Handle closures.
	(Ffuncall): Pass nil lexical environment to lambdas.  Handle closures.
	(funcall_lambda): Add new LEXENV argument, and lexically bind
	arguments if it's non-nil.  Bind `interpreter-lexenv' if it changed.
	(apply_lambda): Add new LEXENV argument and pass it to funcall_lambda.
	(Fdefvaralias, Fdefvar, Fdefconst): Mark the variable as special.
	(Qinternal_interpreter_environment, Qclosure): New constants.
	(syms_of_eval): Initialize them.
	(Fdefun, Fdefmacro): Use a closure if lexical binding is active.
	* lread.c (defvar_bool, defvar_lisp_nopro, defvar_per_buffer)
	(defvar_kboard, defvar_int): Mark the variable as special.
	(Vlexical_binding, Qlexical_binding): New variables.
	(syms_of_lread): Initialize them.
	(Fload): Bind `lexically-bound' to nil unless specified otherwise
	in the file header.
	(lisp_file_lexically_bound_p): New function.
	(Qinternal_interpreter_environment): New variable.
	* doc.c (Qclosure): New extern declaration.
	(Fdocumentation, store_function_docstring): Handle interpreted
	closures.

;; arch-tag: 7cf884aa-6b48-40cb-bfca-265a1e99b3c5