[movitz-cvs] CVS movitz/losp/muerte

ffjeld ffjeld at common-lisp.net
Mon Feb 19 20:24:52 UTC 2007


Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory clnet:/tmp/cvs-serv30606

Modified Files:
	basic-functions.lisp 
Log Message:
First implementation of new &key-parsing strategy.


--- /project/movitz/cvsroot/movitz/losp/muerte/basic-functions.lisp	2006/03/21 20:20:20	1.21
+++ /project/movitz/cvsroot/movitz/losp/muerte/basic-functions.lisp	2007/02/19 20:24:51	1.22
@@ -10,7 +10,7 @@
 ;;;; Author:        Frode Vatvedt Fjeld <frodef at acm.org>
 ;;;; Created at:    Tue Sep  4 18:41:57 2001
 ;;;;                
-;;;; $Id: basic-functions.lisp,v 1.21 2006/03/21 20:20:20 ffjeld Exp $
+;;;; $Id: basic-functions.lisp,v 1.22 2007/02/19 20:24:51 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -432,4 +432,36 @@
 	    (setf (memref object offset :index i :type :character)
 	      (char value j))))))))
   value)
-     
+
+
+
+(define-primitive-function blah ()
+  "foo"
+  (with-inline-assembly (:returns :multiple-values)
+    ;; EAX: (presumed) keyword
+    (:globally (:cmpl :eax (:edi (:edi-offset allow-other-keys-symbol))))
+    (:je '(:sub-program (found-allow-other-keys)
+	   				; XXX
+	   (:ret)))
+    (:leal (:ebx -7) :ecx)
+    (:testb 7 :cl)
+    (:jnz '(:sub-program ()
+	    (:xorl :ecx :ecx)		; hash of nil is 0
+	    (:cmpl :edi :ebx)
+	    (:je 'proceed-with-nil-key)
+	    (:movl :ebx :eax)
+	    (:movb 0 :cl)
+	    (:int 72)))
+    (:xorl :ecx :ecx)
+    (:movw (:eax (:offset movitz-symbol hash-key)) :cx)
+   proceed-with-nil-key
+    ;; We now have symbol's basic sxhash in CX.
+    (:xorl :edx :edx)
+    (:leal ((:ecx 4) :edx) :edx)
+    (:andl (:esi (:offset movitz-funobj constant0))
+	   :edx)
+    
+    (:ret)
+    
+    ))
+




More information about the Movitz-cvs mailing list