[movitz-cvs] CVS update: movitz/losp/muerte/primitive-functions.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Thu Nov 11 10:48:28 UTC 2004


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

Modified Files:
	primitive-functions.lisp 
Log Message:
More about dynamic binding protocol: also call
dynamic-variable-install at binding time.

Date: Thu Nov 11 11:48:27 2004
Author: ffjeld

Index: movitz/losp/muerte/primitive-functions.lisp
diff -u movitz/losp/muerte/primitive-functions.lisp:1.48 movitz/losp/muerte/primitive-functions.lisp:1.49
--- movitz/losp/muerte/primitive-functions.lisp:1.48	Wed Nov 10 18:34:51 2004
+++ movitz/losp/muerte/primitive-functions.lisp	Thu Nov 11 11:48:27 2004
@@ -10,7 +10,7 @@
 ;;;; Author:        Frode Vatvedt Fjeld <frodef at acm.org>
 ;;;; Created at:    Tue Oct  2 21:02:18 2001
 ;;;;                
-;;;; $Id: primitive-functions.lisp,v 1.48 2004/11/10 17:34:51 ffjeld Exp $
+;;;; $Id: primitive-functions.lisp,v 1.49 2004/11/11 10:48:27 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -147,7 +147,8 @@
     (:ret)))
 
 (define-primitive-function dynamic-variable-install ()
-  ""
+  "Install each dynamic binding entry between that in ESP and current dynamic-env.
+Preserve EDX."
   (with-inline-assembly (:returns :nothing)
     (:ret)))
 
@@ -169,10 +170,6 @@
 When the tag is not found, no cleanup-forms are executed, and carry is cleared upon return,
 with EAX still holding the tag."
   (with-inline-assembly (:returns :multiple-values)
-;;;    (:pushl :ebp)
-;;;    (:movl :esp :ebp)			; set up a pseudo stack-frame
-;;;    (:pushl :edi)
-    
     (:globally (:movl (:edi (:edi-offset unwind-protect-tag)) :edx))
     (:locally (:movl (:edi (:edi-offset dynamic-env)) :ecx))
 
@@ -188,52 +185,18 @@
     (:jz 'success)
 
    mismatch
-;;;    (:cmpl :edx (:ecx 4))		; is env-slot in ECX == unwind-protect?
-;;;    (:jne 'not-unwind-protect)
-;;;    (:pushl :ecx)			; ..then save env-slot (in pseudo stack-frame)
 
    not-unwind-protect
     (:movl (:ecx 12) :ecx)		; get parent
     (:jmp 'search-loop)
     
    success
-
-;;;    (:pushl 0)				; mark, meaning next slot is ``the'' target slot.
-;;;    (:pushl :ecx)			; save the found env-slot
-;;;
-;;;    ;; Now execute any unwind-protect cleanup-forms we encountered.
-;;;    ;; We are still inside the pseudo stack-frame.
-;;;    (:leal (:ebp -8) :edx)		; EDX points to the current dynamic-slot-slot
-;;;
-;;;   unwind-loop
-;;;    (:movl (:edx) :eax)			; next dynamic-slot to unwind
-;;;    (:testl :eax :eax)			; is this the last entry?
-;;;    (:jz 'unwind-done)
-;;;    (:pushl :ebp)			; save EBP
-;;;    (:pushl :edx)			; and EDX
-;;;    (:movl (:eax 12) :ebx)		; unwind dynamic-env..
-;;;    (:locally (:movl :ebx (:edi (:edi-offset dynamic-env))))
-;;;    (:movl (:eax 0) :ebp)		; install clean-up's stack-frame (but keep our ESP)
-;;;    (:movl (:ebp -4) :esi)		; ..and install clean-up's funobj in ESI
-;;;    (:movl (:eax 8) :edx)
-;;;    (:call (:esi :edx (:offset movitz-funobj constant0)))
-;;;    (:popl :edx)			; restoure our EDX
-;;;    (:popl :ebp)			; restore our EBP
-;;;    (:subl 4 :edx)			; ..slide EDX to next position inside stack-frame.
-;;;    (:jmp 'unwind-loop)
-;;;
-;;;   unwind-done
-;;;    (:movl (:edx -4) :eax)		; the final dyamic-slot target.
-;;;    (:leave)				; exit pseudo stack-frame
-;;;    (:movl (:ebp -4) :esi)
     (:movl :ecx :eax)
     (:stc)				; signal success
     (:ret)				; return
     
    search-failed
     (:clc)				; signal failure
-;;;    (:leave)				; exit pseudo stack-frame
-;;;    (:movl (:ebp -4) :esi)
     (:ret)))				; return.
     
 (define-primitive-function dynamic-unwind ()





More information about the Movitz-cvs mailing list