LOAD-TIME-VALUE is no longer a macro

This commit is contained in:
jgarcia 2008-04-24 11:15:34 +00:00
parent 7e8f73c990
commit 504fe5df73
5 changed files with 16 additions and 6 deletions

View file

@ -138,6 +138,10 @@ ECL 0.9k:
- Bytecode functions can now be externalized in C compiled files.
- (FUNCALL (LOAD-TIME-VALUE ...) ...) forced the evaluation of the argument to
LOAD-TIME-VALUE. LOAD-TIME-VALUE is now implemented as a special operator
and not as a macro.
* System design:
- We introduce a new kind of lisp objects, the stack frames. These are objects

View file

@ -84,6 +84,7 @@ static int c_if(cl_object args, int flags);
static int c_labels(cl_object args, int flags);
static int c_let(cl_object args, int flags);
static int c_leta(cl_object args, int flags);
static int c_load_time_value(cl_object args, int flags);
static int c_locally(cl_object args, int flags);
static int c_macrolet(cl_object args, int flags);
static int c_multiple_value_bind(cl_object args, int flags);
@ -251,6 +252,7 @@ static compiler_record database[] = {
{@'let', c_let, 1},
{@'let*', c_leta, 1},
{@'locally', c_locally, 0},
{@'load-time-value', c_load_time_value, 1},
{@'macrolet', c_macrolet, 0},
{@'multiple-value-bind', c_multiple_value_bind, 1},
{@'multiple-value-call', c_multiple_value_call, 1},
@ -1339,6 +1341,14 @@ c_leta(cl_object args, int flags) {
return c_let_leta(OP_BIND, args, flags);
}
static int
c_load_time_value(cl_object args, int flags)
{
if (cl_rest(args) != Cnil)
FEprogram_error("LOAD-TIME-VALUE: Too many arguments.", 0);
return c_values(args, flags);
}
static int
c_locally(cl_object args, int flags) {
cl_object old_env = ENV->variables;

View file

@ -50,8 +50,7 @@
;; (FUNCALL macro-expression ...)
((let ((name (first fun)))
(setq fd (and (symbolp name)
(or (cmp-env-search-macro name)
(macro-function name)))))
(cmp-macro-function name))))
(c1funcall (list* (cmp-expand-macro fd fun) arguments)))
;; (FUNCALL lisp-expression ...)
((not (eq (first fun) 'FUNCTION))

View file

@ -46,7 +46,7 @@ Returns, as a string, the location of the machine on which ECL runs."
(defun lisp-implementation-version ()
"Args:()
Returns the version of your ECL as a string."
"@PACKAGE_VERSION@ (CVS 2008-04-24 09:43)")
"@PACKAGE_VERSION@ (CVS 2008-04-24 12:45)")
(defun machine-type ()
"Args: ()

View file

@ -332,9 +332,6 @@ SECOND-FORM."
(defmacro nth-value (n expr)
`(nth ,n (multiple-value-list ,expr)))
(defmacro load-time-value (form &optional read-only-p)
`(quote ,(eval form)))
(defun maybe-unquote (form)
(if (and (consp form) (eq (car form) 'quote))
(second form)