ecl/src/lsp
Florian Margaine 09899a3e15 Fix INCF on a THE variable.
The following code:

(let ((foo 0))
  (incf (the fixnum foo) (bar)))

was being expanded into:

(let ((foo 0))
  (LET* ((#:G133 (BAR)) (#:G132 (THE FIXNUM (+ (THE FIXNUM FOO) (BAR)))))
    (DECLARE (:READ-ONLY #:G133))
    (SETQ FOO (THE FIXNUM #:G132))))

Which is obviously going to call (BAR) twice. If (BAR) has
side-effects, then it is going to be buggy.

The old define-modify-macro had an issue with out-of-order INCF/DECF,
which is why it was replaced with Bruno Haible's macro, which is
supposed to improve THE handling. It turns out that the improvement is
a bit broken, so we're just fixing this.

Fixes #401.
2017-09-08 11:57:07 +02:00
..
arraylib.lsp The ECL code no longer uses tabulator characters, they were replaced 2015-09-03 07:35:47 -04:00
assert.lsp The ECL code no longer uses tabulator characters, they were replaced 2015-09-03 07:35:47 -04:00
autoload.lsp The ECL code no longer uses tabulator characters, they were replaced 2015-09-03 07:35:47 -04:00
cdr-5.lsp cosmetic: fix header 2016-11-05 19:12:23 +01:00
cmdline.lsp cleanup: remove hierarchical packages interface 2017-05-13 18:06:26 +02:00
cmpinit.lsp The ECL code no longer uses tabulator characters, they were replaced 2015-09-03 07:35:47 -04:00
cmuutil.lsp cmuutil: improve file and export macros 2016-11-19 16:02:31 +01:00
config.lsp.in Add `uname' exception for mingw 2016-11-14 16:17:58 +01:00
defmacro.lsp The ECL code no longer uses tabulator characters, they were replaced 2015-09-03 07:35:47 -04:00
defpackage.lsp declare local function local 2017-05-01 15:48:54 +02:00
defstruct.lsp defstruct: be more ansi conformant with :predicate 2017-05-30 19:31:55 +02:00
defsys.lsp.in loop: rename symbolics LOOP loop2.lsp to loop.lsp 2016-03-11 16:06:45 +01:00
describe.lsp The ECL code no longer uses tabulator characters, they were replaced 2015-09-03 07:35:47 -04:00
evalmacros.lsp loop: rename symbolics LOOP loop2.lsp to loop.lsp 2016-03-11 16:06:45 +01:00
export.lsp dolist: wrap body in tagbody explicitly 2017-01-20 11:27:20 +01:00
ffi.lsp dffi: make :default default convention, not :cdecl 2016-08-19 12:36:08 +02:00
format.lsp format: scale-exponent: fix denormalized long-float 2017-05-25 08:03:32 +02:00
helpfile.lsp cosmetic: line wraps 2016-01-04 12:09:05 +01:00
init.lsp The ECL code no longer uses tabulator characters, they were replaced 2015-09-03 07:35:47 -04:00
iolib.lsp Add zero-padding to the time printed out by DRIBBLE 2017-01-29 21:04:34 -06:00
listlib.lsp The ECL code no longer uses tabulator characters, they were replaced 2015-09-03 07:35:47 -04:00
load.lsp.in loop: rename symbolics LOOP loop2.lsp to loop.lsp 2016-03-11 16:06:45 +01:00
loop.lsp loop: rename symbolics LOOP loop2.lsp to loop.lsp 2016-03-11 16:06:45 +01:00
mislib.lsp The ECL code no longer uses tabulator characters, they were replaced 2015-09-03 07:35:47 -04:00
module.lsp The ECL code no longer uses tabulator characters, they were replaced 2015-09-03 07:35:47 -04:00
mp.lsp cosmetic fix (indent) 2017-05-02 18:19:55 +02:00
numlib.lsp ieee-fp: remove si_infinity 2016-11-18 13:48:22 +01:00
packlib.lsp cleanup: remove hierarchical packages interface 2017-05-13 18:06:26 +02:00
pprint.lsp pprint-tabular: declare type of tabsize 2016-12-06 15:16:10 +01:00
predlib.lsp typep: handle * type 2016-05-25 08:47:55 +02:00
process.lsp environ: accept empty list as nil environment 2017-09-05 20:17:39 +02:00
proclaim.lsp The ECL code no longer uses tabulator characters, they were replaced 2015-09-03 07:35:47 -04:00
seq.lsp seq: remove bogus check-type's 2017-08-16 22:10:13 +02:00
seqlib.lsp cosmetic: add c-local declarations 2016-07-28 18:21:20 +02:00
seqmacros.lsp The ECL code no longer uses tabulator characters, they were replaced 2015-09-03 07:35:47 -04:00
setf.lsp Fix INCF on a THE variable. 2017-09-08 11:57:07 +02:00
top.lsp debugger: be more error-prone in debugger 2017-03-19 21:27:50 +01:00
trace.lsp Correct the abbreviation for :print in stepper help output 2017-03-12 19:41:16 -05:00
unicode.lsp The ECL code no longer uses tabulator characters, they were replaced 2015-09-03 07:35:47 -04:00