[movitz-cvs] CVS update: movitz/special-operators.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Tue Jan 4 11:35:55 UTC 2005


Update of /project/movitz/cvsroot/movitz
In directory common-lisp.net:/tmp/cvs-serv18604

Modified Files:
	special-operators.lisp 
Log Message:
Added support for stack-allocated cons cells.

Date: Tue Jan  4 12:35:52 2005
Author: ffjeld

Index: movitz/special-operators.lisp
diff -u movitz/special-operators.lisp:1.46 movitz/special-operators.lisp:1.47
--- movitz/special-operators.lisp:1.46	Mon Jan  3 12:55:36 2005
+++ movitz/special-operators.lisp	Tue Jan  4 12:35:48 2005
@@ -8,7 +8,7 @@
 ;;;; Author:        Frode Vatvedt Fjeld <frodef at acm.org>
 ;;;; Created at:    Fri Nov 24 16:22:59 2000
 ;;;;                
-;;;; $Id: special-operators.lisp,v 1.46 2005/01/03 11:55:36 ffjeld Exp $
+;;;; $Id: special-operators.lisp,v 1.47 2005/01/04 11:35:48 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -1370,3 +1370,23 @@
 	:env allocation-env))))
 						       
   
+(define-special-operator muerte::compiled-cons
+    (&all all &form form &env env &funobj funobj)
+  (destructuring-bind (car cdr)
+      (cdr form)
+    (let ((dynamic-extent-scope (find-dynamic-extent-scope env)))
+      (cond
+       (dynamic-extent-scope
+	(compiler-values ()
+	  :returns :eax
+	  :functional-p t
+	  :type 'cons
+	  :code (append (make-compiled-two-forms-into-registers car :eax cdr :ebx funobj env)
+			`((:stack-cons ,(make-instance 'movitz-cons)
+				       ,dynamic-extent-scope)))))
+       (t (compiler-values ()
+	    :returns :eax
+	    :functional-p t
+	    :type 'cons
+	    :code (append (make-compiled-two-forms-into-registers car :eax cdr :ebx funobj env)
+			  `((:globally (:call (:edi (:edi-offset fast-cons))))))))))))




More information about the Movitz-cvs mailing list