Commit 8122eeb6 authored by Frode Vatvedt Fjeld's avatar Frode Vatvedt Fjeld
Browse files

Get loop working in run-time.

parent b0dc8ce1
Loading
Loading
Loading
Loading
+13 −13
Changes for losp/muerte/loop.lisp: 13 added lines, 13 removed lines.
Original line number Diff line number Diff line
@@ -66,17 +66,17 @@

(provide :muerte/loop :load-priority 1)

#+movitz
(progn
  (defmacro movitz-macroexpand (&rest args)
    `(macroexpand ,@args))
  (defmacro movitz-macroexpand-1 (&rest args)
    `(macroexpand-1 ,@args))
  (eval-when (:compile-toplevel)
    (defmacro movitz-macroexpand (&rest args)
      `(movitz::movitz-macroexpand ,@args))
    (defmacro movitz-macroexpand-1 (&rest args)
      `(movitz::movitz-macroexpand-1 ,@args))))
;; #+movitz
;; (progn
;;   (defmacro movitz-macroexpand (&rest args)
;;     `(macroexpand ,@args))
;;   (defmacro movitz-macroexpand-1 (&rest args)
;;     `(macroexpand-1 ,@args))
;;   (eval-when (:compile-toplevel)
;;     (defmacro movitz-macroexpand (&rest args)
;;       `(movitz::movitz-macroexpand ,@args))
;;     (defmacro movitz-macroexpand-1 (&rest args)
;;       `(movitz::movitz-macroexpand-1 ,@args))))

;;;This is the "current" loop context in use when we are expanding a
;;;loop.  It gets bound on each invocation of LOOP.
@@ -271,7 +271,7 @@
			       (head-var tail-var &optional user-head-var) form)
  (declare
    #+LISPM (ignore head-var user-head-var))	;use locatives, unconditionally update through the tail.
  (setq form (movitz-macroexpand form env))
  (let ((form (movitz-macroexpand form env)))
    (flet ((cdr-wrap (form n)
	     (declare (fixnum n))
	     (do () ((<= n 4) (setq form `(,(case n
@@ -312,7 +312,7 @@
	  ;; unconditionally, and probably faster than checking.
	  #-LISPM (when user-head-var
		    (setq answer `(progn ,answer (setq ,user-head-var (cdr ,head-var)))))
	answer))))
	  answer)))))


(defmacro loop-collect-answer (head-var &optional user-head-var)