diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 10 | ||||
-rw-r--r-- | src/interp/lisp-backend.boot | 6 | ||||
-rw-r--r-- | src/interp/vmlisp.lisp | 43 |
3 files changed, 10 insertions, 49 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f480c063..12788ace 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,15 @@ 2012-05-03 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/vmlisp.lisp ($lamName): Remove. + (LAM): Likewise. + (*LAM): Likewise. + (ISQUOTEDP): Likewise. + (QUOTESOF): Likewise. + (DDQUOTE): Likewise. + * interp/lisp-backend.boot (COMPILE1): Simplify. + +2012-05-03 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/c-util.boot: Use LAMBDA type in lieu of LAM. * interp/clam.boot: Likewise. * interp/define.boot: Likewise. diff --git a/src/interp/lisp-backend.boot b/src/interp/lisp-backend.boot index c19da522..e0d5a80e 100644 --- a/src/interp/lisp-backend.boot +++ b/src/interp/lisp-backend.boot @@ -787,12 +787,6 @@ COMPILE1 fun == $Decls: local := nil [name,lambda] := fun [type,args,:body] := lambda - if type is 'LAM then - lambda := f(name,lambda) where - f(n,x) == - $lamName: local := makeSymbol strconc(n,'",LAM") - EVAL x - [type,args,:body] := lambda if body is [['DECLARE,['SPECIAL,:xs]],:body'] then $Decls := xs body := body' diff --git a/src/interp/vmlisp.lisp b/src/interp/vmlisp.lisp index 16c4266a..84440e81 100644 --- a/src/interp/vmlisp.lisp +++ b/src/interp/vmlisp.lisp @@ -57,8 +57,6 @@ (defvar *fileactq-apply* nil "function to apply in fileactq") -(defvar |$lamName| nil "name to be used by lam macro if non-nil") - (defvar macerrorcount 0 "Put some documentation in here someday") (defvar *read-place-holder* (make-symbol "%.EOF") @@ -151,9 +149,6 @@ `(let ((,xx ,x)) (and (consp ,xx) (qcdr ,xx)))))) -(defmacro lam (&rest body) - (list 'quote (*lam (copy-tree body)))) - (defmacro maxindex (x) `(the fixnum (1- (the fixnum (length ,x))))) @@ -276,26 +271,8 @@ (declare (special ext::*gc-runtime* ext::*gc-walltime*)) (list ext::*gc-runtime* ext::*gc-walltime*)) -; 7.0 Macros - -; 7.2 Creating Macro Expressions - -; 5.2 Functions - ; 5.2.2 Lambda Expressions -(defun *LAM (body) - (cond ((NOT (ISQUOTEDP (first BODY))) (cons 'LAMBDA BODY)) - ((LET* ((BV (DEQUOTE (first BODY))) - (CONTROL (QUOTESOF (first BODY))) - (BODY (cdr BODY)) - (ARGS (GENSYM)) - (INNER-FUNC (or |$lamName| (gentemp)))) - (COMP370 (LIST INNER-FUNC `(LAMBDA ,BV . ,BODY))) - `(MLAMBDA ,ARGS - (CONS (QUOTE ,INNER-FUNC) - (WRAP (cdr ,ARGS) ',CONTROL))))))) - (defun WRAP (LIST-OF-ITEMS WRAPPER) (prog nil (COND ((OR (NOT (CONSP LIST-OF-ITEMS)) (not WRAPPER)) @@ -308,26 +285,6 @@ (first LIST-OF-ITEMS)) (WRAP (cdr LIST-OF-ITEMS) (cdr WRAPPER)))))) -(defun ISQUOTEDP (bv) - (COND ((NOT (consp BV)) NIL) - ((EQ (first BV) 'QUOTE)) - ((AND (consp (first BV)) (EQ (QCAAR BV) 'QUOTE))) - ((ISQUOTEDP (cdr BV))))) - -(defun QUOTESOF (BV) - (COND ((NOT (consp BV)) NIL) - ((EQ (first BV) 'QUOTE) 'QUOTE) - ((CONS (COND ((NOT (consp (first BV))) nil) - ((EQ (QCAAR BV) 'QUOTE) 'QUOTE) - (T NIL)) - (QUOTESOF (cdr BV)))))) - -(defun DEQUOTE (BV) - (COND ((NOT (consp BV)) BV) - ((EQ 'QUOTE (first BV)) (second BV)) - ((CONS (if (EQ 'QUOTE (IFCAR (CAR BV))) (CADAR BV) (first BV)) - (DEQUOTE (cdr BV)))))) - (defun lotsof (&rest items) (setq items (|copyList| items)) (|append!| items items)) |