projects
/
jscl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
763395d
)
Remove `null-or-empty-p'
author
David Vázquez
<davazp@gmail.com>
Fri, 21 Jun 2013 02:55:24 +0000
(
04:55
+0200)
committer
David Vázquez
<davazp@gmail.com>
Fri, 21 Jun 2013 02:55:24 +0000
(
04:55
+0200)
src/compiler.lisp
patch
|
blob
|
history
diff --git
a/src/compiler.lisp
b/src/compiler.lisp
index
9ebbbf3
..
64f87be
100644
(file)
--- a/
src/compiler.lisp
+++ b/
src/compiler.lisp
@@
-117,11
+117,8
@@
(defun toplevel-compilation (string)
(push string *toplevel-compilations*))
(defun toplevel-compilation (string)
(push string *toplevel-compilations*))
-(defun null-or-empty-p (x)
- (zerop (length x)))
-
(defun get-toplevel-compilations ()
(defun get-toplevel-compilations ()
- (reverse (remove-if #'null-or-empty-p *toplevel-compilations*)))
+ (reverse *toplevel-compilations*))
(defun %compile-defmacro (name lambda)
(toplevel-compilation (ls-compile `',name))
(defun %compile-defmacro (name lambda)
(toplevel-compilation (ls-compile `',name))
@@
-622,7
+619,7
@@
(if *compiling-file*
(progn
(eval (cons 'progn body))
(if *compiling-file*
(progn
(eval (cons 'progn body))
- nil)
+ (ls-compile 0))
(ls-compile `(progn ,@body))))
(defmacro define-transformation (name args form)
(ls-compile `(progn ,@body))))
(defmacro define-transformation (name args form)
@@
-634,10
+631,9
@@
(ls-compile (car body) *multiple-value-p*)
(code "("
(join
(ls-compile (car body) *multiple-value-p*)
(code "("
(join
- (remove-if #'null-or-empty-p
- (append
- (mapcar #'ls-compile (butlast body))
- (list (ls-compile (car (last body)) t))))
+ (append
+ (mapcar #'ls-compile (butlast body))
+ (list (ls-compile (car (last body)) t)))
",")
")")))
",")
")")))
@@
-1424,7
+1420,7
@@
(code (ls-compile-block (butlast sexps) nil decls-allowed-p)
"return " (ls-compile (car (last sexps)) *multiple-value-p*) ";")
(join-trailing
(code (ls-compile-block (butlast sexps) nil decls-allowed-p)
"return " (ls-compile (car (last sexps)) *multiple-value-p*) ";")
(join-trailing
- (remove-if #'null-or-empty-p (mapcar #'ls-compile sexps))
+ (mapcar #'ls-compile sexps)
(concat ";" *newline*)))))
(defun ls-compile (sexp &optional multiple-value-p)
(concat ";" *newline*)))))
(defun ls-compile (sexp &optional multiple-value-p)
@@
-1479,7
+1475,7
@@
(let ((subs (mapcar (lambda (s)
(ls-compile-toplevel s t))
(cdr sexp))))
(let ((subs (mapcar (lambda (s)
(ls-compile-toplevel s t))
(cdr sexp))))
- (join (remove-if #'null-or-empty-p subs))))
+ (join subs)))
(t
(when *compile-print-toplevels*
(let ((form-string (prin1-to-string sexp)))
(t
(when *compile-print-toplevels*
(let ((form-string (prin1-to-string sexp)))