diff --git a/src/CHANGELOG b/src/CHANGELOG index ab726ef7b..72a537f37 100644 --- a/src/CHANGELOG +++ b/src/CHANGELOG @@ -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 diff --git a/src/c/compiler.d b/src/c/compiler.d index 0f66a5681..edf6674cb 100644 --- a/src/c/compiler.d +++ b/src/c/compiler.d @@ -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; diff --git a/src/cmp/cmpcall.lsp b/src/cmp/cmpcall.lsp index 6f78722c7..79dbc5a1b 100644 --- a/src/cmp/cmpcall.lsp +++ b/src/cmp/cmpcall.lsp @@ -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)) diff --git a/src/lsp/config.lsp.in b/src/lsp/config.lsp.in index 948252433..78e560996 100644 --- a/src/lsp/config.lsp.in +++ b/src/lsp/config.lsp.in @@ -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: () diff --git a/src/lsp/evalmacros.lsp b/src/lsp/evalmacros.lsp index d043f1e8c..bf7aaee2c 100644 --- a/src/lsp/evalmacros.lsp +++ b/src/lsp/evalmacros.lsp @@ -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)