cmp: Allow for compile time evaluation of inlined forms

The following statement:
    (eval-when (:compile-toplevel :load-toplevel :execute)
      (print "test"))
    resulted in an error, since the compiler would expand the print
    statement in a FFI:C-INLINE form, which can't be evaluated at
    compile time.
This commit is contained in:
Marius Gerbershagen 2018-04-21 15:30:59 +02:00
parent 825c8d2b2e
commit b00e62f9d3

View file

@ -308,8 +308,9 @@
(cond ((not *compile-toplevel*)
(c1progn (and execute-flag (rest args))))
(load-flag
(let ((*compile-time-too* compile-flag))
(c1progn (rest args))))
(if compile-flag
(cmp-eval (cons 'PROGN (rest args))))
(c1progn (rest args)))
(compile-flag
(cmp-eval (cons 'PROGN (rest args)))
(c1progn 'NIL))